mirror of
https://github.com/fleetdm/fleet
synced 2026-05-21 16:08:47 +00:00
## For #33299 - Couple card logic to URL param - Validate param, push to default macos if invalid or missing - Validate that other setup experience cards don't have a platform param, push to no param if present  - [x] QA'd all new/changed functionality manually --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
52 lines
1.5 KiB
TypeScript
52 lines
1.5 KiB
TypeScript
import PATHS from "router/paths";
|
|
|
|
import { InjectedRouter } from "react-router";
|
|
|
|
import { ISideNavItem } from "pages/admin/components/SideNav/SideNav";
|
|
|
|
import EndUserAuthentication from "./cards/EndUserAuthentication/EndUserAuthentication";
|
|
import BootstrapPackage from "./cards/BootstrapPackage";
|
|
import SetupAssistant from "./cards/SetupAssistant";
|
|
import InstallSoftware from "./cards/InstallSoftware";
|
|
import RunScript from "./cards/RunScript";
|
|
|
|
export interface ISetupExperienceCardProps {
|
|
currentTeamId: number;
|
|
router: InjectedRouter;
|
|
urlPlatformParam?: string; // not yet guaranteed to be a valid platform
|
|
}
|
|
|
|
const SETUP_EXPERIENCE_NAV_ITEMS: ISideNavItem<ISetupExperienceCardProps>[] = [
|
|
{
|
|
title: "1. End user authentication",
|
|
urlSection: "end-user-auth",
|
|
path: PATHS.CONTROLS_END_USER_AUTHENTICATION,
|
|
Card: EndUserAuthentication,
|
|
},
|
|
{
|
|
title: "2. Bootstrap package",
|
|
urlSection: "bootstrap-package",
|
|
path: PATHS.CONTROLS_BOOTSTRAP_PACKAGE,
|
|
Card: BootstrapPackage,
|
|
},
|
|
{
|
|
title: "3. Install software",
|
|
urlSection: "install-software",
|
|
path: PATHS.CONTROLS_INSTALL_SOFTWARE("macos"),
|
|
Card: InstallSoftware,
|
|
},
|
|
{
|
|
title: "4. Run script",
|
|
urlSection: "run-script",
|
|
path: PATHS.CONTROLS_RUN_SCRIPT,
|
|
Card: RunScript,
|
|
},
|
|
{
|
|
title: "5. Setup assistant",
|
|
urlSection: "setup-assistant",
|
|
path: PATHS.CONTROLS_SETUP_ASSITANT,
|
|
Card: SetupAssistant,
|
|
},
|
|
];
|
|
|
|
export default SETUP_EXPERIENCE_NAV_ITEMS;
|