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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
ed0c1297
Commit
ed0c1297
authored
Apr 07, 2022
by
Romain Courteaud
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: improve activity viewer look
Use the html_viewer gadget
parent
4355b153
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
40 deletions
+68
-40
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.html.html
.../portal_skins/erp5_core/gadget_activity_watcher.html.html
+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
+67
-39
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.html.html
View file @
ed0c1297
...
@@ -12,6 +12,6 @@
...
@@ -12,6 +12,6 @@
<script
src=
"gadget_activity_watcher.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_activity_watcher.js"
type=
"text/javascript"
></script>
</head>
</head>
<body>
<body>
<div
class=
"activity_watcher_gadget
"
></div>
<div
data-gadget-url=
"gadget_html_viewer.html"
data-gadget-scope=
"html_viewer
"
></div>
</body>
</body>
</html>
</html>
\ No newline at end of file
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/gadget_activity_watcher.js.js
View file @
ed0c1297
...
@@ -9,11 +9,23 @@
...
@@ -9,11 +9,23 @@
for
(
i
=
0
;
i
<
data
[
string
].
line_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
data
[
string
].
line_list
.
length
;
i
+=
1
)
{
array
.
push
(
domsugar
(
'
tr
'
,
[
array
.
push
(
domsugar
(
'
tr
'
,
[
domsugar
(
'
td
'
,
{
text
:
messagetype
}),
domsugar
(
'
td
'
,
{
text
:
messagetype
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
count
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
count
,
style
:
'
text-align: right;
'
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
method_id
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
method_id
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
node
}),
domsugar
(
'
td
'
,
{
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
min_pri
}),
text
:
data
[
string
].
line_list
[
i
].
node
,
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
max_pri
})
style
:
'
text-align: right;
'
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
min_pri
,
style
:
'
text-align: right;
'
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
max_pri
,
style
:
'
text-align: right;
'
})
]));
]));
}
}
}
}
...
@@ -25,10 +37,22 @@
...
@@ -25,10 +37,22 @@
for
(
i
=
0
;
i
<
data
[
string
].
line_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
data
[
string
].
line_list
.
length
;
i
+=
1
)
{
array
.
push
(
domsugar
(
'
tr
'
,
[
array
.
push
(
domsugar
(
'
tr
'
,
[
domsugar
(
'
td
'
,
{
text
:
messagetype
}),
domsugar
(
'
td
'
,
{
text
:
messagetype
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
pri
}),
domsugar
(
'
td
'
,
{
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
min
}),
text
:
data
[
string
].
line_list
[
i
].
pri
,
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
avg
}),
style
:
'
text-align: right;
'
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
max
})
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
min
,
style
:
'
text-align: right;
'
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
avg
,
style
:
'
text-align: right;
'
}),
domsugar
(
'
td
'
,
{
text
:
data
[
string
].
line_list
[
i
].
max
,
style
:
'
text-align: right;
'
})
]));
]));
}
}
}
}
...
@@ -49,51 +73,55 @@
...
@@ -49,51 +73,55 @@
}
}
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
jIO
.
util
.
ajax
(
return
RSVP
.
hash
({
{
evt
:
jIO
.
util
.
ajax
(
{
"
type
"
:
"
GET
"
,
"
type
"
:
"
GET
"
,
"
url
"
:
form_gadget
.
state
.
read_activity_list_url
,
"
url
"
:
form_gadget
.
state
.
read_activity_list_url
,
"
xhrFields
"
:
{
"
xhrFields
"
:
{
withCredentials
:
true
withCredentials
:
true
}
}
}
}),
);
html_viewer
:
form_gadget
.
getDeclaredGadget
(
'
html_viewer
'
)
});
})
})
.
push
(
function
(
evt
)
{
.
push
(
function
(
hash
)
{
var
data
=
JSON
.
parse
(
evt
.
target
.
response
),
var
data
=
JSON
.
parse
(
hash
.
evt
.
target
.
response
),
tbody1_content_list
=
[],
tbody1_content_list
=
[],
tbody2_content_list
=
[];
tbody2_content_list
=
[];
putMessageType
(
data
,
'
dict
'
,
'
SQLDict
'
,
tbody1_content_list
);
putMessageType
(
data
,
'
dict
'
,
'
SQLDict
'
,
tbody1_content_list
);
putMessageType
(
data
,
'
queue
'
,
'
SQLQueue
'
,
tbody1_content_list
);
putMessageType
(
data
,
'
queue
'
,
'
SQLQueue
'
,
tbody1_content_list
);
putMessageType2
(
data
,
'
dict
'
,
'
SQLDict2
'
,
tbody2_content_list
);
putMessageType2
(
data
,
'
dict
'
,
'
SQLDict2
'
,
tbody2_content_list
);
putMessageType2
(
data
,
'
queue
'
,
'
SQLQueue2
'
,
tbody2_content_list
);
putMessageType2
(
data
,
'
queue
'
,
'
SQLQueue2
'
,
tbody2_content_list
);
domsugar
(
form_gadget
.
element
.
querySelector
(
"
.activity_watcher_gadget
"
),
[
return
hash
.
html_viewer
.
render
({
value
:
domsugar
(
'
div
'
,
'
Date :
'
,
{
'
class
'
:
'
page
'
},
[
new
Date
().
toTimeString
(),
'
Date :
'
,
new
Date
().
toTimeString
(),
domsugar
(
'
table
'
,
[
domsugar
(
'
table
'
,
[
domsugar
(
'
thead
'
,
[
domsugar
(
'
tr
'
,
[
domsugar
(
'
caption
'
,
{
text
:
'
Current Activities
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Type
'
}),
domsugar
(
'
thead
'
,
[
domsugar
(
'
tr
'
,
[
domsugar
(
'
th
'
,
{
text
:
'
Count
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Type
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Method Id
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Count
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Processing Node
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Method Id
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Min pri
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Processing Node
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Max pri
'
})
domsugar
(
'
th
'
,
{
text
:
'
Min pri
'
}),
])]),
domsugar
(
'
th
'
,
{
text
:
'
Max pri
'
})
domsugar
(
'
tbody
'
,
tbody1_content_list
)
])]),
]),
domsugar
(
'
tbody
'
,
tbody1_content_list
)
]),
domsugar
(
'
table
'
,
[
domsugar
(
'
table
'
,
[
domsugar
(
'
thead
'
,
[
domsugar
(
'
tr
'
,
[
domsugar
(
'
caption
'
,
{
text
:
'
Statistics
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Type
'
}),
domsugar
(
'
thead
'
,
[
domsugar
(
'
tr
'
,
[
domsugar
(
'
th
'
,
{
text
:
'
Priority
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Type
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Min
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Priority
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Avg
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Min
'
}),
domsugar
(
'
th
'
,
{
text
:
'
Max
'
})
domsugar
(
'
th
'
,
{
text
:
'
Avg
'
}),
])]),
domsugar
(
'
th
'
,
{
text
:
'
Max
'
})
domsugar
(
'
tbody
'
,
tbody2_content_list
)
])]),
])
domsugar
(
'
tbody
'
,
tbody2_content_list
)
]);
])
]).
outerHTML
});
},
function
(
error
)
{
},
function
(
error
)
{
//Exception is raised if network is lost for some reasons,
//Exception is raised if network is lost for some reasons,
...
...
Romain Courteaud
@romain
mentioned in commit
d02269e0
·
Apr 08, 2022
mentioned in commit
d02269e0
mentioned in commit d02269e0f3fd0dc334d67d3ec82382a39709b3e1
Toggle commit list
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