IGNITE-9608 Web Console: Fixed namings and buttons on Demo modal.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0efce4bc Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0efce4bc Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0efce4bc Branch: refs/heads/ignite-7251 Commit: 0efce4bc70058eb84a4052ded8fedb788fafd943 Parents: f1942bb Author: Alexander Kalinin <verba...@yandex.ru> Authored: Wed Sep 19 16:48:47 2018 +0700 Committer: Alexey Kuznetsov <akuznet...@apache.org> Committed: Wed Sep 19 16:48:47 2018 +0700 ---------------------------------------------------------------------- .../components/queries-notebook/controller.js | 15 ++++++--- .../frontend/views/templates/demo-info.tpl.pug | 32 +++++++++++--------- 2 files changed, 29 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/0efce4bc/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js index 3db1661..3ee08b3 100644 --- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js +++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js @@ -251,16 +251,16 @@ class Paragraph { // Controller for SQL notebook screen. export class NotebookCtrl { - static $inject = ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval', '$animate', '$location', '$anchorScroll', '$state', '$filter', '$modal', '$popover', 'IgniteLoading', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'AgentManager', 'IgniteChartColors', 'IgniteNotebook', 'IgniteNodes', 'uiGridExporterConstants', 'IgniteVersion', 'IgniteActivitiesData', 'JavaTypes', 'IgniteCopyToClipboard', 'CSV', 'IgniteErrorParser']; + static $inject = ['$rootScope', '$scope', '$http', '$q', '$timeout', '$interval', '$animate', '$location', '$anchorScroll', '$state', '$filter', '$modal', '$popover', 'IgniteLoading', 'IgniteLegacyUtils', 'IgniteMessages', 'IgniteConfirm', 'AgentManager', 'IgniteChartColors', 'IgniteNotebook', 'IgniteNodes', 'uiGridExporterConstants', 'IgniteVersion', 'IgniteActivitiesData', 'JavaTypes', 'IgniteCopyToClipboard', 'CSV', 'IgniteErrorParser', 'DemoInfo']; /** * @param {CSV} CSV */ - constructor($root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMgr, IgniteChartColors, Notebook, Nodes, uiGridExporterConstants, Version, ActivitiesData, JavaTypes, IgniteCopyToClipboard, CSV, errorParser) { + constructor($root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMgr, IgniteChartColors, Notebook, Nodes, uiGridExporterConstants, Version, ActivitiesData, JavaTypes, IgniteCopyToClipboard, CSV, errorParser, DemoInfo) { const $ctrl = this; this.CSV = CSV; - Object.assign(this, { $root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMgr, IgniteChartColors, Notebook, Nodes, uiGridExporterConstants, Version, ActivitiesData, JavaTypes, errorParser }); + Object.assign(this, { $root, $scope, $http, $q, $timeout, $interval, $animate, $location, $anchorScroll, $state, $filter, $modal, $popover, Loading, LegacyUtils, Messages, Confirm, agentMgr, IgniteChartColors, Notebook, Nodes, uiGridExporterConstants, Version, ActivitiesData, JavaTypes, errorParser, DemoInfo }); // Define template urls. $ctrl.paragraphRateTemplateUrl = paragraphRateTemplateUrl; @@ -988,7 +988,14 @@ export class NotebookCtrl { else $scope.rebuildScrollParagraphs(); }) - .then(() => _startWatch()) + .then(() => { + if ($root.IgniteDemoMode && sessionStorage.showDemoInfo !== 'true') { + sessionStorage.showDemoInfo = 'true'; + + this.DemoInfo.show().then(_startWatch); + } else + _startWatch(); + }) .catch(() => { $scope.notebookLoadFailed = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/0efce4bc/modules/web-console/frontend/views/templates/demo-info.tpl.pug ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/views/templates/demo-info.tpl.pug b/modules/web-console/frontend/views/templates/demo-info.tpl.pug index eab3274..437c8a0 100644 --- a/modules/web-console/frontend/views/templates/demo-info.tpl.pug +++ b/modules/web-console/frontend/views/templates/demo-info.tpl.pug @@ -25,25 +25,29 @@ | {{title}} .modal-body div(ng-bind-html='message') + div(ng-hide='hasAgents') - p - div - h4 - i.fa.fa-download.fa-cursor-default - | How To Start Demo - ul - li - a(ng-href='{{downloadAgentHref}}' target='_self') #[b Download] - | and unzip ignite-web-agent archive - li #[b Run] shell file ignite-web-agent.{sh|bat} - div(ng-show='hasAgents') + h4 + i.fa.fa-download.fa-cursor-default + | How To Start Demo + ul + li + a(ng-href='{{downloadAgentHref}}' target='_self') #[b Download] + | and unzip ignite-web-agent archive + li #[b Run] shell file ignite-web-agent.{sh|bat} + + div(ng-hide='!hasAgents') h4 i.fa.fa-star-o.fa-cursor-default | Start Demo ul li Web Agent is already started li Close dialog and try Web Console + .modal-footer - div - a.btn-ignite.btn-ignite--link-success(ng-hide='hasAgents' ng-href='{{downloadAgentHref}}' target='_self') Download agent - button.btn-ignite.btn-ignite--success(ng-class='hasAgents ? "btn-primary" : "btn-default"' ng-click='close()') Close + .ng-animate-disabled(ng-if='!hasAgents') + button.btn-ignite.btn-ignite--link-success(ng-click='close()') Close + a.btn-ignite.btn-ignite--success(ng-href='{{downloadAgentHref}}' target='_self') Download agent + + .ng-animate-disabled(ng-if='hasAgents') + button.btn-ignite.btn-ignite--success(ng-click='close()') Close