Dynamically reload the dashboard contents without a page refresh.

Review Request #4175 — Created May 26, 2013 and submitted — Latest diff uploaded

Information

Review Board
release-1.7.x

Reviewers

Dynamically reload the dashboard contents without a page refresh.

The dashboard contents are now dynamically loaded every 5 minutes.
We fetch the entire page and just extract the dashboard content
(including sidebar) and replace the current content with it.

We replace the Edit Columns pencil icon with a spinner during reload.

One of the nice advantages to this is that if the server goes down at
all while the client is trying to reload, the worst that happens is they
get an HTTP 404/500/whatever error in the console log/network inspector.
The fetch will be tried again at the next 5 minute mark.

The sidebar count calculations have been moved into the view. It's been
made a bit smarter there. We don't attempt to calculate if we're only
fetching the datagrid (due to reload, reordering of columns, etc.),
cutting down on queries.
Tested with a short timer, and saw the two loads.

Tested with the server down. No user-facing errors outside of the console
log. It kept trying until the server was up.

Tested bumping review request counts and updating the dashboard. Saw
the updates at the next reload cycle.
    Loading...