From c06115768d2e2ef683d60b79ac4a04c290e83492 Mon Sep 17 00:00:00 2001 From: Emerson Felipe Date: Wed, 16 Oct 2024 13:08:38 +0000 Subject: [PATCH] Add communication failure message also on FastAPI card with Status badge. --- .../templates/netbox_proxbox/home.html | 45 ++++++++++++++++--- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/netbox_proxbox/templates/netbox_proxbox/home.html b/netbox_proxbox/templates/netbox_proxbox/home.html index 0887164..05ae6a8 100755 --- a/netbox_proxbox/templates/netbox_proxbox/home.html +++ b/netbox_proxbox/templates/netbox_proxbox/home.html @@ -36,11 +36,23 @@ fullUpdateMessage = document.getElementById('full-update-error-message') fullUpdateMessage.className = "text-red" - fullUpdateMessage.innerHTML = ` -

- WebSocket communication failed with ${error.currentTarget.url} + + let errorMessage = ` +

+ WebSocket communication failed with ${error.currentTarget.url}
The most probably cause is Proxbox Backend not running properly.

` + + fullUpdateMessage.innerHTML = errorMessage + + + statusBadgeError = document.getElementById('fastapi-connection-status') + statusBadgeError.className = "text-bg-red badge p-2" + statusBadgeError.textContent = "Connection Failed!" + + statusErrorMessage = document.getElementById('fastapi-connection-error') + statusErrorMessage.className = "text-bg-red p-2" + statusErrorMessage.innerHTML = errorMessage } function sendMessage(event) { @@ -170,7 +182,7 @@
{% if perms.netbox_proxbox.add_proxmoxvm %} - + {% endif %} @@ -381,13 +393,32 @@

+ +
+ +
+
+ + +
+ + Netbox Logo + + +
+ + +
+ Unknown +
+ +
+

- - Netbox Logo -

This service MUST be running to Proxbox work.
It's the backend which communicates with Proxmox Clusters.

+