Skip to content

Commit

Permalink
Merge branch 'main' into 22115-script-automation-be
Browse files Browse the repository at this point in the history
  • Loading branch information
iansltx committed Oct 3, 2024
2 parents c12402e + 3d43aeb commit 03f4a1e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
3 changes: 2 additions & 1 deletion changes/19619-win-battery
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Windows host details now include battery status
- Windows host details now include battery status
- UI includes information on how battery health is defined
12 changes: 10 additions & 2 deletions frontend/pages/hosts/details/cards/About/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import {
DEFAULT_EMPTY_CELL_VALUE,
MDM_STATUS_TOOLTIP,
BATTERY_TOOLTIP,
} from "utilities/constants";
import DataSet from "components/DataSet";

Expand Down Expand Up @@ -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 (
<DataSet
title="Battery condition"
value={aboutData.batteries?.[0]?.health}
value={
<TooltipWrapper
tipContent={BATTERY_TOOLTIP[aboutData.batteries?.[0]?.health]}
>
{aboutData.batteries?.[0]?.health}
</TooltipWrapper>
}
/>
);
};
Expand Down
21 changes: 21 additions & 0 deletions frontend/utilities/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,27 @@ export const MDM_STATUS_TOOLTIP: Record<string, string | React.ReactNode> = {
),
};

export const BATTERY_TOOLTIP: Record<string, string | React.ReactNode> = {
Normal: (
<span>
Current maximum capacity is at least
<br />
80% of its designed capacity and the
<br />
cycle count is below 1000.
</span>
),
"Service recommended": (
<span>
Current maximum capacity has fallen
<br />
below 80% of its designed capacity
<br />
or the cycle count has reached 1000.
</span>
),
};

export const DEFAULT_CREATE_USER_ERRORS = {
email: "",
name: "",
Expand Down
4 changes: 2 additions & 2 deletions orbit/TUF.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Following are the currently deployed versions of fleetd components on the `stabl

| Component\OS | macOS | Linux | Windows | Linux (arm64) |
|--------------|--------|--------|---------|---------------|
| orbit | 1.33.0 | 1.33.0 | 1.33.0 | 1.33.0 |
| desktop | 1.33.0 | 1.33.0 | 1.33.0 | 1.33.0 |
| orbit | 1.34.0 | 1.34.0 | 1.34.0 | 1.34.0 |
| desktop | 1.34.0 | 1.34.0 | 1.34.0 | 1.34.0 |
| osqueryd | 5.13.1 | 5.13.1 | 5.13.1 | 5.13.1 |
| nudge | - | - | - | - |
| swiftDialog | - | - | - | - |
Expand Down

0 comments on commit 03f4a1e

Please sign in to comment.