Updated Branches: refs/heads/UI-explicitDedication 651864d9b -> 3063fa58c
explicit Dedication - Pod action filter for release/dedicate action items Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3063fa58 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3063fa58 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3063fa58 Branch: refs/heads/UI-explicitDedication Commit: 3063fa58cdfee609d09b5c826fef3b01ac523c39 Parents: 651864d Author: Pranav Saxena <pranav.sax...@citrix.com> Authored: Tue May 28 18:04:22 2013 +0530 Committer: Pranav Saxena <pranav.sax...@citrix.com> Committed: Tue May 28 18:04:22 2013 +0530 ---------------------------------------------------------------------- ui/scripts/system.js | 22 +++++----------------- 1 files changed, 5 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3063fa58/ui/scripts/system.js ---------------------------------------------------------------------- diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 3d7537e..1d2ade1 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -12264,26 +12264,14 @@ var podActionfilter = function(args) { var podObj = args.context.item; + var dedicatedPodObj = args.context.podItem; var allowedActions = []; - var flag = 0; - $.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) - flag =1; - } - else - flag =0; - } - }); - - // if(flag == 0) + + if(podObj.domainid != null) + allowedActions.push("release"); + else allowedActions.push("dedicate"); - // if(flag == 1) - allowedActions.push("release"); allowedActions.push("edit"); if(podObj.allocationstate == "Disabled")