mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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.
14 lines
341 B
JavaScript
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)); |