From d800c4474f8576cb4a48076a767ddc43fefad039 Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Fri, 18 May 2012 11:43:17 +0530 Subject: [PATCH] Nexus UI development nexusActionfilter --- ui/scripts/system.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 1953d234d41..f5f1d53c6cb 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -6505,7 +6505,7 @@ args.context.clusters[0].state = item.allocationstate; addExtraPropertiesToClusterObject(item); args.response.success({ - actionFilter: podActionfilter, + actionFilter: nexusActionfilter, data:item }); } @@ -6538,7 +6538,7 @@ args.context.clusters[0].state = item.allocationstate; addExtraPropertiesToClusterObject(item); args.response.success({ - actionFilter: podActionfilter, + actionFilter: nexusActionfilter, data:item }); } @@ -8885,6 +8885,19 @@ allowedActions.push("remove"); return allowedActions; } + + + var nexusActionfilter = function(args) { + var nexusObj = args.context.item; + var allowedActions = [ ]; + allowedActions.push("edit"); + if(nexusObj.vsmdevicestate == "Disabled") + allowedActions.push("enable"); + else if(nexusObj.vsmdevicestate == "Enabled") + allowedActions.push("disable"); + allowedActions.push("remove"); + return allowedActions; + } var podActionfilter = function(args) { var podObj = args.context.item;