diff options
author | Srix <sriram@watchy.in> | 2015-05-29 16:15:36 +0530 |
---|---|---|
committer | Srix <sriram@watchy.in> | 2015-05-29 16:15:36 +0530 |
commit | ef38cf72af9af01101f2c10e19ab0085549e9cb7 (patch) | |
tree | c3309f22f5404493173c0878e256ad2ed2f51e19 | |
parent | 4a41ade5990aae01e2ed39404ea5d2d12ce6bcae (diff) |
fix to render chart even though one of the chart element is not available
-rw-r--r-- | jarmon/jarmon.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/jarmon/jarmon.js b/jarmon/jarmon.js index e4fd1dc..e30a228 100644 --- a/jarmon/jarmon.js +++ b/jarmon/jarmon.js @@ -522,7 +522,19 @@ jarmon.RrdQueryRemote.prototype._callRemote = function(methodName, args) { this._download.always( function(res) { if(res instanceof Error) { - ret.reject(res); + //ret.reject(res); + result = { + data: [ + [args[0], 0], + [args[1], 0] + ], + lines: { + lineWidth: 0 + } + }; + ret.resolve(result); + return result; + } else { // Upon successful download convert the resulting binary // into an RRD file |