diff --git a/js/actions/api-endpoint.js b/js/actions/api-endpoint.js index 57ba819880..dbd31145f6 100644 --- a/js/actions/api-endpoint.js +++ b/js/actions/api-endpoint.js @@ -226,8 +226,8 @@ var internal = require("internal"); /// database only. Calling this action in any other database will make the server /// return an error. /// -/// Futhermore, the last remaining endpoint cannot be deleted as this would -/// render the server's HTTP interface useless. +/// Futhermore, the last remaining endpoint cannot be deleted as this would make +/// the server kaputt. /// /// @RESTRETURNCODES /// diff --git a/js/apps/system/aardvark/frontend/js/views/queryView.js b/js/apps/system/aardvark/frontend/js/views/queryView.js index 2196b542b2..f53f7e7da7 100644 --- a/js/apps/system/aardvark/frontend/js/views/queryView.js +++ b/js/apps/system/aardvark/frontend/js/views/queryView.js @@ -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);