Skip to content

Deal with v2 json output from vnstat defining hours differently - #34

Open
benjsc wants to merge 5 commits into
alexandermarston:masterfrom
benjsc:master
Open

Deal with v2 json output from vnstat defining hours differently#34
benjsc wants to merge 5 commits into
alexandermarston:masterfrom
benjsc:master

Conversation

@benjsc

@benjsc benjsc commented Jun 19, 2019

Copy link
Copy Markdown

Using vnstat 2.0 I found that the hours were all broken. This turns out it's because the json output changed.
The fix below fixes the hours being completely wrong in v2 json output.
I've not tested with v1 api, though it should work.

extremeCrazyCoder and others added 3 commits February 12, 2019 20:54
changed variable names from kb to bytes getLargestPrefix,bytesToString@vnstat.php
changed function name from kbytesToString to bytesToString
This break makes sure at most 1 day is displayed in the hours graph.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants