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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
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 @@
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_report
</string>
<string>
action_type/object_
jio_
report
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_report
</string>
</value>
<value>
<string>
object_
jio_
report
</string>
</value>
</item>
<item>
<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 @@
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_
view_
dialog
</string>
</value>
<value>
<string>
form_dialog
</string>
</value>
</item>
<item>
<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 @@
<list>
<string>
editable
</string>
<string>
gadget_url
</string>
<string>
renderjs_extra
</string>
<string>
title
</string>
</list>
</value>
...
...
@@ -50,6 +51,10 @@
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -64,6 +69,16 @@
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</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>
</value>
</item>
...
...
@@ -87,6 +102,12 @@
<key>
<string>
gadget_url
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
renderjs_extra
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Watcher
</string>
</value>
...
...
@@ -110,4 +131,17 @@
</dictionary>
</pickle>
</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>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.html.html
View file @
4fa3a1b9
...
...
@@ -8,6 +8,7 @@
<script
id=
"getData"
type=
"text/x-handlebars-template"
>
Date
:
{{
time
}}
<
table
>
<
thead
>
<
tr
>
<
th
>
Type
<
/th
>
<
th
>
Count
<
/th
>
...
...
@@ -16,6 +17,7 @@
<
th
>
Min
pri
<
/th
>
<
th
>
Max
pri
<
/th
>
<
/tr
>
<
/thead><tbody
>
{{
#
each
messageList1
}}
<
tr
>
<
td
>
{{
this
.
messagetype
}}
<
/td
>
...
...
@@ -36,8 +38,10 @@
<
td
>
{{
this
.
max_pri
}}
<
/td
>
<
/tr>
{{
/
each
}}
<
/tbody
>
<
/table
>
<
table
>
<
thead
>
<
tr
>
<
th
>
Type
<
/th
>
<
th
>
Priority
<
/th
>
...
...
@@ -45,6 +49,7 @@
<
th
>
Avg
<
/th
>
<
th
>
Max
<
/th
>
<
/tr
>
<
/thead><tbody
>
{{
#
each
messagePri1
}}
<
tr
>
<
td
>
{{
this
.
messagetype
}}
<
/td
>
...
...
@@ -63,6 +68,7 @@
<
td
>
{{
this
.
max
}}
<
/td
>
<
/tr>
{{
/
each
}}
<
/tbody
>
<
/table
>
</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*/
(
function
(
rJS
,
jIO
,
Handlebars
,
RSVP
,
window
)
{
"
use strict
"
;
...
...
@@ -17,15 +17,24 @@
}
rJS
(
window
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
console
.
log
(
options
);
return
this
.
changeState
(
options
);
})
.
onLoop
(
function
()
{
var
form_gadget
=
this
,
basedir
=
location
.
pathname
.
split
(
'
/
'
).
slice
(
0
,
-
1
).
join
(
'
/
'
)
+
'
/
'
;
var
form_gadget
=
this
;
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
()
.
push
(
function
()
{
return
jIO
.
util
.
ajax
(
{
"
type
"
:
"
POS
T
"
,
"
url
"
:
basedir
+
'
ActivityTool_getSqlStatisticList
'
,
"
type
"
:
"
GE
T
"
,
"
url
"
:
form_gadget
.
state
.
read_activity_list_url
,
"
xhrFields
"
:
{
withCredentials
:
true
}
...
...
@@ -35,15 +44,13 @@
.
push
(
function
(
evt
)
{
var
data
=
JSON
.
parse
(
evt
.
target
.
response
);
form_gadget
.
element
.
querySelector
(
"
.activity_watcher_gadget
"
)
.
innerHTML
=
get_data_template
(
{
.
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
'
)
}
);
messagePri1
:
putMessageType
(
data
,
'
dict
'
,
'
SQLDict2
'
),
messagePri2
:
putMessageType
(
data
,
'
queue
'
,
'
SQLQueue2
'
)
});
},
function
(
error
)
{
//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