phpsysinfo / phpsysinfo

phpSysInfo: a customizable PHP script that displays information about your system nicely
http://phpsysinfo.github.io/phpsysinfo
GNU General Public License v2.0
1.38k stars 234 forks source link

Question about bootstrap (and a schabau_bootstrap.css) #332

Closed schabau closed 2 years ago

schabau commented 2 years ago

Hi there,

I have adapted the color of the phpsysinfo_bootstrap.css to my good old schabau.css and created a schabau_bootstrap.css. I would be happy if you build it into phpSysInfo.

schabau_bootstrap.css.txt

I have a question about "bootstrap". So far I've only used "dynamic".

Where or with what is "progress-bar-warning" and "progress-bar-danger" defined. I can't see any connection with the percentage utilization. The point at which the color for "warning" or "danger" is used for the bar seems to be completely arbitrary. When does the bar turn yellow and when does it turn red?

phpSysInfo_Screenshot

Many greetings schabau

namiltd commented 2 years ago

; Filesystem usage warning threshold in percent ; - 0 : disabled ; - 90 : 90% ; Default is 90% ; FS_USAGE_THRESHOLD=90

schabau commented 2 years ago

Hi there,

this may possibly apply to "progress-bar-warning" but not to "progress-bar-danger".

Why is the bar yellow for different percentages?

Look at /dev/sdc and /dev/sdd. A utilization of 6% and already "progress-bar-warning"? This can not be.

Many greetings Schabau

schabau commented 2 years ago

FS_USAGE THRESHOLD is here at 95 Many greetings Schabau

namiltd commented 2 years ago

The "yellow" part is the value of the fs buffers (difference between Free + Used and Size).

namiltd commented 2 years ago

Template added: https://github.com/phpsysinfo/phpsysinfo/commit/3006bc7f3c93c9f3783a84229b0d5679cacc787e

schabau commented 2 years ago

Hi there,

the color classification is good for the main memory. What do you think of my customization in phpsysinfo_bootstrap.js?

Line 1029 html += '<span class="progress-bar-info">&emsp;</span>&nbsp;' + genlang(64) + ': '+ this.Details["@attributes"].AppPercent + '%'; //Kernel + apps

Line 1034 html += '<span class="progress-bar-warning">&emsp;</span>&nbsp;' + genlang(66) + ': ' + this.Details["@attributes"].CachedPercent + '%'; //Cache

Line1039 html += '<span class="progress-bar-danger">&emsp;</span>&nbsp;' + genlang(65) + ': ' + this.Details["@attributes"].BuffersPercent + '%'; //Buffers

I think it's easier to see that way. (To test "FS_USAGE_THRESHOLD=55") phpSysInfo_Screenshot

I don't think it's a good thing for hard drives, there should only be progress-bar-info and progress-bar-danger. With "dynamic" everything is clearly visible. phpSysInfo_Screenshot2

But with "bootstrap" you ask "what does the yellow part mean?".

Many greetings schabau

schabau commented 2 years ago

Hi there,

I think it would be better that way.

phpSysInfo_Screenshot3

Many greetings schabau

schabau commented 2 years ago

Hi there,

Excuse me but I have to disturb you again. I was so focused on the "progress-bar-warning" thing that I printed schabau_bootstrap.css even though the template wasn't quite finished yet.

Even if it's old-fashioned, of course "schabau" remains serif in the headings. That's the way it is and it will stay that way.

Please exchange the Templar again. It's really done now.

schabau_bootstrap.css.txt

Many greetings schabau

namiltd commented 2 years ago

Done: https://github.com/phpsysinfo/phpsysinfo/commit/84ea24e04f786f814e373b95e493f71cbdef3e88

schabau commented 2 years ago

Hi there,

Thanks very much. It's always nice to be able to contribute to phpSysInfo with small suggestions.

Many greetings schabau