ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject ignite git commit: ignite-843 Minor fix explain
Date Thu, 08 Oct 2015 04:54:31 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 514e61e66 -> 97d72ce94


ignite-843 Minor fix explain


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/97d72ce9
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/97d72ce9
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/97d72ce9

Branch: refs/heads/ignite-843
Commit: 97d72ce94308179ac3bc0e74d47bd61cce4fc2ae
Parents: 514e61e
Author: Andrey <anovikov@gridgain.com>
Authored: Thu Oct 8 11:52:41 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Thu Oct 8 11:54:12 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js                | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/97d72ce9/modules/control-center-web/src/main/js/controllers/sql-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/sql-controller.js b/modules/control-center-web/src/main/js/controllers/sql-controller.js
index c304c3e..17a25bd 100644
--- a/modules/control-center-web/src/main/js/controllers/sql-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/sql-controller.js
@@ -461,8 +461,10 @@ consoleModule.controller('sqlController',
             if (paragraph.queryArgs.type == "EXPLAIN" && res.rows) {
                 paragraph.rows = [];
 
-                res.rows.forEach(function (row) {
-                    (row[0]).replace(/\"/g, '').split('\n').forEach(function (line) {
+                res.rows.forEach(function (row, i) {
+                    var line = res.rows.length - 1 == i ? row[0] : row[0] + '\n';
+
+                    line.replace(/\"/g, '').split('\n').forEach(function (line) {
                         paragraph.rows.push([line]);
                     });
                 });
@@ -483,7 +485,7 @@ consoleModule.controller('sqlController',
 
             _showLoading(paragraph, false);
 
-            if (paragraph.result == 'none')
+            if (paragraph.result == 'none' || paragraph.queryArgs.type != "QUERY")
                 paragraph.result = 'table';
             else if (paragraph.chart())
                 _chartApplySettings(paragraph);


Mime
View raw message