ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [3/3] ignite git commit: IGNITE-1708 Fixed ROW_IDX numbering on next page.
Date Thu, 22 Oct 2015 14:18:52 GMT
IGNITE-1708 Fixed ROW_IDX numbering on next page.


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

Branch: refs/heads/ignite-843-rc1
Commit: b268feee6e3103c32f240da7b9890f9cc40f4118
Parents: d2018e2
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Thu Oct 22 21:18:42 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Thu Oct 22 21:18:42 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js   | 34 ++++++++++++++------
 1 file changed, 24 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b268feee/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 8cec516..75488f7 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
@@ -891,12 +891,20 @@ consoleModule.controller('sqlController',
                     }
                 }
                 else {
+                    index = paragraph.total;
+
                     values = _.map(paragraph.rows, function (row) {
-                        return {
-                            x: _chartNumber(row, paragraph.chartKeyCols[0].value, index),
-                            xLbl: _chartLabel(row, paragraph.chartKeyCols[0].value, undefined),
-                            y: _chartNumber(row, valCol.value, index++)
-                        }
+                        var xCol = paragraph.chartKeyCols[0].value;
+
+                        var v = {
+                            x: _chartNumber(row, xCol, index),
+                            xLbl: _chartLabel(row, xCol, undefined),
+                            y: _chartNumber(row, valCol.value, index)
+                        };
+
+                        index++;
+
+                        return v;
                     });
 
                     datum.push({key: valCol.label, values: values});
@@ -912,13 +920,19 @@ consoleModule.controller('sqlController',
 
         if (paragraph.chartColumnsConfigured() && !paragraph.chartTimeLineEnabled())
{
             paragraph.chartValCols.forEach(function (valCol) {
-                var index = 0;
+                var index = paragraph.total;
 
                 var values = _.map(paragraph.rows, function (row) {
-                    return {
-                        x: row[paragraph.chartKeyCols[0].value],
-                        y: _chartNumber(row, valCol.value, index++)
-                    }
+                    var xCol = paragraph.chartKeyCols[0].value;
+
+                    var v = {
+                        x: xCol < 0 ? index : row[xCol],
+                        y: _chartNumber(row, valCol, index)
+                    };
+
+                    index++;
+
+                    return v;
                 });
 
                 datum.push({key: valCol.label, values: values});


Mime
View raw message