quentin-st / Munin-for-Android

Watch your munin-monitored servers on your Android devices
https://www.munin-for-android.com/
GNU General Public License v2.0
44 stars 7 forks source link

Dynazoom graphs zoom in time #33

Closed Phoenix1o1 closed 8 years ago

Phoenix1o1 commented 8 years ago

So, after figuring out how to make dynazoom working properly, I noticed that when zooming in the timestamps seem to be somehow wrong.I will upload a video to show you where.

Phoenix1o1 commented 8 years ago

http://sendvid.com/uux3eqzq

quentin-st commented 8 years ago

Hi, Thank you for the video! There is indeed some problems with the datetimes...

The issue seems to come from Activity_GraphView:937:940:

long new_dynazoom_from = dynazoom_from + (dynazoom_to-dynazoom_from) * fromIndex / DynazoomHelper.RANGEBAR_TICKS_COUNT;
long new_dynazoom_to = dynazoom_from + (dynazoom_to-dynazoom_from) * toIndex / DynazoomHelper.RANGEBAR_TICKS_COUNT;

dynazoom_updateFromTo(new_dynazoom_from, new_dynazoom_to);

new_dynazoom_from & new_dynazoom_to are timestamps computed from the rangeBar indexes & the current dynazoom_from & dynazoom_to values. dynazoom_updateFromTo updates the TextViews.

I don't have much time to investigate for now - but if you find where it comes from, don't hesitate to comment here or open a pull-request!

Thank you for your help on this issue!

quentin-st commented 8 years ago

Sorry for the long time it took, but I finally found the source of the issue. If you look at the changelog, you'll see two issues:

Thanks for your patience, I'll publish a new version of the app right away.