2022-07-30 00:19:30 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="de">
|
2022-08-27 00:29:22 +02:00
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/header.css') }}">
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/main.css') }}">
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/switch.css') }}">
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<script>
|
|
|
|
function sleep (time) {
|
|
|
|
return new Promise((resolve) => setTimeout(resolve, time));
|
|
|
|
}
|
2022-08-25 13:24:11 +02:00
|
|
|
|
2022-08-27 00:29:22 +02:00
|
|
|
function executeAction(command, index, value, handleResponse) {
|
|
|
|
var url = '{{url_for("executeAction")}}';
|
|
|
|
var messageString = 'no';
|
|
|
|
var varString = 'command=' + command + '&index=' + index + '&value=' + value;
|
|
|
|
send_web_request(url, messageString, varString, handleResponse);
|
|
|
|
}
|
|
|
|
function executeActionByValueID(command, index, valueID, valueFactor){
|
|
|
|
var value = document.getElementById(valueID).value * valueFactor;
|
|
|
|
executeAction(command, index, value);
|
|
|
|
}
|
2022-08-25 15:37:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-27 00:29:22 +02:00
|
|
|
function switchZoneMode(autoMode, zone) {
|
|
|
|
executeAction('switch_zone_mode' ,zone, (autoMode ? 'automatic' : 'manual'));
|
|
|
|
sleep(1000).then(() => {
|
|
|
|
refreshContent();
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
function switchZoneState(command, zone, value) {
|
|
|
|
executeAction(command, zone, value);
|
|
|
|
sleep(1000).then(() => {
|
|
|
|
refreshContent();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
function switchZoneStateByValueID(command, zone, valueID, valueFactor) {
|
|
|
|
executeActionByValueID(command, zone, valueID, valueFactor);
|
|
|
|
sleep(1000).then(() => {
|
|
|
|
refreshContent();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
function deleteJobsForZone(command, zone) {
|
|
|
|
executeAction(command, zone);
|
|
|
|
sleep(1000).then(() => {
|
|
|
|
refreshContent();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
function deleteJobById(command, jobId) {
|
|
|
|
executeAction(command, jobId);
|
|
|
|
sleep(1000).then(() => {
|
|
|
|
refreshContent();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-08-25 15:37:54 +02:00
|
|
|
|
|
|
|
|
2022-08-25 13:24:11 +02:00
|
|
|
|
2022-08-27 00:29:22 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<nav>
|
|
|
|
<ul>
|
|
|
|
{% for item in nav.top %}
|
|
|
|
<li {{ 'class=active' if item.is_active else '' }}>
|
|
|
|
<a href="{{ item.url }}">
|
|
|
|
{{ item.label }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2022-07-30 00:19:30 +02:00
|
|
|
|
2022-08-27 00:29:22 +02:00
|
|
|
<a class="heading" href="{{ url_for('startPage')}}">
|
|
|
|
<img src="{{ url_for('static', filename='img/header/wassertropfen.png') }}" alt="" class="title-img">
|
2022-07-30 00:19:30 +02:00
|
|
|
|
2022-08-27 00:29:22 +02:00
|
|
|
<h1>{{ translater.getTranslation("Irrigation") }}-<br>{{ translater.getTranslation("system") }}</h1>
|
|
|
|
</a>
|
2022-07-30 00:19:30 +02:00
|
|
|
|
2022-08-27 00:29:22 +02:00
|
|
|
<img src="{{ url_for('static', filename='img/header/blumenbeet.jpg') }}" alt="" class="header-img">
|
|
|
|
|
|
|
|
</header>
|
|
|
|
<script src="{{ url_for('static', filename='js/action.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/webhook.js') }}"></script>
|
|
|
|
</body>
|
2022-08-16 03:22:01 +02:00
|
|
|
</html>
|
|
|
|
|