Detect communications loss between Perspective Client and Gateway

I’m working to resolve an exception scenario I discovered during testing.
I’d like to be able to detect when there’s a comm loss between a perspective session (running on a PC) and the Gateway (on another PC). And then automatically switch to another page with messaging indicating there was a comms loss.

At present, when I disconnect the client from the network I see that there’s a small “No Connection to Gateway” banner that appears at the top. This presents two problems. 1) At a glance from a distance an operator may not notice this . 2) All existing states on the UI seem to be at their last state. It is problematic to display a system state that’s not necessarily true.

I know it’s problematic to run client side events/scripts as these execute on the gateway. Is there a way to display better (larger) messaging of a comms loss? Switch pages as I’d prefer? Or any other method to address client to gateway comm loss events?

1 Like

Hi @fil.rossi, and welcome to the forums!

You can do this with Perspective Workstation through the new (8.1.6) Fallback Redirect feature. It even supports returning to the original page once comms are re-established.

Hope that helps,
Jonathan C

I’m not sure if @jcoffman 's solution will suit, but if not, you might be able to look at modifying the display of the existing comms lost display by overriding the CSS for it in your custom CSS theme

Thanks @nminchin @jcoffman. Our client prefers to use a web browser instead of Perspective Workstation, for reasons that escape me. I’ll look into the Fallback redirect and perhaps make a case to switch to PW. I’ll also look into this CSS option. Thanks.

The selectors you’ll need to change are:

.connection-lost-banner {
    position: absolute;
    width: 100%;
    height: 3rem;
    top: -3rem;
    padding: 0.75rem 1rem;
    background-color: #194070;
    transition: top 0.3s ease-in-out;

and for the text:

.connection-lost-banner .connection-lost-message {
    color: #4E5665;
    font-size: 16px;
    line-height: 1.5rem;

You can modify this in your browser with your browser’s dev tools to test it and get it right before copying it into your theme.


Thanks very much!

Best Regards,