From 5079cb6a067bb86579c7b8b5d2d9c0d157bcbba0 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 16 Mar 2012 15:57:07 -0700 Subject: [PATCH] bug 14332: cloudstack 3.0 UI - Host page - make "Remove Host" action available when host state is Down, Alert, Disconnected or when resource state is Maintenance, Disabled. --- ui/scripts/system.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 1b66055a466..86d496b389d 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -7288,6 +7288,11 @@ allowedActions.push("edit"); allowedActions.push("remove"); } + + if((jsonObj.state == "Down" || jsonObj.state == "Alert" || jsonObj.state == "Disconnected") && ($.inArray("remove", allowedActions) == -1)) { + allowedActions.push("remove"); + } + return allowedActions; }