show_enviornment called multiple times even on other views

Bug #1170031 reported by Benji York
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-gui
Triaged
High
Jeff Pihach

Bug Description

If you add a console.log() call to show_environment in app/app.js (lline 820 as of the time of this writing) you will note that it is called multiple times during a single URL routing, even if the current page is not the environment view.

I don't completely understand the routing system, but there seems to be at least three causes. The first is the "double dispatch" problem (no bug filed, that I know of).

Once that is fixed show_environment will still be called for each URL routing because it is registered with a path of "*".

If that path is changed to "/" it will still be called more than once, this time I /think/ because the route is registered without a namespace so the _routeSeen hash in app/assets/javascripts/ns-routing-app-extension.js only keeps from calling a handler more than once per namespace, not per route.

Revision history for this message
Benji York (benji) wrote :

The currently-known user-facing effects of this bug are that you will
sometimes see a "flash of topology" (bug 1169625) before you see the
final screen you were navigating to, and it does quite a bit more work
than it needs to, so the app will be slower than necessary.

Jeff Pihach (hatch)
Changed in juju-gui:
assignee: nobody → Jeff Pihach (hatch)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.