You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2018/08/06 03:30:11 UTC
ignite git commit: IGNITE-9176 Web Console: Show error if failed to
toggle cluster state.
Repository: ignite
Updated Branches:
refs/heads/master 3ab8bbadc -> d3760ed79
IGNITE-9176 Web Console: Show error if failed to toggle cluster state.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d3760ed7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d3760ed7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d3760ed7
Branch: refs/heads/master
Commit: d3760ed7919447c066c5d138ed0abd7e35c32dcb
Parents: 3ab8bba
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Mon Aug 6 10:29:54 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Mon Aug 6 10:29:54 2018 +0700
----------------------------------------------------------------------
.../app/components/cluster-selector/controller.js | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/d3760ed7/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 63421b1..fb64b9f 100644
--- a/modules/web-console/frontend/app/components/cluster-selector/controller.js
+++ b/modules/web-console/frontend/app/components/cluster-selector/controller.js
@@ -21,17 +21,19 @@ import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import 'rxjs/add/operator/combineLatest';
export default class {
- static $inject = ['AgentManager', 'IgniteConfirm', 'IgniteVersion'];
+ static $inject = ['AgentManager', 'IgniteConfirm', 'IgniteVersion', 'IgniteMessages'];
/**
* @param agentMgr Agent manager.
* @param Confirm Confirmation service.
* @param Version Version check service.
+ * @param Messages Messages service.
*/
- constructor(agentMgr, Confirm, Version) {
+ constructor(agentMgr, Confirm, Version, Messages) {
this.agentMgr = agentMgr;
this.Confirm = Confirm;
this.Version = Version;
+ this.Messages = Messages;
this.clusters = [];
this.isDemo = agentMgr.isDemoMode();
@@ -74,10 +76,13 @@ export default class {
const toggleClusterState = () => {
this._inProgressSubject.next(true);
- // IGNITE-8744 For some reason .finally() not working in Firefox, needed to be investigated later.
return this.agentMgr.toggleClusterState()
.then(() => this._inProgressSubject.next(false))
- .catch(() => this._inProgressSubject.next(false));
+ .catch((err) => {
+ this._inProgressSubject.next(false);
+
+ this.Messages.showError('Failed to toggle cluster state: ', err);
+ });
};
if (this.cluster.active) {