ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [1/2] ignite git commit: IGNITE-1703 Show query result.
Date Tue, 03 Nov 2015 03:13:24 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 3c762c5de -> c1325c896


IGNITE-1703 Show query result.


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

Branch: refs/heads/ignite-843-rc1
Commit: d1d302534eec33833bba9231ab3e4cd3d3f8b920
Parents: 3c762c5
Author: vsisko <vsisko@gridgain.com>
Authored: Tue Nov 3 10:07:30 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Tue Nov 3 10:07:30 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js   | 29 ++++++++++++++++++--
 .../src/main/js/views/sql/sql.jade              |  4 +--
 2 files changed, 28 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d1d30253/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 5341c78..f25eef1 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
@@ -26,8 +26,6 @@ consoleModule.controller('sqlController',
     $scope.agentGoal = 'execute sql statements';
     $scope.agentTestDriveOption = '--test-drive-sql';
 
-    $scope.showMessage = $message.message;
-
     $scope.joinTip = $common.joinTip;
 
     $scope.caches = [];
@@ -1306,5 +1304,32 @@ consoleModule.controller('sqlController',
                     $loading.finish('loadingCacheMetadata');
                 });
         }
+    };
+
+    $scope.showResultQuery = function (paragraph) {
+        if ($common.isDefined(paragraph)) {
+            var title;
+            var queryMsg;
+
+            switch (paragraph.queryArgs.type) {
+                case 'QUERY':
+                    title = 'SQL query';
+                    queryMsg = paragraph.queryArgs.query;
+
+                    break;
+
+                case 'EXPLAIN':
+                    title = 'Explain query';
+                    queryMsg = paragraph.queryArgs.query;
+
+                    break;
+
+                default:
+                    title = 'SCAN query';
+                    queryMsg = 'SCAN query for cache <b>' + paragraph.queryArgs.cacheName
+ '</b>';
+            }
+
+            $message.message(title, [queryMsg]);
+        }
     }
 }]);

http://git-wip-us.apache.org/repos/asf/ignite/blob/d1d30253/modules/control-center-web/src/main/js/views/sql/sql.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/sql/sql.jade b/modules/control-center-web/src/main/js/views/sql/sql.jade
index aebae6a..58c739f 100644
--- a/modules/control-center-web/src/main/js/views/sql/sql.jade
+++ b/modules/control-center-web/src/main/js/views/sql/sql.jade
@@ -199,10 +199,8 @@ block container
                                                 | &nbspquery
                                     div(ng-show='queryExecuted(paragraph) && !paragraph.refreshExecuting()')
                                         -var nextVisibleCondition = 'paragraph.queryId &&
(paragraph.table() || paragraph.chart() && paragraph.queryExecute() && (paragraph.timeLineSupported()
|| !paragraph.chartTimeLineEnabled()))'
-                                        -var queryLinkStyle = 'float: left; margin-left:
5px; margin-bottom: 5px;'
 
                                         hr(style='margin-top: 0; margin-bottom: 5px')
-                                        a(ng-show='paragraph.queryArgs.type != "SCAN"' style=queryLinkStyle
ng-click='showMessage("Query", [paragraph.queryArgs.query])') Show query
-                                        label(ng-show='paragraph.queryArgs.type == "SCAN"'
style=queryLinkStyle) Scan query
+                                        a(ng-show='paragraph.queryArgs.type' style='float:
left; margin-left: 5px; margin-bottom: 5px' ng-click='showResultQuery(paragraph)') Show query
                                         i.fa.fa-chevron-circle-right(ng-show=nextVisibleCondition
style='float: right;margin-right: 10px;' ng-click='nextPage(paragraph)')
                                         a(ng-show=nextVisibleCondition style='float: right;
margin-bottom: 5px;margin-right: 5px;' ng-click='nextPage(paragraph)') Next


Mime
View raw message