implemented to cancel all jobs if all jobs are deleted.
This commit is contained in:
parent
cb9a3b6830
commit
18e78b7783
|
@ -64,7 +64,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button onclick="buttonDeleteJobById('all')">{{ translater.getTranslation("delete all jobs")}}</button>
|
||||
<button onclick="buttonDeleteJobById('all')">{{ translater.getTranslation("delete and cancel all jobs")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class Translater:
|
|||
"planed duration": "geplante Dauer",
|
||||
"cancel": "abbrechen",
|
||||
"delete": "löschen",
|
||||
"delete all jobs" : "alle Aufträge löschen",
|
||||
"delete and cancel all jobs": "alle Aufträge löschen und abbrechen",
|
||||
"switch all to": "stelle alle um auf",
|
||||
}
|
||||
|
||||
|
|
|
@ -63,6 +63,8 @@ class ZoneManager:
|
|||
def clearIrrigationJobs(self):
|
||||
with self.piplineMutexLock:
|
||||
self.pipeLine = []
|
||||
for zone in self.zones:
|
||||
self.switchZoneState(zone=zone, state=False, duration=-1, instant=True)
|
||||
|
||||
def isAnyZoneBusy(self):
|
||||
for zone in self.zones:
|
||||
|
@ -80,7 +82,7 @@ class ZoneManager:
|
|||
|
||||
def switchZoneIndexState(self, zoneIndex, state, duration, instant=False):
|
||||
zone = self.getZone(zoneIndex)
|
||||
self.switchZoneState(zone, state, duration, instant)
|
||||
self.switchZoneState(zone=zone, state=state, duration=duration, instant=instant)
|
||||
|
||||
def getPlanedDurationForZone(self, zone):
|
||||
totalDuration = 0
|
||||
|
|
Loading…
Reference in New Issue