Webserver_Dashboard and basic functionality #1
|
@ -1,29 +1,29 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="../static/Styles/main.css">
|
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/dashboard.css') }}">
|
||||||
<link rel="stylesheet" href="../static/Styles/dashboard.css">
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@media screen and (min-width: 2051px){
|
@media screen and (min-width: 2051px){
|
||||||
#content{
|
#content{
|
||||||
grid-template-rows: repeat( {{ (zones|length / 3) + 1 }} , minmax(150px, auto));
|
grid-template-rows: repeat( {{ (zoneManager.zones|length / 3) + 1 }} , minmax(150px, auto));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 2050px) and (min-width: 1351px){
|
@media screen and (max-width: 2050px) and (min-width: 1351px){
|
||||||
#content{
|
#content{
|
||||||
grid-template-rows: repeat( {{ (zones|length / 2) + 1 }} , minmax(150px, auto));
|
grid-template-rows: repeat( {{ (zoneManager.zones|length / 2) + 1 }} , minmax(150px, auto));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 1350px){
|
@media screen and (max-width: 1350px){
|
||||||
#content{
|
#content{
|
||||||
grid-template-rows: repeat( {{ zones|length }} , minmax(150px, auto));
|
grid-template-rows: repeat( {{ zoneManager.zones|length }} , minmax(150px, auto));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% include "header.html" %}
|
{% include "header.html" %}
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
<h2>{{ translater.getTranslation("Dashboard") }}</h2>
|
<h2>{{ translater.getTranslation("Dashboard") }}</h2>
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
{% for zone in zones %}
|
{% for zone in zoneManager.zones %}
|
||||||
<div id="zone_{{ zone.number }}" class="zone">
|
<div id="zone_{{ zone.number }}" class="zone">
|
||||||
<a href="/zones/{{ zone.number}}">
|
<a href="/zones/{{ zone.number}}">
|
||||||
<h3>{{ zone.name }}</h3>
|
<h3>{{ zone.name }}</h3>
|
||||||
|
@ -48,9 +48,14 @@
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td class="property">{{ translater.getTranslation("state") }}:</td>
|
<td class="property">{{ translater.getTranslation("state") }}:</td>
|
||||||
<td class="value">
|
<td class="value">{{ translater.getTranslation("switched on") if zone.state else translater.getTranslation("switched off") }}</td>
|
||||||
<p class="state">{{ translater.getTranslation("switched on") if zone.state else translater.getTranslation("switched off") }}</p>
|
<td>
|
||||||
<p class="on_off" href="">{{ translater.getTranslation("turn off") if zone.state else translater.getTranslation("turn on") }}</p>
|
<select id="duration_zone_{{ zone.number }}">
|
||||||
|
{% for option in zoneManager.systemSettings.webDurationOptions %}
|
||||||
|
<option value="{{ option }}">{{ option }} {{ translater.getTranslation("minutes") }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
<button onclick="executeActionByValueID({{'"switch_zone_off"' if zone.state else '"switch_zone_on"'}},'{{ zone.number }}', 'duration_zone_{{ zone.number }}', 60)">{{ translater.getTranslation("turn off") if zone.state else translater.getTranslation("turn on") }}</button>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -62,6 +67,9 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="property">{{ translater.getTranslation("operating mode") }}:</td>
|
<td class="property">{{ translater.getTranslation("operating mode") }}:</td>
|
||||||
<td class="value">{{translater.getTranslation("automatic mode") if zone.autoMode else translater.getTranslation("manual mode")}}</td>
|
<td class="value">{{translater.getTranslation("automatic mode") if zone.autoMode else translater.getTranslation("manual mode")}}</td>
|
||||||
|
<td>
|
||||||
|
<button onclick="executeAction('switch_zone_mode','{{ zone.number }}', '{{ 'manual' if zone.autoMode else 'automatic' }}')">{{translater.getTranslation("switch to manual mode") if zone.autoMode else translater.getTranslation("switch to automatic mode")}}</button>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="icon">
|
<td class="icon">
|
||||||
|
|
|
@ -1,8 +1,19 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="../static/Styles/header.css">
|
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/header.css') }}">
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='Styles/main.css') }}">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function executeAction(command, index, value) {
|
||||||
|
send_web_request('{{url_for("executeAction")}}/' + command + '/' + index + '/' + value, 'no', 'variable');
|
||||||
|
}
|
||||||
|
function executeActionByValueID(command, index, valueID, valueFactor){
|
||||||
|
var value = document.getElementById(valueID).value * valueFactor;
|
||||||
|
executeAction(command, index, value);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
|
@ -19,13 +30,15 @@
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="heading">
|
<div class="heading">
|
||||||
<img src="../static/img/header/wassertropfen.png" alt="" class="title-img">
|
<img src="{{ url_for('static', filename='img/header/wassertropfen.png') }}" alt="" class="title-img">
|
||||||
|
|
||||||
<h1>{{ translater.getTranslation("Irrigation") }}-<br>{{ translater.getTranslation("system") }}</h1>
|
<h1>{{ translater.getTranslation("Irrigation") }}-<br>{{ translater.getTranslation("system") }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img src="../static/img/header/blumenbeet.jpg" alt="" class="header-img">
|
<img src="{{ url_for('static', filename='img/header/blumenbeet.jpg') }}" alt="" class="header-img">
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
<script src="{{ url_for('static', filename='js/webhook.js') }}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="../static/Styles/main.css">
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="../static/Styles/main.css">
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="../static/Styles/main.css">
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="../static/Styles/main.css">
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
<title>{{ translater.getTranslation("Irrigation") }}{{ translater.getTranslation("system") }}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -57,25 +57,6 @@ td.value{
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.state{
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
.on_off{
|
|
||||||
display: none;
|
|
||||||
color: green;
|
|
||||||
position: absolute;
|
|
||||||
background: #bbb;
|
|
||||||
padding-right: 50px;
|
|
||||||
padding-left: 5px;
|
|
||||||
top: -15px;
|
|
||||||
left: 0px;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
.state:hover + .on_off, .on_off:hover{
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.outer_dot {
|
.outer_dot {
|
||||||
|
|
Loading…
Reference in New Issue