aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/js
diff options
context:
space:
mode:
authorPim van den Berg2014-07-05 13:36:33 +0200
committerPim van den Berg2014-07-05 13:42:23 +0200
commit2e28b180b6562f940a806a719cd4c650ede79659 (patch)
tree4e508bcba27281f4542bfad2ff315f76900446d1 /js
parenttype/genericio: apply percentile on scaled value (diff)
downloadapt-panopticon_cgp-2e28b180b6562f940a806a719cd4c650ede79659.zip
apt-panopticon_cgp-2e28b180b6562f940a806a719cd4c650ede79659.tar.gz
apt-panopticon_cgp-2e28b180b6562f940a806a719cd4c650ede79659.tar.bz2
apt-panopticon_cgp-2e28b180b6562f940a806a719cd4c650ede79659.tar.xz
jsrrdgraph: RrdGraph.js: make HRULE support reference to variable
The value of HRULE could be a reference to for example a VDEF variable. Closes #85
Diffstat (limited to 'js')
-rw-r--r--js/RrdGraph.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/RrdGraph.js b/js/RrdGraph.js
index 9d35581..dfbbc07 100644
--- a/js/RrdGraph.js
+++ b/js/RrdGraph.js
@@ -379,7 +379,9 @@ RrdGraphDesc.prototype.vrule = function (graph, time, color, legend)
379RrdGraphDesc.prototype.hrule = function (graph, value, color, legend) 379RrdGraphDesc.prototype.hrule = function (graph, value, color, legend)
380{ 380{
381 this.gf = RrdGraphDesc.GF_HRULE; 381 this.gf = RrdGraphDesc.GF_HRULE;
382 this.yrule = value; 382 this.vidx = graph.find_var(value);
383 if (this.vidx == -1)
384 this.yrule = value;
383 this.col = color; 385 this.col = color;
384 if (legend === undefined) this.legend = ''; 386 if (legend === undefined) this.legend = '';
385 else this.legend = ' '+legend; 387 else this.legend = ' '+legend;