From 43ac4fe5697f20705d980dccee9cea918d9ab32e Mon Sep 17 00:00:00 2001 From: Frank Wuerthwein Date: Sun, 10 May 2009 14:38:03 +0000 Subject: Add ds_list - allow user to specify a list of DSs --- src/lib/rrdFlotMatrix.js | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/lib/rrdFlotMatrix.js b/src/lib/rrdFlotMatrix.js index 54505a5..23bacb2 100644 --- a/src/lib/rrdFlotMatrix.js +++ b/src/lib/rrdFlotMatrix.js @@ -23,6 +23,13 @@ * */ +/* + * The ds_list is a list of + * [ds_id, ds_title] pairs + * If not defined, the list will be created from the RRDs + * + */ + /* * Local dependencies: * rrdFlotSupport.py @@ -51,9 +58,21 @@ * } */ -function rrdFlotMatrix(html_id, rrd_files, graph_options, rrd_graph_options) { +function rrdFlotMatrix(html_id, rrd_files, ds_list, graph_options, rrd_graph_options) { this.html_id=html_id; this.rrd_files=rrd_files; + if (ds_list==null) { + this.ds_list=[]; + var rrd_file=this.rrd_files[0][1]; // get the first one... they are all the same + var nrDSs=rrd_file.getNrDSs(); + for (var i=0; i