From 8134377e86dfdcab31218fbe4f665843536fe643 Mon Sep 17 00:00:00 2001 From: boynet Date: Thu, 9 Jun 2016 19:09:12 +0300 Subject: [PATCH] Update influxdb.min.js --- influxdb.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/influxdb.min.js b/influxdb.min.js index b0510f8..3a1b2b7 100644 --- a/influxdb.min.js +++ b/influxdb.min.js @@ -1 +1 @@ -"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function t(t,e){for(var n=0;n0&&e&&(e+="\n"),e+=this.points[t].getLine()):this.points.slice(t,1);return e}},{key:"send",value:function(){if(0==this.points.length)return!1;var t=this.implodePoints();if(t){var e=new XMLHttpRequest;e.open("POST",this.host,!0),e.setRequestHeader("Content-Type","text/plain; charset=UTF-8"),e.send(t)}this.points=[]}}]),t}(),Influxdb_Point=function(){function t(e,n,i,s){_classCallCheck(this,t),this.key=e,"undefined"==typeof n||this.isEmpty(n)||(this.fields=n),"undefined"==typeof i||this.isEmpty(n)||(this.tags=i),"undefined"!=typeof s&&(this.time=s)}return _createClass(t,[{key:"isValid",value:function(){return this.key&&this.fields?!0:!1}},{key:"getLine",value:function(){return this.key||this.fields?(this.line=this.key,this.tags&&(this.line=this.line+","+this.objToString(this.tags)),this.fields&&(this.line=this.line+" "+this.objToString(this.fields)),this.time&&(this.line=this.line+" "+this.time),this.line):void 0}},{key:"sortObjectByKey",value:function(t){if(!Array.prototype.forEach)return t;if(!Array.prototype.sort)return t;if(!Object.keys)return t;var e={};return Object.keys(t).sort().forEach(function(n){e[n]=t[n]}),e}},{key:"objToString",value:function(t){var e,n,i=0,s="";t=this.sortObjectByKey(t);for(var e in t)t.hasOwnProperty(e)&&(e=e.replace(/\s+/g,""),n=t[e].toString(),n=n.replace(/\s+/g,""),i++,i>1&&(s+=","),s+=e+"="+n);return s}},{key:"isEmpty",value:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return window.JSON?JSON.stringify(t)===JSON.stringify({}):!0}}]),t}(); +"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function t(t,e){for(var n=0;n1&&(s+=","),s+=e+"="+n);return s}},{key:"isEmpty",value:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return window.JSON?JSON.stringify(t)===JSON.stringify({}):!0}}]),t}();