@camunda/ccma-saas-frontend 0.0.43 → 0.0.45
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/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.d.ts +1 -1
- package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.d.ts +3 -3
- package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.d.ts +3 -3
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts +2 -1
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +2 -2
- package/lib/esm/components/c4-cluster-overview/applications.js +10 -2
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +1 -1
- package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.d.ts +3 -3
- package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.js +5 -13
- package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.spec.d.ts +1 -0
- package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.spec.js +42 -0
- package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-toggle.d.ts +1 -1
- package/lib/esm/components/c4-console-dashboard/elements/empty-state.d.ts +1 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +1 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.js +3 -3
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +12 -0
- package/lib/esm/components/c4-divider/c4-divider.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-timestamp-information.d.ts +1 -1
- package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.d.ts +1 -1
- package/lib/esm/components/c4-number-input/c4-number-input.d.ts +1 -1
- package/lib/esm/components/c4-optimize-activation-modal/c4-optimize-activation-modal.d.ts +3 -0
- package/lib/esm/components/c4-optimize-activation-modal/c4-optimize-activation-modal.js +21 -0
- package/lib/esm/components/c4-optimize-activation-modal/c4-optimize-activation-modal.types.d.ts +6 -0
- package/lib/esm/components/c4-optimize-activation-modal/c4-optimize-activation-modal.types.js +6 -0
- package/lib/esm/components/c4-page-template/c4-page-template.d.ts +1 -1
- package/lib/esm/components/c4-search/c4-search-results.d.ts +1 -1
- package/lib/esm/components/c4-telemetry-page/metrics-empty-state-image.d.ts +1 -1
- package/lib/esm/externalUrls.const.d.ts +1 -0
- package/lib/esm/externalUrls.const.js +2 -0
- package/lib/esm/externalUrls.const.spec.js +1 -0
- package/lib/esm/i18n/en/modals/apiclients.json +1 -0
- package/lib/esm/i18n/en/modals/clusters.json +6 -0
- package/lib/esm/i18n/en/pages/clusterdetails.json +25 -0
- package/lib/esm/i18n/en/pages/createcluster.json +1 -1
- package/lib/esm/i18n/en/pages/orgmanagement.json +1 -0
- package/lib/esm/icons/c4-icons.d.ts +11 -11
- package/lib/esm/index.d.ts +2 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/runtime/c4-console-data-context.d.ts +1 -1
- package/lib/esm/runtime/c4-console-data-context.js +2 -2
- package/lib/esm/runtime/c4-console-data-context.types.d.ts +3 -3
- package/lib/esm/runtime/c4-console-data-store.d.ts +3 -3
- package/lib/esm/runtime/c4-console-data-store.js +34 -15
- package/lib/esm/runtime/c4-console-data-store.spec.js +55 -1
- package/lib/esm/runtime/c4-console-notifications-context.d.ts +1 -1
- package/lib/esm/runtime/c4-console-runtime-context.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +27 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +2 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +7 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +2 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.js +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +2 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +37 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +128 -59
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +297 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +17 -4
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +63 -10
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +116 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +21 -11
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +2 -2
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +2 -2
- package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +1 -1
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
- package/lib/esm/widgets/management/c4-management-app.js +6 -0
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +7 -0
- package/package.json +21 -21
|
@@ -17,6 +17,7 @@ const stubDocsUrls = {
|
|
|
17
17
|
swagger: 'https://docs.example/swagger',
|
|
18
18
|
mcpOverview: 'https://docs.example/mcp-overview',
|
|
19
19
|
tasklistApiVersions: 'https://docs.example/tasklist-api-versions',
|
|
20
|
+
multiTenancy: 'https://docs.example/multi-tenancy',
|
|
20
21
|
};
|
|
21
22
|
const resizeObserverStub = class ResizeObserver {
|
|
22
23
|
observe() { }
|
|
@@ -39,7 +40,9 @@ vi.mock('../../../components/c4-cluster-settings/c4-cluster-settings', () => {
|
|
|
39
40
|
return {
|
|
40
41
|
C4ClusterSettings: (props) => {
|
|
41
42
|
lastClusterSettingsProps = props;
|
|
42
|
-
return (_jsxs("div", { "data-testid": 'C4ClusterSettings', children: [props.tasklistSettings?.action ? (_jsx("button", { type: 'button', onClick: props.tasklistSettings.action.onClick, disabled: props.tasklistSettings.action.disabled, children: props.tasklistSettings.action.label })) : null, props.settings?.resourceBasedAuthorizations?.action ? (_jsx("button", { type: 'button', onClick: props.settings.resourceBasedAuthorizations.action.onClick, children: props.settings.resourceBasedAuthorizations.action.label })) : null, props.settings?.identityBasedAuthorizations?.action ? (_jsx("button", { type: 'button', onClick: props.settings.identityBasedAuthorizations.action.onClick, children: props.settings.identityBasedAuthorizations.action.label })) : null, props.settings?.
|
|
43
|
+
return (_jsxs("div", { "data-testid": 'C4ClusterSettings', children: [props.tasklistSettings?.action ? (_jsx("button", { type: 'button', onClick: props.tasklistSettings.action.onClick, disabled: props.tasklistSettings.action.disabled, children: props.tasklistSettings.action.label })) : null, props.settings?.resourceBasedAuthorizations?.action ? (_jsx("button", { type: 'button', onClick: props.settings.resourceBasedAuthorizations.action.onClick, children: props.settings.resourceBasedAuthorizations.action.label })) : null, props.settings?.identityBasedAuthorizations?.action ? (_jsx("button", { type: 'button', onClick: props.settings.identityBasedAuthorizations.action.onClick, children: props.settings.identityBasedAuthorizations.action.label })) : null, props.settings?.multiTenancy?.action ? (_jsx("button", { type: 'button', onClick: () => {
|
|
44
|
+
Promise.resolve(props.settings.multiTenancy?.action.onClick()).catch(() => undefined);
|
|
45
|
+
}, disabled: !props.settings.multiTenancy.permissions?.mayToggle, children: props.settings.multiTenancy.action.label })) : null, props.settings?.swaggerToggle?.description] }));
|
|
43
46
|
},
|
|
44
47
|
};
|
|
45
48
|
});
|
|
@@ -92,6 +95,9 @@ function renderTab(options) {
|
|
|
92
95
|
getAccessToken: async () => 'token',
|
|
93
96
|
},
|
|
94
97
|
backendUrls: {},
|
|
98
|
+
featureFlags: {
|
|
99
|
+
isEnabled: () => true,
|
|
100
|
+
},
|
|
95
101
|
}, children: _jsx(C4ClusterDetailsSettingsTab, { cluster: cluster, orgId: 'org-1', clusterId: 'cluster-1', apiConfig: { stage: 'dev' }, canEditCluster: true, canDeleteCluster: false, canManageUsers: false, t: (k) => k, docsUrls: stubDocsUrls, onReloadCluster: async () => undefined, onRequestDelete: () => undefined }) }));
|
|
96
102
|
if (!lastClusterSettingsProps) {
|
|
97
103
|
throw new Error('Expected C4ClusterSettings to be rendered');
|
|
@@ -116,6 +122,7 @@ function renderTasklistTab(options) {
|
|
|
116
122
|
swagger: '',
|
|
117
123
|
mcpOverview: '',
|
|
118
124
|
tasklistApiVersions: '',
|
|
125
|
+
multiTenancy: '',
|
|
119
126
|
} }) }));
|
|
120
127
|
}
|
|
121
128
|
describe('C4ClusterDetailsSettingsTab version gating', () => {
|
|
@@ -244,6 +251,114 @@ describe('C4ClusterDetailsSettingsTab version gating', () => {
|
|
|
244
251
|
});
|
|
245
252
|
expect(onReloadCluster).toHaveBeenCalled();
|
|
246
253
|
});
|
|
254
|
+
it('does not show Multi-tenancy toggle below 8.8.0-alpha7', () => {
|
|
255
|
+
const settings = renderTab({ zeebeVersion: 'zeebe:8.8.0-alpha6' });
|
|
256
|
+
expect(settings.multiTenancy).toBeUndefined();
|
|
257
|
+
});
|
|
258
|
+
it('shows Multi-tenancy toggle at 8.8.0-alpha7+', () => {
|
|
259
|
+
const settings = renderTab({ zeebeVersion: 'zeebe:8.8.0-alpha7' });
|
|
260
|
+
expect(settings.multiTenancy).toBeDefined();
|
|
261
|
+
expect(settings.multiTenancy?.action.label).toBe('Multi-tenancy');
|
|
262
|
+
});
|
|
263
|
+
it('flips Multi-tenancy via PATCH and reloads the cluster', async () => {
|
|
264
|
+
vi.mocked(ConsoleClusterService.updateCluster).mockResolvedValue(undefined);
|
|
265
|
+
const onReloadCluster = vi.fn(async () => undefined);
|
|
266
|
+
lastClusterSettingsProps = undefined;
|
|
267
|
+
const cluster = createCluster({ zeebeVersion: 'zeebe:8.8.0-alpha7' });
|
|
268
|
+
render(_jsx(C4ConsoleRuntimeProvider, { config: {
|
|
269
|
+
stage: 'dev',
|
|
270
|
+
auth: { getAccessToken: async () => 'token' },
|
|
271
|
+
backendUrls: {},
|
|
272
|
+
featureFlags: { isEnabled: () => true },
|
|
273
|
+
}, children: _jsx(C4ClusterDetailsSettingsTab, { cluster: cluster, orgId: 'org-1', clusterId: 'cluster-1', apiConfig: { stage: 'dev' }, canEditCluster: true, canDeleteCluster: false, canManageUsers: false, t: (k) => k, docsUrls: stubDocsUrls, onReloadCluster: onReloadCluster, onRequestDelete: () => undefined }) }));
|
|
274
|
+
await userEvent.click(screen.getByRole('button', { name: 'Multi-tenancy' }));
|
|
275
|
+
await waitFor(() => {
|
|
276
|
+
expect(ConsoleClusterService.updateCluster).toHaveBeenCalledWith(expect.objectContaining({
|
|
277
|
+
body: { multiTenancyEnabled: true },
|
|
278
|
+
}));
|
|
279
|
+
});
|
|
280
|
+
expect(onReloadCluster).toHaveBeenCalled();
|
|
281
|
+
});
|
|
282
|
+
it('disables the Multi-tenancy toggle when canEditCluster=false', () => {
|
|
283
|
+
lastClusterSettingsProps = undefined;
|
|
284
|
+
const cluster = createCluster({ zeebeVersion: 'zeebe:8.8.0-alpha7' });
|
|
285
|
+
render(_jsx(C4ConsoleRuntimeProvider, { config: {
|
|
286
|
+
stage: 'dev',
|
|
287
|
+
auth: { getAccessToken: async () => 'token' },
|
|
288
|
+
backendUrls: {},
|
|
289
|
+
featureFlags: { isEnabled: () => true },
|
|
290
|
+
}, children: _jsx(C4ClusterDetailsSettingsTab, { cluster: cluster, orgId: 'org-1', clusterId: 'cluster-1', apiConfig: { stage: 'dev' }, canEditCluster: false, canDeleteCluster: false, canManageUsers: false, t: (k) => k, docsUrls: stubDocsUrls, onReloadCluster: async () => undefined, onRequestDelete: () => undefined }) }));
|
|
291
|
+
expect(screen.getByRole('button', { name: 'Multi-tenancy' })).toBeDisabled();
|
|
292
|
+
});
|
|
293
|
+
it('captures exception when the Multi-tenancy PATCH throws', async () => {
|
|
294
|
+
const apiError = new Error('boom');
|
|
295
|
+
vi.mocked(ConsoleClusterService.updateCluster).mockRejectedValue(apiError);
|
|
296
|
+
const captureException = vi.fn();
|
|
297
|
+
const onReloadCluster = vi.fn(async () => undefined);
|
|
298
|
+
const cluster = createCluster({ zeebeVersion: 'zeebe:8.8.0-alpha7' });
|
|
299
|
+
render(_jsx(C4ConsoleRuntimeProvider, { config: {
|
|
300
|
+
stage: 'dev',
|
|
301
|
+
auth: { getAccessToken: async () => 'token' },
|
|
302
|
+
backendUrls: {},
|
|
303
|
+
featureFlags: { isEnabled: () => true },
|
|
304
|
+
telemetry: {
|
|
305
|
+
track: () => undefined,
|
|
306
|
+
captureException,
|
|
307
|
+
},
|
|
308
|
+
}, children: _jsx(C4ClusterDetailsSettingsTab, { cluster: cluster, orgId: 'org-1', clusterId: 'cluster-1', apiConfig: { stage: 'dev' }, canEditCluster: true, canDeleteCluster: false, canManageUsers: false, t: (k) => k, docsUrls: stubDocsUrls, onReloadCluster: onReloadCluster, onRequestDelete: () => undefined }) }));
|
|
309
|
+
await userEvent.click(screen.getByRole('button', { name: 'Multi-tenancy' }));
|
|
310
|
+
await waitFor(() => {
|
|
311
|
+
expect(captureException).toHaveBeenCalledWith(apiError, expect.objectContaining({
|
|
312
|
+
eventName: 'multiTenancy:true:confirm',
|
|
313
|
+
}));
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
it('hides the Multi-tenancy toggle when the feature flag is off, even at 8.8.0-alpha7', () => {
|
|
317
|
+
lastClusterSettingsProps = undefined;
|
|
318
|
+
const cluster = createCluster({ zeebeVersion: 'zeebe:8.8.0-alpha7' });
|
|
319
|
+
render(_jsx(C4ConsoleRuntimeProvider, { config: {
|
|
320
|
+
stage: 'dev',
|
|
321
|
+
auth: { getAccessToken: async () => 'token' },
|
|
322
|
+
backendUrls: {},
|
|
323
|
+
featureFlags: {
|
|
324
|
+
isEnabled: (key) => key !== 'console.multiTenancy',
|
|
325
|
+
},
|
|
326
|
+
}, children: _jsx(C4ClusterDetailsSettingsTab, { cluster: cluster, orgId: 'org-1', clusterId: 'cluster-1', apiConfig: { stage: 'dev' }, canEditCluster: true, canDeleteCluster: false, canManageUsers: false, t: (k) => k, docsUrls: stubDocsUrls, onReloadCluster: async () => undefined, onRequestDelete: () => undefined }) }));
|
|
327
|
+
const captured = lastClusterSettingsProps;
|
|
328
|
+
if (!captured) {
|
|
329
|
+
throw new Error('Expected C4ClusterSettings to be rendered');
|
|
330
|
+
}
|
|
331
|
+
expect(captured.settings.multiTenancy).toBeUndefined();
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
describe('C4ClusterDetailsSettingsTab safeTranslate fallback', () => {
|
|
335
|
+
beforeAll(() => {
|
|
336
|
+
globalThis.ResizeObserver = resizeObserverStub;
|
|
337
|
+
});
|
|
338
|
+
afterEach(() => {
|
|
339
|
+
cleanup();
|
|
340
|
+
});
|
|
341
|
+
afterAll(() => {
|
|
342
|
+
globalThis.ResizeObserver = originalResizeObserver;
|
|
343
|
+
});
|
|
344
|
+
it('uses fallback text when i18next returns a namespace-stripped key on a miss', () => {
|
|
345
|
+
// i18next strips the namespace prefix on a cache miss, returning e.g.
|
|
346
|
+
// "settings.multiTenancy.title" instead of "clusterdetails:settings.multiTenancy.title".
|
|
347
|
+
const t = (key) => key.includes(':') ? key.split(':').slice(1).join(':') : key;
|
|
348
|
+
lastClusterSettingsProps = undefined;
|
|
349
|
+
const cluster = createCluster({ zeebeVersion: 'zeebe:8.8.0-alpha7' });
|
|
350
|
+
render(_jsx(C4ConsoleRuntimeProvider, { config: {
|
|
351
|
+
stage: 'dev',
|
|
352
|
+
auth: { getAccessToken: async () => 'token' },
|
|
353
|
+
backendUrls: {},
|
|
354
|
+
featureFlags: { isEnabled: () => true },
|
|
355
|
+
}, children: _jsx(C4ClusterDetailsSettingsTab, { cluster: cluster, orgId: 'org-1', clusterId: 'cluster-1', apiConfig: { stage: 'dev' }, canEditCluster: true, canDeleteCluster: false, canManageUsers: false, t: t, docsUrls: stubDocsUrls, onReloadCluster: async () => undefined, onRequestDelete: () => undefined }) }));
|
|
356
|
+
const captured = lastClusterSettingsProps;
|
|
357
|
+
if (!captured) {
|
|
358
|
+
throw new Error('Expected C4ClusterSettings to be rendered');
|
|
359
|
+
}
|
|
360
|
+
expect(captured.settings.multiTenancy?.action.label).toBe('Multi-tenancy');
|
|
361
|
+
});
|
|
247
362
|
});
|
|
248
363
|
describe('C4ClusterDetailsSettingsTab swagger URL', () => {
|
|
249
364
|
beforeAll(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { C4ClustersPageProps } from './c4-clusters-page.types';
|
|
2
|
-
export declare const C4ClustersPage: (({ orgId, gettingStartedHref, onNavigate, translations, permissionsOverride, clusterCapMessage, isClusterPaused: isClusterPausedOverride, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride, onRequestAssignTag, onRequestDeleteCluster, onRequestWakeCluster, }: C4ClustersPageProps) => import("react
|
|
2
|
+
export declare const C4ClustersPage: (({ orgId, gettingStartedHref, onNavigate, translations, permissionsOverride, clusterCapMessage, isClusterPaused: isClusterPausedOverride, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride, onRequestAssignTag, onRequestDeleteCluster, onRequestWakeCluster, }: C4ClustersPageProps) => import("react").JSX.Element) & {
|
|
3
3
|
displayName: string;
|
|
4
4
|
};
|
|
@@ -271,21 +271,27 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
|
|
|
271
271
|
const isLoading = clustersCache?.isLoading ?? false;
|
|
272
272
|
const error = clustersCache?.error;
|
|
273
273
|
const upgradableGenerationsCache = data.upgradableGenerations;
|
|
274
|
+
const generationToClusterId = useMemo(() => {
|
|
275
|
+
const map = new Map();
|
|
276
|
+
for (const rawCluster of rawClusters) {
|
|
277
|
+
const genUuid = getClusterGenerationUuid(rawCluster);
|
|
278
|
+
const clusterUuid = getString(rawCluster, 'uuid') ??
|
|
279
|
+
getString(rawCluster, 'id') ??
|
|
280
|
+
getString(rawCluster, 'clusterId');
|
|
281
|
+
if (genUuid && clusterUuid && !map.has(genUuid)) {
|
|
282
|
+
map.set(genUuid, clusterUuid);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return map;
|
|
286
|
+
}, [rawClusters]);
|
|
274
287
|
useEffect(() => {
|
|
275
288
|
if (rawClusters.length === 0) {
|
|
276
289
|
return;
|
|
277
290
|
}
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
const generationUuid = getClusterGenerationUuid(rawCluster);
|
|
281
|
-
if (generationUuid) {
|
|
282
|
-
uniqueGenerationUuids.add(generationUuid);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
for (const generationUuid of uniqueGenerationUuids) {
|
|
286
|
-
void data.fetchUpgradableGenerations(generationUuid);
|
|
291
|
+
for (const [generationUuid, clusterId] of generationToClusterId) {
|
|
292
|
+
void data.fetchUpgradableGenerations(generationUuid, clusterId);
|
|
287
293
|
}
|
|
288
|
-
}, [data.fetchUpgradableGenerations, rawClusters]);
|
|
294
|
+
}, [data.fetchUpgradableGenerations, generationToClusterId, rawClusters]);
|
|
289
295
|
// Map cluster load from context
|
|
290
296
|
const clusterLoadData = useMemo(() => {
|
|
291
297
|
return clusterCapacityMap;
|
|
@@ -324,8 +330,11 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
|
|
|
324
330
|
return { ...item, status: 'maintenance' };
|
|
325
331
|
}
|
|
326
332
|
const generationUuid = getClusterGenerationUuid(rawCluster);
|
|
333
|
+
const representativeClusterId = generationUuid
|
|
334
|
+
? generationToClusterId.get(generationUuid)
|
|
335
|
+
: undefined;
|
|
327
336
|
const upgradableCount = generationUuid
|
|
328
|
-
? (data.getUpgradableGenerations(generationUuid)?.length ?? 0)
|
|
337
|
+
? (data.getUpgradableGenerations(generationUuid, representativeClusterId)?.options.length ?? 0)
|
|
329
338
|
: 0;
|
|
330
339
|
const zeebeStatus = getPathString(rawCluster, [
|
|
331
340
|
'status',
|
|
@@ -355,6 +364,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
|
|
|
355
364
|
authz,
|
|
356
365
|
clusterLoadData,
|
|
357
366
|
data,
|
|
367
|
+
generationToClusterId,
|
|
358
368
|
isOrgAdmin,
|
|
359
369
|
rawClusters,
|
|
360
370
|
runtime.i18n,
|
package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { C4ConnectorManagementExecutableDetailsPageProps } from './c4-connector-management-executable-details-page.types';
|
|
2
|
-
export declare const C4ConnectorManagementExecutableDetailsPage: (({ orgId, clusterId, connectorId, connectorInstanceId, onNavigate, }: C4ConnectorManagementExecutableDetailsPageProps) => import("react
|
|
2
|
+
export declare const C4ConnectorManagementExecutableDetailsPage: (({ orgId, clusterId, connectorId, connectorInstanceId, onNavigate, }: C4ConnectorManagementExecutableDetailsPageProps) => import("react").JSX.Element) & {
|
|
3
3
|
displayName: string;
|
|
4
4
|
};
|
package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js
CHANGED
|
@@ -14,7 +14,7 @@ function sendNavigate(onNavigate, event) {
|
|
|
14
14
|
onNavigate?.(event);
|
|
15
15
|
}
|
|
16
16
|
export const C4ConnectorManagementExecutableDetailsPage = observer(({ orgId, clusterId, connectorId, connectorInstanceId, onNavigate, }) => {
|
|
17
|
-
const { isLoading, clusterName, connectorsUrl, isProviderReady, Provider, checkClusterVersion } = useConnectorManagementRuntime({ orgId, clusterId });
|
|
17
|
+
const { isLoading, clusterName, connectorsUrl, isProviderReady, Provider, checkClusterVersion, } = useConnectorManagementRuntime({ orgId, clusterId });
|
|
18
18
|
const content = useMemo(() => {
|
|
19
19
|
if (isLoading) {
|
|
20
20
|
return _jsx("p", { children: "Loading..." });
|
|
@@ -25,7 +25,7 @@ export const C4ConnectorManagementExecutableDetailsPage = observer(({ orgId, clu
|
|
|
25
25
|
if (!isProviderReady) {
|
|
26
26
|
return _jsx("p", { children: "Loading..." });
|
|
27
27
|
}
|
|
28
|
-
return (_jsx(Provider, { children: _jsx(C4ExecutableDetails, { connectorId: connectorId, executableId: connectorInstanceId, showRestartButton: checkClusterVersion('8.10.0-
|
|
28
|
+
return (_jsx(Provider, { children: _jsx(C4ExecutableDetails, { connectorId: connectorId, executableId: connectorInstanceId, showRestartButton: checkClusterVersion('8.10.0-alpha3') }) }));
|
|
29
29
|
}, [
|
|
30
30
|
Provider,
|
|
31
31
|
checkClusterVersion,
|
package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { C4ConnectorManagementExecutablesTablePageProps } from './c4-connector-management-executables-table-page.types';
|
|
2
|
-
export declare const C4ConnectorManagementExecutablesTablePage: (({ orgId, clusterId, connectorId, onNavigate, }: C4ConnectorManagementExecutablesTablePageProps) => import("react
|
|
2
|
+
export declare const C4ConnectorManagementExecutablesTablePage: (({ orgId, clusterId, connectorId, onNavigate, }: C4ConnectorManagementExecutablesTablePageProps) => import("react").JSX.Element) & {
|
|
3
3
|
displayName: string;
|
|
4
4
|
};
|
package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js
CHANGED
|
@@ -14,7 +14,7 @@ function sendNavigate(onNavigate, event) {
|
|
|
14
14
|
onNavigate?.(event);
|
|
15
15
|
}
|
|
16
16
|
export const C4ConnectorManagementExecutablesTablePage = observer(({ orgId, clusterId, connectorId, onNavigate, }) => {
|
|
17
|
-
const { isLoading, clusterName, connectorsUrl, isProviderReady, Provider, checkClusterVersion } = useConnectorManagementRuntime({ orgId, clusterId });
|
|
17
|
+
const { isLoading, clusterName, connectorsUrl, isProviderReady, Provider, checkClusterVersion, } = useConnectorManagementRuntime({ orgId, clusterId });
|
|
18
18
|
const content = useMemo(() => {
|
|
19
19
|
if (isLoading) {
|
|
20
20
|
return _jsx("p", { children: "Loading..." });
|
|
@@ -25,7 +25,7 @@ export const C4ConnectorManagementExecutablesTablePage = observer(({ orgId, clus
|
|
|
25
25
|
if (!isProviderReady) {
|
|
26
26
|
return _jsx("p", { children: "Loading..." });
|
|
27
27
|
}
|
|
28
|
-
return (_jsx(Provider, { children: _jsx(C4ExecutablesTable, { connectorId: connectorId, showRestartButton: checkClusterVersion('8.10.0-
|
|
28
|
+
return (_jsx(Provider, { children: _jsx(C4ExecutablesTable, { connectorId: connectorId, showRestartButton: checkClusterVersion('8.10.0-alpha3'), onClick: (connectorInstanceId) => {
|
|
29
29
|
sendNavigate(onNavigate, {
|
|
30
30
|
kind: 'connectorExecutableDetails',
|
|
31
31
|
orgId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { C4ConnectorManagementPageProps } from './c4-connector-management-page.types';
|
|
2
|
-
export declare const C4ConnectorManagementPage: (({ orgId, clusterId, onNavigate }: C4ConnectorManagementPageProps) => import("react
|
|
2
|
+
export declare const C4ConnectorManagementPage: (({ orgId, clusterId, onNavigate }: C4ConnectorManagementPageProps) => import("react").JSX.Element) & {
|
|
3
3
|
displayName: string;
|
|
4
4
|
};
|
|
@@ -5,8 +5,8 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { C4ConnectorsContextProvider } from '@camunda/c4-connectors';
|
|
8
|
-
import { VersionCheckOperator, checkVersion } from '@camunda/ccma-shared-types';
|
|
9
8
|
import { C3EmptyState } from '@camunda/camunda-composite-components';
|
|
9
|
+
import { checkVersion, VersionCheckOperator } from '@camunda/ccma-shared-types';
|
|
10
10
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
11
11
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
12
12
|
import { C4_EXTERNAL_URLS } from '../../externalUrls.const.js';
|
|
@@ -204,7 +204,7 @@ function buildCreateClusterTranslations(t) {
|
|
|
204
204
|
generationTitle: translate('createcluster:form.generation.title', 'Channel'),
|
|
205
205
|
olderGenerationsLabel: translate('createcluster:form.generation.olderGenerationsLabel', 'View older generations'),
|
|
206
206
|
olderGenerationsHelperText: translate('createcluster:form.generation.olderGenerationsHelperText', 'These are older generations that are used in your organization.'),
|
|
207
|
-
orgUnlockedGenerationsHelperText: translate('createcluster:form.generation.orgUnlockedGenerationsHelperText', 'These are
|
|
207
|
+
orgUnlockedGenerationsHelperText: translate('createcluster:form.generation.orgUnlockedGenerationsHelperText', 'These are generations that have been unlocked for your organization.'),
|
|
208
208
|
autoUpdateTitle: translate('createcluster:form.autoUpdate.title', 'Automatic cluster patch updates'),
|
|
209
209
|
autoUpdateDescription: translate('createcluster:form.autoUpdate.description', 'When enabled, the cluster will be updated to the latest patch release. For entirely new cluster versions, updates will need to be performed manually. Please note that during the update, there may be a brief period of unavailability for the cluster.'),
|
|
210
210
|
autoUpdateDescriptionIfDisabled: translate('createcluster:form.autoUpdate.descriptionIfDisabled', 'Only available for generations in the stable channel.'),
|
|
@@ -274,6 +274,12 @@ function mapPermissionsToScopeStrings(permissions, t) {
|
|
|
274
274
|
case 'DeleteCluster':
|
|
275
275
|
clusterScopes.push(safeTranslate(t, 'orgmanagement:tabs.api.scopes.delete', 'Delete'));
|
|
276
276
|
break;
|
|
277
|
+
case 'UpdateCluster':
|
|
278
|
+
clusterScopes.push(safeTranslate(t, 'orgmanagement:tabs.api.scopes.update', 'Update'));
|
|
279
|
+
break;
|
|
280
|
+
case 'UpdateClusterEncryption':
|
|
281
|
+
clusterScopes.push(safeTranslate(t, 'orgmanagement:tabs.api.scopes.updateEncryption', 'Update encryption'));
|
|
282
|
+
break;
|
|
277
283
|
case 'CreateZeebeClient':
|
|
278
284
|
zeebeScopes.push(safeTranslate(t, 'orgmanagement:tabs.api.scopes.create', 'Create'));
|
|
279
285
|
break;
|
|
@@ -84,6 +84,9 @@ function mapPermissionsToScopeStrings(permissions, t) {
|
|
|
84
84
|
case 'UpdateCluster':
|
|
85
85
|
clusterScopes.push(safeTranslate(t, 'orgmanagement:tabs.api.scopes.update', 'Update'));
|
|
86
86
|
break;
|
|
87
|
+
case 'UpdateClusterEncryption':
|
|
88
|
+
clusterScopes.push(safeTranslate(t, 'orgmanagement:tabs.api.scopes.updateEncryption', 'Update encryption'));
|
|
89
|
+
break;
|
|
87
90
|
case 'CreateZeebeClient':
|
|
88
91
|
zeebeScopes.push(safeTranslate(t, 'orgmanagement:tabs.api.scopes.create', 'Create'));
|
|
89
92
|
break;
|
|
@@ -251,6 +254,10 @@ export const C4ManagementApiTab = (props) => {
|
|
|
251
254
|
label: safeTranslate(t, 'apiclients:create.fields.scopes.cluster.update', 'Update'),
|
|
252
255
|
value: 'UpdateCluster',
|
|
253
256
|
},
|
|
257
|
+
{
|
|
258
|
+
label: safeTranslate(t, 'apiclients:create.fields.scopes.cluster.updateEncryption', 'Update encryption'),
|
|
259
|
+
value: 'UpdateClusterEncryption',
|
|
260
|
+
},
|
|
254
261
|
],
|
|
255
262
|
},
|
|
256
263
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/ccma-saas-frontend",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.45",
|
|
4
4
|
"description": "Camunda Composite Components",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
|
|
@@ -23,37 +23,37 @@
|
|
|
23
23
|
"registry": "https://registry.npmjs.org/"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@camunda/c4-connectors": "1.
|
|
26
|
+
"@camunda/c4-connectors": "1.5.0",
|
|
27
27
|
"@camunda/c4-identity": "0.0.41",
|
|
28
28
|
"@carbon/charts": "1.27.11",
|
|
29
29
|
"@carbon/charts-react": "1.27.11",
|
|
30
|
-
"@carbon/layout": "11.
|
|
30
|
+
"@carbon/layout": "11.53.0",
|
|
31
31
|
"@carbon/motion": "^11.46.0",
|
|
32
|
-
"@carbon/react": "1.
|
|
32
|
+
"@carbon/react": "1.109.0",
|
|
33
33
|
"@carbon/styles": "^1.107.0",
|
|
34
34
|
"@carbon/themes": "^11.74.0",
|
|
35
|
-
"@carbon/type": "11.
|
|
35
|
+
"@carbon/type": "11.61.0",
|
|
36
36
|
"@chromatic-com/storybook": "5.2.1",
|
|
37
37
|
"@mdx-js/react": "3.1.1",
|
|
38
|
-
"@storybook/addon-docs": "10.4.
|
|
39
|
-
"@storybook/addon-links": "10.4.
|
|
40
|
-
"@storybook/react": "10.4.
|
|
41
|
-
"@storybook/react-vite": "10.4.
|
|
38
|
+
"@storybook/addon-docs": "10.4.3",
|
|
39
|
+
"@storybook/addon-links": "10.4.3",
|
|
40
|
+
"@storybook/react": "10.4.3",
|
|
41
|
+
"@storybook/react-vite": "10.4.3",
|
|
42
42
|
"@testing-library/jest-dom": "6.9.1",
|
|
43
43
|
"@testing-library/react": "16.3.2",
|
|
44
44
|
"@testing-library/user-event": "14.6.1",
|
|
45
|
-
"eslint-import-resolver-typescript": "4.4.
|
|
45
|
+
"eslint-import-resolver-typescript": "4.4.5",
|
|
46
46
|
"eslint-plugin-react": "7.37.5",
|
|
47
47
|
"eslint-plugin-react-hooks": "7.1.1",
|
|
48
|
-
"eslint-plugin-storybook": "10.4.
|
|
48
|
+
"eslint-plugin-storybook": "10.4.3",
|
|
49
49
|
"jsdom": "29.1.1",
|
|
50
|
-
"react": "19.2.
|
|
51
|
-
"react-dom": "19.2.
|
|
52
|
-
"react-is": "19.2.
|
|
50
|
+
"react": "19.2.7",
|
|
51
|
+
"react-dom": "19.2.7",
|
|
52
|
+
"react-is": "19.2.7",
|
|
53
53
|
"rimraf": "6.1.3",
|
|
54
|
-
"storybook": "10.4.
|
|
54
|
+
"storybook": "10.4.3",
|
|
55
55
|
"styled-components": "6.4.2",
|
|
56
|
-
"@camunda/camunda-composite-components": "0.
|
|
56
|
+
"@camunda/camunda-composite-components": "0.25.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@camunda/c4-connectors": "1.x",
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
"@carbon/themes": "11.x",
|
|
67
67
|
"react": "18.x || 19.x",
|
|
68
68
|
"react-dom": "18.x || 19.x",
|
|
69
|
-
"react-markdown": "^8.0.7"
|
|
69
|
+
"react-markdown": "^8.0.7 || ^10.0.0"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@pactsafe/pactsafe-react-sdk": "2.15.0",
|
|
73
73
|
"cron-parser": "5.5.0",
|
|
74
|
-
"mobx": "6.
|
|
74
|
+
"mobx": "6.16.1",
|
|
75
75
|
"mobx-react-lite": "4.1.1",
|
|
76
76
|
"mobx-state-tree": "7.2.0",
|
|
77
|
-
"semver": "7.8.
|
|
78
|
-
"@camunda/ccma-api": "0.0.
|
|
79
|
-
"@camunda/ccma-shared-types": "0.1.
|
|
77
|
+
"semver": "7.8.4",
|
|
78
|
+
"@camunda/ccma-api": "0.0.9",
|
|
79
|
+
"@camunda/ccma-shared-types": "0.1.2"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
82
|
"clean": "rimraf lib/",
|