You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by yz...@apache.org on 2017/10/13 17:43:03 UTC

[18/50] [abbrv] ignite git commit: Web Console: minor refactoring. (cherry picked from commit abe4ee8)

Web Console: minor refactoring.
(cherry picked from commit abe4ee8)


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

Branch: refs/heads/ignite-2.1.5-p1
Commit: f5ff60eb72cf6bf55511b2c73f841eb50af59526
Parents: b6d570f
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Thu Sep 21 21:13:59 2017 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Thu Sep 21 21:28:06 2017 +0700

----------------------------------------------------------------------
 .../frontend/app/modules/agent/AgentManager.service.js       | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f5ff60eb/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/agent/AgentManager.service.js b/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
index 7c84edc..9a736b6 100644
--- a/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
+++ b/modules/web-console/frontend/app/modules/agent/AgentManager.service.js
@@ -101,7 +101,7 @@ export default class IgniteAgentManager {
 
         this.clusterVersion = '2.1.0';
 
-        if (!$root.IgniteDemoMode) {
+        if (!this.isDemoMode()) {
             this.connectionSbj.subscribe({
                 next: ({cluster}) => {
                     const version = _.get(cluster, 'clusterVersion');
@@ -115,6 +115,10 @@ export default class IgniteAgentManager {
         }
     }
 
+    isDemoMode() {
+        return this.$root.IgniteDemoMode;
+    }
+
     available(sinceVersion) {
         return this.Version.since(this.clusterVersion, sinceVersion);
     }
@@ -141,7 +145,7 @@ export default class IgniteAgentManager {
         self.socket.on('agents:stat', ({clusters, count}) => {
             const conn = self.connectionSbj.getValue();
 
-            conn.update(self.$root.IgniteDemoMode, count, clusters);
+            conn.update(self.isDemoMode(), count, clusters);
 
             self.connectionSbj.next(conn);
         });