mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
<!-- 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>
22 lines
731 B
TypeScript
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;
|
|
};
|