소스 검색

[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");