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
137
Merge Requests
137
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
041bd35c
Commit
041bd35c
authored
Sep 06, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_monitoring] Use generic erp5 graph gadget
parent
f902a75f
Changes
19
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
293 additions
and
1047 deletions
+293
-1047
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_graph_html.html
...hTemplateItem/web_page_module/gadget_erp5_graph_html.html
+0
-23
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_graph_html.xml
...thTemplateItem/web_page_module/gadget_erp5_graph_html.xml
+0
-324
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_graph_js.js
.../PathTemplateItem/web_page_module/gadget_erp5_graph_js.js
+0
-103
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_graph_js.xml
...PathTemplateItem/web_page_module/gadget_erp5_graph_js.xml
+0
-320
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_appcache.xml
...mplateItem/web_page_module/gadget_monitoring_appcache.xml
+5
-5
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_custom_css.css
...lateItem/web_page_module/gadget_monitoring_custom_css.css
+5
-5
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_custom_css.xml
...lateItem/web_page_module/gadget_monitoring_custom_css.xml
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_resource_view_html.html
...web_page_module/gadget_monitoring_resource_view_html.html
+8
-18
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_resource_view_html.xml
.../web_page_module/gadget_monitoring_resource_view_html.xml
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_resource_view_js.js
...tem/web_page_module/gadget_monitoring_resource_view_js.js
+212
-222
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_resource_view_js.xml
...em/web_page_module/gadget_monitoring_resource_view_js.xml
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_software_instance_view_html.html
...module/gadget_monitoring_software_instance_view_html.html
+1
-1
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_software_instance_view_html.xml
..._module/gadget_monitoring_software_instance_view_html.xml
+2
-2
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_software_instance_view_js.js
...age_module/gadget_monitoring_software_instance_view_js.js
+48
-10
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_software_instance_view_js.xml
...ge_module/gadget_monitoring_software_instance_view_js.xml
+2
-2
bt5/erp5_web_monitoring/bt/dependency_list
bt5/erp5_web_monitoring/bt/dependency_list
+2
-1
bt5/erp5_web_monitoring/bt/template_keep_last_workflow_history_only_path_list
...ing/bt/template_keep_last_workflow_history_only_path_list
+1
-2
bt5/erp5_web_monitoring/bt/template_keep_workflow_path_list
bt5/erp5_web_monitoring/bt/template_keep_workflow_path_list
+1
-2
bt5/erp5_web_monitoring/bt/template_path_list
bt5/erp5_web_monitoring/bt/template_path_list
+0
-1
No files found.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_graph_html.html
deleted
100644 → 0
View file @
f902a75f
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
ERP5 Graph
</title>
<!-- custom css -->
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"dygraph.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_graph.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
class=
"custom-grid-wrap"
>
<div
class=
"custom-grid ui-corner-all ui-body-inherit ui-shadow ui-corner-all"
></div>
</div>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_graph_html.xml
deleted
100644 → 0
View file @
f902a75f
This diff is collapsed.
Click to expand it.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_graph_js.js
deleted
100644 → 0
View file @
f902a75f
/*global window, rJS, console, RSVP, Dygraph */
/*jslint indent: 2, maxerr: 3 */
(
function
(
rJS
,
window
,
RSVP
,
Dygraph
)
{
"
use strict
"
;
// Custom Interaction Model for synchronised graphs
var
customInteractionModel
=
Dygraph
.
Interaction
.
defaultModel
;
customInteractionModel
.
touchend
=
function
(
event
,
g
,
context
)
{
Dygraph
.
Interaction
.
endTouch
(
event
,
g
,
context
);
var
viewWindow
=
g
.
xAxisRange
();
g
.
getFunctionOption
(
"
zoomCallback
"
).
call
(
g
,
viewWindow
[
0
],
viewWindow
[
1
],
g
.
yAxisRanges
());
};
/*customInteractionModel.touchmove = function(event, g, context) {
Dygraph.Interaction.moveTouch(event, g, context);
var viewWindow = g.xAxisRange();
g.getFunctionOption("zoomCallback").call(g, viewWindow[0], viewWindow[1], g.yAxisRanges());
};
customInteractionModel.mousemove = function(event, g, context) {
if (context.isPanning) {
var viewWindow = g.xAxisRange();
g.getFunctionOption("zoomCallback").call(g, viewWindow[0], viewWindow[1], g.yAxisRanges());
}
}*/
customInteractionModel
.
mouseup
=
function
(
event
,
g
,
context
)
{
if
(
context
.
isPanning
)
{
var
viewWindow
=
g
.
xAxisRange
();
g
.
getFunctionOption
(
"
zoomCallback
"
).
call
(
g
,
viewWindow
[
0
],
viewWindow
[
1
],
g
.
yAxisRanges
());
}
};
rJS
(
window
)
.
setState
({
graph
:
""
})
/////////////////////////////////////////////////////////////////
// ready
/////////////////////////////////////////////////////////////////
.
ready
(
function
(
gadget
)
{
return
;
})
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
getColors
'
,
function
()
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
state
.
graph
.
getColors
();
});
})
.
declareMethod
(
'
setVisibility
'
,
function
(
num
,
value
)
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
state
.
graph
.
setVisibility
(
num
,
value
);
});
})
.
declareMethod
(
'
updateOptions
'
,
function
(
options
,
ndarray
)
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
gadget
.
state
.
graph
.
ndarray
=
ndarray
;
return
gadget
.
state
.
graph
.
updateOptions
(
options
);
});
})
.
declareMethod
(
'
resize
'
,
function
(
width
,
height
)
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
state
.
graph
.
resize
(
width
,
height
);
});
})
// render gadget
.
declareMethod
(
'
render
'
,
function
(
data
,
option_dict
,
interactionModel
)
{
var
gadget
=
this
;
if
(
interactionModel
===
"
customInteractionModel
"
)
{
option_dict
.
interactionModel
=
customInteractionModel
;
}
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
gadget
.
changeState
({
graph
:
new
Dygraph
(
gadget
.
element
,
data
,
option_dict
)
});
});
});
}(
rJS
,
window
,
RSVP
,
Dygraph
));
\ No newline at end of file
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_erp5_graph_js.xml
deleted
100644 → 0
View file @
f902a75f
This diff is collapsed.
Click to expand it.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_appcache.xml
View file @
041bd35c
...
...
@@ -105,7 +105,7 @@
<item>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
CACHE MANIFEST\n
# generated on Fri,
11 august
2017 15:47:33 +0000\n
# generated on Fri,
07 sep
2017 15:47:33 +0000\n
# XXX + fonts\n
# images/ajax-loader.gif\n
CACHE:\n
...
...
@@ -119,8 +119,8 @@ URI.js\n
dygraph.js\n
gadget_erp5.css\n
gadget_global.js\n
gadget_
erp5_
graph.html\n
gadget_
erp5_
graph.js\n
gadget_
field_graph_dy
graph.html\n
gadget_
field_graph_dy
graph.js\n
gadget_jio.html\n
gadget_jio.js\n
gadget_translate.html\n
...
...
@@ -328,7 +328,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
46782.15224.10001
</string>
</value>
<value>
<string>
961.
61188.16000.18722
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -346,7 +346,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
150
3935899.97
</float>
<float>
150
4800490.65
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_custom_css.css
View file @
041bd35c
...
...
@@ -511,13 +511,13 @@ html .custom-grid-wrap table thead tr th {
position
:
relative
;
}
.graph-medium
{
height
:
20
0px
;
width
:
100
%
;
height
:
32
0px
;
width
:
98
%
;
}
.graph-h-medium
{
height
:
23
0px
;
width
:
100
%
;
margin
:
30px
0
;
height
:
32
0px
;
width
:
98
%
;
margin
:
30px
;
}
.ui-grid-column
.graph-state-labels
{
margin
:
10px
;
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_custom_css.xml
View file @
041bd35c
...
...
@@ -239,7 +239,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
46334.51033.4727
</string>
</value>
<value>
<string>
961.
59579.23436.30429
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>
1504
086678.92
</float>
<float>
1504
708727.24
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_resource_view_html.html
View file @
041bd35c
...
...
@@ -40,32 +40,22 @@
</div>
</div>
<h2
class=
"header-notice"
><i
class=
"fa fa-info"
aria-hidden=
"true"
></i>
Graph content will be reloaded automatically every minutes.
</h2>
<ul
class=
"ui-grid-column ui-grid-column-5 graph_cpu"
>
<li
class=
"ui-grid-span-
4
custom-grid-wrap graph-cell"
>
<
!--<
ul class="ui-grid-column ui-grid-column-5 graph_cpu">
<li class="ui-grid-span-
5
custom-grid-wrap graph-cell">
<div data-gadget-url="gadget_erp5_graph.html" data-gadget-scope="graph_cpu" class="graph graph-h-medium" data-gadget-sandbox="public"></div>
</li>
<li class="ui-grid-span-1 custom-grid-wrap graph-cell">
</li>
</ul>
</ul>
-->
<div
class=
"ui-grid-a ui-responsive"
>
<div
class=
"ui-block-a"
>
<div
data-gadget-url=
"gadget_erp5_graph.html"
data-gadget-scope=
"graph_memory_used"
class=
"graph graph-h-medium"
data-gadget-sandbox=
"public"
></div>
</div>
<div
class=
"ui-block-b"
>
<div
data-gadget-url=
"gadget_erp5_graph.html"
data-gadget-scope=
"graph_memory_percent"
class=
"graph graph-h-medium"
data-gadget-sandbox=
"public"
></div>
<div
data-gadget-url=
"gadget_field_graph_dygraph.html"
data-gadget-scope=
"graph_cpu"
class=
"graph graph-h-medium"
data-gadget-sandbox=
"public"
></div>
</div>
<div
class=
"ui-grid-a ui-responsive"
>
<div
data-gadget-url=
"gadget_field_graph_dygraph.html"
data-gadget-scope=
"graph_memory_used"
class=
"graph graph-h-medium"
data-gadget-sandbox=
"public"
></div>
</div>
<div
class=
"ui-grid-b ui-responsive"
>
<div
class=
"ui-block-a"
>
<div
data-gadget-url=
"gadget_erp5_graph.html"
data-gadget-scope=
"graph_disk_used"
class=
"graph graph-h-medium"
data-gadget-sandbox=
"public"
></div>
</div>
<div
class=
"ui-block-b"
>
<div
data-gadget-url=
"gadget_erp5_graph.html"
data-gadget-scope=
"graph_io_rw"
class=
"graph graph-h-medium"
data-gadget-sandbox=
"public"
></div>
</div>
<div
class=
"ui-block-c"
>
<div
data-gadget-url=
"gadget_erp5_graph.html"
data-gadget-scope=
"graph_io_counter"
class=
"graph graph-h-medium"
data-gadget-sandbox=
"public"
></div>
</div>
<div
data-gadget-url=
"gadget_field_graph_dygraph.html"
data-gadget-scope=
"graph_io"
class=
"graph graph-h-medium"
data-gadget-sandbox=
"public"
></div>
</div>
<div
class=
'graph-footer'
>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_resource_view_html.xml
View file @
041bd35c
...
...
@@ -243,7 +243,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
47920.32703.17493
</string>
</value>
<value>
<string>
961.
59537.30226.3259
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -261,7 +261,7 @@
</tuple>
<state>
<tuple>
<float>
1504
086069.06
</float>
<float>
1504
704987.14
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_resource_view_js.js
View file @
041bd35c
This diff is collapsed.
Click to expand it.
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_resource_view_js.xml
View file @
041bd35c
...
...
@@ -239,7 +239,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
22271.22355.17766
</string>
</value>
<value>
<string>
961.
61208.24795.20087
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -257,7 +257,7 @@
</tuple>
<state>
<tuple>
<float>
1504
086036.21
</float>
<float>
1504
801600.39
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_software_instance_view_html.html
View file @
041bd35c
...
...
@@ -140,7 +140,7 @@
<div
class=
"graph-full"
>
<div
class=
"signal ui-content-hidden"
></div>
<h2><i
class=
"fa fa-line-chart"
aria-hidden=
"true"
></i>
<strong>
Promises result progression
</strong></h2>
<div
data-gadget-url=
"gadget_
erp5_
graph.html"
data-gadget-scope=
"graph_gadget"
class=
"graph graph-medium "
></div>
<div
data-gadget-url=
"gadget_
field_graph_dy
graph.html"
data-gadget-scope=
"graph_gadget"
class=
"graph graph-medium "
></div>
</div>
<div
class=
"promise-list"
>
</div>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_software_instance_view_html.xml
View file @
041bd35c
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
16513.57050.1211
</string>
</value>
<value>
<string>
961.
59699.24642.30873
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>
150
2377991.75
</float>
<float>
150
4711023.3
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_software_instance_view_js.js
View file @
041bd35c
...
...
@@ -310,18 +310,56 @@
"
Date, Success, Error, Warning
"
,
new
Date
()
+
"
,0,0,0
"
],
data
=
element_dict
.
data
||
promise_data
;
data
=
element_dict
.
data
||
promise_data
,
data_list
=
[],
line_list
,
i
;
data_list
.
push
({
value_dict
:
{
"
0
"
:
[],
"
1
"
:
[]},
type
:
"
scatter
"
,
axis_mapping_id_dict
:
{
"
1
"
:
"
1_1
"
},
title
:
"
promises success counter
"
});
data_list
.
push
({
value_dict
:
{
"
0
"
:
[],
"
1
"
:
[]},
type
:
"
scatter
"
,
axis_mapping_id_dict
:
{
"
1
"
:
"
1_2
"
},
title
:
"
promises error counter
"
});
for
(
i
=
1
;
i
<
data
.
length
;
i
+=
1
)
{
line_list
=
data
[
i
].
split
(
'
,
'
);
data_list
[
0
].
value_dict
[
"
0
"
].
push
(
line_list
[
0
]);
data_list
[
0
].
value_dict
[
"
1
"
].
push
(
line_list
[
1
]);
// XXX repeating date entry
data_list
[
1
].
value_dict
[
"
0
"
].
push
(
line_list
[
0
]);
data_list
[
1
].
value_dict
[
"
1
"
].
push
(
line_list
[
2
]);
}
$
(
"
.graph-full .signal
"
).
addClass
(
"
ui-content-hidden
"
);
return
gadget
.
state
.
graph_gadget
.
render
(
data
.
join
(
'
\n
'
),
{
ylabel
:
'
<span class="graph-label"><i class="fa fa-bar-chart"></i> Success/Failure count</span>
'
,
legend
:
'
always
'
,
labelsDivStyles
:
{
'
textAlign
'
:
'
right
'
}
return
gadget
.
state
.
graph_gadget
.
render
({
value
:{
data
:
data_list
,
layout
:
{
axis_dict
:
{
"
0
"
:
{
"
title
"
:
"
Success/Failure counter
"
,
"
scale_type
"
:
"
linear
"
,
"
value_type
"
:
"
date
"
},
"
customInteractionModel
"
);
"
1_1
"
:
{
"
title
"
:
"
Promises success counter
"
,
"
position
"
:
"
left
"
},
"
1_2
"
:
{
"
title
"
:
"
Promises error counter
"
,
"
position
"
:
"
left
"
}
},
title
:
"
Success/Failure counter
"
}
}
});
});
//return RSVP.all(promise_list);
});
...
...
bt5/erp5_web_monitoring/PathTemplateItem/web_page_module/gadget_monitoring_software_instance_view_js.xml
View file @
041bd35c
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
21935.10239.6381
2
</string>
</value>
<value>
<string>
961.
59703.38142.4403
2
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>
150
2465314.29
</float>
<float>
150
4711794.22
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_monitoring/bt/dependency_list
View file @
041bd35c
erp5_web
erp5_web_renderjs_ui
erp5_officejs
\ No newline at end of file
bt5/erp5_web_monitoring/bt/template_keep_last_workflow_history_only_path_list
View file @
041bd35c
web_page_module/Notify_min_js
web_page_module/rjs_gadget_erp5_css
web_page_module/gadget_erp5_graph_*
web_page_module/gadget_monitoring_*
web_page_module/jquery.magnific-popup.min.js
web_page_module/jsen_json_validator_js
web_page_module/magnific-popup.css
web_page_module/monitoring_jio_*
web_page_module/rjs_gadget_erp5_css
web_page_module/rjs_gadget_erp5_js
web_page_module/rjs_gadget_global_js
web_page_module/rjs_gadget_monitoring_html
...
...
bt5/erp5_web_monitoring/bt/template_keep_workflow_path_list
View file @
041bd35c
web_page_module/Notify_min_js
web_page_module/rjs_gadget_erp5_css
web_page_module/gadget_erp5_graph_*
web_page_module/gadget_monitoring_*
web_page_module/jquery.magnific-popup.min.js
web_page_module/jsen_json_validator_js
web_page_module/magnific-popup.css
web_page_module/monitoring_jio_*
web_page_module/rjs_gadget_erp5_css
web_page_module/rjs_gadget_erp5_js
web_page_module/rjs_gadget_global_js
web_page_module/rjs_gadget_monitoring_html
...
...
bt5/erp5_web_monitoring/bt/template_path_list
View file @
041bd35c
web_page_module/Notify_min_js
web_page_module/gadget_erp5_graph_*
web_page_module/gadget_monitoring_*
web_page_module/jquery.magnific-popup.min.js
web_page_module/jsen_json_validator_js
...
...
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