IGNITE-4454. Added duration and node ID in results header and 'Show query' 
modal.


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

Branch: refs/heads/ignite-zk
Commit: 31055f21753ddc60aa656da131b83d8c29a5e71e
Parents: ed4616e
Author: alexdel <verba...@yandex.ru>
Authored: Tue Nov 21 17:20:11 2017 +0700
Committer: Alexey Kuznetsov <akuznet...@apache.org>
Committed: Tue Nov 21 17:20:11 2017 +0700

----------------------------------------------------------------------
 .../frontend/app/modules/sql/sql.controller.js  |  7 +++++--
 .../web-console/frontend/views/sql/sql.tpl.pug  | 22 +++++++++++++-------
 .../frontend/views/templates/message.tpl.pug    |  1 +
 3 files changed, 20 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/31055f21/modules/web-console/frontend/app/modules/sql/sql.controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/sql/sql.controller.js 
b/modules/web-console/frontend/app/modules/sql/sql.controller.js
index f5edb04..e97825c 100644
--- a/modules/web-console/frontend/app/modules/sql/sql.controller.js
+++ b/modules/web-console/frontend/app/modules/sql/sql.controller.js
@@ -1421,13 +1421,12 @@ export default ['$rootScope', '$scope', '$http', '$q', 
'$timeout', '$interval',
             const enforceJoinOrder = !!paragraph.enforceJoinOrder;
             const lazy = !!paragraph.lazy;
 
-            paragraph.localQueryMode = local;
-
             $scope.queryAvailable(paragraph) && 
_chooseNode(paragraph.cacheName, local)
                 .then((nid) => {
                     Notebook.save($scope.notebook)
                         .catch(Messages.showError);
 
+                    paragraph.localQueryMode = local;
                     paragraph.prevQuery = paragraph.queryArgs ? 
paragraph.queryArgs.query : paragraph.query;
 
                     _showLoading(paragraph, true);
@@ -1841,6 +1840,10 @@ export default ['$rootScope', '$scope', '$http', '$q', 
'$timeout', '$interval',
                     scope.content = paragraph.queryArgs.query.split(/\r?\n/);
                 }
 
+                // Attach duration and selected node info
+                scope.meta = `Duration: 
${$filter('duration')(paragraph.duration)}.`;
+                scope.meta += paragraph.localQueryMode ? ` Node ID8: 
${_.id8(paragraph.resNodeId)}` : '';
+
                 // Show a basic modal from a controller
                 $modal({scope, templateUrl: messageTemplateUrl, show: true});
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/31055f21/modules/web-console/frontend/views/sql/sql.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/sql/sql.tpl.pug 
b/modules/web-console/frontend/views/sql/sql.tpl.pug
index b324622..44989e8 100644
--- a/modules/web-console/frontend/views/sql/sql.tpl.pug
+++ b/modules/web-console/frontend/views/sql/sql.tpl.pug
@@ -32,7 +32,7 @@ mixin result-toolbar
 
 mixin chart-settings
     .total.row
-        .col-xs-4
+        .col-xs-5
             .chart-settings-link(ng-show='paragraph.chart && 
paragraph.chartColumns.length > 0')
                 a(title='Click to show chart settings dialog' 
ng-click='$event.stopPropagation()' bs-popover data-template-url='{{ 
$ctrl.chartSettingsTemplateUrl }}' data-placement='bottom' data-auto-close='1' 
data-trigger='click')
                     i.fa.fa-bars
@@ -41,7 +41,11 @@ mixin chart-settings
                     label Show
                     
button.select-manual-caret.btn.btn-default(ng-model='paragraph.timeLineSpan' 
ng-change='applyChartSettings(paragraph)' bs-options='item for item in 
timeLineSpans' bs-select data-caret-html='<span class="caret"></span>')
                     label min
-        .col-xs-4
+
+                div
+                    label Duration: #[b {{paragraph.duration | duration}}]
+                    label.margin-left-dflt(ng-show='paragraph.localQueryMode') 
NodeID8: #[b {{paragraph.resNodeId | id8}}]
+        .col-xs-2
             +result-toolbar
 
 mixin notebook-rename
@@ -139,16 +143,17 @@ mixin query-actions
 
 mixin table-result-heading-query
     .total.row
-        .col-xs-4
+        .col-xs-5
             grid-column-selector(grid-api='paragraph.gridOptions.api')
                 .fa.fa-bars.icon
             label Page: #[b {{paragraph.page}}]
             label.margin-left-dflt Results so far: #[b {{paragraph.rows.length 
+ paragraph.total}}]
             label.margin-left-dflt Duration: #[b {{paragraph.duration | 
duration}}]
-        .col-xs-4
+            label.margin-left-dflt(ng-show='paragraph.localQueryMode') 
NodeID8: #[b {{paragraph.resNodeId | id8}}]
+        .col-xs-2
             div(ng-if='paragraph.qryType === "query"')
                 +result-toolbar
-        .col-xs-4
+        .col-xs-5
             .pull-right
                 .btn-group.panel-tip-container
                     button.btn.btn-primary.btn--with-icon(
@@ -182,16 +187,17 @@ mixin table-result-heading-query
 
 mixin table-result-heading-scan
     .total.row
-        .col-xs-4
+        .col-xs-5
             grid-column-selector(grid-api='paragraph.gridOptions.api')
                 .fa.fa-bars.icon
             label Page: #[b {{paragraph.page}}]
             label.margin-left-dflt Results so far: #[b {{paragraph.rows.length 
+ paragraph.total}}]
             label.margin-left-dflt Duration: #[b {{paragraph.duration | 
duration}}]
-        .col-xs-4
+            label.margin-left-dflt(ng-show='paragraph.localQueryMode') 
NodeID8: #[b {{paragraph.resNodeId | id8}}]
+        .col-xs-2
             div(ng-if='paragraph.qryType === "query"')
                 +result-toolbar
-        .col-xs-4
+        .col-xs-5
             .pull-right
                 .btn-group.panel-tip-container
                     // TODO: replace this logic for exporting under one 
component

http://git-wip-us.apache.org/repos/asf/ignite/blob/31055f21/modules/web-console/frontend/views/templates/message.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/templates/message.tpl.pug 
b/modules/web-console/frontend/views/templates/message.tpl.pug
index aa3615f..3cdb3c8 100644
--- a/modules/web-console/frontend/views/templates/message.tpl.pug
+++ b/modules/web-console/frontend/views/templates/message.tpl.pug
@@ -25,4 +25,5 @@
             .modal-body(ng-show='content' style='overflow: auto; max-height: 
300px;')
                 p(ng-bind-html='content.join("<br/>")' style='text-align: 
left; white-space: nowrap;')
             .modal-footer
+                .pull-left(ng-show='meta') {{meta}}
                 button.btn.btn-primary(id='confirm-btn-confirm' 
ng-click='$hide()') Ok

Reply via email to