diff --git a/netbox_proxbox/templates/netbox_proxbox/home.html b/netbox_proxbox/templates/netbox_proxbox/home.html index 2830283..0887164 100755 --- a/netbox_proxbox/templates/netbox_proxbox/home.html +++ b/netbox_proxbox/templates/netbox_proxbox/home.html @@ -28,6 +28,20 @@ }; + ws.onerror = function(error) { + console.log("WebSocket error observed: ", error); + + fullUpdateButton = document.getElementById('full-update-button') + fullUpdateButton.className = "btn btn-red" + + fullUpdateMessage = document.getElementById('full-update-error-message') + fullUpdateMessage.className = "text-red" + fullUpdateMessage.innerHTML = ` +

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

` + } function sendMessage(event) { // Send Websocket Message @@ -151,11 +165,12 @@
+
{# Full Update Button#}
{% if perms.netbox_proxbox.add_proxmoxvm %} - + {% endif %}