Allow hiding plugins from Plugin Manager
This commit is contained in:
parent
1eb3f84bce
commit
22d12ac54c
2 changed files with 6 additions and 1 deletions
|
|
@ -9,6 +9,7 @@
|
|||
* More verbose output for Software Update plugin for logged in administrators.
|
||||
Will now log the update commands and their output similar to the Plugin
|
||||
Manager install and uninstall dialog.
|
||||
* Allow hiding plugins from Plugin Manager via ``config.yaml``.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,8 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
|
|||
return dict(
|
||||
repository="http://plugins.octoprint.org/plugins.json",
|
||||
repository_ttl=24*60,
|
||||
pip=None
|
||||
pip=None,
|
||||
hidden=[]
|
||||
)
|
||||
|
||||
def on_settings_save(self, data):
|
||||
|
|
@ -161,8 +162,11 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
|
|||
|
||||
plugins = self._plugin_manager.plugins
|
||||
|
||||
hidden = self._settings.get(["hidden"])
|
||||
result = []
|
||||
for name, plugin in plugins.items():
|
||||
if name in hidden:
|
||||
continue
|
||||
result.append(self._to_external_representation(plugin))
|
||||
|
||||
if "refresh_repository" in request.values and request.values["refresh_repository"] in valid_boolean_trues:
|
||||
|
|
|
|||
Loading…
Reference in a new issue