diff --git a/changes/19619-win-battery b/changes/19619-win-battery index 124e58114048..4ea9aca94fb5 100644 --- a/changes/19619-win-battery +++ b/changes/19619-win-battery @@ -1 +1,2 @@ -- Windows host details now include battery status \ No newline at end of file +- Windows host details now include battery status +- UI includes information on how battery health is defined diff --git a/frontend/pages/hosts/details/cards/About/About.tsx b/frontend/pages/hosts/details/cards/About/About.tsx index f1667f890059..67a54f977705 100644 --- a/frontend/pages/hosts/details/cards/About/About.tsx +++ b/frontend/pages/hosts/details/cards/About/About.tsx @@ -13,6 +13,7 @@ import { import { DEFAULT_EMPTY_CELL_VALUE, MDM_STATUS_TOOLTIP, + BATTERY_TOOLTIP, } from "utilities/constants"; import DataSet from "components/DataSet"; @@ -173,14 +174,21 @@ const About = ({ const renderBattery = () => { if ( aboutData.batteries === null || - typeof aboutData.batteries !== "object" + typeof aboutData.batteries !== "object" || + aboutData.batteries?.[0]?.health === "Unknown" ) { return null; } return ( + {aboutData.batteries?.[0]?.health} + + } /> ); }; diff --git a/frontend/utilities/constants.tsx b/frontend/utilities/constants.tsx index 4b780aebc98c..513e6dacf840 100644 --- a/frontend/utilities/constants.tsx +++ b/frontend/utilities/constants.tsx @@ -336,6 +336,27 @@ export const MDM_STATUS_TOOLTIP: Record = { ), }; +export const BATTERY_TOOLTIP: Record = { + Normal: ( + + Current maximum capacity is at least +
+ 80% of its designed capacity and the +
+ cycle count is below 1000. +
+ ), + "Service recommended": ( + + Current maximum capacity has fallen +
+ below 80% of its designed capacity +
+ or the cycle count has reached 1000. +
+ ), +}; + export const DEFAULT_CREATE_USER_ERRORS = { email: "", name: "",