1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00
unleash.unleash/frontend/src/interfaces/uiConfig.ts

81 lines
1.9 KiB
TypeScript
Raw Normal View History

import { ReactNode } from 'react';
import { Variant } from 'utils/variants';
export interface IUiConfig {
authenticationType?: string;
baseUriPath?: string;
flags: IFlags;
name: string;
slogan: string;
environment?: string;
unleashUrl?: string;
version: string;
versionInfo?: IVersionInfo;
links: ILinks[];
disablePasswordAuth?: boolean;
emailEnabled?: boolean;
networkViewEnabled: boolean;
2022-12-21 12:23:44 +01:00
maintenanceMode?: boolean;
toast?: IProclamationToast;
segmentValuesLimit?: number;
strategySegmentsLimit?: number;
frontendApiOrigins?: string[];
}
export interface IProclamationToast {
message: string;
id: string;
severity: 'success' | 'info' | 'warning' | 'error';
link: string;
}
export interface IFlags {
P: boolean;
RE: boolean;
2022-02-23 13:47:32 +01:00
EEA?: boolean;
SE?: boolean;
T?: boolean;
UNLEASH_CLOUD?: boolean;
UG?: boolean;
embedProxyFrontend?: boolean;
maintenanceMode?: boolean;
messageBanner?: Variant;
2023-03-29 08:19:33 +02:00
featuresExportImport?: boolean;
caseInsensitiveInOperators?: boolean;
proPlanAutoCharge?: boolean;
notifications?: boolean;
personalAccessTokensKillSwitch?: boolean;
demo?: boolean;
googleAuthEnabled?: boolean;
disableBulkToggle?: boolean;
disableNotifications?: boolean;
advancedPlayground?: boolean;
customRootRolesKillSwitch?: boolean;
2023-07-11 09:21:01 +02:00
strategyVariant?: boolean;
segmentChangeRequests?: boolean;
2023-08-15 09:08:26 +02:00
changeRequestReject?: boolean;
lastSeenByEnvironment?: boolean;
2023-08-18 13:55:23 +02:00
newApplicationList?: boolean;
integrationsRework?: boolean;
feat: multiple project roles (#4512) https://linear.app/unleash/issue/2-1128/change-the-api-to-support-adding-multiple-roles-to-a-usergroup-on-a https://linear.app/unleash/issue/2-1125/be-able-to-fetch-all-roles-for-a-user-in-a-project https://linear.app/unleash/issue/2-1127/adapt-the-ui-to-be-able-to-do-a-multi-select-on-role-permissions-for - Allows assigning project roles to groups with root roles - Implements new methods that support assigning, editing, removing and retrieving multiple project roles in project access, along with other auxiliary methods - Adds new events for updating and removing assigned roles - Adapts `useProjectApi` to new methods that use new endpoints that support multiple roles - Adds the `multipleRoles` feature flag that controls the possibility of selecting multiple roles on the UI - Adapts `ProjectAccessAssign` to support multiple role, using the new methods - Adds a new `MultipleRoleSelect` component that allows you to select multiple roles based on the `RoleSelect` component - Adapts the `RoleCell` component to support either a single role or multiple roles - Updates the `access.spec.ts` Cypress e2e test to reflect our new logic - Updates `access-service.e2e.test.ts` with tests covering the multiple roles logic and covering some corner cases - Updates `project-service.e2e.test.ts` to adapt to the new logic, adding a test that covers adding access with `[roles], [groups], [users]` - Misc refactors and boy scouting ![image](https://github.com/Unleash/unleash/assets/14320932/d1cc7626-9387-4ab8-9860-cd293a0d4f62) --------- Co-authored-by: David Leek <david@getunleash.io> Co-authored-by: Mateusz Kwasniewski <kwasniewski.mateusz@gmail.com> Co-authored-by: Nuno Góis <github@nunogois.com>
2023-08-25 10:31:37 +02:00
multipleRoles?: boolean;
}
export interface IVersionInfo {
instanceId: string;
isLatest: boolean;
latest: Partial<IVersion>;
current: IVersion;
}
export interface IVersion {
oss: string;
enterprise: string;
}
export interface ILinks {
value: string;
icon: ReactNode;
href: string;
title: string;
}