mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Add battery health to host details (#6472)
This commit is contained in:
parent
1c6c379f4d
commit
943a1188f1
1
changes/issue-4062-add-battery-health
Normal file
1
changes/issue-4062-add-battery-health
Normal file
@ -0,0 +1 @@
|
||||
* Added battery health to host details UI
|
@ -178,6 +178,7 @@ const DeviceUserPage = ({
|
||||
"hardware_serial",
|
||||
"primary_ip",
|
||||
"public_ip",
|
||||
"batteries",
|
||||
])
|
||||
);
|
||||
|
||||
|
@ -342,6 +342,7 @@ const HostDetailsPage = ({
|
||||
"primary_ip",
|
||||
"public_ip",
|
||||
"geolocation",
|
||||
"batteries",
|
||||
])
|
||||
);
|
||||
|
||||
|
@ -137,6 +137,20 @@ const About = ({
|
||||
);
|
||||
};
|
||||
|
||||
const renderBattery = () => {
|
||||
if (typeof aboutData.batteries !== "object") {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<div className="info-grid__block">
|
||||
<span className="info-grid__header">Battery</span>
|
||||
<span className="info-grid__data">
|
||||
{aboutData.batteries[0]?.health}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
if (deviceUser) {
|
||||
return (
|
||||
<div className="section about">
|
||||
@ -160,6 +174,7 @@ const About = ({
|
||||
</div>
|
||||
{renderSerialAndIPs()}
|
||||
{renderDeviceUser()}
|
||||
{renderBattery()}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@ -190,6 +205,7 @@ const About = ({
|
||||
{renderMdmData()}
|
||||
{renderDeviceUser()}
|
||||
{renderGeolocation()}
|
||||
{renderBattery()}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user