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 $, d3, _, console, document*/
|
||||||
/*global AbstractAdapter*/
|
/*global AbstractAdapter, arangoHelper*/
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief Graph functionality
|
/// @brief Graph functionality
|
||||||
///
|
///
|
||||||
|
@ -456,8 +456,15 @@ function GharialAdapter(nodes, edges, viewer, config) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
|
var text = "";
|
||||||
|
try {
|
||||||
|
text = JSON.parse(data.responseText).errorMessage + ' (' + JSON.parse(data.responseText).errorNum + ')';
|
||||||
|
arangoHelper.arangoError(data.statusText, text);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
throw data.statusText;
|
throw data.statusText;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -476,8 +483,15 @@ function GharialAdapter(nodes, edges, viewer, config) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
|
var text = "";
|
||||||
|
try {
|
||||||
|
text = JSON.parse(data.responseText).errorMessage + ' (' + JSON.parse(data.responseText).errorNum + ')';
|
||||||
|
arangoHelper.arangoError(data.statusText, text);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
throw data.statusText;
|
throw data.statusText;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -496,8 +510,15 @@ function GharialAdapter(nodes, edges, viewer, config) {
|
||||||
callback();
|
callback();
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
|
var text = "";
|
||||||
|
try {
|
||||||
|
text = JSON.parse(data.responseText).errorMessage + ' (' + JSON.parse(data.responseText).errorNum + ')';
|
||||||
|
arangoHelper.arangoError(data.statusText, text);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
throw data.statusText;
|
throw data.statusText;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -520,8 +541,15 @@ function GharialAdapter(nodes, edges, viewer, config) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
|
var text = "";
|
||||||
|
try {
|
||||||
|
text = JSON.parse(data.responseText).errorMessage + ' (' + JSON.parse(data.responseText).errorNum + ')';
|
||||||
|
arangoHelper.arangoError(data.statusText, text);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
throw data.statusText;
|
throw data.statusText;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -541,8 +569,15 @@ function GharialAdapter(nodes, edges, viewer, config) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
|
var text = "";
|
||||||
|
try {
|
||||||
|
text = JSON.parse(data.responseText).errorMessage + ' (' + JSON.parse(data.responseText).errorNum + ')';
|
||||||
|
arangoHelper.arangoError(data.statusText, text);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
throw data.statusText;
|
throw data.statusText;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,6 @@ var uiComponentsHelper = uiComponentsHelper || {};
|
||||||
$(btn).toggleClass("active", false);
|
$(btn).toggleClass("active", false);
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(button.id);
|
|
||||||
|
|
||||||
if (button.id === "control_event_new_node") {
|
if (button.id === "control_event_new_node") {
|
||||||
$('.node').css('cursor', 'pointer');
|
$('.node').css('cursor', 'pointer');
|
||||||
$('.gv-background').css('cursor', 'copy');
|
$('.gv-background').css('cursor', 'copy');
|
||||||
|
|
|
@ -188,8 +188,6 @@
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
console.log(this.model.get("path"));
|
|
||||||
|
|
||||||
$(this.el).html(this.template.render({
|
$(this.el).html(this.template.render({
|
||||||
app: this.model,
|
app: this.model,
|
||||||
db: arangoHelper.currentDatabase(),
|
db: arangoHelper.currentDatabase(),
|
||||||
|
|
Loading…
Reference in New Issue