Skip to content

Usage meter chooses incorrect level #1

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

Open
mojeda opened this issue Mar 4, 2013 · 3 comments
Open

Usage meter chooses incorrect level #1

mojeda opened this issue Mar 4, 2013 · 3 comments

Comments

@mojeda
Copy link
Owner

mojeda commented Mar 4, 2013

Usage meters don't pick correct level when usage is 4%-9%

@Munzy
Copy link

Munzy commented Sep 16, 2014

Up
'; // YES WE ARE! // ======================================================================================================================================== // Post Data // ======================================================================================================================================== echo json_encode($post); // Time to show the world what we are made of! // ======================================================================================================================================== // Functions // ======================================================================================================================================== function levels($perc, $dl, $wl){ // make nice green bars if($perc < 30) { $width = 30; } else { $width = $perc; } if($perc > $wl) { $return = '
' . $perc . '%'; } elseif($perc < $wl) { $return = '
' . $perc . '%
'; } elseif($perc < $dl) { $return = '
' . $perc . '%
'; } return $return; } // Sec2Human is from the original Script function sec2human($time) { $seconds = $time%60; $mins = floor($time/60)%60; $hours = floor($time/60/60)%24; $days = floor($time/60/60/24); return $days > 0 ? $days . ' day'.($days > 1 ? 's' : '') : $hours.':'.$mins.':'.$seconds; } // ======================================================================================================================================== // Done // ======================================================================================================================================== ?>

@mkody
Copy link

mkody commented Sep 16, 2014

@Munroenet it would be nice to put this in a gist or in a Fenced code blocks

@Munzy
Copy link

Munzy commented Sep 16, 2014

https://github.com/Munroenet/ServerStatus/blob/Munzy/uptime.php

Its right there, was trying to find the way for an easy submit into the code repo however, and couldn't find it.

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

3 participants