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-843 WIP reworked chart settings.
Date Wed, 09 Sep 2015 14:31:46 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 f02b9c207 -> 3c10128cf


IGNITE-843 WIP reworked chart settings.


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

Branch: refs/heads/ignite-843
Commit: 3c10128cf405ed04e3df296a8c77aee3dcc37b12
Parents: f02b9c2
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Wed Sep 9 21:31:37 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Wed Sep 9 21:31:37 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js   | 21 +++++---------------
 .../control-center-web/src/main/js/package.json |  2 +-
 .../src/main/js/views/sql/sql.jade              |  4 ++--
 3 files changed, 8 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3c10128c/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 124f301..0f9ec31 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
@@ -197,6 +197,7 @@ controlCenterModule.controller('sqlController', ['$scope', '$window','$controlle
             query: '',
             pageSize: $scope.pageSizes[0],
             result: 'none',
+            chart: false,
             hideSystemColumns: true,
             disabledSystemColumns: false,
             rate: {
@@ -217,12 +218,10 @@ controlCenterModule.controller('sqlController', ['$scope', '$window','$controlle
     $scope.setResult = function (paragraph, new_result) {
         paragraph.result = paragraph.result === new_result ? 'none' : new_result;
 
-        if (paragraph.rows && paragraph.rows.length > 0) {
-            switch (new_result) {
-                case 'table':
-                case 'none':
-                    break;
+        paragraph.chart = new_result != 'table' && paragraph.result != 'none' &&
paragraph.rows && paragraph.rows.length > 0;
 
+        if (paragraph.chart) {
+            switch (new_result) {
                 case 'bar':
                     _barChart(paragraph);
                     break;
@@ -238,9 +237,6 @@ controlCenterModule.controller('sqlController', ['$scope', '$window','$controlle
                 case 'area':
                     _areaChart(paragraph);
                     break;
-
-                default:
-                    $common.showError('Unknown result: ' + new_result);
             }
         }
     };
@@ -582,12 +578,8 @@ controlCenterModule.controller('sqlController', ['$scope', '$window','$controlle
     }
 
     $scope.applyChartSettings = function (paragraph) {
-        if (paragraph.rows && paragraph.rows.length > 0) {
+        if (paragraph.chart && paragraph.rows && paragraph.rows.length >
0) {
             switch (paragraph.result) {
-                case 'table':
-                case 'none':
-                    break;
-
                 case 'bar':
                     _barChart(paragraph);
                     break;
@@ -603,9 +595,6 @@ controlCenterModule.controller('sqlController', ['$scope', '$window','$controlle
                 case 'area':
                     _areaChart(paragraph);
                     break;
-
-                default:
-                    $common.showError('Unknown result: ' + new_result);
             }
         }
     };

http://git-wip-us.apache.org/repos/asf/ignite/blob/3c10128c/modules/control-center-web/src/main/js/package.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/package.json b/modules/control-center-web/src/main/js/package.json
index 23ee952..8e18c0d 100644
--- a/modules/control-center-web/src/main/js/package.json
+++ b/modules/control-center-web/src/main/js/package.json
@@ -32,7 +32,7 @@
     "express-session": "^1.11.1",
     "jade": "~1.11.0",
     "lodash": "3.10.1",
-    "mongoose": "^4.1.5",
+    "mongoose": "^4.1.6",
     "mongoose-deep-populate": "2.0.1",
     "nconf": "^0.7.2",
     "node-sass-middleware": "^0.9.0",

http://git-wip-us.apache.org/repos/asf/ignite/blob/3c10128c/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 0706ed6..dbf9c61 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
@@ -61,7 +61,7 @@ block container
                                         +btn-toolbar('fa-remove', 'removeParagraph(paragraph)',
'Remove paragraph')
 
                                     .pull-right
-                                        a.chart-settings-link(ng-hide='paragraph.chart' ng-click='$event.stopPropagation()'
bs-popover data-template-url='chart-settings' data-placement='bottom' data-auto-close='1'
data-trigger='click') Chart settings
+                                        a.chart-settings-link(ng-show='paragraph.chart' ng-click='$event.stopPropagation()'
bs-popover data-template-url='chart-settings' data-placement='bottom' data-auto-close='1'
data-trigger='click') Chart settings
                                         .btn-group(ng-model='paragraph.result' ng-click='$event.stopPropagation()'
style='float: right')
                                             +btn-toolbar-data('fa-table', 'table', 'Show
data in tabular form.')
                                             +btn-toolbar-data('fa-bar-chart', 'bar', 'Show
bar chart.<br/>By default first column - X values, second column - Y values.<br/>In
case of one column it will be treated as Y values.')
@@ -134,7 +134,7 @@ block container
                                                 tbody
                                                     tr(ng-repeat='row in displayedResult
track by $index')
                                                         td(ng-repeat='val in row track by
$index' ng-if='paragraph.columnFilter(paragraph.meta[$index])') {{ val }}
-                                    div(ng-show='paragraph.rows && paragraph.result
!= "table" && paragraph.result != "none"')
+                                    div(ng-show='paragraph.rows && paragraph.chart')
                                         div(id='chart-{{paragraph.id}}')
                                             svg
                                     .sql-empty-result(ng-show='!paragraph.rows &&
paragraph.result != "none"') Result set is empty.


Mime
View raw message