diff --git a/changedetectionio/static/js/realtime.js b/changedetectionio/static/js/realtime.js index e9ab37ff..6e6ff444 100644 --- a/changedetectionio/static/js/realtime.js +++ b/changedetectionio/static/js/realtime.js @@ -55,6 +55,7 @@ $(document).ready(function () { // Connection status logging socket.on('connect', function () { + $('#realtime-conn-error').hide(); console.log('Socket.IO connected with path:', socketio_url); console.log('Socket transport:', socket.io.engine.transport.name); bindSocketHandlerButtonsEvents(socket); @@ -74,7 +75,8 @@ $(document).ready(function () { socket.on('disconnect', function (reason) { console.log('Socket.IO disconnected, reason:', reason); - $('.ajax-op').off('.socketHandlerNamespace') + $('.ajax-op').off('.socketHandlerNamespace'); + $('#realtime-conn-error').show(); }); socket.on('queue_size', function (data) { diff --git a/changedetectionio/static/styles/scss/styles.scss b/changedetectionio/static/styles/scss/styles.scss index 514d825c..73123caa 100644 --- a/changedetectionio/static/styles/scss/styles.scss +++ b/changedetectionio/static/styles/scss/styles.scss @@ -1190,3 +1190,12 @@ ul { vertical-align: middle; } +#realtime-conn-error { + position: absolute; + bottom: 0; + left: 30px; + background: var(--color-warning); + padding: 10px; + font-size: 0.8rem; + color: #fff; +} diff --git a/changedetectionio/static/styles/styles.css b/changedetectionio/static/styles/styles.css index 639a2e9b..65257e6a 100644 --- a/changedetectionio/static/styles/styles.css +++ b/changedetectionio/static/styles/styles.css @@ -1535,3 +1535,12 @@ ul { height: 21px; padding: 2px; vertical-align: middle; } + +#realtime-conn-error { + position: absolute; + bottom: 0; + left: 30px; + background: var(--color-warning); + padding: 10px; + font-size: 0.8rem; + color: #fff; } diff --git a/changedetectionio/templates/base.html b/changedetectionio/templates/base.html index 6a6f25d0..c55d1a13 100644 --- a/changedetectionio/templates/base.html +++ b/changedetectionio/templates/base.html @@ -236,6 +236,7 @@
+