aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/js/rrdFile.js
diff options
context:
space:
mode:
authorPeter Wu2014-07-25 23:28:21 +0200
committerPim van den Berg2014-08-02 12:29:32 +0200
commitb6be82b8edefa452e72ed53391971e53d9dccf83 (patch)
tree01a33ac72f6ef7e6e5c607238bc5e4dd3a8751fe /js/rrdFile.js
parentsupport php versions without json support and show a warning message (diff)
downloadapt-panopticon_cgp-b6be82b8edefa452e72ed53391971e53d9dccf83.zip
apt-panopticon_cgp-b6be82b8edefa452e72ed53391971e53d9dccf83.tar.gz
apt-panopticon_cgp-b6be82b8edefa452e72ed53391971e53d9dccf83.tar.bz2
apt-panopticon_cgp-b6be82b8edefa452e72ed53391971e53d9dccf83.tar.xz
jsrrdgraph: Fixed jshint warnings/errors
Many fall in the category missing semicolon, but there are legitimate bugs (like throwing an error with an undefined variable, using isInfinite instead of !isFinite or fabs instead of Math.abs). At some places, I moved the variable declarations to avoid duplicate definition warnings. Redundant breaks have been removed (after return / throw). Global variables were implicitly defined in RrdDataFile (which caught my attention) and Base64, these have been made local. Also fixed some whitespace errors. Yay, the consistency. Not all (style) issues are fixed.
Diffstat (limited to 'js/rrdFile.js')
-rw-r--r--js/rrdFile.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/rrdFile.js b/js/rrdFile.js
index eabebc7..3385df5 100644
--- a/js/rrdFile.js
+++ b/js/rrdFile.js
@@ -431,7 +431,7 @@ function RRDFile(bf,file_options) {
431 } 431 }
432 432
433 this.getRRA = function(idx) { 433 this.getRRA = function(idx) {
434 rra_info=this.rrd_header.getRRAInfo(idx); 434 var rra_info = this.rrd_header.getRRAInfo(idx);
435 return new RRDRRA(rrd_data, 435 return new RRDRRA(rrd_data,
436 this.rrd_header.rra_ptr_idx+idx*this.rrd_header.rra_ptr_el_size, 436 this.rrd_header.rra_ptr_idx+idx*this.rrd_header.rra_ptr_el_size,
437 rra_info, 437 rra_info,