fleet/frontend/pages/admin/IntegrationsPage/IntegrationsPage.tsx
Gabriel Hernandez 37ac5db5e8
implement UI for automatic enrollment section in integrations (#11642)
relates to #10745

Implements the UI for automatic enrollment. This includes:

**moving ABM section into this page**


![image](https://github.com/fleetdm/fleet/assets/1153709/f819d90d-0a4b-4c42-9a55-f825c027577e)

**implementing end user authentication**


![image](https://github.com/fleetdm/fleet/assets/1153709/7a326606-5964-4004-a0c9-ac16f65cebdc)

**implement uploading EULA pdf**


![image](https://github.com/fleetdm/fleet/assets/1153709/22710262-e9a3-4992-ab49-287ea53bf878)


![image](https://github.com/fleetdm/fleet/assets/1153709/ff83de9e-8066-4179-a648-58f75516601d)

- [x] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
- [x] Manual QA for all new/changed functionality
2023-05-17 11:18:31 +01:00

45 lines
1.3 KiB
TypeScript

import { AppContext } from "context/app";
import React, { useContext } from "react";
import { InjectedRouter, Params } from "react-router/lib/Router";
import SideNav from "../components/SideNav";
import getFilteredIntegrationSettingsNavItems from "./IntegrationNavItems";
const baseClass = "integrations";
interface IIntegrationSettingsPageProps {
router: InjectedRouter;
params: Params;
}
const IntegrationsPage = ({
router,
params,
}: IIntegrationSettingsPageProps) => {
const { isSandboxMode } = useContext(AppContext);
const { section } = params;
const navItems = getFilteredIntegrationSettingsNavItems(isSandboxMode);
const DEFAULT_SETTINGS_SECTION = navItems[0];
const currentSection =
navItems.find((item) => item.urlSection === section) ??
DEFAULT_SETTINGS_SECTION;
const CurrentCard = currentSection.Card;
return (
<div className={`${baseClass}`}>
<p className={`${baseClass}__page-description`}>
Add ticket destinations and turn on mobile device management features.
</p>
<SideNav
className={`${baseClass}__side-nav`}
navItems={navItems}
activeItem={currentSection.urlSection}
CurrentCard={<CurrentCard router={router} />}
/>
</div>
);
};
export default IntegrationsPage;