From 004a8b3b07917a01e595461cd4548a53cb64ba9c Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Mon, 21 May 2012 10:07:13 -0700 Subject: [PATCH] Nexus UI development nexusActionfilter reviewed-by: brian --- 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;