fleet/frontend/pages/hosts/helpers.ts
melpike 75982f44de
Rename Apple Business Manager in UI (#42584)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #42512

---------

Co-authored-by: Luke Heath <luke@fleetdm.com>
Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
2026-04-08 11:14:19 -06:00

22 lines
731 B
TypeScript

import { DEFAULT_EMPTY_CELL_VALUE } from "utilities/constants";
export const getHostStatusTooltipText = (status: string): string => {
if (status === "online") {
return "Online hosts will respond to a live report.";
}
if (status === DEFAULT_EMPTY_CELL_VALUE) {
return "Device is pending enrollment in Apple Business and status is not yet available.";
}
return "Offline hosts won't respond to a live report because they may be shut down, asleep, or not connected to the internet.";
};
export const getHostStatus = (
status: string,
mdmEnrollmentStatus?: string
): string => {
if (mdmEnrollmentStatus === "Pending") {
return DEFAULT_EMPTY_CELL_VALUE;
}
return status || DEFAULT_EMPTY_CELL_VALUE;
};