mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Infrastructure UI plugin API: Add 'resource' method
Add new method 'infrastructure.resource' for retrieving resource objects from the infrastructure section. Specify the type as a string (i.e, 'pod' 'cluster' or 'host') and the entire resource object will be returned, including listView, actions, createForm, etc. Updating the data in this resource will automatically update the UI.
This commit is contained in:
parent
d53d06cc2f
commit
1c482b5c3b
@ -40,7 +40,17 @@
|
||||
state: state
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
resource: function(args) {
|
||||
var type = args.type;
|
||||
|
||||
if (type) {
|
||||
return cloudStack.sections.system.subsections[type];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
}(jQuery, cloudStack));
|
||||
}(jQuery, cloudStack));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user