Fleet UI: NDES SCEP followup (#22963)

This commit is contained in:
RachelElysia
2024-10-17 10:21:26 -04:00
committed by GitHub
parent e918aa4366
commit 9dbe04da49
6 changed files with 33 additions and 10 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ export enum ActivityType {
DeletedAppleOSProfile = "deleted_macos_profile",
/** Note: BE not renamed (yet) from macOS even though activity is also used for iOS and iPadOS */
EditedAppleOSProfile = "edited_macos_profile",
CreatedNdesScepProxy = "created_ndes_scep_proxy",
AddedNdesScepProxy = "added_ndes_scep_proxy",
DeletedNdesScepProxy = "deleted_ndes_scep_proxy",
EditedNdesScepProxy = "edited_ndes_scep_proxy",
CreatedWindowsProfile = "created_windows_profile",
@@ -1371,9 +1371,9 @@ describe("Activity Feed", () => {
expect(screen.getByText("An end user")).toBeInTheDocument();
});
it("renders createdNdesScepProxy activity correctly", () => {
it("renders addedNdesScepProxy activity correctly", () => {
const activity = createMockActivity({
type: ActivityType.CreatedNdesScepProxy,
type: ActivityType.AddedNdesScepProxy,
});
render(<ActivityItem activity={activity} isPremiumTier={false} />);
@@ -414,7 +414,7 @@ const TAGGED_TEMPLATES = {
</>
);
},
createdNdesScepProxy: () => {
addedNdesScepProxy: () => {
return (
<>
{" "}
@@ -1143,8 +1143,8 @@ const getDetail = (
case ActivityType.EditedAppleOSProfile: {
return TAGGED_TEMPLATES.editedAppleOSProfile(activity, isPremiumTier);
}
case ActivityType.CreatedNdesScepProxy: {
return TAGGED_TEMPLATES.createdNdesScepProxy();
case ActivityType.AddedNdesScepProxy: {
return TAGGED_TEMPLATES.addedNdesScepProxy();
}
case ActivityType.DeletedNdesScepProxy: {
return TAGGED_TEMPLATES.deletedNdesScepProxy();
@@ -64,6 +64,10 @@ export const ScepCertificateContent = ({
return <PremiumFeatureMessage />;
}
if (isLoading) {
return <Spinner />;
}
if (!config?.mdm.enabled_and_configured) {
return (
<TurnOnMdmMessage
@@ -74,10 +78,6 @@ export const ScepCertificateContent = ({
);
}
if (isLoading) {
return <Spinner />;
}
// TODO: error UI
if (showDataError) {
return (
@@ -9,6 +9,7 @@ import { NotificationContext } from "context/notification";
import TooltipTruncatedTextCell from "components/TableContainer/DataTable/TooltipTruncatedTextCell";
import Button from "components/buttons/Button";
import Icon from "components/Icon";
import CustomLink from "components/CustomLink";
import { IHostMdmProfileWithAddedStatus } from "../OSSettingsTableConfig";
@@ -89,9 +90,30 @@ const generateErrorTooltip = (
) => {
if (profile.status !== "failed") return null;
// Special case for creating UI link
if (profile.detail.includes("There is no IdP email for this host.")) {
return (
<>
There is no IdP email for this host.
<br />
Fleet couldn&apos;t populate
<br />
$FLEET_VAR_HOST_END_USER_EMAIL_IDP.
<br />
<CustomLink
text="Learn more"
url="https://fleetdm.com/learn-more-about/idp-email"
newTab
iconColor="core-fleet-white"
/>
</>
);
}
if (profile.platform !== "windows") {
return cellValue;
}
return generateFormattedTooltip(profile.detail);
};
+1
View File
@@ -544,6 +544,7 @@ module.exports.routes = {
'GET /sign-in-to/microsoft-automatic-enrollment-tool': 'https://portal.azure.com',
'GET /learn-more-about/custom-os-settings': '/docs/using-fleet/mdm-custom-os-settings',
'GET /learn-more-about/ndes': 'https://learn.microsoft.com/en-us/windows-server/identity/ad-cs/network-device-enrollment-service-overview', // TODO: Confirm URL
'GET /learn-more-about/idp-email': 'https://fleetdm.com/docs/rest-api/rest-api#get-human-device-mapping',
'GET /learn-more-about/enrolling-hosts': '/docs/using-fleet/adding-hosts',
'GET /learn-more-about/setup-assistant': '/docs/using-fleet/mdm-macos-setup-experience#macos-setup-assistant',
'GET /learn-more-about/policy-automations': '/docs/using-fleet/automations',