2023-05-15 14:46:58 -07:00
|
|
|
<html>
|
|
|
|
<h1>Relay Creation</h1>
|
2023-05-26 09:52:01 -07:00
|
|
|
<h2>Existing relays</h2>
|
|
|
|
<table>
|
|
|
|
<thead><th>Relay</th><th>Pin</th></thead>
|
|
|
|
<tbody>
|
|
|
|
{% for relay in relays %}
|
|
|
|
<tr><td>{{ relay.name }}</td><td>{{ relay.pin.name }}</td></tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
2023-05-15 14:46:58 -07:00
|
|
|
<form method="POST" action="/relay/create">
|
|
|
|
<input type="text" name="name" placeholder="Pool Pump 1"></input>
|
2023-05-26 09:28:39 -07:00
|
|
|
<select name="pin_id">:
|
2023-05-15 14:46:58 -07:00
|
|
|
{% for pin in pins %}
|
2023-05-26 09:28:39 -07:00
|
|
|
<option value="{{ pin.chip.number }}-{{ pin.chip.name }}-{{ pin.line_number }}">{{ pin.name }}</option>
|
2023-05-15 14:46:58 -07:00
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
<button type="submit">Create</button>
|
|
|
|
</form>
|
|
|
|
</html>
|