Environment detection & logging on startup
Incl. OctoPi version & RPi model through bundled plugin that only gets loaded if OctoPi is detected.
This commit is contained in:
1 parent
0bb343e1d3
commit
b2d70de144
19 files changed
+494
-53
No files matched your search
@@ -91,7 +91,8 @@ def plugin_manager(init=False, plugin_folders=None, plugin_types=None, plugin_en
|
||||
else:
|
||||
if init:
|
||||
if plugin_types is None:
|
||||
plugin_types = [StartupPlugin,
|
||||
plugin_types = [EnvironmentDetectionPlugin,
|
||||
StartupPlugin,
|
||||
ShutdownPlugin,
|
||||
TemplatePlugin,
|
||||
SettingsPlugin,
|
||||
|
||||
@@ -105,6 +105,16 @@ class ReloadNeedingPlugin(Plugin):
|
||||
Mixin for plugin types that need a reload of the UI after enabling/disabling them.
|
||||
"""
|
||||
|
||||
|
||||
class EnvironmentDetectionPlugin(OctoPrintPlugin, RestartNeedingPlugin):
|
||||
|
||||
def get_additional_environment(self):
|
||||
pass
|
||||
|
||||
def on_environment_detected(self, environment, *args, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
class StartupPlugin(OctoPrintPlugin, SortablePlugin):
|
||||
"""
|
||||
The ``StartupPlugin`` allows hooking into the startup of OctoPrint. It can be used to start up additional services
|
||||
|
||||
Reference in new issue
Block a user