Dashboard pages disappear when internet connection lost.
-
In more context they are my custom pages but they do utilise mango's angular directives.
Some pages show different content depending on the user that is logged in and this is reflected with ng-if statements. However because of this, due to shoddy internet connections out in rural areas, The page disappears if the websocket connection is lost. Very frustrating when we need the pages to work for installers to test out hardware as they set it up.Is there any other way around this? I cannot work with the mango dashboard if the page keeps disconnecting from the mango instance if the websocket is somewhat intermittent. If needs be I'll rewrite my controllers but I need to get past the issue of the page losing all of its content just because the internet has hit a dead spot.
-
Can you provide one of the ng-if elements that would conditionally disappear? Perhaps it would be possible to take the information for which user it is when the page loads and store it?
-
The problem is the fact the user session disappears. it needs a connection to keep the session alive. All pages go faint/blank. even the watchlist as you know disconnects and goes blank when there is no connection. Makes me feel as if AngularJS is not practical for DOM intensive/orientated code.
as for markup one example would be ng-if="User.current.username!='admin'"
-
Yep
maUser.current
is cleared when the connection goes down. I agree that this is potentially disruptive and I will change this behavior for the next release.You could temporarily work around the problem by using
ng-init="myUser=maUser.current"
to store the initial user when the page loads. -
Thanks for hearing my pleas Jared. It's a bit of a struggle at the moment.
You will likely need to ensure it doesnt affect charts and points/values also otherwise you will be stuck in a constant loop of having to reload all point info everytime it disconnects. I may have to rewrite to use ajax so i can at least store the information on the client side. Its a pain because I heavily use point queries and they use tags based on the username and json settings.
-
Dont clear maUser.current when connectivity lost
https://forum.infiniteautomation.com/topic/3811/release-notes-for-3-5-0
-
Nicely done!
I'll get an ES updated and will test with my code.