intake/web/html/editSource.html

64 lines
1.6 KiB
HTML
Raw Normal View History

2025-02-12 18:04:58 +00:00
{{ define "title" }}{{ .Name }} - Intake{{ end }}
{{ define "content" -}}
<nav class="center">
<span class="feed-controls">
<a href="/">Home</a>
</span>
</nav>
<nav>
<span class="feed-controls">Edit source {{ .Name }}</span>
<p>
<form method="post">
<label for="name">Name:</label>
<input type="text" name="name" placeholder="Source name" value="{{ .Name }}" readonly>
<input type="submit" value="Update" disabled>
</form>
</p>
<p>Environment:</p>
<table id="envvars">{{ range $name, $value := .Envs }}
<tr>
<td><input type="text" value="{{ $name }}" disabled></td>
<td><input type="text" value="{{ $value }}" disabled></td>
</tr>{{ end }}
<tr>
<td><input type="text" form="env" name="envName"></td>
<td><input type="text" form="env" name="envValue"></td>
</tr>
<tr>
2025-02-12 18:04:58 +00:00
<td><form id="env"><button
type="button"
hx-post="/source/{{ .Name }}/edit"
>Update</button></form></td>
</form>
</tr>
</table>
<p>Actions:</p>
<table id="actions">{{ range $name, $argv := .Actions }}
<tr>
<td><input type="text" value="{{ $name }}" disabled></td>
<td><input type="text" value="{{ $argv }}" disabled></td>
</tr>{{ end }}
<tr>
<td><input type="text" form="action" name="actionName"></td>
<td><input type="text" form="action" name="actionArgv"></td>
</tr>
<tr>
2025-02-12 18:04:58 +00:00
<td><form id="action"><button
type="button"
hx-post="/source/{{ .Name }}/edit"
>Update</button></form></td>
</form>
</tr>
</table>
2025-02-20 23:47:31 +00:00
<p>Fetch:</p>
<form method="post" action="/source/{{ .Name }}/fetch">
<button type="submit">fetch</button>
</form>
2025-02-12 18:04:58 +00:00
</nav>
{{- end }}