Deletion of notification services.

This commit is contained in:
Magnus Åhall 2024-06-28 17:18:08 +02:00
parent c7ad2aa1b6
commit a736ae60af
10 changed files with 74 additions and 9 deletions

View file

@ -68,6 +68,11 @@
const nType = select.value
location.href = `/configuration/notification?type=${nType}`
}
function deleteNotification(prio) {
if (!confirm(`Are you sure you want to delete notification with prio ${prio}?`))
return
location.href = `/configuration/notification/delete/${prio}`;
}
</script>
{{ block "page_label" . }}{{end}}
@ -126,11 +131,13 @@
<div class="header">Prio</div>
<div class="header">Type</div>
<div class="header">Target</div>
<div></div>
<div class="line"></div>
{{ range .Data.NotificationServices }}
<div><a href="/configuration/notification?prio={{ .GetPrio }}">{{ .GetPrio }}</a></div>
<div><a href="/configuration/notification?prio={{ .GetPrio }}">{{ .GetType }}</a></div>
<div><a href="/configuration/notification?prio={{ .GetPrio }}">{{ .String }}</a></div>
<div><img onclick="deleteNotification({{ .GetPrio }})" class="delete" src="/images/{{ $version }}/{{ $theme }}/delete.svg"></div>
{{ end }}
</div>