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 Add header tooltip for column on sql result table.
Date Wed, 14 Oct 2015 05:39:06 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 64b85ba03 -> c5c015db5


IGNITE-843 Add header tooltip for column on sql result table.


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

Branch: refs/heads/ignite-843-rc1
Commit: c5c015db5a89d79d76f976546ffa76e0005bf10e
Parents: 64b85ba
Author: Andrey <anovikov@gridgain.com>
Authored: Wed Oct 14 12:39:03 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Wed Oct 14 12:39:03 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js   | 41 +++++++++++---------
 1 file changed, 22 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c5c015db/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 b674a32..3d04ddf 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
@@ -377,17 +377,18 @@ consoleModule.controller('sqlController',
     var _rebuildColumns = function (paragraph) {
         var columnDefs = [];
 
-        _.forEach(paragraph.meta, function (meta, idx) {
-            if (paragraph.columnFilter(meta)) {
-                if (_notObjectType(meta.fieldTypeName))
-                    paragraph.chartColumns.push({value: idx, type: meta.fieldTypeName, label:
meta.fieldName});
+        _.forEach(paragraph.meta, function (col, idx) {
+            if (paragraph.columnFilter(col)) {
+                if (_notObjectType(col.fieldTypeName))
+                    paragraph.chartColumns.push({value: idx, type: col.fieldTypeName, label:
col.fieldName});
 
                 // Index for explain, execute and fieldName for scan.
-                var colValue = 'data[' +  (paragraph.queryArgs.query ? idx : '"' + meta.fieldName
+ '"') + ']';
+                var colValue = 'data[' +  (paragraph.queryArgs.query ? idx : '"' + col.fieldName
+ '"') + ']';
 
                 columnDefs.push({
-                    headerName: meta.fieldName,
-                    valueGetter: $common.isJavaBuildInClass(meta.fieldTypeName) ? colValue
: 'JSON.stringify(' + colValue + ')',
+                    headerName: col.fieldName,
+                    headerTooltip: _fullColName(col),
+                    valueGetter: $common.isJavaBuildInClass(col.fieldTypeName) ? colValue
: 'JSON.stringify(' + colValue + ')',
                     minWidth: 50
                 });
             }
@@ -628,22 +629,24 @@ consoleModule.controller('sqlController',
             });
     };
 
-    var _export = function(fileName, meta, rows) {
-        var csvContent = '';
+    var _fullColName = function(col) {
+        var res = [];
 
-        if (meta) {
-            csvContent += meta.map(function (col) {
-                var res = [];
+        if (col.schemaName)
+            res.push(col.schemaName);
+        if (col.typeName)
+            res.push(col.typeName);
+
+        res.push(col.fieldName);
 
-                if (col.schemaName)
-                    res.push(col.schemaName);
-                if (col.typeName)
-                    res.push(col.typeName);
+        return res.join('.');
+    };
 
-                res.push(col.fieldName);
+    var _export = function(fileName, meta, rows) {
+        var csvContent = '';
 
-                return res.join('.');
-            }).join(',') + '\n';
+        if (meta) {
+            csvContent += meta.map(_fullColName).join(',') + '\n';
         }
 
         rows.forEach(function (row) {


Mime
View raw message