2024-03-01 16:52:19 +00:00
|
|
|
import React from "react";
|
|
|
|
|
import { DEFAULT_EMPTY_CELL_VALUE } from "utilities/constants";
|
|
|
|
|
import Icon from "components/Icon";
|
|
|
|
|
import NotSupported from "components/NotSupported";
|
2026-04-02 17:32:30 +00:00
|
|
|
import TooltipWrapper from "components/TooltipWrapper";
|
2024-03-01 16:52:19 +00:00
|
|
|
import { IHost } from "interfaces/host";
|
|
|
|
|
|
|
|
|
|
const baseClass = "host-mdm-status-cell";
|
|
|
|
|
|
|
|
|
|
const HostMdmStatusCell = ({
|
|
|
|
|
row: {
|
2026-04-11 00:49:52 +00:00
|
|
|
original: { mdm, platform },
|
2024-03-01 16:52:19 +00:00
|
|
|
},
|
|
|
|
|
cell: { value },
|
|
|
|
|
}: {
|
|
|
|
|
row: { original: IHost };
|
|
|
|
|
cell: { value: string };
|
|
|
|
|
}): JSX.Element => {
|
|
|
|
|
if (platform === "chrome") {
|
|
|
|
|
return NotSupported;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!value) {
|
|
|
|
|
return <span className={`${baseClass}`}>{DEFAULT_EMPTY_CELL_VALUE}</span>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<span className={`${baseClass}`}>
|
|
|
|
|
{value}
|
|
|
|
|
{mdm?.dep_profile_error && (
|
2026-04-02 17:32:30 +00:00
|
|
|
<TooltipWrapper
|
|
|
|
|
tipContent={
|
|
|
|
|
<span className="tooltip__tooltip-text">
|
|
|
|
|
Fleet hit Apple's API rate limit when preparing the macOS
|
|
|
|
|
Setup Assistant for this host. Fleet will try again every hour.
|
2024-03-01 16:52:19 +00:00
|
|
|
</span>
|
2026-04-02 17:32:30 +00:00
|
|
|
}
|
|
|
|
|
position="top"
|
|
|
|
|
underline={false}
|
|
|
|
|
showArrow
|
|
|
|
|
tipOffset={8}
|
|
|
|
|
>
|
|
|
|
|
<Icon name="error-outline" color="status-error" size="medium" />
|
|
|
|
|
</TooltipWrapper>
|
2024-03-01 16:52:19 +00:00
|
|
|
)}
|
|
|
|
|
</span>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default HostMdmStatusCell;
|