From 2d84606abfb31dfa1061943fd265fb8bdfd500e0 Mon Sep 17 00:00:00 2001 From: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com> Date: Fri, 21 Dec 2018 02:50:36 +0100 Subject: [PATCH] BUG - correcting size and non significant zeroes (#9575) --- html/includes/table/sensors-common.php | 2 +- html/pages/device/health/sensors.inc.php | 10 +++++----- includes/common.php | 5 ++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/html/includes/table/sensors-common.php b/html/includes/table/sensors-common.php index 39adafe164..5d566e599d 100644 --- a/html/includes/table/sensors-common.php +++ b/html/includes/table/sensors-common.php @@ -121,7 +121,7 @@ foreach (dbFetchRows($sql, $param) as $sensor) { } else { // we have another sensor $current_label = get_sensor_label_color($sensor); - $sensor_current = "".(format_si($sensor['sensor_current'])+0)." $unit"; + $sensor_current = "".format_si($sensor['sensor_current']).$unit.""; } $response[] = array( diff --git a/html/pages/device/health/sensors.inc.php b/html/pages/device/health/sensors.inc.php index 2f136701e4..49569ae8a2 100644 --- a/html/pages/device/health/sensors.inc.php +++ b/html/pages/device/health/sensors.inc.php @@ -23,13 +23,13 @@ foreach (dbFetchRows('SELECT * FROM `sensors` WHERE `sensor_class` = ? AND `devi $sensor_current = get_state_label($sensor['state_generic_value'], $state_translation[0]['state_descr'] . " (".$sensor['sensor_current'].")"); } else { $current_label = get_sensor_label_color($sensor); - $sensor_current = "".(format_si($sensor['sensor_current'])+0)." $unit"; + $sensor_current = "".format_si($sensor['sensor_current']).$unit.""; } - $sensor_limit = (format_si($sensor['sensor_limit'])+0)." $unit"; - $sensor_limit_low = (format_si($sensor['sensor_limit_low'])+0)." $unit"; - $sensor_limit_warn = (format_si($sensor['sensor_limit_warn'])+0)." $unit"; - $sensor_limit_low_warn = (format_si($sensor['sensor_limit_low_warn'])+0)." $unit"; + $sensor_limit = format_si($sensor['sensor_limit']).$unit; + $sensor_limit_low = format_si($sensor['sensor_limit_low']).$unit; + $sensor_limit_warn = format_si($sensor['sensor_limit_warn']).$unit; + $sensor_limit_low_warn = format_si($sensor['sensor_limit_low_warn']).$unit; echo "