From 1b8ab1a3829b9ebe5a799af71ca4bdf333592dda Mon Sep 17 00:00:00 2001 From: Pranav Saxena Date: Tue, 28 May 2013 16:00:24 +0530 Subject: [PATCH] explicit Dedication - Pod action filter for release/dedicate action items --- ui/scripts/system.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 4755f270b48..42a8d3679dc 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -12228,8 +12228,21 @@ var podActionfilter = function(args) { var podObj = args.context.item; var allowedActions = []; + + $.ajax({ + url:createURL("listDedicatedPods&podId=" + args.context.pods[0].id), + success:function(json){ + if(json.listdedicatedpodsresponse.dedicatedpod != undefined){ + var dedicatedPodObj = json.listdedicatedpodsresponse.dedicatedpod[0]; + if(dedicatedPodObj.domainid != null) + allowedActions.push("release"); + } + else + allowedActions.push("dedicate"); + } + }); + allowedActions.push("edit"); - allowedActions.push("dedicate"); if(podObj.allocationstate == "Disabled") allowedActions.push("enable"); else if(podObj.allocationstate == "Enabled")