Web Console: minor refactoring.
@@ -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);
});
