5 Commits

Author SHA1 Message Date
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
Brian Federle
347ac311a0 UI Plugin: Use new format
Define plugins as namespaced objects instead of as function calls. This
is easier to implement and manage by the framework.

New format changes for defining plugins:

Now create 2 JS files in plugin folder:
  -config.js
  -[pluginName].js

plugins.js (listing) format:

  cloudStack.plugins = [
    'testPlugin'
  ];

config.js format:

  cloudStack.plugins.testPlugin.config = {
    title: 'Test Plugin',
    desc: 'Sample plugin'
  };

[pluginName].js format:

  cloudStack.plugins.testPlugin = function(plugin) {
    //
    // Plugin code goes here
    //
  };
2012-12-20 11:55:44 -08:00
Brian Federle
59c77b4850 Add plugin loading functionality and basic framework
Dynamically load UI plugins via require.js

Plugin code uses the following format:

(function (cloudStack) {
  var testPlugin1 = function(plugin) {
    // Plugin code goes here
  };

  cloudStack.plugin({
    id: 'testPlugin1',
    title: 'Test Plugin 1',
    desc: 'Sample plugin 1',
    load: testPlugin1
  });
}(cloudStack));
2012-12-19 15:47:25 -08:00
Brian Federle
f0a6e86e14 Add/style basic plugin listing 2012-12-19 15:04:47 -08:00
Brian Federle
bd9bedac8a Fix path for plugins.js 2012-12-19 14:03:31 -08:00