Brian Federle 1a3ea28243 UI plugins API: addSection method
Adds 'addSection' method to UI plugins, which will add a new top-level
section. It follows the same syntax used by the existing sections in
the UI.
2012-12-20 13:27:37 -08:00

14 lines
341 B
JavaScript

(function (cloudStack) {
cloudStack.plugins.testPlugin = function(plugin) {
plugin.ui.addSection({
id: 'testPlugin',
title: 'TestPlugin',
preFilter: function(args) {
return isAdmin();
},
show: function() {
return $('<div>').html('Test plugin section');
}
});
};
}(cloudStack));