🐛 Fix rendering of UI plugin

No, I'm not making one *yet*. Just testing it out as a possible way of updating the UI, or extracting the current core UI 😉

Closes #3887
This commit is contained in:
cp2004 committed 2020-12-15 23:17:00 +00:00
1 parent 535af4aa1d
commit 3b79f83c50
1 file changed
+4 -2
+4 -2
View File
@@ -616,14 +616,16 @@ def index():
if plugin is not None and isinstance(
plugin.implementation, octoprint.plugin.UiPlugin
):
permissions = plugin.get_ui_permissions()
permissions = plugin.implementation.get_ui_permissions()
response = require_login(*permissions)
if not response:
response = plugin_view(plugin.implementation)
if _logger.isEnabledFor(logging.DEBUG) and isinstance(
response, Response
):
response.headers["X-Ui-Plugin"] = plugin._identifier
response.headers[
"X-Ui-Plugin"
] = plugin.implementation._identifier
else:
response = require_login(*default_permissions)
if not response: