diff --git a/Webserver/Templates/dashboard/dashboard.html b/Webserver/Templates/dashboard/dashboard.html index f54a24c..cd9eb59 100644 --- a/Webserver/Templates/dashboard/dashboard.html +++ b/Webserver/Templates/dashboard/dashboard.html @@ -64,7 +64,8 @@ - +
{{ translater.getTranslation("currently there are no planned jobs.")}}
+ diff --git a/Webserver/Translater.py b/Webserver/Translater.py index 9deb220..e5c8ea7 100644 --- a/Webserver/Translater.py +++ b/Webserver/Translater.py @@ -36,6 +36,7 @@ class Translater: "delete": "löschen", "delete and cancel all jobs": "alle Aufträge löschen und abbrechen", "switch all to": "stelle alle um auf", + "currently there are no planned jobs.": "momentan sind keine Aufträge geplant." } diff --git a/Webserver/static/js/dashboard.js b/Webserver/static/js/dashboard.js index 2d5e15b..91e8df8 100644 --- a/Webserver/static/js/dashboard.js +++ b/Webserver/static/js/dashboard.js @@ -17,7 +17,11 @@ function refreshZone(zone_json) { function refreshPipeline(pipeline_html) { - document.getElementById("jobListBody").innerHTML = pipeline_html; + //alert("refreshing Pipeline"); + var jobListBody = document.getElementById("jobListBody"); + jobListBody.innerHTML = pipeline_html; + document.getElementById("text_no_jobs").style.display = jobListBody.childElementCount ? 'none' : 'block'; + document.getElementById("button_delete_all_jobs").style.display = jobListBody.childElementCount ? 'block' : 'none'; } function buttonDeleteJobById(jobId) { diff --git a/Zone.py b/Zone.py index b03ae5a..992475c 100644 --- a/Zone.py +++ b/Zone.py @@ -55,7 +55,10 @@ class Zone: self.state = False case 2: if (self.timeOver()): - self.setState = 0 + if (self.planedDuration > 0): + self.setState = 3 + else: + self.setState = 0 self.refreshStateAutomode() else: self.state = True @@ -81,7 +84,10 @@ class Zone: self.state = False case 2: if (self.timeOver()): - self.setState = 0 + if (self.planedDuration > 0): + self.setState = 3 + else: + self.setState = 0 self.state = False else: self.state = True @@ -112,7 +118,7 @@ class Zone: self.setState = 2 self.endTimeSetState = time.time() + duration else: - if(self.setState == 1): + if(self.setState == 1 or self.setState == 2): pass elif(state): self.setState = 3