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