mirror of https://github.com/apache/cloudstack.git
explicit Dedication - Pod action filter for release/dedicate action items
This commit is contained in:
parent
5b2c2109c8
commit
1b8ab1a382
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in New Issue