mirror of
https://github.com/FAUSheppy/icinga-webhook-gateway
synced 2025-12-06 07:21:38 +01:00
feat: service deletions & css
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
{% endif %}
|
||||
<form class="mt-4" method="POST" action="/entry-form">
|
||||
|
||||
{{ form.csrf_token }}
|
||||
{{ form.service_hidden }}
|
||||
{{ form.service.label }}
|
||||
|
||||
{% if is_modification %}
|
||||
|
||||
@@ -17,12 +17,28 @@
|
||||
style="background-color: magenta;"
|
||||
{% endif %}
|
||||
>
|
||||
<p class="w-100 font-weight-bold">{{ status.service }}</p>
|
||||
<div class="overview-tile-titel mb-2">{{ status.service }}</div>
|
||||
<div class="overview-tile-status {{ status.status.lower() }}">
|
||||
{{ status.status }}
|
||||
</div>
|
||||
|
||||
<div class="overview-tile-info-text">
|
||||
<small>
|
||||
{% if status.info_text %}
|
||||
{{ status.info_text }}
|
||||
{% else %}
|
||||
No extra info
|
||||
{% endif %}
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<small class="overview-tile-date pt-2">
|
||||
{% if status.timestamp == 0 %}
|
||||
Service never reported in
|
||||
{% else %}
|
||||
{{ datetime.fromtimestamp(status.timestamp).strftime("%H:%M %d.%m.%y") }}
|
||||
{{ datetime.fromtimestamp(status.timestamp).strftime("%H:%M on %d.%b.%y") }}
|
||||
{% endif %}
|
||||
</small>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
<a class="service-info-button mt-3" style="background-color: orange;"
|
||||
href="/entry-form?service={{ service.service }}">Modify</a>
|
||||
<a class="service-info-button mt-3" style="background-color: red;"
|
||||
href="#"
|
||||
onclick="alert('Delete is not supported yet')">Delete</a>
|
||||
href="/entry-form?service={{ service.service }}&operation=delete">Delete</a>
|
||||
|
||||
<div class="last-status">
|
||||
{% if status_list | length > 0 %}
|
||||
@@ -30,8 +29,8 @@
|
||||
<div class="ml-3 example">
|
||||
curl -X POST \ <br>
|
||||
<div class="example-indent">
|
||||
-H "application/json" \ <br>
|
||||
-d '{ "service_name" : "{{ service.service }}",
|
||||
-H "Content-Type: application/json" \ <br>
|
||||
-d '{ "service" : "{{ service.service }}",
|
||||
"token" : "{{ service.token }}", \<br>
|
||||
"status" : "OK", "info" : "Free Text Information here" }' \<br>
|
||||
{{ flask.request.url_root }}
|
||||
|
||||
Reference in New Issue
Block a user