@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.
Files changed (77) hide show
  1. package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.d.ts +1 -1
  2. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.d.ts +3 -3
  3. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.d.ts +3 -3
  4. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts +2 -1
  5. package/lib/esm/components/c4-cluster-overview/applications.d.ts +2 -2
  6. package/lib/esm/components/c4-cluster-overview/applications.js +10 -2
  7. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +1 -1
  8. package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.d.ts +3 -3
  9. package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.js +5 -13
  10. package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.spec.d.ts +1 -0
  11. package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.spec.js +42 -0
  12. package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-toggle.d.ts +1 -1
  13. package/lib/esm/components/c4-console-dashboard/elements/empty-state.d.ts +1 -1
  14. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +1 -1
  15. package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.js +3 -3
  16. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +12 -0
  17. package/lib/esm/components/c4-divider/c4-divider.d.ts +1 -1
  18. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -1
  19. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.d.ts +1 -1
  20. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.d.ts +1 -1
  21. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.d.ts +1 -1
  22. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.d.ts +1 -1
  23. package/lib/esm/components/c4-job-dashboard-shared/c4-timestamp-information.d.ts +1 -1
  24. package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.d.ts +1 -1
  25. package/lib/esm/components/c4-number-input/c4-number-input.d.ts +1 -1
  26. package/lib/esm/components/c4-optimize-activation-modal/c4-optimize-activation-modal.d.ts +3 -0
  27. package/lib/esm/components/c4-optimize-activation-modal/c4-optimize-activation-modal.js +21 -0
  28. package/lib/esm/components/c4-optimize-activation-modal/c4-optimize-activation-modal.types.d.ts +6 -0
  29. package/lib/esm/components/c4-optimize-activation-modal/c4-optimize-activation-modal.types.js +6 -0
  30. package/lib/esm/components/c4-page-template/c4-page-template.d.ts +1 -1
  31. package/lib/esm/components/c4-search/c4-search-results.d.ts +1 -1
  32. package/lib/esm/components/c4-telemetry-page/metrics-empty-state-image.d.ts +1 -1
  33. package/lib/esm/externalUrls.const.d.ts +1 -0
  34. package/lib/esm/externalUrls.const.js +2 -0
  35. package/lib/esm/externalUrls.const.spec.js +1 -0
  36. package/lib/esm/i18n/en/modals/apiclients.json +1 -0
  37. package/lib/esm/i18n/en/modals/clusters.json +6 -0
  38. package/lib/esm/i18n/en/pages/clusterdetails.json +25 -0
  39. package/lib/esm/i18n/en/pages/createcluster.json +1 -1
  40. package/lib/esm/i18n/en/pages/orgmanagement.json +1 -0
  41. package/lib/esm/icons/c4-icons.d.ts +11 -11
  42. package/lib/esm/index.d.ts +2 -0
  43. package/lib/esm/index.js +1 -0
  44. package/lib/esm/runtime/c4-console-data-context.d.ts +1 -1
  45. package/lib/esm/runtime/c4-console-data-context.js +2 -2
  46. package/lib/esm/runtime/c4-console-data-context.types.d.ts +3 -3
  47. package/lib/esm/runtime/c4-console-data-store.d.ts +3 -3
  48. package/lib/esm/runtime/c4-console-data-store.js +34 -15
  49. package/lib/esm/runtime/c4-console-data-store.spec.js +55 -1
  50. package/lib/esm/runtime/c4-console-notifications-context.d.ts +1 -1
  51. package/lib/esm/runtime/c4-console-runtime-context.d.ts +1 -1
  52. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +27 -1
  53. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +2 -0
  54. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +7 -0
  55. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +2 -0
  56. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.js +1 -1
  57. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.d.ts +1 -1
  58. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +2 -18
  59. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +37 -2
  60. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +128 -59
  61. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +297 -3
  62. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +17 -4
  63. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +1 -0
  64. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +63 -10
  65. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +116 -1
  66. package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
  67. package/lib/esm/widgets/clusters/c4-clusters-page.js +21 -11
  68. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +1 -1
  69. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +2 -2
  70. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +1 -1
  71. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +2 -2
  72. package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
  73. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +1 -1
  74. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
  75. package/lib/esm/widgets/management/c4-management-app.js +6 -0
  76. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +7 -0
  77. package/package.json +21 -21
