summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sfiligoi <isfiligoi@ucsd.edu>2010-01-25 22:54:01 +0000
committerIgor Sfiligoi <isfiligoi@ucsd.edu>2010-01-25 22:54:01 +0000
commit31115d730181cf3b37d4874c5c9c8162658aed0d (patch)
treed5013d79f11d04ec1438ee00ccc5b83bee6f7ef9
parent8994b8c1fb06d36f7e72d5853ea299a2dc66a982 (diff)
Expose RRDRRA.cur_row
-rw-r--r--src/lib/rrdFile.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/rrdFile.js b/src/lib/rrdFile.js
index a9053fc..c55fb0e 100644
--- a/src/lib/rrdFile.js
+++ b/src/lib/rrdFile.js
@@ -1,7 +1,8 @@
/*
* Client library for access to RRD archive files
* Part of the javascriptRRD package
- * Copyright (c) 2009 Frank Wuerthwein, fkw@ucsd.edu
+ * Copyright (c) 2009-2010 Frank Wuerthwein, fkw@ucsd.edu
+ * Igor Sfiligoi, isfiligoi@ucsd.edu
*
* Original repository: http://javascriptrrd.sourceforge.net/
*
@@ -141,7 +142,7 @@ function RRDRRA(rrd_data,rra_ptr_idx,
this.base_rrd_db_idx=header_size+prev_row_cnts*row_size;
// get imediately, since it will be needed often
- var cur_row=rrd_data.getLongAt(rra_ptr_idx);
+ this.cur_row=rrd_data.getLongAt(rra_ptr_idx);
// calculate idx relative to base_rrd_db_idx
// mostly used internally
@@ -149,7 +150,7 @@ function RRDRRA(rrd_data,rra_ptr_idx,
if ((row_idx>=0) && (row_idx<this.row_cnt)) {
if ((ds_idx>=0) && (ds_idx<ds_cnt)){
// it is round robin, starting from cur_row+1
- var real_row_idx=row_idx+cur_row+1;
+ var real_row_idx=row_idx+this.cur_row+1;
if (real_row_idx>=this.row_cnt) real_row_idx-=this.row_cnt;
return row_size*real_row_idx+ds_idx*8;
} else {