This is an automated email from the ASF dual-hosted git repository. akuznetsov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push: new 27232fb IGNITE-10538 Web Console: Fixed "no-data" component for "Queries" screen. 27232fb is described below commit 27232fb7e9ef14d7298722822071874482908a3b Author: Alexander Kalinin <verba...@yandex.ru> AuthorDate: Thu Feb 14 18:22:13 2019 +0700 IGNITE-10538 Web Console: Fixed "no-data" component for "Queries" screen. --- .../page-queries/components/queries-notebook/controller.ts | 11 ++++++++--- .../page-queries/components/queries-notebook/style.scss | 12 +++++++++++- .../components/queries-notebook/template.tpl.pug | 11 ++++------- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts index 6d17aca..83e9723 100644 --- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts +++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.ts @@ -18,7 +18,7 @@ import _ from 'lodash'; import {nonEmpty, nonNil} from 'app/utils/lodashMixins'; import id8 from 'app/utils/id8'; -import {timer, merge, defer, of} from 'rxjs'; +import {timer, merge, defer, of, EMPTY} from 'rxjs'; import {tap, switchMap, exhaustMap, take, pluck, distinctUntilChanged, filter, map, catchError} from 'rxjs/operators'; import {CSV} from 'app/services/CSV'; @@ -942,8 +942,13 @@ export class NotebookCtrl { this.refresh$ = cluster$.pipe( switchMap((cluster) => { - if (!cluster && !agentMgr.isDemoMode()) - return of(null); + if (!cluster && !agentMgr.isDemoMode()) { + return of(EMPTY).pipe( + tap(() => { + $scope.caches = []; + }) + ); + } return of(cluster).pipe( tap(() => Loading.start('sqlLoading')), diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/style.scss b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/style.scss index e632cdb..8645316 100644 --- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/style.scss +++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/style.scss @@ -107,7 +107,6 @@ queries-notebook { } .empty-caches { - color: $ignite-placeholder-color; display: flex; padding: 10px; align-items: center; @@ -152,6 +151,17 @@ queries-notebook { overflow-y: auto; } + + .notebook-failed--block { + text-align: center; + display: flex; + min-height: 200px; + align-items: center; + justify-content: center; + margin-bottom: 30px; + background: white; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2); + } } .popover.settings.refresh-rate { diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug index e7334cb..5342333 100644 --- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug +++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug @@ -66,11 +66,6 @@ mixin chart-settings .col-xs-2 +result-toolbar -mixin notebook-error - h2 Failed to load notebook - label.col-sm-12 Notebook not accessible any more. Go back to notebooks list. - button.h3.btn.btn-primary(ui-sref='default-state') Leave Notebook - mixin query-settings div .form-field--inline( @@ -496,8 +491,10 @@ div readonly='true' ) - div(ng-if='notebookLoadFailed' style='text-align: center') - +notebook-error + .notebook-failed--block(ng-if='notebookLoadFailed') + no-data + h2 Failed to load notebook + label.col-sm-12 Notebook not accessible any more. Go back to notebooks list. div(ng-if='notebook' ignite-loading='sqlLoading' ignite-loading-text='{{ loadingText }}' ignite-loading-position='top') .docs-body.paragraphs