fleet/frontend/router/paths.ts

108 lines
4.6 KiB
TypeScript
Raw Normal View History

import { IQuery } from "../interfaces/query";
import { IPolicy } from "../interfaces/policy";
import URL_PREFIX from "./url_prefix";
export default {
ROOT: `${URL_PREFIX}/`,
CONTROLS: `${URL_PREFIX}/controls`,
2023-01-27 22:25:53 +00:00
CONTROLS_MAC_OS_UPDATES: `${URL_PREFIX}/controls/mac-os-updates`,
CONTROLS_MAC_SETTINGS: `${URL_PREFIX}/controls/mac-settings`,
CONTROLS_CUSTOM_SETTINGS: `${URL_PREFIX}/controls/mac-settings/custom-settings`,
CONTROLS_DISK_ENCRYPTION: `${URL_PREFIX}/controls/mac-settings/disk-encryption`,
UI for bootstrap package flows (#11288) relates to #10935 This is the UI for all the flows around adding, removing, downloading, and viewing information about a bootstrap package for fleet mdm. This is pretty comprehensive but includes: ### Backend **Update `Get host/id`** to include bootstrap package name ```json { "macos_setup": { ... "bootstrap_package_name": "test.pkg" } } ``` ### Frontend **UI for ABM not being set up**: ![image](https://user-images.githubusercontent.com/1153709/234018772-3221e27b-50a4-454e-8e9f-b62c9d349010.png) **UIs for uploading, downloading, and deleting bootstrap package**: ![image](https://user-images.githubusercontent.com/1153709/234017915-871f252f-bf80-4282-9acf-5ebea12c6efa.png) ![image](https://user-images.githubusercontent.com/1153709/234018029-322a5f30-dd22-44e3-b9ae-a4af7acb68b4.png) ![image](https://user-images.githubusercontent.com/1153709/234018163-4b84a2ce-a064-4952-a63d-0c8307391052.png) **UIs for seeing bootstrap status aggregate data** ![image](https://user-images.githubusercontent.com/1153709/234018107-455d63ab-5b2c-4727-ad20-eef6b269c336.png) **UIs for filtering hosts by bootstrap status** ![image](https://user-images.githubusercontent.com/1153709/234018334-170fe93a-700e-48eb-b198-2a1cc54d31a7.png) **UIs for seeing package status on host details and my device page**: ![image](https://user-images.githubusercontent.com/1153709/234018488-7b515db4-1248-4be7-8de3-9b74bb5d4795.png) ![image](https://user-images.githubusercontent.com/1153709/234018525-d653cb2d-9ef9-437e-8eba-141e557f4f39.png) - [x] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Roberto Dip <dip.jesusr@gmail.com> Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com> Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
2023-04-27 15:10:41 +00:00
CONTROLS_MAC_SETUP: `${URL_PREFIX}/controls/mac-setup`,
CONTROLS_BOOTSTRAP_PACKAGE: `${URL_PREFIX}/controls/mac-setup/bootstrap-package`,
CONTROLS_MAC_SCRIPTS: `${URL_PREFIX}/controls/mac-scripts`,
DASHBOARD: `${URL_PREFIX}/dashboard`,
DASHBOARD_LINUX: `${URL_PREFIX}/dashboard/linux`,
DASHBOARD_MAC: `${URL_PREFIX}/dashboard/mac`,
DASHBOARD_WINDOWS: `${URL_PREFIX}/dashboard/windows`,
ADMIN_USERS: `${URL_PREFIX}/settings/users`,
ADMIN_INTEGRATIONS: `${URL_PREFIX}/settings/integrations`,
ADMIN_INTEGRATIONS_TICKET_DESTINATIONS: `${URL_PREFIX}/settings/integrations/ticket-destinations`,
ADMIN_INTEGRATIONS_MDM: `${URL_PREFIX}/settings/integrations/mdm`,
ADMIN_TEAMS: `${URL_PREFIX}/settings/teams`,
ADMIN_SETTINGS: `${URL_PREFIX}/settings/organization`,
ADMIN_SETTINGS_INFO: `${URL_PREFIX}/settings/organization/info`,
ADMIN_SETTINGS_WEBADDRESS: `${URL_PREFIX}/settings/organization/webaddress`,
ADMIN_SETTINGS_SSO: `${URL_PREFIX}/settings/organization/sso`,
ADMIN_SETTINGS_SMTP: `${URL_PREFIX}/settings/organization/smtp`,
ADMIN_SETTINGS_AGENTS: `${URL_PREFIX}/settings/organization/agents`,
ADMIN_SETTINGS_HOST_STATUS_WEBHOOK: `${URL_PREFIX}/settings/organization/host-status-webhook`,
ADMIN_SETTINGS_STATISTICS: `${URL_PREFIX}/settings/organization/statistics`,
ADMIN_SETTINGS_ADVANCED: `${URL_PREFIX}/settings/organization/advanced`,
ADMIN_SETTINGS_FLEET_DESKTOP: `${URL_PREFIX}/settings/organization/fleet-desktop`,
EDIT_PACK: (packId: number): string => {
return `${URL_PREFIX}/packs/${packId}/edit`;
},
PACK: (packId: number): string => {
return `${URL_PREFIX}/packs/${packId}`;
},
EDIT_LABEL: (labelId: number): string => {
return `${URL_PREFIX}/labels/${labelId}`;
},
EDIT_QUERY: (query: IQuery): string => {
return `${URL_PREFIX}/queries/${query.id}`;
},
EDIT_POLICY: (policy: IPolicy): string => {
return `${URL_PREFIX}/policies/${policy.id}${
policy.team_id ? `?team_id=${policy.team_id}` : ""
}`;
},
FORGOT_PASSWORD: `${URL_PREFIX}/login/forgot`,
API_ONLY_USER: `${URL_PREFIX}/apionlyuser`,
FLEET_403: `${URL_PREFIX}/403`,
LOGIN: `${URL_PREFIX}/login`,
LOGOUT: `${URL_PREFIX}/logout`,
MANAGE_HOSTS: `${URL_PREFIX}/hosts/manage`,
MANAGE_HOSTS_ADD_HOSTS: `${URL_PREFIX}/hosts/manage/?add_hosts=true`,
MANAGE_HOSTS_LABEL: (labelId: number | string): string => {
return `${URL_PREFIX}/hosts/manage/labels/${labelId}`;
},
HOST_DETAILS: (id: number): string => {
return `${URL_PREFIX}/hosts/${id}`;
},
HOST_SOFTWARE: (id: number): string => {
return `${URL_PREFIX}/hosts/${id}/software`;
},
HOST_SCHEDULE: (id: number): string => {
return `${URL_PREFIX}/hosts/${id}/schedule`;
},
HOST_POLICIES: (id: number): string => {
return `${URL_PREFIX}/hosts/${id}/policies`;
},
2022-03-21 13:38:59 +00:00
DEVICE_USER_DETAILS: (deviceAuthToken: any): string => {
return `${URL_PREFIX}/device/${deviceAuthToken}`;
},
MANAGE_SOFTWARE: `${URL_PREFIX}/software/manage`,
2022-06-08 19:01:38 +00:00
SOFTWARE_DETAILS: (id: string): string => {
return `${URL_PREFIX}/software/${id}`;
},
TEAM_DETAILS_MEMBERS: (teamId?: number): string => {
if (teamId !== undefined && teamId > 0) {
return `${URL_PREFIX}/settings/teams/members?team_id=${teamId}`;
}
return `${URL_PREFIX}/settings/teams`;
},
TEAM_DETAILS_OPTIONS: (teamId?: number): string => {
if (teamId !== undefined && teamId > 0) {
return `${URL_PREFIX}/settings/teams/options?team_id=${teamId}`;
}
return `${URL_PREFIX}/settings/teams`;
},
MANAGE_PACKS: `${URL_PREFIX}/packs/manage`,
NEW_PACK: `${URL_PREFIX}/packs/new`,
MANAGE_QUERIES: `${URL_PREFIX}/queries/manage`,
MANAGE_SCHEDULE: `${URL_PREFIX}/schedule/manage`,
MANAGE_TEAM_SCHEDULE: (teamId: number): string => {
return `${URL_PREFIX}/schedule/manage?team_id=${teamId}`;
},
2021-08-30 23:02:53 +00:00
MANAGE_POLICIES: `${URL_PREFIX}/policies/manage`,
NEW_LABEL: `${URL_PREFIX}/labels/new`,
NEW_POLICY: `${URL_PREFIX}/policies/new`,
NEW_QUERY: `${URL_PREFIX}/queries/new`,
RESET_PASSWORD: `${URL_PREFIX}/login/reset`,
SETUP: `${URL_PREFIX}/setup`,
USER_SETTINGS: `${URL_PREFIX}/profile`,
URL_PREFIX,
};