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