@centreon/ui-context 24.7.6 → 24.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/defaults.ts +0 -3
- package/src/index.ts +3 -11
- package/src/{platformFeauresAtom.ts → platformFeaturesAtom.ts} +1 -0
- package/src/types.ts +0 -51
- package/src/additionalResources.ts +0 -5
- package/src/federatedModulesAndWidgetsAtoms.ts +0 -7
- package/src/isOnPublicPageAtom.ts +0 -3
package/package.json
CHANGED
package/src/defaults.ts
CHANGED
|
@@ -2,10 +2,7 @@ import { User, ThemeMode, ListingVariant } from './types';
|
|
|
2
2
|
|
|
3
3
|
const defaultUser: User = {
|
|
4
4
|
alias: '',
|
|
5
|
-
canManageApiTokens: false,
|
|
6
5
|
default_page: '/monitoring/resources',
|
|
7
|
-
id: undefined,
|
|
8
|
-
isAdmin: undefined,
|
|
9
6
|
isExportButtonEnabled: false,
|
|
10
7
|
locale: navigator.language,
|
|
11
8
|
name: '',
|
package/src/index.ts
CHANGED
|
@@ -6,17 +6,11 @@ export { default as cloudServicesAtom } from './cloudServicesAtom';
|
|
|
6
6
|
export { default as acknowledgementAtom } from './acknowledgementAtom';
|
|
7
7
|
export { default as resourceStorageOptimizationModeAtom } from './resourceStorageOptimizationMode';
|
|
8
8
|
export { default as platformNameAtom } from './platformNameAtom';
|
|
9
|
-
export { ThemeMode, ListingVariant
|
|
9
|
+
export { ThemeMode, ListingVariant } from './types';
|
|
10
10
|
export {
|
|
11
11
|
platformFeaturesAtom,
|
|
12
12
|
featureFlagsDerivedAtom
|
|
13
|
-
} from './
|
|
14
|
-
export { isOnPublicPageAtom } from './isOnPublicPageAtom';
|
|
15
|
-
export { additionalResourcesAtom } from './additionalResources';
|
|
16
|
-
export {
|
|
17
|
-
federatedModulesAtom,
|
|
18
|
-
federatedWidgetsAtom
|
|
19
|
-
} from './federatedModulesAndWidgetsAtoms';
|
|
13
|
+
} from './platformFeaturesAtom';
|
|
20
14
|
|
|
21
15
|
export type {
|
|
22
16
|
User,
|
|
@@ -27,8 +21,6 @@ export type {
|
|
|
27
21
|
CloudServices,
|
|
28
22
|
Acknowledgement,
|
|
29
23
|
Acl,
|
|
30
|
-
DashboardRolesAndPermissions,
|
|
31
24
|
FeatureFlags,
|
|
32
|
-
PlatformFeatures
|
|
33
|
-
AdditionalResource
|
|
25
|
+
PlatformFeatures
|
|
34
26
|
} from './types';
|
|
@@ -3,6 +3,7 @@ import { atom } from 'jotai';
|
|
|
3
3
|
import { FeatureFlags, PlatformFeatures } from './types';
|
|
4
4
|
|
|
5
5
|
export const platformFeaturesAtom = atom<PlatformFeatures | null>(null);
|
|
6
|
+
|
|
6
7
|
export const featureFlagsDerivedAtom = atom<FeatureFlags | null>(
|
|
7
8
|
(get): FeatureFlags => {
|
|
8
9
|
const platformFeatures = get(platformFeaturesAtom);
|
package/src/types.ts
CHANGED
|
@@ -5,26 +5,9 @@ export enum ListingVariant {
|
|
|
5
5
|
extended = 'extended'
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export enum DashboardGlobalRole {
|
|
9
|
-
administrator = 'administrator',
|
|
10
|
-
creator = 'creator',
|
|
11
|
-
viewer = 'viewer'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface DashboardRolesAndPermissions {
|
|
15
|
-
createDashboards: boolean;
|
|
16
|
-
globalUserRole: DashboardGlobalRole;
|
|
17
|
-
manageAllDashboards: boolean;
|
|
18
|
-
viewDashboards: boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
8
|
export interface User {
|
|
22
9
|
alias: string;
|
|
23
|
-
canManageApiTokens: boolean;
|
|
24
|
-
dashboard?: DashboardRolesAndPermissions | null;
|
|
25
10
|
default_page?: string | null;
|
|
26
|
-
id?: number;
|
|
27
|
-
isAdmin?: boolean;
|
|
28
11
|
isExportButtonEnabled: boolean;
|
|
29
12
|
locale: string;
|
|
30
13
|
name: string;
|
|
@@ -87,9 +70,7 @@ export interface Downtime {
|
|
|
87
70
|
export interface FeatureFlags {
|
|
88
71
|
adExclusionPeriods?: boolean;
|
|
89
72
|
dashboard?: boolean;
|
|
90
|
-
dashboardPlayList?: boolean;
|
|
91
73
|
notification?: boolean;
|
|
92
|
-
resourceStatusFilterRevamp?: boolean;
|
|
93
74
|
resourceStatusTreeView?: boolean;
|
|
94
75
|
vault?: boolean;
|
|
95
76
|
}
|
|
@@ -98,35 +79,3 @@ export interface PlatformFeatures {
|
|
|
98
79
|
featureFlags: FeatureFlags;
|
|
99
80
|
isCloudPlatform: boolean;
|
|
100
81
|
}
|
|
101
|
-
|
|
102
|
-
export interface AdditionalResource {
|
|
103
|
-
baseEndpoint: string;
|
|
104
|
-
defaultMonitoringParameter?: Record<string, boolean | number | string>;
|
|
105
|
-
label: string;
|
|
106
|
-
resourceType: string;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
interface FederatedComponentsConfiguration {
|
|
110
|
-
federatedComponents: Array<string>;
|
|
111
|
-
panelMinHeight?: number;
|
|
112
|
-
panelMinWidth?: number;
|
|
113
|
-
path: string;
|
|
114
|
-
title?: string;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
interface PageComponent {
|
|
118
|
-
children?: string;
|
|
119
|
-
component: string;
|
|
120
|
-
featureFlag?: string;
|
|
121
|
-
route: string;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export interface FederatedModule {
|
|
125
|
-
federatedComponentsConfiguration: Array<FederatedComponentsConfiguration>;
|
|
126
|
-
federatedPages: Array<PageComponent>;
|
|
127
|
-
moduleFederationName: string;
|
|
128
|
-
moduleName: string;
|
|
129
|
-
preloadScript?: string;
|
|
130
|
-
remoteEntry: string;
|
|
131
|
-
remoteUrl?: string;
|
|
132
|
-
}
|