@@ -1,4 +1,4 @@
1
- import type { ConsoleClusterDto, SseEntity } from '@camunda/ccma-shared-types';
1
+ import type { ConsoleClusterDto, SseEntity, UpgradableGenerationsDto } from '@camunda/ccma-shared-types';
2
2
  /**
3
3
  * Shared data cache state for C4 console widgets
4
4
  *
@@ -49,7 +49,7 @@ export interface C4ConsoleDataState {
49
49
  fetchClusterCapacity: (orgId: string, clusterIds: string[], options?: {
50
50
  force?: boolean;
51
51
  }) => Promise<void>;
52
- fetchUpgradableGenerations: (fromGenerationUuid: string, options?: {
52
+ fetchUpgradableGenerations: (fromGenerationUuid: string, clusterId?: string, options?: {
53
53
  force?: boolean;
54
54
  }) => Promise<void>;
55
55
  fetchGenerationDetails: (generationUuid: string, options?: {
@@ -81,7 +81,7 @@ export interface C4ConsoleDataState {
81
81
  getMembers: (orgId: string) => any[] | undefined;
82
82
  getAudits: (orgId: string) => any[] | undefined;
83
83
  getClusterCapacity: (orgId: string, clusterId: string) => number | undefined;
84
- getUpgradableGenerations: (fromGenerationUuid: string) => any[] | undefined;
84
+ getUpgradableGenerations: (fromGenerationUuid: string, clusterId?: string) => UpgradableGenerationsDto | undefined;
85
85
  getGenerationDetails: (generationUuid: string) => any | undefined;
86
86
  /**
87
87
  * Returns a monotonically increasing number that changes when C4 observes an
@@ -1,4 +1,4 @@
1
- import { type ConsoleClusterDto, SseEntity } from '@camunda/ccma-shared-types';
1
+ import { type ConsoleClusterDto, SseEntity, type UpgradableGenerationsDto } from '@camunda/ccma-shared-types';
2
2
  import { type SnapshotIn } from 'mobx-state-tree';
3
3
  import type { C4ConsoleRuntimeConfig } from './c4-console-runtime.types';
4
4
  export declare const ConsoleDataStore: import("mobx-state-tree").IModelType<{
@@ -83,7 +83,7 @@ export declare const ConsoleDataStore: import("mobx-state-tree").IModelType<{
83
83
  getMembers(orgId: string): any[] | undefined;
84
84
  getAudits(orgId: string): any[] | undefined;
85
85
  getClusterCapacity(orgId: string, clusterId: string): number | undefined;
86
- getUpgradableGenerations(fromGenerationUuid: string): any[] | undefined;
86
+ getUpgradableGenerations(fromGenerationUuid: string, clusterId?: string): UpgradableGenerationsDto | undefined;
87
87
  getGenerationDetails(generationUuid: string): any | undefined;
88
88
  getSseEntityVersion(orgId: string, entity: SseEntity, clusterId?: string): number;
89
89
  } & {
@@ -113,7 +113,7 @@ export declare const ConsoleDataStore: import("mobx-state-tree").IModelType<{
113
113
  fetchClusters: (orgId: string, options?: {
114
114
  force?: boolean;
115
115
  } | undefined) => Promise<void>;
116
- fetchUpgradableGenerations: (fromGenerationUuid: string, options?: {
116
+ fetchUpgradableGenerations: (fromGenerationUuid: string, clusterId?: string | undefined, options?: {
117
117
  force?: boolean;
118
118
  } | undefined) => Promise<void>;
119
119
  fetchGenerationDetails: (generationUuid: string, options?: {
@@ -144,8 +144,9 @@ export const ConsoleDataStore = types
144
144
  const map = self.clusterCapacity.get(orgId);
145
145
  return map?.get(clusterId);
146
146
  },
147
- getUpgradableGenerations(fromGenerationUuid) {
148
- const cached = self.upgradableGenerations.get(fromGenerationUuid);
147
+ getUpgradableGenerations(fromGenerationUuid, clusterId) {
148
+ const key = `${fromGenerationUuid}:${clusterId ?? ''}`;
149
+ const cached = self.upgradableGenerations.get(key);
149
150
  return cached?.data;
150
151
  },
151
152
  getGenerationDetails(generationUuid) {
@@ -439,22 +440,23 @@ export const ConsoleDataStore = types
439
440
  self.inFlightClusters.delete(orgId);
440
441
  }
441
442
  }),
442
- fetchUpgradableGenerations: flow(function* (fromGenerationUuid, options) {
443
+ fetchUpgradableGenerations: flow(function* (fromGenerationUuid, clusterId, options) {
443
444
  if (!self.runtime) {
444
445
  throw new Error('Runtime config not set');
445
446
  }
446
447
  if (!fromGenerationUuid) {
447
448
  return;
448
449
  }
449
- const cached = self.upgradableGenerations.get(fromGenerationUuid);
450
+ const cacheKey = `${fromGenerationUuid}:${clusterId ?? ''}`;
451
+ const cached = self.upgradableGenerations.get(cacheKey);
450
452
  if (!options?.force && cached && (cached.isLoading || cached.data)) {
451
453
  return;
452
454
  }
453
- if (self.inFlightUpgradableGenerations.has(fromGenerationUuid)) {
455
+ if (self.inFlightUpgradableGenerations.has(cacheKey)) {
454
456
  return;
455
457
  }
456
- self.inFlightUpgradableGenerations.add(fromGenerationUuid);
457
- self.upgradableGenerations.set(fromGenerationUuid, {
458
+ self.inFlightUpgradableGenerations.add(cacheKey);
459
+ self.upgradableGenerations.set(cacheKey, {
458
460
  data: cached?.data,
459
461
  isLoading: true,
460
462
  error: null,
@@ -462,19 +464,36 @@ export const ConsoleDataStore = types
462
464
  });
463
465
  try {
464
466
  const apiConfig = toApiConfig(self.runtime);
465
- const gens = yield GenerationService.getUpgradable({
466
- fromGenerationUuid,
467
- config: apiConfig,
468
- });
469
- self.upgradableGenerations.set(fromGenerationUuid, {
470
- data: Array.isArray(gens) ? gens : [],
467
+ const flagOn = self.runtime.featureFlags?.isEnabled('console.upgradeVersionSelection') ?? false;
468
+ let dto;
469
+ if (flagOn) {
470
+ dto = yield GenerationService.getUpgradableMulti({
471
+ fromGenerationUuid,
472
+ ...(clusterId ? { clusterId } : {}),
473
+ config: apiConfig,
474
+ });
475
+ }
476
+ else {
477
+ const gens = yield GenerationService.getUpgradable({
478
+ fromGenerationUuid,
479
+ ...(clusterId ? { clusterId } : {}),
480
+ config: apiConfig,
481
+ });
482
+ // Normalize to UpgradableGenerationsDto — preferred is the only item (existing behavior)
483
+ dto = {
484
+ preferred: Array.isArray(gens) && gens.length > 0 ? gens[0] : null,
485
+ options: Array.isArray(gens) ? gens : [],
486
+ };
487
+ }
488
+ self.upgradableGenerations.set(cacheKey, {
489
+ data: dto,
471
490
  isLoading: false,
472
491
  error: null,
473
492
  lastFetched: new Date(),
474
493
  });
475
494
  }
476
495
  catch (error) {
477
- self.upgradableGenerations.set(fromGenerationUuid, {
496
+ self.upgradableGenerations.set(cacheKey, {
478
497
  data: cached?.data,
479
498
  isLoading: false,
480
499
  error: error,
@@ -482,7 +501,7 @@ export const ConsoleDataStore = types
482
501
  });
483
502
  }
484
503
  finally {
485
- self.inFlightUpgradableGenerations.delete(fromGenerationUuid);
504
+ self.inFlightUpgradableGenerations.delete(cacheKey);
486
505
  }
487
506
  }),
488
507
  fetchGenerationDetails: flow(function* (generationUuid, options) {
@@ -4,8 +4,62 @@
4
4
  * You may not use this file except in compliance with the commercial license.
5
5
  */
