add a method that returns both the available and enabled plugins to reduce the number of AJAX calls required

This commit is contained in:
Damien Churchill 2009-09-16 09:38:46 +00:00
parent 443b4854b4
commit f831cdce9a
1 changed files with 7 additions and 0 deletions

View File

@ -781,6 +781,13 @@ class WebApi(JSONComponent):
config[key] = config[key].encode("utf8")
web_config[key] = config[key]
@export
def get_plugins(self):
return {
"enabled_plugins": component.get("Web.PluginManager").plugins.keys(),
"available_plugins": component.get("Web.PluginManager").available_plugins
}
@export
def get_plugin_info(self, name):
return component.get("Web.PluginManager").get_plugin_info(name)