فهرست منبع

[notebook] Show fetch log errors in the log instead of query error

Some SQL version do not or are not configure to report the query logs,
instead of erroring out big in red for each log call, it is better
to just append those to the optional log panel.
Romain Rigaux 10 سال پیش
والد
کامیت
1a49dfe5b8
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

+ 4 - 0
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -574,6 +574,10 @@ var Snippet = function (vm, notebook, snippet) {
       snippet: ko.mapping.toJSON(self.getContext()),
       from: self.result.logLines
     }, function (data) {
+      if (data.status == 1) { // Append errors to the logs
+    	data.status = 0;
+    	data.logs = data.message;
+      }
       if (data.status == 0) {
         if (data.logs.length > 0) {
           var logs = data.logs.split("\n");