2022-08-27 00:29:22 +02:00
|
|
|
{% include "header.html" %}
|
2022-08-25 15:37:54 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="de">
|
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/dashboard.css') }}">
|
2022-08-27 00:29:22 +02:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/scrollingTable.css') }}">
|
2022-08-25 15:37:54 +02:00
|
|
|
|
|
|
|
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
@media screen and (min-width: 2051px){
|
|
|
|
#zones{
|
|
|
|
grid-template-rows: repeat( {{ (zoneManager.zones|length / 3) + 1 }} , minmax(150px, auto));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@media screen and (max-width: 2050px) and (min-width: 1351px){
|
|
|
|
#zones{
|
|
|
|
grid-template-rows: repeat( {{ (zoneManager.zones|length / 2) + 1 }} , minmax(150px, auto));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@media screen and (max-width: 1350px){
|
|
|
|
#zones{
|
|
|
|
grid-template-rows: repeat( {{ zoneManager.zones|length }} , minmax(150px, auto));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
2022-08-27 00:43:15 +02:00
|
|
|
<script src="{{ url_for('static', filename='js/dashboard.js') }}"></script>
|
|
|
|
<script>
|
|
|
|
function refreshContent() {
|
|
|
|
executeAction('get_dashboard_pipeline_html', '0', '0', refreshPipeline);
|
|
|
|
{% for zone in zoneManager.zones %}
|
|
|
|
executeAction('get_zone_info', {{ zone.number }}, '0', refreshZone);
|
|
|
|
{% endfor %}
|
|
|
|
}
|
2022-08-27 22:06:58 +02:00
|
|
|
|
|
|
|
function buttonDeleteJobById(jobId) {
|
|
|
|
if(jobId == "all") {
|
|
|
|
if(confirm('{{ translater.getTranslation("delete all planed and cancel running jobs?")}}')){
|
|
|
|
document.getElementById("jobListBody").innerHTML = "";
|
|
|
|
} else {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
var jobToDelete = document.getElementById("job_" + jobId);
|
|
|
|
document.getElementById("jobListBody").removeChild(jobToDelete);
|
|
|
|
}
|
|
|
|
deleteJobById('delete_job_by_id',jobId);
|
|
|
|
}
|
2022-08-27 00:43:15 +02:00
|
|
|
</script>
|
|
|
|
|
2022-08-25 15:37:54 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
<main>
|
|
|
|
|
|
|
|
<h2>{{ translater.getTranslation("Dashboard") }}</h2>
|
|
|
|
|
|
|
|
|
2022-08-27 00:29:22 +02:00
|
|
|
<div id="pipeline" class="scrollingtable">
|
2022-08-27 22:06:58 +02:00
|
|
|
<div id="jobListTable">
|
2022-08-27 00:29:22 +02:00
|
|
|
<div>
|
|
|
|
<table>
|
|
|
|
<caption>{{ translater.getTranslation("planed irrigationjobs") }}</caption>
|
2022-08-27 22:06:58 +02:00
|
|
|
<thead id="jobListHead">
|
2022-08-27 00:29:22 +02:00
|
|
|
<tr>
|
|
|
|
<th><div label="Nr."></div></th>
|
|
|
|
<th><div label="{{ translater.getTranslation("Zone") }}"></div></th>
|
|
|
|
<th><div label="{{ translater.getTranslation("planed duration") }}"></div></th>
|
|
|
|
<th><div label="{{ translater.getTranslation("delete") }}"></div></th>
|
|
|
|
<th class="scrollbarhead"></th> <!--ALWAYS ADD THIS EXTRA CELL AT END OF HEADER ROW-->
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="jobListBody">
|
|
|
|
{% include "dashboard/pipeline.html" %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2022-08-27 20:47:03 +02:00
|
|
|
<p id="text_no_jobs">{{ translater.getTranslation("currently there are no planned jobs.")}}</p>
|
|
|
|
<button id="button_delete_all_jobs" onclick="buttonDeleteJobById('all')">{{ translater.getTranslation("delete and cancel all jobs")}}</button>
|
2022-08-27 00:29:22 +02:00
|
|
|
</div>
|
2022-08-25 15:37:54 +02:00
|
|
|
</div>
|
2022-08-27 00:29:22 +02:00
|
|
|
|
2022-08-25 15:37:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
<h3>{{ translater.getTranslation("irrigation zones") }}</h3>
|
2022-08-27 19:16:23 +02:00
|
|
|
<button onclick="switchZoneMode(false, 'all')">{{ translater.getTranslation("switch all to")}} {{ translater.getTranslation("manual mode") }}</button>
|
|
|
|
<button onclick="switchZoneMode(true, 'all')">{{ translater.getTranslation("switch all to")}} {{ translater.getTranslation("automatic mode") }}</button>
|
2022-08-25 15:37:54 +02:00
|
|
|
<div id="zones">
|
|
|
|
{% for zone in zoneManager.zones %}
|
|
|
|
<div id="zone_{{ zone.number }}" class="zone">
|
|
|
|
{% include "dashboard/zone.html" %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</main>
|
|
|
|
<p><br><br></p>
|
|
|
|
|
|
|
|
</body>
|
2022-08-27 00:29:22 +02:00
|
|
|
</html>
|
|
|
|
|
|
|
|
{% include "footer.html" %}
|