6
6
  import { SseEntity } from '@camunda/ccma-shared-types';
7
- import { describe, expect, it } from 'vitest';
7
+ import { beforeEach, describe, expect, it, vi } from 'vitest';
8
8
  import { ConsoleDataStore } from './c4-console-data-store.js';
9
+ vi.mock('@camunda/ccma-api', () => ({
10
+ GenerationService: {
11
+ getUpgradable: vi.fn().mockResolvedValue([]),
12
+ getGeneration: vi.fn().mockResolvedValue(undefined),
13
+ upgradeCluster: vi.fn().mockResolvedValue(undefined),
14
+ },
15
+ ClusterService: { updateCluster: vi.fn() },
16
+ OrgsService: { getOrgInfo: vi.fn(), getOwner: vi.fn() },
17
+ EarlyAccessService: { getEarlyAccessFeatures: vi.fn() },
18
+ MembersService: { getMembers: vi.fn() },
19
+ AuditService: { getAudits: vi.fn() },
20
+ }));
21
+ import { GenerationService } from '@camunda/ccma-api';
22
+ const FAKE_RUNTIME = {
23
+ stage: 'dev',
24
+ auth: { getAccessToken: async () => 'token' },
25
+ backendUrls: {
26
+ consoleApiBaseUrl: 'https://console.example.com',
27
+ },
28
+ };
29
+ const makeStore = () => ConsoleDataStore.create({
30
+ clusters: {},
31
+ orgInfo: {},
32
+ orgOwner: {},
33
+ earlyAccessFeatures: {},
34
+ members: {},
35
+ audits: {},
36
+ clusterCapacity: {},
37
+ upgradableGenerations: {},
38
+ generationDetails: {},
39
+ });
40
+ describe('ConsoleDataStore.fetchUpgradableGenerations', () => {
41
+ beforeEach(() => {
42
+ vi.clearAllMocks();
43
+ });
44
+ it('passes clusterId to GenerationService.getUpgradable', async () => {
45
+ const store = makeStore();
46
+ store.setRuntime(FAKE_RUNTIME);
47
+ await store.fetchUpgradableGenerations('gen-uuid', 'cluster-uuid');
48
+ expect(GenerationService.getUpgradable).toHaveBeenCalledWith(expect.objectContaining({
49
+ fromGenerationUuid: 'gen-uuid',
50
+ clusterId: 'cluster-uuid',
51
+ }));
52
+ });
53
+ it('calls GenerationService.getUpgradable without clusterId when not provided', async () => {
54
+ const store = makeStore();
55
+ store.setRuntime(FAKE_RUNTIME);
56
+ await store.fetchUpgradableGenerations('gen-uuid');
57
+ expect(GenerationService.getUpgradable).toHaveBeenCalledWith(expect.objectContaining({
58
+ fromGenerationUuid: 'gen-uuid',
59
+ }));
60
+ expect(GenerationService.getUpgradable).toHaveBeenCalledWith(expect.not.objectContaining({ clusterId: expect.anything() }));
61
+ });
62
+ });
9
63
  describe('ConsoleDataStore.handleClusterChange', () => {
10
64
  it('bumps sse entity versions for all SseEntity values', () => {
11
65
  const store = ConsoleDataStore.create({
@@ -3,5 +3,5 @@ import type { C4ConsoleNotificationsState } from './c4-console-notifications-con
3
3
  export interface C4ConsoleNotificationsProviderProps {
4
4
  children: React.ReactNode;
5
5
  }
6
- export declare const C4ConsoleNotificationsProvider: ({ children, }: C4ConsoleNotificationsProviderProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const C4ConsoleNotificationsProvider: ({ children, }: C4ConsoleNotificationsProviderProps) => React.JSX.Element;
7
7
  export declare const useC4ConsoleNotifications: () => C4ConsoleNotificationsState;
@@ -4,5 +4,5 @@ export interface C4ConsoleRuntimeProviderProps {
4
4
  config: C4ConsoleRuntimeConfig;
5
5
  children: React.ReactNode;
6
6
  }
7
- export declare const C4ConsoleRuntimeProvider: ({ config, children, }: C4ConsoleRuntimeProviderProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const C4ConsoleRuntimeProvider: ({ config, children, }: C4ConsoleRuntimeProviderProps) => React.JSX.Element;
8
8
  export declare const useC4ConsoleRuntime: () => C4ConsoleRuntimeConfig;
@@ -228,6 +228,12 @@ export const C4ClusterDetailsApp = observer((props) => {
228
228
  const [clusterError, setClusterError] = useState('');
229
229
  const [isClusterLoading, setIsClusterLoading] = useState(true);
230
230
  const [creationParameters, setCreationParameters] = useState(undefined);
231
+ // Tracks whether the creationParameters fetch has settled (success OR
232
+ // failure). Needed because `creationParameters === undefined` is
233
+ // ambiguous: it can mean "not yet loaded" or "load failed". Without
234
+ // this distinction, the `privateNetworking` tab fallback below races
235
+ // with the parameters fetch on hard refresh.
236
+ const [isCreationParametersLoading, setIsCreationParametersLoading] = useState(true);
231
237
  const isAwsCluster = useMemo(() => {
232
238
  const regionUuid = cluster?.k8sContext?.uuid;
233
239
  const providerFromCreationParameters = regionUuid
@@ -283,6 +289,7 @@ export const C4ClusterDetailsApp = observer((props) => {
283
289
  }
284
290
  }, [apiConfig, data, props.clusterId, props.orgId]);
285
291
  const reloadCreationParameters = useCallback(async () => {
292
+ setIsCreationParametersLoading(true);
286
293
  try {
287
294
  const loaded = await ConsoleClusterParametersService.getCreationParameters({
288
295
  config: apiConfig,
@@ -293,6 +300,9 @@ export const C4ClusterDetailsApp = observer((props) => {
293
300
  catch {
294
301
  setCreationParameters(undefined);
295
302
  }
303
+ finally {
304
+ setIsCreationParametersLoading(false);
305
+ }
296
306
  }, [apiConfig, props.orgId]);
297
307
  const canSeeClusterLoad = Boolean(authz.visibilities.clusters?.canSeeClusterLoad);
298
308
  const clusterLoadLoadedRef = useRef(false);
@@ -429,6 +439,9 @@ export const C4ClusterDetailsApp = observer((props) => {
429
439
  const banner = useMemo(() => {
430
440
  if (!cluster)
431
441
  return undefined;
442
+ if (cluster.restoreInProgress) {
443
+ return { kind: 'restoreInProgress' };
444
+ }
432
445
  if (isUnsupportedGenerationStarted(cluster.generation?.isUnsupportedStarting)) {
433
446
  return {
434
447
  kind: 'unsupportedGeneration',
@@ -1004,6 +1017,7 @@ export const C4ClusterDetailsApp = observer((props) => {
1004
1017
  swagger: urls.docs.swagger,
1005
1018
  mcpOverview: urls.docs.mcpOverview,
1006
1019
  tasklistApiVersions: urls.docs.tasklistApiVersions,
1020
+ multiTenancy: urls.docs.multiTenancy,
1007
1021
  } }));
1008
1022
  }, [
1009
1023
  cluster,
@@ -1259,12 +1273,24 @@ export const C4ClusterDetailsApp = observer((props) => {
1259
1273
  t,
1260
1274
  ]);
1261
1275
  useEffect(() => {
1276
+ // Only fall back once we have confirmed that the cluster doesn't
1277
+ // support PrivateLink. Both the cluster fetch and the
1278
+ // creation-parameters fetch must settle first — otherwise a hard
1279
+ // refresh on `.../privateNetworking` races the in-flight parameters
1280
+ // load and falsely bounces the user to Overview before
1281
+ // `isAwsCluster` can be determined.
1262
1282
  if (!isClusterLoading &&
1283
+ !isCreationParametersLoading &&
1263
1284
  activeTabId === 'privateNetworking' &&
1264
1285
  !isSecureConnectivityTabVisible) {
1265
1286
  setActiveTabId('overview');
1266
1287
  }
1267
- }, [activeTabId, isClusterLoading, isSecureConnectivityTabVisible]);
1288
+ }, [
1289
+ activeTabId,
1290
+ isClusterLoading,
1291
+ isCreationParametersLoading,
1292
+ isSecureConnectivityTabVisible,
1293
+ ]);
1268
1294
  return (_jsxs(_Fragment, { children: [_jsx(C4ClusterDetailsPage, { loading: isClusterLoading || authz.isLoading, clusterName: cluster?.name, isDevelopmentPlan: cluster?.planType?.development, urls: { clusters: urls.clusters }, onNavigateToClusters: () => props.onNavigate?.({ kind: 'clusters', orgId: props.orgId }), menu: {
1269
1295
  canRename,
1270
1296
  canDelete,
@@ -52,6 +52,7 @@ export interface C4ClusterDetailsDocsUrls {
52
52
  releasePolicy: string;
53
53
  identityAuthorization: string;
54
54
  resourceAuthorizations: string;
55
+ multiTenancy: string;
55
56
  swagger: string;
56
57
  mcpOverview: string;
57
58
  tasklistApiVersions: string;
@@ -81,6 +82,7 @@ export interface C4ClusterDetailsUrls {
81
82
  releasePolicy?: string;
82
83
  identityAuthorization?: string;
83
84
  resourceAuthorizations?: string;
85
+ multiTenancy?: string;
84
86
  swagger?: string;
85
87
  mcpOverview?: string;
86
88
  tasklistApiVersions?: string;
@@ -51,6 +51,13 @@ function buildBanner(opts) {
51
51
  if (!banner) {
52
52
  return undefined;
53
53
  }
54
+ if (banner.kind === 'restoreInProgress') {
55
+ return {
56
+ kind: 'info',
57
+ title: safeTranslate(t, 'clusterdetails:overview.restoreInProgress.title', 'Restore in progress'),
58
+ subtitle: safeTranslate(t, 'clusterdetails:overview.restoreInProgress.subtitle', 'Cluster configuration changes are not available until the restore completes.'),
59
+ };
60
+ }
54
61
  if (banner.kind === 'unsupportedGeneration') {
55
62
  const subtitle = banner.isAlphaGeneration
56
63
  ? safeTranslate(t, 'c4console:clusterDetails.banner.unsupportedGeneration.subtitleAlpha', 'Alpha-generations can’t be updated. Create a new cluster to access the latest features.')
@@ -7,6 +7,8 @@ export type C4ClusterDetailsPageBanner = {
7
7
  kind: 'authorizationsDisabled';
8
8
  onLearnMore?: () => void;
9
9
  docsUrl: string;
10
+ } | {
11
+ kind: 'restoreInProgress';
10
12
  };
11
13
  export type C4ClusterDetailsTab = C4TabProps;
12
14
  export interface C4ClusterDetailsPageProps {
@@ -109,7 +109,7 @@ describe('C4ClusterDetailsClientsTab', () => {
109
109
  vi.mocked(ConsoleClusterClientsService.delete).mockResolvedValue(undefined);
110
110
  renderTab();
111
111
  await userEvent.click(screen.getByRole('button', { name: 'Open delete client' }));
112
- await userEvent.click(screen.getByRole('button', { name: 'dangerDelete' }));
112
+ await userEvent.click(screen.getByRole('button', { name: 'Delete' }));
113
113
  await waitFor(() => {
114
114
  expect(ConsoleClusterClientsService.delete).toHaveBeenCalledWith(expect.objectContaining({
115
115
  params: expect.objectContaining({
@@ -1,5 +1,5 @@
1
1
  import type { RequestBaseParamsConfig } from '@camunda/ccma-api';
2
- import type { ConsoleClusterDto } from '@camunda/ccma-shared-types';
2
+ import { type ConsoleClusterDto } from '@camunda/ccma-shared-types';
3
3
  import type { JSX } from 'react';
4
4
  type TranslateFn = (key: string, options?: Record<string, unknown>) => string;
5
5
  interface C4ClusterDetailsEncryptionTabProps {
@@ -1,18 +1,11 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ConsoleByokScriptsService, ConsoleClusterService, } from '@camunda/ccma-api';
3
+ import { deriveEncryptionStatus, } from '@camunda/ccma-shared-types';
3
4
  import { useCallback, useEffect, useState } from 'react';
4
5
  import { C4ClusterDetailsEncryption } from '../../../components/c4-cluster-details-encryption/c4-cluster-details-encryption.js';
5
6
  // ARN validation patterns
6
7
  const ARN = /^arn:aws:kms:(?<region>[a-z0-9-]+):\d{12}:key\/[a-f0-9-]{36}$/u;
7
8
  const MULTI_REGION_ARN = /^arn:aws:kms:(?<region>[a-z0-9-]+):\d{12}:key\/mrk-[a-f0-9-]{32}$/u;
8
- function isEncryptionStatus(value) {
9
- return (value === 'Ready' ||
10
- value === 'ProviderError' ||
11
- value === 'ExternalEncryptionKeyNotReady' ||
12
- value === 'ExternalEncryptionKeyNotSupplied' ||
13
- value === 'CreationError' ||
14
- value === 'EncryptedStorageNotReady');
15
- }
16
9
  function normalizeRegion(value) {
17
10
  if (!value || value.trim() === '-')
18
11
  return '';
@@ -102,16 +95,7 @@ export const C4ClusterDetailsEncryptionTab = (props) => {
102
95
  const isDualRegion = backupRegionCodes.length > 1;
103
96
  const primaryEncryptionKeyId = cluster?.primaryEncryptionKeyId ?? null;
104
97
  const secondaryEncryptionKeyId = cluster?.secondaryEncryptionKeyId ?? null;
105
- // Compute encryption status from cluster conditions
106
- const statusCondition = (cluster?.status?.conditions ?? [])
107
- .filter((condition) => condition.type === 'EncryptionReady')
108
- .slice()
109
- .sort((a, b) => new Date(b.lastTransitionTime ?? '').getTime() -
110
- new Date(a.lastTransitionTime ?? '').getTime())[0];
111
- const statusReason = statusCondition?.reason ?? 'ExternalEncryptionKeyNotSupplied';
112
- const encryptionStatus = isEncryptionStatus(statusReason)
113
- ? statusReason
114
- : 'ExternalEncryptionKeyNotSupplied';
98
+ const encryptionStatus = deriveEncryptionStatus(cluster?.status?.conditions);
115
99
  // Extract regions from ARN patterns
116
100
  const primaryRegionFromArn = MULTI_REGION_ARN.exec(primaryArn)?.groups?.region ??
117
101
  ARN.exec(primaryArn)?.groups?.region;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ConsoleIpWhitelistService } from '@camunda/ccma-api';
2
+ import { ConsoleIpWhitelistService, ConsoleSecureConnectivityService, } from '@camunda/ccma-api';
3
3
  import { Form, InlineNotification, Modal, Stack, TextInput, } from '@carbon/react';
4
4
  import { useCallback, useEffect, useState } from 'react';
5
5
  import { C4ClusterDetailsIpWhitelist } from '../../../components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js';
@@ -80,6 +80,7 @@ export const C4ClusterDetailsIpWhitelistTab = (props) => {
80
80
  const { cluster, isClusterLoading, orgId, clusterId, docsUrl, apiConfig, canMutateCluster, t, onNavigate, onReloadCluster, } = props;
81
81
  const runtime = useC4ConsoleRuntime();
82
82
  const [ipWhitelistItems, setIpWhitelistItems] = useState([]);
83
+ const [hasPrivateLink, setHasPrivateLink] = useState(false);
83
84
  const [createIpOpen, setCreateIpOpen] = useState(false);
84
85
  const [updateIpOpen, setUpdateIpOpen] = useState(false);
85
86
  const [deleteIpOpen, setDeleteIpOpen] = useState(false);
@@ -96,6 +97,36 @@ export const C4ClusterDetailsIpWhitelistTab = (props) => {
96
97
  description: entry.description,
97
98
  })));
98
99
  }, [cluster?.ipWhitelist]);
100
+ // Detect whether PrivateLink is active for this cluster so we can warn
101
+ // users when an IP allowlist is also configured: PrivateLink connections
102
+ // arrive with private VPC IPs (not the customer's public IPs), so the
103
+ // allowlist will silently block PrivateLink traffic unless the VPC CIDR
104
+ // is included.
105
+ useEffect(() => {
106
+ let cancelled = false;
107
+ void (async () => {
108
+ try {
109
+ const status = await ConsoleSecureConnectivityService.getStatus({
110
+ config: apiConfig,
111
+ params: { orgId, clusterId },
112
+ });
113
+ if (!cancelled) {
114
+ setHasPrivateLink(!!status);
115
+ }
116
+ }
117
+ catch {
118
+ if (!cancelled) {
119
+ setHasPrivateLink(false);
120
+ }
121
+ }
122
+ })();
123
+ return () => {
124
+ cancelled = true;
125
+ };
126
+ }, [apiConfig, clusterId, orgId]);
127
+ const showPrivateLinkConflictWarning = hasPrivateLink && ipWhitelistItems.length > 0;
128
+ const privateLinkConflictTitle = safeTranslate(t, 'clusterdetails:secureConnectivity.ipAllowlistConflict.title', 'IP allowlist may block PrivateLink traffic');
129
+ const privateLinkConflictSubtitle = safeTranslate(t, 'clusterdetails:secureConnectivity.ipAllowlistConflict.subtitle', 'The IP allowlist also applies to PrivateLink traffic. PrivateLink connections arrive with private VPC IPs (not your public or corporate IPs), so they will be blocked unless the allowlist includes your VPC CIDR. Add your VPC CIDR to the allowlist, or remove the allowlist entirely.');
99
130
  const persistIpWhitelist = useCallback(async (next) => {
100
131
  await ConsoleIpWhitelistService.update({
101
132
  config: apiConfig,
@@ -121,7 +152,11 @@ export const C4ClusterDetailsIpWhitelistTab = (props) => {
121
152
  ...meta,
122
153
  });
123
154
  }, [clusterId, orgId, runtime.telemetry]);
124
- return (_jsxs(_Fragment, { children: [_jsx(C4ClusterDetailsIpWhitelist, { ipWhitelist: ipWhitelistItems, isLoading: isClusterLoading, text: {
155
+ return (_jsxs(_Fragment, { children: [showPrivateLinkConflictWarning && (_jsx(InlineNotification, { kind: 'warning', lowContrast: true, hideCloseButton: true, title: privateLinkConflictTitle, subtitle: privateLinkConflictSubtitle, style: {
156
+ maxWidth: '100%',
157
+ width: '100%',
158
+ marginBottom: 'var(--cds-spacing-05)',
159
+ } })), _jsx(C4ClusterDetailsIpWhitelist, { ipWhitelist: ipWhitelistItems, isLoading: isClusterLoading, text: {
125
160
  title: safeTranslate(t, 'clusterdetails:ipWhitelist.title', 'IP Allowlist'),
126
161
  createButton: safeTranslate(t, 'clusterdetails:ipWhitelist.createButton', 'Create new entry'),
127
162
  searchLabel: 'Search',