mirror of
https://github.com/FAUSheppy/icinga-webhook-gateway
synced 2025-12-06 15:31:38 +01:00
feat: implement manual submission button
This commit is contained in:
@@ -4,6 +4,24 @@
|
||||
{% include "navbar.html" %}
|
||||
<div class="container">
|
||||
|
||||
<script>
|
||||
function submit_manual(){
|
||||
await fetch("/report", {
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
"token" : "{{ service.token }}",
|
||||
"status" : "OK",
|
||||
"info" : "Submitted from Web-Interface" })
|
||||
}
|
||||
)
|
||||
window.location.reload()
|
||||
}
|
||||
</script>
|
||||
|
||||
<h2 class="service-name">Service: {{ service.service }}</h2>
|
||||
{% if service.staticly_configured %}
|
||||
{% endif %}
|
||||
@@ -24,6 +42,10 @@
|
||||
<p style="color: darkred;">Show in Icinga</p>
|
||||
</a>
|
||||
|
||||
<button style="clear: both;" class="hover mr-3" onclick="submit_manual()">
|
||||
<p style="color: darkred;">Submit manual OK</p>
|
||||
</button>
|
||||
|
||||
<div class="last-status">
|
||||
{% if status_list | length > 0 %}
|
||||
<p class="{{ status_list[0].status }}">
|
||||
|
||||
Reference in New Issue
Block a user