IGNITE-7257 Web Console: Fixed reconnection after change profile.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/48a76f67 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/48a76f67 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/48a76f67 Branch: refs/heads/ignite-zk Commit: 48a76f6777dcae2b0e95934df2b973ff8fa18520 Parents: bb26300 Author: Dmitriy Shabalin <[email protected]> Authored: Wed Dec 27 14:41:03 2017 +0700 Committer: Alexey Kuznetsov <[email protected]> Committed: Wed Dec 27 14:41:03 2017 +0700 ---------------------------------------------------------------------- modules/web-console/frontend/app/app.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/48a76f67/modules/web-console/frontend/app/app.js ---------------------------------------------------------------------- diff --git a/modules/web-console/frontend/app/app.js b/modules/web-console/frontend/app/app.js index a1cd6eb..332bc24 100644 --- a/modules/web-console/frontend/app/app.js +++ b/modules/web-console/frontend/app/app.js @@ -300,7 +300,16 @@ angular.module('ignite-console', [ $root.gettingStarted = gettingStarted; }]) .run(['$rootScope', 'AgentManager', ($root, agentMgr) => { - $root.$on('user', () => agentMgr.connect()); + let lastUser; + + $root.$on('user', (e, user) => { + if (lastUser) + return; + + lastUser = user; + + agentMgr.connect(); + }); }]) .run(['$transitions', ($transitions) => { $transitions.onSuccess({ }, (trans) => {
