#6 UI Updates senden und anzeigen
This commit is contained in:
parent
24c7010a9e
commit
66f2792027
@ -15,7 +15,6 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
|
|||||||
octoprint.plugin.ShutdownPlugin):
|
octoprint.plugin.ShutdownPlugin):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._pollTimer = None
|
|
||||||
self.ip = None
|
self.ip = None
|
||||||
self.intervall = 1
|
self.intervall = 1
|
||||||
self._timer = None
|
self._timer = None
|
||||||
@ -75,10 +74,6 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin,
|
|||||||
def on_shutdown(self):
|
def on_shutdown(self):
|
||||||
self._logger.info("Hello World!")
|
self._logger.info("Hello World!")
|
||||||
|
|
||||||
def on_settings_load(self):
|
|
||||||
self._logger.info("on_settings_load")
|
|
||||||
self.initialize()
|
|
||||||
|
|
||||||
def on_settings_migrate(self, target, current):
|
def on_settings_migrate(self, target, current):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ $(function() {
|
|||||||
|
|
||||||
self.mystromswitchEnabled = ko.observable();
|
self.mystromswitchEnabled = ko.observable();
|
||||||
|
|
||||||
|
|
||||||
self.testButtonChangeStatus = function (stat) {
|
self.testButtonChangeStatus = function (stat) {
|
||||||
$("#tester_mystromswitch_gcode").prop("disabled", stat);
|
$("#tester_mystromswitch_gcode").prop("disabled", stat);
|
||||||
$("#tester_mystromswitch_api").prop("disabled", stat);
|
$("#tester_mystromswitch_api").prop("disabled", stat);
|
||||||
@ -291,4 +290,3 @@ $(function() {
|
|||||||
$(".sidebar_plugin_mystromswitch").get(0)
|
$(".sidebar_plugin_mystromswitch").get(0)
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="sidebar_plugin_mystromswitch">
|
<div class="sidebar_plugin_mystromswitch">
|
||||||
<label class="checkbox">
|
<label class="checkbox">
|
||||||
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: mystromswitchEnabled">
|
<input type="checkbox" data-bind="enable: loginState.isUser(), checked: mystromswitchEnabled">
|
||||||
{{ _('Shutdown Printer after print finishes') }}
|
{{ _('Shutdown Printer after print finishes') }}
|
||||||
</label>
|
</label>
|
||||||
|
Loading…
Reference in New Issue
Block a user