stumbleupon/opentsdb — pull request #112 by tsuna (2012-05-06 06:17:19+00:00)
Title: Browser history support, take 2

Changes based from pull request #105, to fix issue #38.

Changes compared to #105:
* Get rid of the `?` from the URL fragment.
* Update the URL fragment even if the query didn't return any data point.
* Fixed various checkboxes and other fields that weren't getting reset properly when moving back and forth (e.g. right axis, radio buttons and checkboxes in the "Key" panel, etc).
* Fixed bug where there's no URL fragment (was causing an `IndexOutOfBoundsException`).
* Fixed bug in parsing tags (`{` isn't a valid regexp, at least in hosted mode, and first tag name wasn't always parsed properly)
* Ported the code that parses the `m` parameter from the server side to the client side. This ensures correctness. Right now there's code duplication, which is the root of all evil, but at the moment there is no way to share code between the server side and client side. This can be made possible though, so I left a `FIXME` in the code to do this later.
* Gracefully handle missing `o` parameters (frequently happens when people manually edit URLs).
* Properly clear out all metric fields when going back to an empty URL fragment.
* Never zero out the `WxH` field.
* Re-ordered and squashed several commits.
* Coding style cleanups.