diff --git a/src/freedombone-installer b/src/freedombone-installer index 54e8f5266e0ef1d5296172c623366dd64bf50a27..83a2ed5c21a1ec2e2336b132e3a5205ad8b3dfcb 100755 --- a/src/freedombone-installer +++ b/src/freedombone-installer @@ -1542,7 +1542,12 @@ function update_system_monitor { sed -i "s|<div name=\"memory\" class=\"w3-container.*|<div name=\"memory\" class=\"w3-container w3-blue w3-round-xlarge\" style=\"width:${used_memory_percent}%\">${used_memory_percent}%</div>|g" "$webadmin_install_dir/system_monitor.html" - sed -i "s|<div name=\"cputemp\" class=\"w3-container.*|<div name=\"cputemp\" class=\"w3-container w3-blue w3-round-xlarge\" style=\"width:${cpu_temperature}%\">${cpu_temperature}C</div>|g" "$webadmin_install_dir/system_monitor.html" + if [ $cpu_temperature -gt 0 ]; then + sed -i "s|<div name=\"cputemp\" class=\"w3-container.*|<div name=\"cputemp\" class=\"w3-container w3-blue w3-round-xlarge\" style=\"width:${cpu_temperature}%\">${cpu_temperature}C</div>|g" "$webadmin_install_dir/system_monitor.html" + else + sed -i "/\"cputemp\"/d" "$webadmin_install_dir/system_monitor.html" + sed -i '/titletextcputemp/d' "$webadmin_install_dir/system_monitor.html" + fi sed -i "s|<div name=\"diskio\" class=\"w3-container.*|<div name=\"diskio\" class=\"w3-container w3-blue w3-round-xlarge\" style=\"width:${disk_io_speed_percent}%\">${disk_io_speed} MB/s</div>|g" "$webadmin_install_dir/system_monitor.html" diff --git a/src/freedombone-utils-webadmin b/src/freedombone-utils-webadmin index d2c3bc24297c8d1f3e82a260def4d5c2f46966bc..0e68d80f96f1c15b08ebe08813102ccc94202338 100755 --- a/src/freedombone-utils-webadmin +++ b/src/freedombone-utils-webadmin @@ -791,7 +791,12 @@ function webadmin_update_system_monitor { sed -i "s|<div name=\"memory\" class=\"w3-container.*|<div name=\"memory\" class=\"w3-container w3-blue w3-round-xlarge\" style=\"width:${used_memory_percent}%\">${used_memory_percent}%</div>|g" "$webadmin_install_dir/system_monitor.html" - sed -i "s|<div name=\"cputemp\" class=\"w3-container.*|<div name=\"cputemp\" class=\"w3-container w3-blue w3-round-xlarge\" style=\"width:${cpu_temperature}%\">${cpu_temperature}C</div>|g" "$webadmin_install_dir/system_monitor.html" + if [ $cpu_temperature -gt 0 ]; then + sed -i "s|<div name=\"cputemp\" class=\"w3-container.*|<div name=\"cputemp\" class=\"w3-container w3-blue w3-round-xlarge\" style=\"width:${cpu_temperature}%\">${cpu_temperature}C</div>|g" "$webadmin_install_dir/system_monitor.html" + else + sed -i "/\"cputemp\"/d" "$webadmin_install_dir/system_monitor.html" + sed -i '/titletextcputemp/d' "$webadmin_install_dir/system_monitor.html" + fi sed -i "s|<div name=\"diskio\" class=\"w3-container.*|<div name=\"diskio\" class=\"w3-container w3-blue w3-round-xlarge\" style=\"width:${disk_io_speed_percent}%\">${disk_io_speed} MB/s</div>|g" "$webadmin_install_dir/system_monitor.html" diff --git a/webadmin/EN/system_monitor_template.html b/webadmin/EN/system_monitor_template.html index 59c34249a5aaa0f5d851316d50fbd1394e63648e..5e84a13af2042ad71d2bd7c248e4114c215a2cb3 100644 --- a/webadmin/EN/system_monitor_template.html +++ b/webadmin/EN/system_monitor_template.html @@ -41,6 +41,11 @@ font-size: 100%; } + .titletextcputemp { + color: black; + font-size: 100%; + } + .appdesc { color: black; font-size: 65%; @@ -91,14 +96,14 @@ <div name="memory" class="w3-container w3-blue w3-round-xlarge" style="width:80%">80%</div> </div> - <p class="titletext">CPU temperature</p> + <p class="titletext">Disk I/O Speed</p> <div class="w3-light-grey w3-round-xlarge"> - <div name="cputemp" class="w3-container w3-blue w3-round-xlarge" style="width:40%">40°C</div> + <div name="diskio" class="w3-container w3-blue w3-round-xlarge" style="width:10%">20 MB/s</div> </div> - <p class="titletext">Disk I/O Speed</p> + <p class="titletextcputemp">CPU temperature</p> <div class="w3-light-grey w3-round-xlarge"> - <div name="diskio" class="w3-container w3-blue w3-round-xlarge" style="width:10%">20 MB/s</div> + <div name="cputemp" class="w3-container w3-blue w3-round-xlarge" style="width:40%">40°C</div> </div> <br><br>