diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0f429ab..4862f78 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,6 +4,7 @@ + @@ -38,17 +39,17 @@ - - - - + + + + - - - + + + @@ -63,8 +64,8 @@ - - + + @@ -73,28 +74,19 @@ - + - - + + - - - - - - - - - - - + + @@ -119,10 +111,10 @@ - - + + @@ -202,20 +194,6 @@ 1574193087583 - - 1574281964923 - - - - 1574281964923 - - - 1574282183896 - - - - 1574282183896 - 1574282504648 @@ -545,7 +523,21 @@ 1582990110412 - + + 1582990799626 + + + + 1582990799626 + + + 1582991033421 + + + + 1582991033421 + + @@ -607,7 +599,6 @@ - @@ -632,40 +623,41 @@ - + + - - - - - - - + + + + + + + - - + + - + - - + + - + - - + + diff --git a/octoprint_mystromswitch/static/js/mystromswitch.js b/octoprint_mystromswitch/static/js/mystromswitch.js index 8d0c978..599d6e3 100644 --- a/octoprint_mystromswitch/static/js/mystromswitch.js +++ b/octoprint_mystromswitch/static/js/mystromswitch.js @@ -7,8 +7,8 @@ $(function() { self.printer = parameters[2]; self.onOffButtonEnabled = ko.observable(); - self.showShutdownOctopiOption = ko.observable(); - self.showPowerOffPrintFinishOption = ko.observable(); + //self.showShutdownOctopiOption = ko.observable(); + //self.showPowerOffPrintFinishOption = ko.observable(); self.mystromswitchPowerValue = document.getElementById("mystromswitchPowerValue") self.mystromswitchEnergyValue = document.getElementById("mystromswitchEnergyValue") @@ -30,7 +30,7 @@ $(function() { //self.onOffButtonEnabled.subscribe(self.onmystromswitchEvent, self); - /*self.onAutomaticShutdownEnabledChanged = function(){ + self.onAutomaticShutdownEnabledChanged = function(){ var cmd = "disableShutdownAfterFinish"; if (self.automaticShutdownEnabled()) { var cmd = "enableShutdownAfterFinish"; @@ -60,7 +60,7 @@ $(function() { }), contentType: "application/json; charset=UTF-8" }) - }*/ + } //self.automaticShutdownEnabled.subscribe(self.onAutomaticShutdownEnabledChanged,self); //self.automaticPowerOffEnabled.subscribe(self.onAutomaticPowerOffEnabledChanged,self); @@ -70,8 +70,8 @@ $(function() { return; } self.onOffButtonEnabled(data.onOffButtonEnabled); - self.showShutdownOctopiOption(data.showShutdownOctopiOption); - self.showPowerOffPrintFinishOption(data.showPowerOffPrintFinishOption); + //self.showShutdownOctopiOption(data.showShutdownOctopiOption); + //self.showPowerOffPrintFinishOption(data.showPowerOffPrintFinishOption); self.mystromswitchEnergyValue.innerHTML = "Energy: "+data.energy.toFixed(1)+"Wh" if(data.relay == false){ self.mystromswitchPowerValue.innerHTML = "Relay is off"; diff --git a/octoprint_mystromswitch/templates/mystromswitch_settings.jinja2 b/octoprint_mystromswitch/templates/mystromswitch_settings.jinja2 index 7942819..933b399 100644 --- a/octoprint_mystromswitch/templates/mystromswitch_settings.jinja2 +++ b/octoprint_mystromswitch/templates/mystromswitch_settings.jinja2 @@ -1,7 +1,7 @@ General - {{ _('URL or IP-Address of your switch') }} + {{ _('URL or IP-Address of your switch (without http)') }} diff --git a/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 b/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 index dd68376..da5a304 100644 --- a/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 +++ b/octoprint_mystromswitch/templates/mystromswitch_sidebar.jinja2 @@ -3,12 +3,12 @@ Energy 0.0Wh {{ _('Toggle Relais') }} - + {{ _('Shutdown Octoprint after print finishes') }} - + {{ _('Power Off Relais after print finishes') }}