webmin / authentic-theme

Official theme for the best server management panel of the 21st Century
https://authentic-theme.com
MIT License
946 stars 163 forks source link

Message: Can’t establish a connection to the server at ... #960

Closed 1manfactory closed 6 years ago

1manfactory commented 6 years ago

I always leave a tab open in the background.

Since the last theme update I get this message pop up

Can’t establish a connection to the server at

This NEVER happened before.

iliajie commented 6 years ago

In case connection breaks, it pops up. When connection is back, you should see green notice and on the tab focus it will disappear.

I never get this error on the other side (I have stable connection though)

fdmgit commented 6 years ago

I have from time to time the same effect as 1manfactory. I get the red notice that the connection is lost and after a while the green notice that the connection is established.

I have definitely a stable (100 mb/s) WAN connection to the server.

gnadelwartz commented 6 years ago

i had this today also on my local nas, from my guess it happens when my nas was syncing big files in background and responds not fast enough.

on my server in the cloud i didn't noticed it so far.

may be the message should only displayed if 1-3 reconnects fail making message display, timeout and retrys configurable would be nice

gnadelwartz commented 6 years ago

BTW: is this message triggered by realtime stats?

iliajie commented 6 years ago

This message would be triggered by any connection error. Any error would case it.

What do you propose, come on, share your thoughts.

gnadelwartz commented 6 years ago

IHMO it should only displayed if multiple errors accour,eg. because internet connection is lost.

iliajie commented 6 years ago

Hm.. Then I need to differentiate human calls and programmatic.

iliajie commented 6 years ago

Maybe make it optional?

gnadelwartz commented 6 years ago

this was why i asked about realtime stats, these should not trigger the message, optional would be a simple solution. or a checkbox/button in the message box "do not display again (in current session)" ...

gnadelwartz commented 6 years ago

btw. does background collection of relatime stats also happen when tab/window is hidden?

I use window.requestAnimationFrame() to stop execution of periodic events when tab/window is hidden. requestAnimationFrame()calls are paused in most browsers when running in background tabs or hidden