Merge pull request #54 from dirkhh/fixes

Fixes
Merge pull request #54 into version 0.6.54
First step towards localized version of the visualizations

This only deals with the stats page so far and only adds a German version.
Additionally it does on the fly conversion to metric.

Right now for simplicity these settings are implemented through URL arguments -
&metric=true switches to metric, &lang=de switches to German.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Force language to be lowercase

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Localization of energy graph

Adds support for German and for metric data. Some of the dates are still shown
US style (the x-axis of the graphs).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remember metric and language settings across links

When switching between energy and stats we now keep these settings.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Merge pull request #55 from dirkhh/localization

Localization
merge pull request #55 into version 0.6.55
removed unnessary delay in HTTP OK long poll
Added sleep support, request counters, and throttling

new -z flag to avoid waking a sleeping car
added request per minute counters and throttling for both REST API and
Streaming URL
removed unused collectionS.find code
Make the marker flicker less

Only redraw it if the position actually changed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't always center the map on the marker

By default this is on, but there's a button that toggles the behavior. Also, if
the user drags the map then centering immediately stops (otherwise the user
fights a losing fight against the centering function).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Merge pull request #56 from dirkhh/mapImprovements

Map improvements
Fix metric conversion for energy chart

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Get metric / imperial default from the GUI settings in the car

This means that for most people the graphs should be shown in the correct
system by default.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix potential null dereferences

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>