IGNITE-8744 Added support for demo mode.

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

Branch: refs/heads/ignite-8446
Commit: 0c5da41c5ff30843bb090072bdc79a9ea194c4a7
Parents: fc737b7
Author: Vasiliy Sisko <vsi...@gridgain.com>
Authored: Wed Jul 11 18:41:35 2018 +0700
Committer: Alexey Kuznetsov <akuznet...@apache.org>
Committed: Wed Jul 11 18:41:35 2018 +0700

----------------------------------------------------------------------
 .../app/components/cluster-selector/controller.js         | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0c5da41c/modules/web-console/frontend/app/components/cluster-selector/controller.js
----------------------------------------------------------------------
diff --git 
a/modules/web-console/frontend/app/components/cluster-selector/controller.js 
b/modules/web-console/frontend/app/components/cluster-selector/controller.js
index a4102f3..9268a96 100644
--- a/modules/web-console/frontend/app/components/cluster-selector/controller.js
+++ b/modules/web-console/frontend/app/components/cluster-selector/controller.js
@@ -35,21 +35,25 @@ export default class {
     }
 
     $onInit() {
+        if (this.isDemo)
+            return;
+
         this.inProgress$ = this._inProgressSubject.asObservable();
 
         this.clusters$ = this.agentMgr.connectionSbj
             .combineLatest(this.inProgress$)
             .do(([sbj, inProgress]) => this.inProgress = inProgress)
             .filter(([sbj, inProgress]) => !inProgress)
-            .do(([{ cluster, clusters }]) => {
-                this.cluster = cluster ? { ...cluster } : null;
+            .do(([{cluster, clusters}]) => {
+                this.cluster = cluster ? {...cluster} : null;
                 this.clusters = _.orderBy(clusters, ['name'], ['asc']);
             })
             .subscribe(() => {});
     }
 
     $onDestroy() {
-        this.clusters$.unsubscribe();
+        if (!this.isDemo)
+            this.clusters$.unsubscribe();
     }
 
     change() {

Reply via email to