Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaN % in Virtual memory pie chart #398

Closed
ghost opened this issue Feb 18, 2016 · 7 comments
Closed

NaN % in Virtual memory pie chart #398

ghost opened this issue Feb 18, 2016 · 7 comments

Comments

@ghost
Copy link

ghost commented Feb 18, 2016

I'm using Webmin 1.780 with Authentic theme 17.71 on an embedded system with no virtual memory. The very first time the interface is loaded after a succesfull login the 'virtual memory' pie chart is shown with NaN % (like it calculates div by 0).
Any refresh of the status page is correct with no virtual memory pie chart shown.
The line Virtual memory correctly indicates '0 bytes total/0 bytes used' in both cases.
immagine 2

@iliajie
Copy link
Collaborator

iliajie commented Feb 18, 2016

I'll take a look.

@ghost
Copy link

ghost commented Feb 18, 2016

Hello,
i temporarily created an swap file via fstab and it works.
Without the swapfile it shows NaN%
But if you could fix this, i could remove the swap dummy. Or you create a query that proofs the existense of swap etc. an if not disable the chart or so.

@iliajie
Copy link
Collaborator

iliajie commented Feb 18, 2016

I can't even remotely imagine why when you get NaN on output, it's not hidden, when it should.

What happens if you go to line

( ( $disk_percent || $disk_percent eq "0" ) ? $disk_percent : 'NaN' )

and lets say replace it with

( ( $disk_percent || $disk_percent eq "0" ) ? -sin(9**9**9) : 'NaN' )

Will you have Local Disk Space chart hidden?

What browser are you using?

@iliajie
Copy link
Collaborator

iliajie commented Feb 19, 2016

I could reproduce your bug. I will fix it in 17.72

@iliajie iliajie closed this as completed Feb 19, 2016
@ghost
Copy link
Author

ghost commented Feb 19, 2016

Thanks a lot Ilia!
Your job is really beautiful and your commitment deserve an applause....and a little donation too!!!

9M072990289196125

@iliajie
Copy link
Collaborator

iliajie commented Feb 19, 2016

Thank you!

@iliajie
Copy link
Collaborator

iliajie commented Feb 21, 2016

Please upgrade to 17.72.

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

No branches or pull requests

1 participant