mirror of https://gitee.com/bigwinds/arangodb
graph viewer now able to throw some errors/notifications
This commit is contained in:
parent
bf0e1d3c8f
commit
c88ab6b49c
|
@ -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;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue