Modify undervoltage status display in device command

Change-type: patch
Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
Scott Lowe 2020-09-04 10:32:40 +02:00
parent 8631e22686
commit ffa8e245ba

View File

@ -130,7 +130,12 @@ export default class DeviceCmd extends Command {
device.cpu_temp_c = device.cpu_temp;
device.cpu_usage_percent = device.cpu_usage;
device.undervoltage_detected = device.is_undervolted;
// Only show undervoltage status if true
// API sends false even for devices which are not detecting this.
if (device.is_undervolted) {
device.undervoltage_detected = device.is_undervolted;
}
if (
device.memory_usage != null &&