Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Papa Tamsir Kane
erp5
Commits
97889676
Commit
97889676
authored
Aug 04, 2017
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_afs_directory: fetch lines of code form openhub, handle loading failures
parent
56f24826
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
68 deletions
+68
-68
bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_converter_storage_js.js
...m/web_page_module/gadget_erp5_afs_converter_storage_js.js
+6
-6
bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_converter_storage_js.xml
.../web_page_module/gadget_erp5_afs_converter_storage_js.xml
+2
-2
bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.js
...age_module/gadget_erp5_page_afs_publisher_statistic_js.js
+53
-53
bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.xml
...ge_module/gadget_erp5_page_afs_publisher_statistic_js.xml
+3
-3
bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs.xml
...js_afs_directory/PathTemplateItem/web_site_module/afs.xml
+4
-4
No files found.
bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_converter_storage_js.js
View file @
97889676
...
...
@@ -108,6 +108,9 @@
var
response
=
data
.
target
.
response
||
data
.
target
.
responseText
;
return
PARSER
.
parseFromString
(
response
,
"
text/xml
"
)
.
getElementsByTagName
(
"
total_code_lines
"
)[
0
].
childNodes
[
0
].
nodeValue
;
})
.
push
(
undefined
,
function
()
{
return
"
0
"
;
});
}
...
...
@@ -138,14 +141,14 @@
}
function
retrieveTotalLinesFromPublisher
(
publisher
)
{
/*
var
unique_software_list
=
[];
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
(
publisher
.
free_software_list
.
map
(
function
(
software
)
{
var
profile_url
;
if
(
isValidProfileUrl
(
software
.
source_code_profile
))
{
profile_url = postFixProfileUrl(software.source_code_profile);
profile_url
=
software
.
source_code_profile
=
postFixProfileUrl
(
software
.
source_code_profile
);
if
(
unique_software_list
.
indexOf
(
profile_url
)
===
-
1
)
{
unique_software_list
.
push
(
profile_url
);
return
retrieveOpenHubAnalysisTotalLines
(
software
);
...
...
@@ -156,8 +159,6 @@
.
push
(
function
(
line_list
)
{
return
totalLines
(
line_list
);
});
*/
return
0
;
}
function
retrieveSuccessCaseFromSoftware
(
publisher
,
path_list
)
{
...
...
@@ -223,7 +224,7 @@
})
.
push
(
function
(
result_list
)
{
var
response
;
publisher
=
result_list
[
0
];
publisher
.
portal_type
=
"
publisher
"
;
publisher
.
uid
=
garble
(
publisher
.
title
);
...
...
@@ -239,7 +240,6 @@
return
response
;
})
.
push
(
null
,
function
(
error
)
{
console
.
log
(
error
);
throw
error
;
});
}
...
...
bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_afs_converter_storage_js.xml
View file @
97889676
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.1
0719.32474.19694
</string>
</value>
<value>
<string>
961.1
1807.49120.23261
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
1501
772147.39
</float>
<float>
1501
837447.71
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.js
View file @
97889676
...
...
@@ -3,23 +3,32 @@
(
function
(
window
,
RSVP
,
rJS
)
{
"
use strict
"
;
var
SORT_STRING
=
'
field_listbox_sort_list:json
'
;
/////////////////////////////////////////////////////////////////
// some parameters
/////////////////////////////////////////////////////////////////
var
STR
=
""
,
QUERY
=
'
urn:jio:allDocs?query=
'
+
'
portal_type:"publisher"
'
,
SORT
=
'
field_listbox_sort_list:json
'
,
COLUMN_LIST
=
[
[
'
title
'
,
'
Title
'
],
[
'
country
'
,
'
Country
'
],
[
'
total_lines
'
,
'
Total Lines of Code
'
]
],
SORT_LIST
=
[
[
'
total_lines
'
,
'
Total Lines of Code
'
]
];
rJS
(
window
)
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
});
})
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
/////////////////////////////////////////////////////////////////
// acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
/////////////////////////////////////////////////////////////////
// published methods
/////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
'
updateHeader
'
,
function
()
{
return
;
})
...
...
@@ -27,60 +36,50 @@
.
allowPublicAcquisition
(
'
getUrlParameter
'
,
function
(
argument_list
)
{
return
this
.
getUrlParameter
(
argument_list
)
.
push
(
function
(
result
)
{
if
((
result
===
undefined
)
&&
(
argument_list
[
0
]
===
SORT
_STRING
))
{
return
[[
'
lines
'
,
'
de
scending
'
]];
if
((
result
===
undefined
)
&&
(
argument_list
[
0
]
===
SORT
))
{
return
[[
'
title
'
,
'
a
scending
'
]];
}
return
result
;
});
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
updateHeader
({
page_title
:
"
Statistics
"
});
return
RSVP
.
all
([
gadget
.
updateHeader
({
page_title
:
"
Statistics
"
}),
gadget
.
getDeclaredGadget
(
"
form_list
"
)
]);
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
form_list
"
);
})
.
push
(
function
(
form_gadget
)
{
var
column_list
=
[
[
'
title
'
,
'
Title
'
],
[
'
country
'
,
'
Country
'
],
[
'
lines
'
,
'
Total Lines of Code
'
]
],
sort_column_list
=
[
[
'
lines
'
,
'
Total Lines of Code
'
]
];
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
listbox
"
:
{
"
column_list
"
:
column_list
,
"
show_anchor
"
:
0
,
"
default_params
"
:
{},
"
editable
"
:
0
,
"
key
"
:
"
field_listbox
"
,
"
lines
"
:
20
,
"
list_method
"
:
"
portal_catalog
"
,
"
query
"
:
'
urn:jio:allDocs?query=
'
+
'
portal_type:"publisher"
'
,
"
portal_type
"
:
[],
"
search_column_list
"
:
column_list
,
"
sort_column_list
"
:
sort_column_list
,
"
sort_on
"
:
[
"
lines
"
,
"
descending
"
],
"
title
"
:
"
Documents
"
,
"
type
"
:
"
ListBox
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
.
push
(
function
(
result_list
)
{
return
result_list
[
1
].
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
"
listbox
"
:
{
"
column_list
"
:
COLUMN_LIST
,
"
show_anchor
"
:
0
,
"
default_params
"
:
{},
"
editable
"
:
0
,
"
key
"
:
"
field_listbox
"
,
"
lines
"
:
20
,
"
list_method
"
:
"
portal_catalog
"
,
"
query
"
:
QUERY
,
"
portal_type
"
:
[],
"
search_column_list
"
:
COLUMN_LIST
,
"
sort_column_list
"
:
SORT_LIST
,
"
sort_on
"
:
[
"
total_lines
"
,
"
descending
"
],
"
title
"
:
"
Documents
"
,
"
type
"
:
"
ListBox
"
}
}
}
},
"
_links
"
:
{
"
type
"
:
{
name
:
STR
}}
},
form_definition
:
{
group_list
:
[
[
"
bottom
"
,
[[
"
listbox
"
]]],
...
...
@@ -90,4 +89,5 @@
});
});
});
}(
window
,
RSVP
,
rJS
));
bt5/erp5_officejs_afs_directory/PathTemplateItem/web_page_module/gadget_erp5_page_afs_publisher_statistic_js.xml
View file @
97889676
...
...
@@ -214,7 +214,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
3
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -228,7 +228,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
59.45388.59712.6178
</string>
</value>
<value>
<string>
9
61.9243.54613.9181
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>
1
496074387.69
</float>
<float>
1
501837210.55
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_afs_directory/PathTemplateItem/web_site_module/afs.xml
View file @
97889676
...
...
@@ -337,7 +337,7 @@
</item>
<item>
<key>
<string>
configuration_content_security_policy
</string>
</key>
<value>
<string>
default-src \'self\'; img-src \'self\' https://images.unsplash.com * data:; media-src \'self\' blob:; connect-src \'self\' https://api.unsplash.com https://en.wikipedia.org https://fr.wikipedia.org https://raw.githubusercontent.com https://api.github.com data:; script-src \'self\' \'unsafe-eval\'; font-src \'self\'; style-src \'self\' data:; frame-src \'self\' data:
</string>
</value>
<value>
<string>
default-src \'self\'; img-src \'self\' https://images.unsplash.com * data:; media-src \'self\' blob:; connect-src \'self\' https://
softinst56769.host.vifib.net/ https://
api.unsplash.com https://en.wikipedia.org https://fr.wikipedia.org https://raw.githubusercontent.com https://api.github.com data:; script-src \'self\' \'unsafe-eval\'; font-src \'self\'; style-src \'self\' data:; frame-src \'self\' data:
</string>
</value>
</item>
<item>
<key>
<string>
configuration_default_view_action_reference
</string>
</key>
...
...
@@ -600,7 +600,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
3
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -614,7 +614,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
59.30886.17996.5358
</string>
</value>
<value>
<string>
9
61.9243.54613.9181
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -632,7 +632,7 @@
</tuple>
<state>
<tuple>
<float>
1
495226845.13
</float>
<float>
1
501835836.9
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment