paramod-rust/templates/index.html
2025-11-20 20:11:48 +01:00

55 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sensor Konfiguration</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<div class="container">
<h1>🔧 Sensor Konfiguration</h1>
<div id="message" class="message"></div>
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Bezeichnung</th>
<th>Adresse</th>
<th>Type</th>
<th>Faktor</th>
<th>MQTT</th>
<th>InfluxDB</th>
</tr>
</thead>
<tbody>
{% for row in rows %}
<tr>
<td><input type='text' class='text-input' data-row='{{ loop.index0 }}' data-field='bezeichnung' value='{{ row.bezeichnung }}' /></td>
<td><input type='text' class='text-input' data-row='{{ loop.index0 }}' data-field='adresse' value='{{ row.adresse }}' /></td>
<td><input type='text' class='text-input' data-row='{{ loop.index0 }}' data-field='type' value='{{ row.type }}' /></td>
<td><input type='text' class='text-input' data-row='{{ loop.index0 }}' data-field='faktor' value='{{ row.faktor }}' /></td>
<td>
<label class='switch'>
<input type='checkbox' class='bool-input' data-row='{{ loop.index0 }}' data-field='mqtt' {% if row.mqtt %}checked{% endif %} />
<span class='slider'></span>
</label>
</td>
<td>
<label class='switch'>
<input type='checkbox' class='bool-input' data-row='{{ loop.index0 }}' data-field='influxdb' {% if row.influxdb %}checked{% endif %} />
<span class='slider'></span>
</label>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<button class="save-btn" onclick="saveTable()">💾 Speichern</button>
</div>
<script src="/static/script.js"></script>
</body>
</html>