1
0
Fork 0

graph viewer now able to throw some errors/notifications

This commit is contained in:
hkernbach 2015-10-30 14:56:39 +01:00 committed by Frank Celler
parent bf0e1d3c8f
commit c88ab6b49c
3 changed files with 41 additions and 10 deletions

View File

@ -1,5 +1,5 @@
/*global $, d3, _, console, document*/
/*global AbstractAdapter*/
/*global AbstractAdapter, arangoHelper*/
////////////////////////////////////////////////////////////////////////////////
/// @brief Graph functionality
///
@ -456,7 +456,14 @@ function GharialAdapter(nodes, edges, viewer, config) {
}
},
error: function(data) {
throw data.statusText;
var text = "";
try {
text = JSON.parse(data.responseText).errorMessage + ' (' + JSON.parse(data.responseText).errorNum + ')';
arangoHelper.arangoError(data.statusText, text);
}
catch (e) {
throw data.statusText;
}
}
});
};
@ -476,7 +483,14 @@ function GharialAdapter(nodes, edges, viewer, config) {
}
},
error: function(data) {
throw data.statusText;
var text = "";
try {
text = JSON.parse(data.responseText).errorMessage + ' (' + JSON.parse(data.responseText).errorNum + ')';
arangoHelper.arangoError(data.statusText, text);
}
catch (e) {
throw data.statusText;
}
}
});
@ -496,7 +510,14 @@ function GharialAdapter(nodes, edges, viewer, config) {
callback();
},
error: function(data) {
throw data.statusText;
var text = "";
try {
text = JSON.parse(data.responseText).errorMessage + ' (' + JSON.parse(data.responseText).errorNum + ')';
arangoHelper.arangoError(data.statusText, text);
}
catch (e) {
throw data.statusText;
}
}
});
};
@ -520,7 +541,14 @@ function GharialAdapter(nodes, edges, viewer, config) {
}
},
error: function(data) {
throw data.statusText;
var text = "";
try {
text = JSON.parse(data.responseText).errorMessage + ' (' + JSON.parse(data.responseText).errorNum + ')';
arangoHelper.arangoError(data.statusText, text);
}
catch (e) {
throw data.statusText;
}
}
});
};
@ -541,7 +569,14 @@ function GharialAdapter(nodes, edges, viewer, config) {
}
},
error: function(data) {
throw data.statusText;
var text = "";
try {
text = JSON.parse(data.responseText).errorMessage + ' (' + JSON.parse(data.responseText).errorNum + ')';
arangoHelper.arangoError(data.statusText, text);
}
catch (e) {
throw data.statusText;
}
}
});
};

View File

@ -56,8 +56,6 @@ var uiComponentsHelper = uiComponentsHelper || {};
$(btn).toggleClass("active", false);
});
console.log(button.id);
if (button.id === "control_event_new_node") {
$('.node').css('cursor', 'pointer');
$('.gv-background').css('cursor', 'copy');

View File

@ -188,8 +188,6 @@
var self = this;
console.log(this.model.get("path"));
$(this.el).html(this.template.render({
app: this.model,
db: arangoHelper.currentDatabase(),