XavierBerger / RPi-Monitor

Real time monitoring for embedded devices
https://xavierberger.github.io/RPi-Monitor-docs/index.html
GNU General Public License v3.0
1.16k stars 176 forks source link

Changing gauges to progress bars? #362

Open C4Wiz opened 3 years ago

C4Wiz commented 3 years ago

im trying to change the cpu usage and cpu temp grom gauges to progress bars, but the progress bar only displays %

here is my temperature.conf (it's messy)

########################################################################
# Extract CPU Temperature information
#  Page: 1
#  Information               Status     Statistics
#  - cpu temperature         - yes      - yes
#
# Note: Rounding temperatures to two digits is done with the
#  post-processiing formula: sprintf("%.2f", $1/1000)
#  It is possible to roud to 1 digit with sprintf("%.1f", $1/1000)
########################################################################
dynamic.12.name=soc_temp
dynamic.12.source=/sys/devices/virtual/thermal/thermal_zone0/temp
dynamic.12.regexp=(.*)
dynamic.12.postprocess=sprintf("%.1f", $1/1000)
dynamic.12.rrd=GAUGE

web.status.1.content.4.name=CPU Temp
web.status.1.content.4.icon=cpu_temp.png
web.status.1.content.4.line.1=ProgressBar(data.soc_temp, 75, 10, 66, 33, "°C")
Screen Shot 2021-04-17 at 8 54 29 AM
psa-jforestier commented 3 years ago

Hello. I faced the same problem, but you cant remove % without modifying the code, because the % is hardcoded. https://github.com/XavierBerger/RPi-Monitor/blob/d75e752f433ccfd35c1d1ef6482d97691073a6a0/src/usr/share/rpimonitor/web/js/rpimonitor.utils.js#L100