Code review comment for lp:~blake-rouse/maas/error-overlay-directive

Revision history for this message
Blake Rouse (blake-rouse) wrote :

So this will occur only on the first load of a page with the websocket. Meaning when you load the node listing it will occur. Most of the time the connection is made so fast that it doesn't even show. It will only show if the connection cannot be made, the connection is lost, or a fatal error occurs. Now switching between the node listing to nodes details to node events or other pages that use angular do not reload the page at all. Its the same page just a different view and its the same websocket connection. The end goal would do this for the entire web UI, so the page would only need to be loaded once and the websocket connection would never need to be created again.

You can't show something like failed to load node listing, because this can happen anywhere. Chances are uses will never see this view, but when something happens where the connection has failed it much better to show why then just leave them guessing.

There are three different messages that can be displayed from this directive.

1. Connecting
This occurs when the websocket is trying to connect to the region, and a connection has never been made to the region. This will only occur if the user does not have access to the 5240 port. The url is shown so they know where its trying to connect.

http://people.canonical.com/~blaker/connecting.png

2. Connection to region lost, reconnection...
Occurs when the websocket connection goes down. Normally because the region has crashed or they have lost a route to that host or that port. This will continue to be shown until the connection is remade. The client will keep try over and over again until the connection is made.

http://people.canonical.com/~blaker/connection_lost.png

3. Erro occurred communicating with region
Only occurs when something really wrong has happened and the region did not respond as expected. This is very rare, but is needed to alter the user of a very bad error.

http://people.canonical.com/~blaker/error.png

You will notice that in 1 and 2 the spinner is misaligned, Rich is looking into fixing this for me.

« Back to merge proposal