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 Fixed system columns detection
Date Thu, 08 Oct 2015 05:27:45 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 49409da5a -> f7d350813


ignite-843 Fixed system columns detection


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

Branch: refs/heads/ignite-843
Commit: f7d3508137b5c68db484767d37a59a424022bd60
Parents: 49409da
Author: Andrey <anovikov@gridgain.com>
Authored: Thu Oct 8 12:27:38 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Thu Oct 8 12:27:38 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js               | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f7d35081/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 2176208..9793f90 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
@@ -442,8 +442,13 @@ consoleModule.controller('sqlController',
                 if (!$common.isDefined(paragraph.chartValCols ))
                     paragraph.chartValCols = [];
 
-                paragraph.disabledSystemColumns = res.meta.length == 2 &&
-                    _.find(res.meta, {fieldName: '_KEY'}) && _.find(res.meta, {fieldName:
'_VAL'});
+                if (res.meta.length <= 2) {
+                    var _key = _.find(res.meta, {fieldName: '_KEY'});
+                    var _val = _.find(res.meta, {fieldName: '_VAL'});
+
+                    paragraph.disabledSystemColumns = (res.meta.length == 2 && _key
&& _val) ||
+                        (res.meta.length == 1 && (_key || _val));
+                }
 
                 paragraph.columnFilter = _columnFilter(paragraph);
 


Mime
View raw message