aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/js/CGP-sync.js
diff options
context:
space:
mode:
authorVincent Brillault2013-12-16 22:28:33 +0100
committerPim van den Berg2014-01-12 14:35:02 +0100
commit775da40f8c247a97a01c3affd75511b4cbdb95b7 (patch)
tree1bf6a5fcaff9b6fec8268c6161a2fbf4fb7e79cb /js/CGP-sync.js
parentjsrrdgraph: CGP.js: split draw(id) into prepare_draw(id) and draw(id) (diff)
downloadapt-panopticon_cgp-775da40f8c247a97a01c3affd75511b4cbdb95b7.zip
apt-panopticon_cgp-775da40f8c247a97a01c3affd75511b4cbdb95b7.tar.gz
apt-panopticon_cgp-775da40f8c247a97a01c3affd75511b4cbdb95b7.tar.bz2
apt-panopticon_cgp-775da40f8c247a97a01c3affd75511b4cbdb95b7.tar.xz
Add a configuration option for sync/async choice for the canvas graphs
Diffstat (limited to 'js/CGP-sync.js')
-rw-r--r--js/CGP-sync.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/CGP-sync.js b/js/CGP-sync.js
new file mode 100644
index 0000000..01f6b19
--- /dev/null
+++ b/js/CGP-sync.js
@@ -0,0 +1,21 @@
1function draw(id) {
2 var rrdgraph = prepare_draw(id);
3
4 try {
5 rrdgraph.graph_paint();
6 } catch (e) {
7 alert(e+"\n"+e.stack);
8 }
9}
10
11function drawAll()
12{
13 var list=[];
14 var a=document.getElementsByClassName('rrd');
15 for (var i=0,l=a.length;i<l;i++)
16 {
17 draw(a[i].getAttribute('id'))
18 }
19}
20
21window.onload = drawAll()