Add/edit notifications
This commit is contained in:
parent
1ede36b8aa
commit
c7ad2aa1b6
19 changed files with 531 additions and 11 deletions
34
views/pages/notification/ntfy.gotmpl
Normal file
34
views/pages/notification/ntfy.gotmpl
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{{ define "page" }}
|
||||
<h1>NTFY</h1>
|
||||
<style>
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: min-content 1fr;
|
||||
grid-gap: 8px 16px;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
input[type=number] {
|
||||
width: 64px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<form action="/configuration/notification/update/{{ if .Data.Service.Exists }}{{ .Data.Service.GetPrio }}{{ else }}-1{{ end }}" method="post">
|
||||
<input type="hidden" name="type" value="NTFY">
|
||||
<div class="grid">
|
||||
<div>Prio:</div>
|
||||
<input type="number" min=0 name="prio" value="{{ .Data.Service.GetPrio }}">
|
||||
|
||||
<div>URL:</div>
|
||||
<input type="text" name="url" value="{{ .Data.Service.URL }}" style="width: 100%">
|
||||
|
||||
<button style="grid-column: 1 / -1; width: min-content;">OK</button>
|
||||
</div>
|
||||
</form>
|
||||
{{ end }}
|
||||
34
views/pages/notification/script.gotmpl
Normal file
34
views/pages/notification/script.gotmpl
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{{ define "page" }}
|
||||
<h1>Script</h1>
|
||||
<style>
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: min-content 1fr;
|
||||
grid-gap: 8px 16px;
|
||||
align-items: center;
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
input[type=number] {
|
||||
width: 64px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
button {
|
||||
margin-top: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<form action="/configuration/notification/update/{{ .Data.Service.GetPrio }}" method="post">
|
||||
<input type="hidden" name="type" value="Script">
|
||||
<div class="grid">
|
||||
<div>Prio:</div>
|
||||
<input type="number" min=0 name="prio" value="{{ .Data.Service.GetPrio }}">
|
||||
|
||||
<div>Filename:</div>
|
||||
<input type="text" name="filename" value="{{ .Data.Service.Filename }}" style="width: 100%">
|
||||
|
||||
<button style="grid-column: 1 / -1; width: min-content;">OK</button>
|
||||
</div>
|
||||
</form>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue