From f9e50307ad74beb8c80bf302d5d3deb67f6fdfc5 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 bdae8f6b847..2b1f4e23b1e 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -7289,6 +7289,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; }