mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 14481: cloudstack 3.0 UI - instance page - after a regular user destroys a VM, listVirtualMachines API will no longer returns this destroyed VM to the regular user. So, add additional code in dataProvider() to handle this case.
This commit is contained in:
parent
5998eb84c7
commit
1945c70805
@ -1554,8 +1554,13 @@
|
||||
url: createURL("listVirtualMachines&id=" + args.context.instances[0].id),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jsonObj = json.listvirtualmachinesresponse.virtualmachine[0];
|
||||
success: function(json) {
|
||||
var jsonObj;
|
||||
if(json.listvirtualmachinesresponse.virtualmachine != null && json.listvirtualmachinesresponse.virtualmachine.length > 0)
|
||||
jsonObj = json.listvirtualmachinesresponse.virtualmachine[0];
|
||||
else
|
||||
jsonObj = $.extend(args.context.instances[0], {state: "Destroyed",}); //after a regular user destroys a VM, listVirtualMachines API will no longer returns this destroyed VM to the regular user.
|
||||
|
||||
args.response.success(
|
||||
{
|
||||
actionFilter: vmActionfilter,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user