vnstat-dashboard
vnstat-dashboard copied to clipboard
Add support for 5 minute data from vnstat 2.x - compatible with vnstat 1.x
Tested with vnstat 2.3 and vnstat 1.14 on Ubuntu 16.04 / Apache 2.4.39
Add zoom and pan capability to 5min/hour/day graphs More fixes / cleanup
@tomangert thanks for doing some work on this and getting it up to date. I'll have a look at this PR in detail tonight hopefully.
Does PR #36 need to be closed now this one is open?
Yes 36 can be closed - changes from 36 are included in 37.
A few comments with this one initially, @tomangert :
- The content now appears to take out the whole page width whereas before content was centered, could we please revert this to how it was?
- I'm not sure the use of being able to pan and zoom the graph, given the small dataset it is.
- Could you revert the formatting of the time in the hourly list to its original (i.e.: '8pm')
- OK.
- V2 allows you to configure the dataset size for each sampling interval. I have mine bumped up and it makes the pan/zoom pretty useful.
- I can use am/pm instead of 24hr time - but if you have more than 24 hours in the data you need the day. I can check the time range and suppress the day if not needed.
@tomangert can you update your copy against the new changes and we can have a look what it looks like.
ok - probably tonight. (gmt-4 here)
Hey - any update on this?
The history on this is a bit of a mess. The end result is 5 files with changes. Let me know if I should redo this in a new pull request.
@tomangert this looks good. Have you got an example of this running with the 5 minute dataset?
Example sent in an email.
The current merge request is the minimum changes to get something working.
Problems / enhancements left to deal with (~decreasing severity):
- vnstat2 keeps a lot more data. Current code displays it all on the initial graph. but frequently it is too much to see the individual bars. It needs to set the initial zoom level to show about the same as vnstat1 - or set number of time periods in config file - or compute on the fly based on screen size.
- Scroll-to-zoom and drag-to-pan help, but parameters need tweaking to allow more zoom range and finer control.
- Need to add help text for scroll/drag
The rest are not directly 5 minute/vnstat2 related and may just be my preferences.
- Logarithmic graph. This can be a config file option. My network is lightly loaded 90% of the time (~1% of bandwidth) Other times it is moderately loaded (interactive or streaming something) and occasionally there is something saturating the bandwidth (backup or big download or ...) . With a linear graph I can only see saturated vs next to nothing most of the time. A logarithmic graph shows a lot more nuance.
- Screen formatting. On medium to large screens the graphs are only using the middle half of the screen - about 1/4 of the screen is blank on both sides. For text that is useful to make it easier to read, but for graphs wider is better.