ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-1703 Show original query.
Date Fri, 30 Oct 2015 03:01:17 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 775e5e378 -> 96ef0ff0c


IGNITE-1703 Show original query.


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

Branch: refs/heads/ignite-843-rc1
Commit: 96ef0ff0cd49fd414148d966a4ec2cf1dc815e2e
Parents: 775e5e3
Author: vsisko <vsisko@gridgain.com>
Authored: Fri Oct 30 10:01:23 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Oct 30 10:01:23 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js           | 12 +++++++++---
 .../control-center-web/src/main/js/views/sql/sql.jade   | 11 ++++++++---
 2 files changed, 17 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/96ef0ff0/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 8dd0664..5341c78 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
@@ -17,15 +17,17 @@
 
 // Controller for SQL notebook screen.
 consoleModule.controller('sqlController',
-    ['$scope', '$window','$controller', '$http', '$timeout', '$common', '$confirm', '$interval',
'$popover', '$loading',
+    ['$scope', '$window','$controller', '$http', '$timeout', '$common', '$confirm', '$interval',
'$message', '$popover', '$loading',
         '$location', '$anchorScroll', function ($scope, $window, $controller, $http, $timeout,
$common, $confirm,
-        $interval, $popover, $loading, $location, $anchorScroll) {
+        $interval, $message, $popover, $loading, $location, $anchorScroll) {
     // Initialize the super class and extend it.
     angular.extend(this, $controller('agent-download', {$scope: $scope}));
 
     $scope.agentGoal = 'execute sql statements';
     $scope.agentTestDriveOption = '--test-drive-sql';
 
+    $scope.showMessage = $message.message;
+
     $scope.joinTip = $common.joinTip;
 
     $scope.caches = [];
@@ -553,7 +555,7 @@ consoleModule.controller('sqlController',
                 if (!$common.isDefined(paragraph.chartKeyCols))
                     paragraph.chartKeyCols = [];
 
-                if (!$common.isDefined(paragraph.chartValCols ))
+                if (!$common.isDefined(paragraph.chartValCols))
                     paragraph.chartValCols = [];
 
                 if (res.meta.length <= 2) {
@@ -680,6 +682,10 @@ consoleModule.controller('sqlController',
         paragraph.ace.focus();
     };
 
+    $scope.queryExecuted = function(paragraph) {
+        return $common.isDefined(paragraph.queryArgs);
+    };
+
     $scope.explain = function (paragraph) {
         _saveNotebook();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/96ef0ff0/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 4d94d2a..27cabfe 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
@@ -194,7 +194,12 @@ block container
                                             | &nbspand&nbsp
                                             b Scan
                                             | &nbspquery
-                                    div(ng-show='paragraph.queryId && !paragraph.refreshExecuting()
&& (paragraph.table() || paragraph.chart() && paragraph.queryExecute() &&
(paragraph.timeLineSupported() || !paragraph.chartTimeLineEnabled()))')
+                                    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')
-                                        i.fa.fa-chevron-circle-right(style='float: right;margin-right:
10px;' ng-click='nextPage(paragraph)')
-                                        a(style='float: right; margin-bottom: 5px;margin-right:
5px;' ng-click='nextPage(paragraph)') Next
+                                        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
+                                        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