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 Moved result buttons.
Date Mon, 26 Oct 2015 03:10:35 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843-rc1 c1583b618 -> b3010bb6b


IGNITE-843 Moved result buttons.


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

Branch: refs/heads/ignite-843-rc1
Commit: b3010bb6b00c36a5b523f6d7686d2f1d054813eb
Parents: c1583b6
Author: Andrey <anovikov@gridgain.com>
Authored: Mon Oct 26 10:10:40 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Mon Oct 26 10:10:40 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/sql-controller.js   | 21 ++++----
 .../src/main/js/public/stylesheets/style.scss   |  2 +-
 .../src/main/js/views/sql/sql.jade              | 50 ++++++++++++--------
 3 files changed, 40 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b3010bb6/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 81bc01a..de4ef51 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
@@ -69,7 +69,7 @@ consoleModule.controller('sqlController',
 
     var MAX_VAL_COLS = CHART_COLORS.length;
 
-    $anchorScroll.yOffset = 50;
+    $anchorScroll.yOffset = 55;
 
     $scope.chartColor = function(index) {
         return {"color": "white", "background-color": CHART_COLORS[index]};
@@ -369,18 +369,17 @@ consoleModule.controller('sqlController',
     };
 
     $scope.setResult = function (paragraph, new_result) {
-        var changed = paragraph.result != new_result;
+        if (paragraph.result === new_result)
+            return;
 
-        paragraph.result = paragraph.result === new_result ? 'none' : new_result;
+        paragraph.result = new_result;
 
-        if (changed) {
-            if (paragraph.chart())
-                _chartApplySettings(paragraph, changed);
-            else
-                setTimeout(function () {
-                    paragraph.gridOptions.api.sizeColumnsToFit();
-                });
-        }
+        if (paragraph.chart())
+            _chartApplySettings(paragraph, true);
+        else
+            setTimeout(function () {
+                paragraph.gridOptions.api.sizeColumnsToFit();
+            });
     };
 
     $scope.resultEq = function(paragraph, result) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/b3010bb6/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 2389909..d6fdb33 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -1527,7 +1527,7 @@ a {
 }
 
 .chart-settings-link {
-    margin-left: 10px;
+    padding-left: 10px;
     line-height: $input-height;
 
     label, button {

http://git-wip-us.apache.org/repos/asf/ignite/blob/b3010bb6/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 10ca7fe..8d73899 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
@@ -33,14 +33,26 @@ mixin btn-toolbar(btn, click, tip, focusId)
 mixin btn-toolbar-data(btn, kind, tip)
     i.btn.btn-default.fa(class=btn ng-click='setResult(paragraph, "#{kind}")' ng-class='{active:
resultEq(paragraph, "#{kind}")}' bs-tooltip='' data-title=tip data-trigger='hover' data-placement='bottom')
 
+mixin result-toolbar
+    .btn-group(ng-model='paragraph.result' ng-click='$event.stopPropagation()' style='left:
50%; margin: 0 0 0 -70px;')
+        +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.')
+        +btn-toolbar-data('fa-pie-chart', 'pie', 'Show pie chart.<br/>By default first
column - pie labels, second column - pie values.<br/>In case of one column it will be
treated as pie values.')
+        +btn-toolbar-data('fa-line-chart', 'line', 'Show line 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.')
+        +btn-toolbar-data('fa-area-chart', 'area', 'Show area 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.')
+
 mixin chart-settings(mdl)
-    .chart-settings-link.row(ng-show='paragraph.chart')
-        i.fa.fa-chevron-circle-down
-        a(ng-click='$event.stopPropagation()' bs-popover data-template-url='chart-settings'
data-placement='bottom' data-auto-close='1' data-trigger='click') Chart settings
-        div(ng-show='paragraphTimeSpanVisible(paragraph)')
-            label Show
-            button.select-manual-caret.btn.btn-default(ng-model='paragraph.timeLineSpan'
ng-change='applyChartTimeFrame(paragraph)' bs-options='item for item in timeLineSpans' bs-select
data-caret-html='<span class="caret"></span>')
-            label min
+    .row(ng-show='paragraph.chart')
+        .col-xs-4.chart-settings-link
+            i.fa.fa-chevron-circle-down
+            a(ng-click='$event.stopPropagation()' bs-popover data-template-url='chart-settings'
data-placement='bottom' data-auto-close='1' data-trigger='click') Chart settings
+            div(ng-show='paragraphTimeSpanVisible(paragraph)')
+                label Show
+                button.select-manual-caret.btn.btn-default(ng-model='paragraph.timeLineSpan'
ng-change='applyChartTimeFrame(paragraph)' bs-options='item for item in timeLineSpans' bs-select
data-caret-html='<span class="caret"></span>')
+                label min
+        .col-xs-4
+            +result-toolbar
+
 
 block container
     .row
@@ -103,13 +115,6 @@ block container
                                         +btn-toolbar('fa-pencil', 'paragraph.edit = true;
paragraph.editName = paragraph.name;', 'Rename query', 'paragraph-name-{{paragraph.id}}')
                                         +btn-toolbar('fa-remove', 'removeParagraph(paragraph)',
'Remove query')
 
-                                    .pull-right.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.')
-                                        +btn-toolbar-data('fa-pie-chart', 'pie', 'Show pie
chart.<br/>By default first column - pie labels, second column - pie values.<br/>In
case of one column it will be treated as pie values.')
-                                        +btn-toolbar-data('fa-line-chart', 'line', 'Show
line 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.')
-                                        +btn-toolbar-data('fa-area-chart', 'area', 'Show
area 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.')
-
                                 div(ng-show='paragraph.edit')
                                     i.tipLabel.fa(ng-class='paragraphExpanded(paragraph)
? "fa-chevron-circle-up" : "fa-chevron-circle-down"')
                                     input.sql-name-input(id='paragraph-name-{{paragraph.id}}'
ng-model='paragraph.editName' required ng-click='$event.stopPropagation();' on-enter='renameParagraph(paragraph,
paragraph.editName)' on-escape='paragraph.edit = false')
@@ -156,13 +161,16 @@ block container
                                     hr(style='margin-top: 0; margin-bottom: 10px')
                                     .sql-empty-result(ng-show='!paragraph.nonEmpty()') Result
set is empty
                                     div(ng-show='paragraph.table() && paragraph.nonEmpty()')
-                                        .sql-table-total
-                                            label Page #&nbsp;
-                                            b {{paragraph.page}}&nbsp;&nbsp;&nbsp;
-                                            label Results so far:&nbsp;
-                                            b {{paragraph.rows.length + paragraph.total}}
-                                            .pull-right
-                                                .btn-group(ng-disabled='paragraph.loading')
+                                        .sql-table-total.row
+                                            .col-xs-4
+                                                label Page #&nbsp;
+                                                b {{paragraph.page}}&nbsp;&nbsp;&nbsp;
+                                                label Results so far:&nbsp;
+                                                b {{paragraph.rows.length + paragraph.total}}
+                                            .col-xs-4
+                                                +result-toolbar
+                                            .col-xs-4
+                                                .btn-group.pull-right(ng-disabled='paragraph.loading')
                                                     button.btn.btn-primary.fieldButton(ng-click='exportPage(paragraph)'
bs-tooltip data-title='{{actionTooltip(paragraph, "export", false)}}') Export
                                                     button.btn.btn-primary(id='export-item-dropdown'
data-toggle='dropdown' data-container='body' bs-dropdown='exportDropdown' data-placement='bottom-right')
                                                         span.caret


Mime
View raw message