~bcsaller/juju-gui/routing-hash-query

Viewing all changes in revision 712.

  • Committer: Rick Harding
  • Author(s): Richard Harding
  • Date: 2013-06-07 17:17:59 UTC
  • mfrom: (707.1.5 direct-2-tab)
  • Revision ID: rick.harding@canonical.com-20130607171759-9zkzmq2b40h2z0is
Prevent a case of charm details double dispatch.

- This double dispatch caused the charm details to be rendered multiple times
  causing issues with the tabview.
- We match multiple routes in the browser subapp. We always match on * for
  instance. In the case of the * route, a url path /charm/id will match, but
  not have a req.params.id set, this causes the _viewState to think there is
  no charm id in the request. Because of this, it clears any current _details
  View object. However, a later matched route *id will find the id and cause
  it to render again. This could happen a couple of times.
- We create custom callables for the * and *id routes.
- These callables only kick in and do any work at all if they're the perfect
match for that path.
- If they do not apply, then they ignore and carry on allowing later matching
routes (more specific ones) to do their work correctly.

R=j.c.sackett, benjamin.saller
CC=
https://codereview.appspot.com/10086045

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: