summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sfiligoi <isfiligoi@ucsd.edu>2013-11-06 23:15:50 +0000
committerIgor Sfiligoi <isfiligoi@ucsd.edu>2013-11-06 23:15:50 +0000
commit339eb37e87d81b1452a398ca98bff918cb62ff6f (patch)
tree987449dc835c8d39f640e34aa9a38e6a2e9ae5ff
parent04af1ab89f48bdb0df2b121d7c61ad8d2c61c1fd (diff)
Get rid of the DoNothing function and use the implicit Ident transformation by passing the index
-rw-r--r--src/examples/rrdJFlotFilter.html10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/examples/rrdJFlotFilter.html b/src/examples/rrdJFlotFilter.html
index 1fee276..eb49ec2 100644
--- a/src/examples/rrdJFlotFilter.html
+++ b/src/examples/rrdJFlotFilter.html
@@ -87,13 +87,6 @@
// Next three functions are for use in RRDFilterOp,
// which requires a list of functions, one for each DS
- //Do nothing to the DS
- function DoNothing(ds) {
- this.getName = function() {return ds;}
- this.getDSNames = function() {return [ds];}
- this.computeResult = function(val_list) {return val_list[0];}
- }
-
//Sum two DSs
function SumDS(ds1,ds2) {
this.getName = function() {return ds1+"+"+ds2;}
@@ -151,10 +144,9 @@
var i = 0;
//create a new rrdlist, which contains all original elements
- // (kept the same by DoNothing())
// plus additional operated-on DSs from RRDFilterOp
for (i=0;i<rrd_data.getNrDSs();i++) {
- op_list.push(new DoNothing(rrd_data.getDS(i).getName()));
+ op_list.push(i);
DS_list.push(rrd_data.getDS(i))
}
op_list.push(new MultiSumDS(DS_list));