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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
4fa3a1b9
Commit
4fa3a1b9
authored
Jun 06, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_core] Allow to view the activity watcher in ERP5JS
parent
d72c36be
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
14 deletions
+61
-14
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Activity%20Tool/watch_report.xml
...emplateItem/portal_types/Activity%20Tool/watch_report.xml
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ActivityTool_viewWatcher.xml
...eItem/portal_skins/erp5_core/ActivityTool_viewWatcher.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ActivityTool_viewWatcher/activity_watcher_gadget.xml
...core/ActivityTool_viewWatcher/activity_watcher_gadget.xml
+34
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.html.html
.../portal_skins/erp5_core/gadget_activity_watcher.html.html
+6
-0
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
+18
-11
No files found.
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Activity%20Tool/watch_report.xml
View file @
4fa3a1b9
...
@@ -16,13 +16,13 @@
...
@@ -16,13 +16,13 @@
<key>
<string>
categories
</string>
</key>
<key>
<string>
categories
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
action_type/object_report
</string>
<string>
action_type/object_
jio_
report
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
category
</string>
</key>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_report
</string>
</value>
<value>
<string>
object_
jio_
report
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
condition
</string>
</key>
<key>
<string>
condition
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ActivityTool_viewWatcher.xml
View file @
4fa3a1b9
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
pt
</string>
</key>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_
view_
dialog
</string>
</value>
<value>
<string>
form_dialog
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
row_length
</string>
</key>
<key>
<string>
row_length
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ActivityTool_viewWatcher/activity_watcher_gadget.xml
View file @
4fa3a1b9
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<list>
<list>
<string>
editable
</string>
<string>
editable
</string>
<string>
gadget_url
</string>
<string>
gadget_url
</string>
<string>
renderjs_extra
</string>
<string>
title
</string>
<string>
title
</string>
</list>
</list>
</value>
</value>
...
@@ -50,6 +51,10 @@
...
@@ -50,6 +51,10 @@
<key>
<string>
tales
</string>
</key>
<key>
<string>
tales
</string>
</key>
<value>
<value>
<dictionary>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<item>
<key>
<string>
field_id
</string>
</key>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
...
@@ -64,6 +69,16 @@
...
@@ -64,6 +69,16 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</value>
</item>
</item>
<item>
<key>
<string>
renderjs_extra
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</dictionary>
</value>
</value>
</item>
</item>
...
@@ -87,6 +102,12 @@
...
@@ -87,6 +102,12 @@
<key>
<string>
gadget_url
</string>
</key>
<key>
<string>
gadget_url
</string>
</key>
<value>
<string></string>
</value>
<value>
<string></string>
</value>
</item>
</item>
<item>
<key>
<string>
renderjs_extra
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
Watcher
</string>
</value>
<value>
<string>
Watcher
</string>
</value>
...
@@ -110,4 +131,17 @@
...
@@ -110,4 +131,17 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: {\'read_activity_list_url\': here.absolute_url() + \'/ActivityTool_getSqlStatisticList\'}
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.html.html
View file @
4fa3a1b9
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<script
id=
"getData"
type=
"text/x-handlebars-template"
>
<script
id=
"getData"
type=
"text/x-handlebars-template"
>
Date
:
{{
time
}}
Date
:
{{
time
}}
<
table
>
<
table
>
<
thead
>
<
tr
>
<
tr
>
<
th
>
Type
<
/th
>
<
th
>
Type
<
/th
>
<
th
>
Count
<
/th
>
<
th
>
Count
<
/th
>
...
@@ -16,6 +17,7 @@
...
@@ -16,6 +17,7 @@
<
th
>
Min
pri
<
/th
>
<
th
>
Min
pri
<
/th
>
<
th
>
Max
pri
<
/th
>
<
th
>
Max
pri
<
/th
>
<
/tr
>
<
/tr
>
<
/thead><tbody
>
{{
#
each
messageList1
}}
{{
#
each
messageList1
}}
<
tr
>
<
tr
>
<
td
>
{{
this
.
messagetype
}}
<
/td
>
<
td
>
{{
this
.
messagetype
}}
<
/td
>
...
@@ -36,8 +38,10 @@
...
@@ -36,8 +38,10 @@
<
td
>
{{
this
.
max_pri
}}
<
/td
>
<
td
>
{{
this
.
max_pri
}}
<
/td
>
<
/tr>
<
/tr>
{{
/
each
}}
{{
/
each
}}
<
/tbody
>
<
/table
>
<
/table
>
<
table
>
<
table
>
<
thead
>
<
tr
>
<
tr
>
<
th
>
Type
<
/th
>
<
th
>
Type
<
/th
>
<
th
>
Priority
<
/th
>
<
th
>
Priority
<
/th
>
...
@@ -45,6 +49,7 @@
...
@@ -45,6 +49,7 @@
<
th
>
Avg
<
/th
>
<
th
>
Avg
<
/th
>
<
th
>
Max
<
/th
>
<
th
>
Max
<
/th
>
<
/tr
>
<
/tr
>
<
/thead><tbody
>
{{
#
each
messagePri1
}}
{{
#
each
messagePri1
}}
<
tr
>
<
tr
>
<
td
>
{{
this
.
messagetype
}}
<
/td
>
<
td
>
{{
this
.
messagetype
}}
<
/td
>
...
@@ -63,6 +68,7 @@
...
@@ -63,6 +68,7 @@
<
td
>
{{
this
.
max
}}
<
/td
>
<
td
>
{{
this
.
max
}}
<
/td
>
<
/tr>
<
/tr>
{{
/
each
}}
{{
/
each
}}
<
/tbody
>
<
/table
>
<
/table
>
</script>
</script>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.js.js
View file @
4fa3a1b9
/*global window, rJS, RSVP, Handlebars, jIO,
location,
console */
/*global window, rJS, RSVP, Handlebars, jIO, console */
/*jslint nomen: true, maxlen:80, indent:2*/
/*jslint nomen: true, maxlen:80, indent:2*/
(
function
(
rJS
,
jIO
,
Handlebars
,
RSVP
,
window
)
{
(
function
(
rJS
,
jIO
,
Handlebars
,
RSVP
,
window
)
{
"
use strict
"
;
"
use strict
"
;
...
@@ -17,15 +17,24 @@
...
@@ -17,15 +17,24 @@
}
}
rJS
(
window
)
rJS
(
window
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
console
.
log
(
options
);
return
this
.
changeState
(
options
);
})
.
onLoop
(
function
()
{
.
onLoop
(
function
()
{
var
form_gadget
=
this
,
var
form_gadget
=
this
;
basedir
=
location
.
pathname
.
split
(
'
/
'
).
slice
(
0
,
-
1
).
join
(
'
/
'
)
+
'
/
'
;
if
(
!
form_gadget
.
state
.
read_activity_list_url
)
{
// renderjs has not yet been called
// gadget doesn't know which URL to call
return
;
}
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
jIO
.
util
.
ajax
(
return
jIO
.
util
.
ajax
(
{
{
"
type
"
:
"
POS
T
"
,
"
type
"
:
"
GE
T
"
,
"
url
"
:
basedir
+
'
ActivityTool_getSqlStatisticList
'
,
"
url
"
:
form_gadget
.
state
.
read_activity_list_url
,
"
xhrFields
"
:
{
"
xhrFields
"
:
{
withCredentials
:
true
withCredentials
:
true
}
}
...
@@ -35,15 +44,13 @@
...
@@ -35,15 +44,13 @@
.
push
(
function
(
evt
)
{
.
push
(
function
(
evt
)
{
var
data
=
JSON
.
parse
(
evt
.
target
.
response
);
var
data
=
JSON
.
parse
(
evt
.
target
.
response
);
form_gadget
.
element
.
querySelector
(
"
.activity_watcher_gadget
"
)
form_gadget
.
element
.
querySelector
(
"
.activity_watcher_gadget
"
)
.
innerHTML
=
get_data_template
(
.
innerHTML
=
get_data_template
({
{
time
:
new
Date
().
toTimeString
(),
time
:
new
Date
().
toTimeString
(),
messageList1
:
putMessageType
(
data
,
'
dict
'
,
'
SQLDict
'
),
messageList1
:
putMessageType
(
data
,
'
dict
'
,
'
SQLDict
'
),
messageList2
:
putMessageType
(
data
,
'
queue
'
,
'
SQLQueue
'
),
messageList2
:
putMessageType
(
data
,
'
queue
'
,
'
SQLQueue
'
),
messagePri1
:
putMessageType
(
data
,
'
dict
'
,
'
SQLDict2
'
),
messagePri1
:
putMessageType
(
data
,
'
dict
'
,
'
SQLDict2
'
),
messagePri2
:
putMessageType
(
data
,
'
queue
'
,
'
SQLQueue2
'
)
messagePri2
:
putMessageType
(
data
,
'
queue
'
,
'
SQLQueue2
'
)
}
});
);
},
function
(
error
)
{
},
function
(
error
)
{
//Exception is raised if network is lost for some reasons,
//Exception is raised if network is lost for some reasons,
...
...
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