mirror of https://github.com/apache/cloudstack.git
Nexus UI development nexusActionfilter
reviewed-by: brian
This commit is contained in:
parent
5a3fcbc604
commit
004a8b3b07
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue