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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
55efebea
Commit
55efebea
authored
Mar 25, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core/web_renderjs_ui: stop using handlebars
parent
e6454e94
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
456 additions
and
475 deletions
+456
-475
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/gadget_jslint.html.html
...em/portal_skins/erp5_web_renderjs/gadget_jslint.html.html
+0
-14
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/gadget_jslint.html.xml
...tem/portal_skins/erp5_web_renderjs/gadget_jslint.html.xml
+1
-1
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/gadget_jslint.js.js
...teItem/portal_skins/erp5_web_renderjs/gadget_jslint.js.js
+33
-25
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/gadget_jslint.js.xml
...eItem/portal_skins/erp5_web_renderjs/gadget_jslint.js.xml
+1
-1
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/jslint.js.xml
...TemplateItem/portal_skins/erp5_web_renderjs/jslint.js.xml
+1
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_html.html
...em/web_page_module/gadget_erp5_page_router_test_html.html
+2
-12
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_html.xml
...tem/web_page_module/gadget_erp5_page_router_test_html.xml
+163
-151
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_js.js
...teItem/web_page_module/gadget_erp5_page_router_test_js.js
+19
-20
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_js.xml
...eItem/web_page_module/gadget_erp5_page_router_test_js.xml
+163
-151
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.html.html
.../portal_skins/erp5_core/gadget_activity_watcher.html.html
+9
-78
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.html.xml
...m/portal_skins/erp5_core/gadget_activity_watcher.html.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.js.js
...Item/portal_skins/erp5_core/gadget_activity_watcher.js.js
+62
-19
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.js.xml
...tem/portal_skins/erp5_core/gadget_activity_watcher.js.xml
+1
-1
No files found.
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/gadget_jslint.html.html
View file @
55efebea
...
...
@@ -3,22 +3,8 @@
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<script
src=
"handlebars.js"
type=
"text/javascript"
></script>
<script
src=
"jslint.js"
type=
"text/javascript"
></script>
<script
id=
"jslint_template"
type=
"text/x-handlebars-template"
>
{{
#
each
error_list
}}
{{
#
if
this
}}
<
tr
class
=
"
Data{{this.line_letter}}
"
>
<
td
class
=
"
listbox-table-data-cell
"
>
line
:
{{
this
.
line
}}:
{{
this
.
character
}}:
{{
this
.
evidence
}}
<
/td
>
<
td
class
=
"
listbox-table-data-cell
"
>
{{
this
.
reason
}}
<
/td
>
<
/tr
>
{{
/
if
}}
{{
else
}}
<
tr
class
=
"
DataA
"
><
td
>
No
error
!<
/td></
tr
>
{{
/
each
}}
</script>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_jslint.js"
type=
"text/javascript"
></script>
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/gadget_jslint.html.xml
View file @
55efebea
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<string>
http_cache
</string>
</value>
<value>
<string>
must_revalidate_
http_cache
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/gadget_jslint.js.js
View file @
55efebea
/*global window, rJS, JSLINT,
Handlebars
*/
/*global window, rJS, JSLINT,
document
*/
/*jslint nomen: true, maxlen:80, indent:2*/
(
function
(
rJS
,
Handlebars
,
JSLINT
,
window
)
{
(
function
(
rJS
,
JSLINT
,
window
,
document
)
{
"
use strict
"
;
var
gk
=
rJS
(
window
),
template_source
=
gk
.
__template_element
.
getElementById
(
'
jslint_template
'
)
.
innerHTML
,
template
=
Handlebars
.
compile
(
template_source
);
rJS
(
window
)
.
ready
(
function
(
g
)
{
g
.
props
=
{};
})
.
ready
(
function
(
g
)
{
return
g
.
getElement
().
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
});
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
text_content
=
options
.
value
,
data
,
...
...
@@ -25,21 +11,43 @@
i
,
line_letter
=
"
A
"
,
len
,
gadget
=
this
;
gadget
=
this
,
fragment
=
document
.
createDocumentFragment
(),
td_element
,
tr_element
;
JSLINT
(
text_content
,
{});
data
=
JSLINT
.
data
();
for
(
i
=
0
,
len
=
data
.
errors
.
length
;
i
<
len
;
i
+=
1
)
{
if
(
data
.
errors
[
i
]
!==
null
)
{
data
.
errors
[
i
].
line_letter
=
line_letter
;
line_letter
=
line_letter
===
"
A
"
?
"
B
"
:
"
A
"
;
tr_element
=
document
.
createElement
(
'
tr
'
);
tr_element
.
setAttribute
(
'
class
'
,
'
Data
'
+
line_letter
);
line_letter
=
(
line_letter
===
"
A
"
)
?
"
B
"
:
"
A
"
;
fragment
.
appendChild
(
tr_element
);
td_element
=
document
.
createElement
(
'
td
'
);
td_element
.
setAttribute
(
'
class
'
,
'
listbox-table-data-cell
'
);
td_element
.
textContent
=
"
line:
"
+
data
.
errors
[
i
].
line
+
"
:
"
+
data
.
errors
[
i
].
character
+
"
:
"
+
data
.
errors
[
i
].
evidence
;
tr_element
.
appendChild
(
td_element
);
td_element
=
document
.
createElement
(
'
td
'
);
td_element
.
setAttribute
(
'
class
'
,
'
listbox-table-data-cell
'
);
td_element
.
textContent
=
data
.
errors
[
i
].
reason
;
tr_element
.
appendChild
(
td_element
);
}
}
html_content
=
template
({
error_list
:
data
.
errors
});
if
(
len
===
0
)
{
tr_element
=
document
.
createElement
(
'
tr
'
);
tr_element
.
setAttribute
(
'
class
'
,
'
DataA
'
);
fragment
.
appendChild
(
tr_element
);
td_element
=
document
.
createElement
(
'
td
'
);
td_element
.
textContent
=
"
No error!
"
;
tr_element
.
appendChild
(
td_element
);
}
gadget
.
props
.
element
.
querySelector
(
"
tbody
"
)
.
innerHTML
=
html_content
;
gadget
.
element
.
querySelector
(
"
tbody
"
).
appendChild
(
fragment
);
});
}(
rJS
,
Handlebars
,
JSLINT
,
window
));
\ No newline at end of file
}(
rJS
,
JSLINT
,
window
,
document
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/gadget_jslint.js.xml
View file @
55efebea
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<string>
http_cache
</string>
</value>
<value>
<string>
must_revalidate_
http_cache
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/jslint.js.xml
View file @
55efebea
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<string>
http_cache
</string>
</value>
<value>
<string>
must_revalidate_
http_cache
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_html.html
View file @
55efebea
...
...
@@ -8,23 +8,13 @@
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"handlebars.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"domsugar.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_page_router_test.js"
type=
"text/javascript"
></script>
<script
id=
"result-list-template"
type=
"text/x-handlebars-template"
>
<
p
class
=
"
result-{{i}}
"
>
Test
{{
i
}}
:
<
a
href
=
"
{{link}}
"
>
Link
{{
i
}}
<
/a
>
<
/p
>
</script>
</head>
<body>
<h2>
Test router commands. Each line is the result of a test
</h2>
<div
class=
'result-block'
>
<p>
Test 1 :
<a
href=
"#"
>
Link 1
</a>
</p>
</div>
<div
class=
'result-block'
></div>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_html.xml
View file @
55efebea
...
...
@@ -152,11 +152,13 @@
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
...
...
@@ -200,16 +202,20 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
...
...
@@ -232,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
969.59260.8680.47291
</string>
</value>
<value>
<string>
982.50157.25397.11963
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -250,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
1535547522.49
</float>
<float>
1585158666.42
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
@@ -259,16 +265,20 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
...
...
@@ -316,7 +326,9 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_js.js
View file @
55efebea
/*global window, rJS,
RSVP, Handlebars
*/
/*global window, rJS,
domsugar
*/
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
Handlebars
)
{
(
function
(
window
,
rJS
,
domsugar
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
),
template_element
=
gadget_klass
.
__template_element
,
result_list_template
=
Handlebars
.
compile
(
template_element
.
getElementById
(
"
result-list-template
"
)
.
innerHTML
);
gadget_klass
rJS
(
window
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
gadget
=
this
,
result_inner_html
=
""
;
.
declareMethod
(
'
render
'
,
function
()
{
var
gadget
=
this
;
return
gadget
.
getUrlFor
({
command
:
'
display_erp5_action
'
,
options
:
{
jio_key
:
"
foo_module
"
,
page
:
"
empty_mass_action
"
}})
return
gadget
.
getUrlFor
({
command
:
'
display_erp5_action
'
,
options
:
{
jio_key
:
"
foo_module
"
,
page
:
"
empty_mass_action
"
}
})
.
push
(
function
(
link
)
{
gadget
.
element
.
querySelector
(
"
.result-block
"
).
innerHTML
=
result_list_template
({
"
i
"
:
0
,
"
link
"
:
link
});
domsugar
(
gadget
.
element
.
querySelector
(
"
.result-block
"
),
[
domsugar
(
'
p
'
,
{
class
:
'
result-0
'
},
[
"
Test 0
"
,
domsugar
(
'
a
'
,
{
href
:
link
,
text
:
"
Link 0
"
})
])
]
);
});
});
}(
window
,
rJS
,
RSVP
,
Handlebars
));
\ No newline at end of file
}(
window
,
rJS
,
domsugar
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/web_page_module/gadget_erp5_page_router_test_js.xml
View file @
55efebea
...
...
@@ -148,11 +148,13 @@
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
...
...
@@ -196,16 +198,20 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
...
...
@@ -228,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
969.59410.62276.10888
</string>
</value>
<value>
<string>
982.50160.27419.21026
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -246,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1535547597.4
</float>
<float>
1585158747.98
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
@@ -255,16 +261,20 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
patches.WorkflowTool
"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.
Workflow
"
/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
...
...
@@ -312,7 +322,9 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.html.html
View file @
55efebea
...
...
@@ -4,83 +4,14 @@
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width,height=device-height,initial-scale=1"
/>
<title>
Activity watcher gadget
</title>
<script
src=
"handlebars.js"
type=
"text/javascript"
></script>
<script
id=
"getData"
type=
"text/x-handlebars-template"
>
Date
:
{{
time
}}
<
table
>
<
thead
>
<
tr
>
<
th
>
Type
<
/th
>
<
th
>
Count
<
/th
>
<
th
>
Method
Id
<
/th
>
<
th
>
Processing
Node
<
/th
>
<
th
>
Min
pri
<
/th
>
<
th
>
Max
pri
<
/th
>
<
/tr
>
<
/thead><tbody
>
{{
#
each
messageList1
}}
<
tr
>
<
td
>
{{
this
.
messagetype
}}
<
/td
>
<
td
>
{{
this
.
count
}}
<
/td
>
<
td
>
{{
this
.
method_id
}}
<
/td
>
<
td
>
{{
this
.
node
}}
<
/td
>
<
td
>
{{
this
.
min_pri
}}
<
/td
>
<
td
>
{{
this
.
max_pri
}}
<
/td
>
<
/tr>
{{
/
each
}}
{{
#
each
messageList2
}}
<
tr
>
<
td
>
{{
this
.
messagetype
}}
<
/td
>
<
td
>
{{
this
.
count
}}
<
/td
>
<
td
>
{{
this
.
method_id
}}
<
/td
>
<
td
>
{{
this
.
node
}}
<
/td
>
<
td
>
{{
this
.
min_pri
}}
<
/td
>
<
td
>
{{
this
.
max_pri
}}
<
/td
>
<
/tr>
{{
/
each
}}
<
/tbody
>
<
/table
>
<
table
>
<
thead
>
<
tr
>
<
th
>
Type
<
/th
>
<
th
>
Priority
<
/th
>
<
th
>
Min
<
/th
>
<
th
>
Avg
<
/th
>
<
th
>
Max
<
/th
>
<
/tr
>
<
/thead><tbody
>
{{
#
each
messagePri1
}}
<
tr
>
<
td
>
{{
this
.
messagetype
}}
<
/td
>
<
td
>
{{
this
.
pri
}}
<
/td
>
<
td
>
{{
this
.
min
}}
<
/td
>
<
td
>
{{
this
.
avg
}}
<
/td
>
<
td
>
{{
this
.
max
}}
<
/td
>
<
/tr>
{{
/
each
}}
{{
#
each
messagePri2
}}
<
tr
>
<
td
>
{{
this
.
messagetype
}}
<
/td
>
<
td
>
{{
this
.
pri
}}
<
/td
>
<
td
>
{{
this
.
min
}}
<
/td
>
<
td
>
{{
this
.
avg
}}
<
/td
>
<
td
>
{{
this
.
max
}}
<
/td
>
<
/tr>
{{
/
each
}}
<
/tbody
>
<
/table
>
</script>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"jio.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_activity_watcher.js"
type=
"text/javascript"
></script>
</head>
<body>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"jio.js"
type=
"text/javascript"
></script>
<script
src=
"domsugar.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_activity_watcher.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
class=
"activity_watcher_gadget"
></div>
</body>
</body>
</html>
\ No newline at end of file
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.html.xml
View file @
55efebea
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<string>
http_cache
</string>
</value>
<value>
<string>
must_revalidate_
http_cache
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.js.js
View file @
55efebea
/*global window, rJS, RSVP,
Handlebars
, jIO, console */
/*global window, rJS, RSVP,
domsugar
, jIO, console */
/*jslint nomen: true, maxlen:80, indent:2*/
(
function
(
rJS
,
jIO
,
Handlebars
,
RSVP
,
window
)
{
(
function
(
rJS
,
jIO
,
domsugar
,
RSVP
,
window
)
{
"
use strict
"
;
var
gk
=
rJS
(
window
),
data_source
=
gk
.
__template_element
.
getElementById
(
'
getData
'
).
innerHTML
,
get_data_template
=
Handlebars
.
compile
(
data_source
);
function
putMessageType
(
data
,
messagetype
,
string
)
{
function
putMessageType
(
data
,
messagetype
,
string
,
array
)
{
var
i
;
if
(
data
[
string
]
&&
data
[
string
].
line_list
)
{
for
(
i
=
0
;
i
<
data
[
string
].
line_list
.
length
;
i
+=
1
)
{
array
.
push
(
domsugar
(
'
tr
'
,
[
domsugar
(
'
td
'
,
{
text
:
messagetype
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
count
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
method_id
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
node
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
min_pri
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
max_pri
})
]));
}
}
}
function
putMessageType2
(
data
,
messagetype
,
string
,
array
)
{
var
i
;
if
(
data
[
string
]
&&
data
[
string
].
line_list
)
{
for
(
i
=
0
;
i
<
data
[
string
].
line_list
.
length
;
i
+=
1
)
{
data
[
string
].
line_list
[
i
].
messagetype
=
messagetype
;
array
.
push
(
domsugar
(
'
tr
'
,
[
domsugar
(
'
td
'
,
{
text
:
messagetype
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
pri
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
min
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
avg
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
max
})
]));
}
return
data
[
string
].
line_list
;
}
return
''
;
}
rJS
(
window
)
...
...
@@ -42,15 +60,40 @@
);
})
.
push
(
function
(
evt
)
{
var
data
=
JSON
.
parse
(
evt
.
target
.
response
);
form_gadget
.
element
.
querySelector
(
"
.activity_watcher_gadget
"
)
.
innerHTML
=
get_data_template
({
time
:
new
Date
().
toTimeString
(),
messageList1
:
putMessageType
(
data
,
'
dict
'
,
'
SQLDict
'
),
messageList2
:
putMessageType
(
data
,
'
queue
'
,
'
SQLQueue
'
),
messagePri1
:
putMessageType
(
data
,
'
dict
'
,
'
SQLDict2
'
),
messagePri2
:
putMessageType
(
data
,
'
queue
'
,
'
SQLQueue2
'
)
});
var
data
=
JSON
.
parse
(
evt
.
target
.
response
),
tbody1_content_list
=
[],
tbody2_content_list
=
[];
putMessageType
(
data
,
'
dict
'
,
'
SQLDict
'
,
tbody1_content_list
);
putMessageType
(
data
,
'
queue
'
,
'
SQLQueue
'
,
tbody1_content_list
);
putMessageType2
(
data
,
'
dict
'
,
'
SQLDict2
'
,
tbody2_content_list
);
putMessageType2
(
data
,
'
queue
'
,
'
SQLQueue2
'
,
tbody2_content_list
);
domsugar
(
form_gadget
.
element
.
querySelector
(
"
.activity_watcher_gadget
"
),
[
'
Date :
'
,
new
Date
().
toTimeString
(),
domsugar
(
'
table
'
,
[
domsugar
(
'
thead
'
,
[
domsugar
(
'
tr
'
,
[
domsugar
(
'
th
'
,
{
text
:
'
Type
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Count
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Method Id
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Processing Node
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Min pri
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Max pri
'
})
])]),
domsugar
(
'
tbody
'
,
tbody1_content_list
)
]),
domsugar
(
'
table
'
,
[
domsugar
(
'
thead
'
,
[
domsugar
(
'
tr
'
,
[
domsugar
(
'
th
'
,
{
text
:
'
Type
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Priority
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Min
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Avg
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Max
'
})
])]),
domsugar
(
'
tbody
'
,
tbody2_content_list
)
])
]);
},
function
(
error
)
{
//Exception is raised if network is lost for some reasons,
...
...
@@ -61,4 +104,4 @@
});
},
1000
);
}(
rJS
,
jIO
,
Handlebars
,
RSVP
,
window
));
\ No newline at end of file
}(
rJS
,
jIO
,
domsugar
,
RSVP
,
window
));
\ No newline at end of file
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.js.xml
View file @
55efebea
...
...
@@ -8,7 +8,7 @@
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<string>
http_cache
</string>
</value>
<value>
<string>
must_revalidate_
http_cache
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
...
...
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