summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrix <sriram@watchy.in>2015-05-29 16:15:36 +0530
committerSrix <sriram@watchy.in>2015-05-29 16:15:36 +0530
commitef38cf72af9af01101f2c10e19ab0085549e9cb7 (patch)
treec3309f22f5404493173c0878e256ad2ed2f51e19
parent4a41ade5990aae01e2ed39404ea5d2d12ce6bcae (diff)
fix to render chart even though one of the chart element is not available
-rw-r--r--jarmon/jarmon.js14
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