1
0
Fork 0

show warnings in aql result

This commit is contained in:
scottashton 2014-11-12 13:59:04 +01:00
parent e5d9379ac5
commit f8bd383808
1 changed files with 11 additions and 1 deletions

View File

@ -597,7 +597,17 @@
contentType: "application/json",
processData: false,
success: function (data) {
outputEditor.setValue(JSON.stringify(data.result, undefined, 2));
var warnings = "";
if (data.extra.warnings.length > 0) {
warnings += "Warnings:" + "\r\n\r\n";
data.extra.warnings.forEach(function(w) {
warnings += "[" + w.code + "], '" + w.message + "'\r\n";
});
}
if (warnings !== "") {
warnings += "\r\n" + "Result:" + "\r\n\r\n";
}
outputEditor.setValue(warnings + JSON.stringify(data.result, undefined, 2));
self.switchTab("result-switch");
window.progressView.hide();
self.deselect(outputEditor);