From 9f564fe0d5b60a5d6fe5287ca3b8f78849f47163 Mon Sep 17 00:00:00 2001 From: Srix Date: Mon, 29 Jun 2015 20:56:19 +0530 Subject: Need to upgrade javascriptrrdfile.js to latest 1.1.1 version to support rrd files generated by arm machines. Yes the rrd file generated by arm is not binary compatible with x86. However rebuilding the dependency.js kept failing because of version mismatch. so excluded the rrd file part and added it as separate JS. --- docs/examples/assets/js/dependencies.js | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'docs/examples/assets/js/dependencies.js') diff --git a/docs/examples/assets/js/dependencies.js b/docs/examples/assets/js/dependencies.js index dfefa39..9f3e0ae 100644 --- a/docs/examples/assets/js/dependencies.js +++ b/docs/examples/assets/js/dependencies.js @@ -4,7 +4,6 @@ // @code_url http://flot.googlecode.com/svn/trunk/jquery.flot.js // @code_url http://flot.googlecode.com/svn/trunk/jquery.flot.stack.js // @code_url http://flot.googlecode.com/svn/trunk/jquery.flot.selection.js -// @code_url http://javascriptrrd.cvs.sourceforge.net/viewvc/javascriptrrd/v0/src/lib/rrdFile.js // @code_url https://raw.github.com/jquerytools/jquerytools/dev/src/dateinput/dateinput.js // @code_url https://raw.github.com/jquerytools/jquerytools/dev/src/tabs/tabs.js // @code_url https://raw.github.com/jquerytools/jquerytools/dev/src/toolbox/toolbox.history.js @@ -305,22 +304,6 @@ void 0)document.ondrag=n;J=!1;K(d);ma()?R():(j.getPlaceholder().trigger("plotuns t.selection.mode=="y"?(D.x=0,l.x=j.width()):(z=C(d,"x"),D.x=z.axis.p2c(z.from),l.x=z.axis.p2c(z.to));t.selection.mode=="x"?(D.y=0,l.y=j.height()):(z=C(d,"y"),D.y=z.axis.p2c(z.from),l.y=z.axis.p2c(z.to));x=!0;j.triggerRedrawOverlay();!n&&ma()&&R()};j.getSelection=L;j.hooks.bindEvents.push(function(d,j){d.getOptions().selection.mode!=null&&(j.mousemove(y),j.mousedown(V))});j.hooks.drawOverlay.push(function(j,n){if(x&&ma()){var z=j.getPlotOffset(),t=j.getOptions();n.save();n.translate(z.left,z.top); z=d.color.parse(t.selection.color);n.strokeStyle=z.scale("a",0.8).toString();n.lineWidth=1;n.lineJoin="round";n.fillStyle=z.scale("a",0.4).toString();var z=Math.min(D.x,l.x),t=Math.min(D.y,l.y),C=Math.abs(l.x-D.x),y=Math.abs(l.y-D.y);n.fillRect(z,t,C,y);n.strokeRect(z,t,C,y);n.restore()}});j.hooks.shutdown.push(function(j,l){l.unbind("mousemove",y);l.unbind("mousedown",V);S&&d(document).unbind("mouseup",S)})},options:{selection:{mode:null,color:"#e8cfac"}},name:"selection",version:"1.1"})})(jQuery); // Input 5 -function InvalidRRD(d){this.message=d;this.name="Invalid RRD"}InvalidRRD.prototype.toString=function(){return this.name+': "'+this.message+'"'};function RRDDS(d,j,E){this.rrd_data=d;this.rrd_data_idx=j;this.my_idx=E}RRDDS.prototype.getIdx=function(){return this.my_idx};RRDDS.prototype.getName=function(){return this.rrd_data.getCStringAt(this.rrd_data_idx,20)};RRDDS.prototype.getType=function(){return this.rrd_data.getCStringAt(this.rrd_data_idx+20,20)}; -RRDDS.prototype.getMin=function(){return this.rrd_data.getDoubleAt(this.rrd_data_idx+48)};RRDDS.prototype.getMax=function(){return this.rrd_data.getDoubleAt(this.rrd_data_idx+56)};function RRDRRAInfo(d,j,E,n,J,D){this.rrd_data=d;this.rra_def_idx=j;this.rrd_align=E;this.row_cnt=n;this.pdp_step=J;this.my_idx=D}RRDRRAInfo.prototype.getIdx=function(){return this.my_idx};RRDRRAInfo.prototype.getNrRows=function(){return this.row_cnt}; -RRDRRAInfo.prototype.getPdpPerRow=function(){return this.rrd_align==32?this.rrd_data.getLongAt(this.rra_def_idx+24,20):this.rrd_data.getLongAt(this.rra_def_idx+32,20)};RRDRRAInfo.prototype.getStep=function(){return this.pdp_step*this.getPdpPerRow()};RRDRRAInfo.prototype.getCFName=function(){return this.rrd_data.getCStringAt(this.rra_def_idx,20)}; -function RRDRRA(d,j,E,n,J,D){this.rrd_data=d;this.rra_info=E;this.row_cnt=E.row_cnt;this.ds_cnt=D;var l=D*8;this.base_rrd_db_idx=n+J*l;this.cur_row=d.getLongAt(j);this.calc_idx=function(d,j){if(d>=0&&d=0&&j=this.row_cnt&&(n-=this.row_cnt);return l*n+j*8}else throw RangeError("DS idx ("+d+") out of range [0-"+D+").");else throw RangeError("Row idx ("+d+") out of range [0-"+this.row_cnt+").");}}RRDRRA.prototype.getIdx=function(){return this.rra_info.getIdx()}; -RRDRRA.prototype.getNrRows=function(){return this.row_cnt};RRDRRA.prototype.getNrDSs=function(){return this.ds_cnt};RRDRRA.prototype.getStep=function(){return this.rra_info.getStep()};RRDRRA.prototype.getCFName=function(){return this.rra_info.getCFName()};RRDRRA.prototype.getEl=function(d,j){return this.rrd_data.getDoubleAt(this.base_rrd_db_idx+this.calc_idx(d,j))};RRDRRA.prototype.getElFast=function(d,j){return this.rrd_data.getFastDoubleAt(this.base_rrd_db_idx+this.calc_idx(d,j))}; -function RRDHeader(d){this.rrd_data=d;this.validate_rrd();this.load_header();this.calc_idxs()} -RRDHeader.prototype.validate_rrd=function(){if(this.rrd_data.getCStringAt(0,4)!=="RRD")throw new InvalidRRD("Wrong magic id.");this.rrd_version=this.rrd_data.getCStringAt(4,5);if(this.rrd_version!=="0003"&&this.rrd_version!=="0004")throw new InvalidRRD("Unsupported RRD version "+this.rrd_version+".");if(this.rrd_data.getDoubleAt(12)==8.642135E130)this.rrd_align=32;else if(this.rrd_data.getDoubleAt(16)==8.642135E130)this.rrd_align=64;else throw new InvalidRRD("Unsupported platform.");}; -RRDHeader.prototype.load_header=function(){this.rrd_align==32?(this.ds_cnt=this.rrd_data.getLongAt(20,!1),this.rra_cnt=this.rrd_data.getLongAt(24,!1),this.pdp_step=this.rrd_data.getLongAt(28,!1),this.top_header_size=112):(this.ds_cnt=this.rrd_data.getLongAt(24,!1),this.rra_cnt=this.rrd_data.getLongAt(32,!1),this.pdp_step=this.rrd_data.getLongAt(40,!1),this.top_header_size=128)}; -RRDHeader.prototype.calc_idxs=function(){this.ds_def_idx=this.top_header_size;this.ds_el_size=120;this.rra_def_idx=this.ds_def_idx+this.ds_el_size*this.ds_cnt;this.rrd_align==32?(this.rra_def_el_size=108,this.row_cnt_idx=20):(this.rra_def_el_size=120,this.row_cnt_idx=24);this.live_head_idx=this.rra_def_idx+this.rra_def_el_size*this.rra_cnt;this.live_head_size=this.rrd_align==32?8:16;this.pdp_prep_idx=this.live_head_idx+this.live_head_size;this.pdp_prep_el_size=112;this.cdp_prep_idx=this.pdp_prep_idx+ -this.pdp_prep_el_size*this.ds_cnt;this.cdp_prep_el_size=80;this.rra_ptr_idx=this.cdp_prep_idx+this.cdp_prep_el_size*this.ds_cnt*this.rra_cnt;this.rra_ptr_el_size=this.rrd_align==32?4:8;this.header_size=this.rra_ptr_idx+this.rra_ptr_el_size*this.rra_cnt}; -RRDHeader.prototype.load_row_cnts=function(){this.rra_def_row_cnts=[];this.rra_def_row_cnt_sums=[];for(var d=0;d=0&&d=0&&d