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:
Brian Federle 2013-04-23 14:40:33 -07:00
parent d53d06cc2f
commit 1c482b5c3b

View File

@ -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));