Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D4EED200D41 for ; Wed, 22 Nov 2017 11:23:19 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D36BD160BDA; Wed, 22 Nov 2017 10:23:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CB1AC160C0F for ; Wed, 22 Nov 2017 11:23:18 +0100 (CET) Received: (qmail 58855 invoked by uid 500); 22 Nov 2017 10:23:18 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 58839 invoked by uid 99); 22 Nov 2017 10:23:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Nov 2017 10:23:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 451F7F159F; Wed, 22 Nov 2017 10:23:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Wed, 22 Nov 2017 10:23:19 -0000 Message-Id: <7fdfe13845d6499784fb9af7991a7342@git.apache.org> In-Reply-To: <6d1da56bcf184977abca40329c0d7023@git.apache.org> References: <6d1da56bcf184977abca40329c0d7023@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/15] ignite git commit: IGNITE-4454. Added duration and node ID in results header and 'Show query' modal. archived-at: Wed, 22 Nov 2017 10:23:20 -0000 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 Authored: Tue Nov 21 17:20:11 2017 +0700 Committer: Alexey Kuznetsov 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='') 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("
")' 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