CLOUDSTACK-228: cloudstack UI - host page - hide Force Reconnect option when host state is Disconnected.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/4bcd46e4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/4bcd46e4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/4bcd46e4 Branch: refs/heads/junit-tests Commit: 4bcd46e45e78baaabdc26fef75ef7529af51330d Parents: abc3ff2 Author: Jessica Wang <[email protected]> Authored: Wed Oct 10 12:38:06 2012 -0700 Committer: Chip Childers <[email protected]> Committed: Mon Oct 15 16:19:13 2012 -0400 ---------------------------------------------------------------------- ui/scripts/system.js | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4bcd46e4/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 840cd47..3088b31 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -10153,7 +10153,9 @@ if (jsonObj.resourcestate == "Enabled") { allowedActions.push("edit"); allowedActions.push("enableMaintenanceMode"); - allowedActions.push("forceReconnect"); + + if(jsonObj.state != "Disconnected") + allowedActions.push("forceReconnect"); } else if (jsonObj.resourcestate == "ErrorInMaintenance") { allowedActions.push("edit");
