app-editor.html
ASCII text
1{% extends "default.html" %} 2{% block title %}{{ app.name }} | Echo Tracker{% endblock %} 3{% block content %} 4<main> 5<h1>Editing {{ app.name }}</h1> 6 7<div id="endpoint-editor"> 8{% for endpoint in app.endpoints %} 9<form class="stacked-form" method="post" action="/app/{{ app.id }}/edit/{{ endpoint.id }}"> 10<input type="text" name="name" placeholder="Name" value="{{ endpoint.name }}"> 11<input type="url" name="url" placeholder="Ping address" value="{{ endpoint.address }}"> 12<div class="side-by-side"> 13<input class="extend" type="number" name="ping_interval" placeholder="Interval (seconds)" value="{{ endpoint.ping_interval }}" step="1" min="15"> 14seconds 15</div> 16<textarea name="comment" placeholder="Comment" rows="4">{{ endpoint.comment }}</textarea> 17<div class="side-by-side"> 18<button type="submit" class="extend">Apply changes</button> 19<button type="submit" name="delete" value="delete" class="danger-button"> 20<iconify-icon icon="mdi:trash-can">Delete</iconify-icon> 21</button> 22</div> 23</form> 24{% endfor %} 25</div> 26<h2>Add an endpoint</h2> 27<form class="stacked-form" method="post" action="/app/{{ app.id }}/add-endpoint"> 28<input type="text" name="name" placeholder="Name"> 29<input type="url" name="url" placeholder="Ping address"> 30<div class="side-by-side"> 31<input class="extend" type="number" name="ping_interval" placeholder="Interval (seconds)" value="300" step="1" min="15"> 32seconds 33</div> 34<textarea name="comment" placeholder="Comment" rows="4"></textarea> 35<button type="submit">Add</button> 36</form> 37</main> 38{% endblock %}