fleet/frontend/pages/ManageControlsPage/SetupExperience/SetupExperienceNavItems.tsx
Gabriel Hernandez d03468314e
add UI for uploading setup experience script (#22691)
relates to #22374

> NOTE: we still need integration with the API which will be done in
another PR.

>NOTE: Please review https://github.com/fleetdm/fleet/pull/22651 first,
as this PR is based off of that branch.

This adds the UI for uploading a setup experience script. this includes:

**setup experience script uploader:**


![image](https://github.com/user-attachments/assets/bec00594-9519-48a9-bce5-d90d282ad5fb)

**script card:**


![image](https://github.com/user-attachments/assets/35549f1c-c280-4293-8e4e-e36e2a3df16c)

**delete script modal:**


![image](https://github.com/user-attachments/assets/90be6bd3-6807-4adb-8709-2ec5893f7fad)

**script run preview:**


![image](https://github.com/user-attachments/assets/cb874986-e0eb-4e6e-bab3-b8325394894c)



<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-10-10 13:19:32 +01:00

51 lines
1.4 KiB
TypeScript

import PATHS from "router/paths";
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 SetupExperienceScript from "./cards/SetupExperienceScript";
interface ISetupExperienceCardProps {
currentTeamId?: number;
}
// TODO: types
const SETUP_EXPERIENCE_NAV_ITEMS: ISideNavItem<
ISetupExperienceCardProps | any
>[] = [
{
title: "1. End user authentication",
urlSection: "end-user-auth",
path: PATHS.CONTROLS_END_USER_AUTHENTICATION,
Card: EndUserAuthentication,
},
{
title: "2. Setup assistant",
urlSection: "setup-assistant",
path: PATHS.CONTROLS_SETUP_ASSITANT,
Card: SetupAssistant,
},
{
title: "3. Bootstrap package",
urlSection: "bootstrap-package",
path: PATHS.CONTROLS_BOOTSTRAP_PACKAGE,
Card: BootstrapPackage,
},
{
title: "4. Install software",
urlSection: "install-software",
path: PATHS.CONTROLS_INSTALL_SOFTWARE,
Card: InstallSoftware,
},
{
title: "5. Run script",
urlSection: "run-script",
path: PATHS.CONTROLS_RUN_SCRIPT,
Card: SetupExperienceScript,
},
];
export default SETUP_EXPERIENCE_NAV_ITEMS;