@camunda/ccma-saas-frontend 0.0.44 → 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-overview/c4-cluster-overview.d.ts +1 -1
- 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 +8 -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-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/i18n/en/modals/clusters.json +6 -0
- package/lib/esm/i18n/en/pages/clusterdetails.json +4 -0
- package/lib/esm/i18n/en/pages/createcluster.json +1 -1
- package/lib/esm/icons/c4-icons.d.ts +11 -11
- 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 +23 -1
- 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-ip-whitelist-tab.js +37 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +91 -50
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +226 -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.js +3 -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-executables-table-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
- package/package.json +20 -20
|
@@ -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(
|
|
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',
|
|
@@ -59,6 +59,7 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
59
59
|
const [hardwareBusy, setHardwareBusy] = useState(false);
|
|
60
60
|
const [hardwareError, setHardwareError] = useState(undefined);
|
|
61
61
|
const [upgradeModalOpen, setUpgradeModalOpen] = useState(false);
|
|
62
|
+
const [selectedUpgradeGeneration, setSelectedUpgradeGeneration] = useState(undefined);
|
|
62
63
|
const [tasklistMode, setTasklistMode] = useState('v2');
|
|
63
64
|
const [autoUpdateState, setAutoUpdateState] = useState(false);
|
|
64
65
|
const fromGenerationUuid = cluster?.generation?.uuid;
|
|
@@ -83,8 +84,8 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
83
84
|
if (!fromGenerationUuid) {
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
86
|
-
void data.fetchUpgradableGenerations(fromGenerationUuid);
|
|
87
|
-
}, [data.fetchUpgradableGenerations, fromGenerationUuid]);
|
|
87
|
+
void data.fetchUpgradableGenerations(fromGenerationUuid, clusterId);
|
|
88
|
+
}, [data.fetchUpgradableGenerations, fromGenerationUuid, clusterId]);
|
|
88
89
|
const updateClusterStatus = useMemo(() => {
|
|
89
90
|
return cluster?.status?.updateClusterStatus;
|
|
90
91
|
}, [cluster?.status]);
|
|
@@ -99,13 +100,16 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
99
100
|
data.fetchGenerationDetails,
|
|
100
101
|
updateClusterStatus?.previousGeneration?.uuid,
|
|
101
102
|
]);
|
|
102
|
-
const
|
|
103
|
-
if (!fromGenerationUuid)
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
const upgradableDto = useMemo(() => {
|
|
104
|
+
if (!fromGenerationUuid)
|
|
105
|
+
return undefined;
|
|
106
|
+
return data.getUpgradableGenerations(fromGenerationUuid, clusterId);
|
|
107
|
+
}, [data, data.upgradableGenerations, fromGenerationUuid, clusterId]);
|
|
108
|
+
const upgradableGenerations = useMemo(() => (upgradableDto?.options ?? []), [upgradableDto]);
|
|
109
|
+
const preferredUpgradableGeneration = useMemo(() => upgradableDto?.preferred ?? undefined, [upgradableDto]);
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
setSelectedUpgradeGeneration(preferredUpgradableGeneration ?? upgradableGenerations[0]);
|
|
112
|
+
}, [preferredUpgradableGeneration, upgradableGenerations]);
|
|
109
113
|
const previousGenerationDetails = useMemo(() => {
|
|
110
114
|
const previousUuid = updateClusterStatus?.previousGeneration?.uuid;
|
|
111
115
|
if (!previousUuid) {
|
|
@@ -117,13 +121,8 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
117
121
|
data.generationDetails,
|
|
118
122
|
updateClusterStatus?.previousGeneration?.uuid,
|
|
119
123
|
]);
|
|
120
|
-
const bestUpgradableGeneration = useMemo(() => {
|
|
121
|
-
const sorted = [...upgradableGenerations];
|
|
122
|
-
sorted.sort((a, b) => sortGenerationBySemverOfZeebe(a, b));
|
|
123
|
-
return sorted[0];
|
|
124
|
-
}, [upgradableGenerations]);
|
|
125
124
|
const updateToIdentityAuthorization = useMemo(() => {
|
|
126
|
-
const targetZeebe =
|
|
125
|
+
const targetZeebe = selectedUpgradeGeneration?.versions?.zeebe;
|
|
127
126
|
const currentZeebe = cluster?.generation?.versions?.zeebe;
|
|
128
127
|
if (!targetZeebe || !currentZeebe) {
|
|
129
128
|
return false;
|
|
@@ -150,12 +149,12 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
150
149
|
versionToCompareTo: '8.8.0-alpha1',
|
|
151
150
|
}));
|
|
152
151
|
}, [
|
|
153
|
-
|
|
152
|
+
selectedUpgradeGeneration?.versions?.zeebe,
|
|
154
153
|
cluster?.generation?.versions?.zeebe,
|
|
155
154
|
]);
|
|
156
155
|
const showTasklistV2Upgrade = useMemo(() => {
|
|
157
156
|
const currentZeebe = cluster?.generation?.versions?.zeebe;
|
|
158
|
-
const targetZeebe =
|
|
157
|
+
const targetZeebe = selectedUpgradeGeneration?.versions?.zeebe;
|
|
159
158
|
if (!currentZeebe || !targetZeebe) {
|
|
160
159
|
return false;
|
|
161
160
|
}
|
|
@@ -198,7 +197,7 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
198
197
|
currentGenerationGoodEnoughForTasklistV2 &&
|
|
199
198
|
currentGenerationNot810Yet);
|
|
200
199
|
}, [
|
|
201
|
-
|
|
200
|
+
selectedUpgradeGeneration?.versions?.zeebe,
|
|
202
201
|
cluster?.externalMetadata,
|
|
203
202
|
cluster?.generation?.versions?.zeebe,
|
|
204
203
|
]);
|
|
@@ -213,7 +212,7 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
213
212
|
if (tasklistV2Enabled === true)
|
|
214
213
|
return false;
|
|
215
214
|
const currentZeebe = cluster?.generation?.versions?.zeebe;
|
|
216
|
-
const targetZeebe =
|
|
215
|
+
const targetZeebe = selectedUpgradeGeneration?.versions?.zeebe;
|
|
217
216
|
if (!currentZeebe || !targetZeebe)
|
|
218
217
|
return false;
|
|
219
218
|
const currentIs89 = checkVersion({
|
|
@@ -239,12 +238,16 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
239
238
|
});
|
|
240
239
|
return currentIs89 && target810OrHigher;
|
|
241
240
|
}, [
|
|
242
|
-
|
|
241
|
+
selectedUpgradeGeneration?.versions?.zeebe,
|
|
243
242
|
cluster?.externalMetadata,
|
|
244
243
|
cluster?.generation?.versions?.zeebe,
|
|
245
244
|
]);
|
|
245
|
+
const showVersionPicker = useMemo(() => upgradableGenerations.length > 1 &&
|
|
246
|
+
(runtime.featureFlags?.isEnabled('console.upgradeVersionSelection') ??
|
|
247
|
+
false), [upgradableGenerations.length, runtime.featureFlags]);
|
|
246
248
|
const upgradeSteps = useMemo(() => {
|
|
247
|
-
const totalSteps = (
|
|
249
|
+
const totalSteps = (showVersionPicker ? 1 : 0) +
|
|
250
|
+
(updateToIdentityAuthorization ? 5 : 0) +
|
|
248
251
|
(showTasklistV2Upgrade ? 1 : 0) +
|
|
249
252
|
1;
|
|
250
253
|
const label = totalSteps > 1
|
|
@@ -252,9 +255,10 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
252
255
|
: '';
|
|
253
256
|
const onCancel = () => {
|
|
254
257
|
setUpgradeModalOpen(false);
|
|
258
|
+
setSelectedUpgradeGeneration(preferredUpgradableGeneration ?? upgradableGenerations[0]);
|
|
255
259
|
};
|
|
256
260
|
const submit = async () => {
|
|
257
|
-
if (!
|
|
261
|
+
if (!selectedUpgradeGeneration) {
|
|
258
262
|
return;
|
|
259
263
|
}
|
|
260
264
|
const selectedTasklistV2Enabled = showTasklistV2Upgrade
|
|
@@ -271,7 +275,7 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
271
275
|
});
|
|
272
276
|
}
|
|
273
277
|
await data.upgradeClusterGeneration({
|
|
274
|
-
generationUuid:
|
|
278
|
+
generationUuid: selectedUpgradeGeneration.uuid,
|
|
275
279
|
clusterId,
|
|
276
280
|
orgId,
|
|
277
281
|
tasklistV2Enabled: selectedTasklistV2Enabled,
|
|
@@ -314,7 +318,9 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
314
318
|
},
|
|
315
319
|
kind: 'primary',
|
|
316
320
|
type: 'submit',
|
|
317
|
-
disabled: !
|
|
321
|
+
disabled: !selectedUpgradeGeneration ||
|
|
322
|
+
!canEditCluster ||
|
|
323
|
+
!!restoreInProgress,
|
|
318
324
|
});
|
|
319
325
|
return buttons;
|
|
320
326
|
}
|
|
@@ -369,26 +375,26 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
369
375
|
buttons: baseButtons({ hasPrevious: steps.length > 0 }),
|
|
370
376
|
});
|
|
371
377
|
}
|
|
378
|
+
const toDisplayVersion = (version) => {
|
|
379
|
+
if (!version) {
|
|
380
|
+
return '-';
|
|
381
|
+
}
|
|
382
|
+
const raw = version.trim();
|
|
383
|
+
if (!raw) {
|
|
384
|
+
return '-';
|
|
385
|
+
}
|
|
386
|
+
const withoutDigest = raw.split('@')[0] ?? raw;
|
|
387
|
+
const lastSlashIndex = withoutDigest.lastIndexOf('/');
|
|
388
|
+
const lastColonIndex = withoutDigest.lastIndexOf(':');
|
|
389
|
+
if (lastColonIndex > lastSlashIndex) {
|
|
390
|
+
const tag = withoutDigest.slice(lastColonIndex + 1).trim();
|
|
391
|
+
return tag || '-';
|
|
392
|
+
}
|
|
393
|
+
return raw;
|
|
394
|
+
};
|
|
372
395
|
const deltas = (() => {
|
|
373
396
|
const currentVersions = cluster?.generation?.versions;
|
|
374
|
-
const targetVersions =
|
|
375
|
-
const toDisplayVersion = (version) => {
|
|
376
|
-
if (!version) {
|
|
377
|
-
return '-';
|
|
378
|
-
}
|
|
379
|
-
const raw = version.trim();
|
|
380
|
-
if (!raw) {
|
|
381
|
-
return '-';
|
|
382
|
-
}
|
|
383
|
-
const withoutDigest = raw.split('@')[0] ?? raw;
|
|
384
|
-
const lastSlashIndex = withoutDigest.lastIndexOf('/');
|
|
385
|
-
const lastColonIndex = withoutDigest.lastIndexOf(':');
|
|
386
|
-
if (lastColonIndex > lastSlashIndex) {
|
|
387
|
-
const tag = withoutDigest.slice(lastColonIndex + 1).trim();
|
|
388
|
-
return tag || '-';
|
|
389
|
-
}
|
|
390
|
-
return raw;
|
|
391
|
-
};
|
|
397
|
+
const targetVersions = selectedUpgradeGeneration?.versions;
|
|
392
398
|
const versionDelta = (input) => {
|
|
393
399
|
const current = toDisplayVersion(input.current);
|
|
394
400
|
const target = toDisplayVersion(input.target);
|
|
@@ -403,13 +409,21 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
403
409
|
const items = [
|
|
404
410
|
versionDelta({
|
|
405
411
|
label: 'Tasklist',
|
|
406
|
-
current: currentVersions?.tasklist
|
|
407
|
-
|
|
412
|
+
current: currentVersions?.tasklist?.trim()
|
|
413
|
+
? currentVersions?.tasklist
|
|
414
|
+
: currentVersions?.zeebe,
|
|
415
|
+
target: targetVersions?.tasklist?.trim()
|
|
416
|
+
? targetVersions?.tasklist
|
|
417
|
+
: targetVersions?.zeebe,
|
|
408
418
|
}),
|
|
409
419
|
versionDelta({
|
|
410
420
|
label: 'Operate',
|
|
411
|
-
current: currentVersions?.operate
|
|
412
|
-
|
|
421
|
+
current: currentVersions?.operate?.trim()
|
|
422
|
+
? currentVersions?.operate
|
|
423
|
+
: currentVersions?.zeebe,
|
|
424
|
+
target: targetVersions?.operate?.trim()
|
|
425
|
+
? targetVersions?.operate
|
|
426
|
+
: targetVersions?.zeebe,
|
|
413
427
|
}),
|
|
414
428
|
versionDelta({
|
|
415
429
|
label: 'Zeebe',
|
|
@@ -429,12 +443,31 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
429
443
|
].filter((value) => typeof value === 'string');
|
|
430
444
|
return items;
|
|
431
445
|
})();
|
|
446
|
+
if (showVersionPicker) {
|
|
447
|
+
const sortedOptions = [...upgradableGenerations].sort((a, b) => sortGenerationBySemverOfZeebe(a, b));
|
|
448
|
+
steps.push({
|
|
449
|
+
title: safeTranslate(t, 'clustermodals:upgrade.selectVersion.title', 'Select target version'),
|
|
450
|
+
label,
|
|
451
|
+
content: (_jsx(Stack, { gap: 6, children: _jsx(RadioButtonGroup, { name: 'upgrade-target-version', legendText: safeTranslate(t, 'clustermodals:upgrade.selectVersion.legend', 'Available versions'), valueSelected: selectedUpgradeGeneration?.uuid, orientation: 'vertical', onChange: (uuid) => {
|
|
452
|
+
const gen = upgradableGenerations.find((g) => g.uuid === uuid);
|
|
453
|
+
if (gen)
|
|
454
|
+
setSelectedUpgradeGeneration(gen);
|
|
455
|
+
}, children: sortedOptions.map((gen) => {
|
|
456
|
+
const isPreferred = gen.uuid === preferredUpgradableGeneration?.uuid;
|
|
457
|
+
const labelText = isPreferred
|
|
458
|
+
? safeTranslate(t, 'clustermodals:upgrade.selectVersion.latestLabel', `${gen.name} (latest)`, { name: gen.name })
|
|
459
|
+
: safeTranslate(t, 'clustermodals:upgrade.selectVersion.optionLabel', gen.name, { name: gen.name });
|
|
460
|
+
return (_jsx(RadioButton, { labelText: labelText, value: gen.uuid, id: `upgrade-target-version-${gen.uuid}` }, gen.uuid));
|
|
461
|
+
}) }) })),
|
|
462
|
+
buttons: baseButtons({ hasPrevious: false }),
|
|
463
|
+
});
|
|
464
|
+
}
|
|
432
465
|
steps.push({
|
|
433
466
|
title: updateToIdentityAuthorization
|
|
434
467
|
? identityWizardTitle
|
|
435
468
|
: safeTranslate(t, 'clustermodals:upgrade.title', 'Update available'),
|
|
436
469
|
label,
|
|
437
|
-
content: (_jsxs(Stack, { gap: 6, children: [_jsxs("p", { style: { margin: 0 }, children: ["Update cluster generation from", ' ', _jsx("strong", { children: cluster?.generation?.name ?? '-' }), " to", ' ', _jsx("strong", { children:
|
|
470
|
+
content: (_jsxs(Stack, { gap: 6, children: [_jsxs("p", { style: { margin: 0 }, children: ["Update cluster generation from", ' ', _jsx("strong", { children: cluster?.generation?.name ?? '-' }), " to", ' ', _jsx("strong", { children: selectedUpgradeGeneration?.name ?? '-' })] }), showTasklistV1RemovalWarning ? (_jsxs(InlineNotification, { kind: 'warning', lowContrast: true, hideCloseButton: true, title: safeTranslate(t, 'clustermodals:upgrade.banner.tasklistV1RemovalTitle', 'Update removes Tasklist V1'), children: [_jsx("p", { style: { margin: '0.5rem 0 0 0' }, children: safeTranslate(t, 'clustermodals:upgrade.banner.tasklistV1RemovalBody', 'The 8.10 update removes the Tasklist V1 API. Applications on this cluster still using Tasklist V1 will break. Migrate to Tasklist V2 / Orchestration Cluster API before continuing.') }), upgradeDocsUrls?.tasklistApiVersions ? (_jsx("div", { style: { marginTop: '0.5rem' }, children: _jsx(Link, { rel: 'ignore', style: { cursor: 'pointer' }, onClick: () => {
|
|
438
471
|
window.open(upgradeDocsUrls.tasklistApiVersions, '_blank', 'noopener,noreferrer');
|
|
439
472
|
}, children: safeTranslate(t, 'clustermodals:upgrade.banner.tasklistV1RemovalLearnMore', 'Migration guide') }) })) : null] })) : null, _jsx(InlineNotification, { kind: 'warning', lowContrast: true, title: safeTranslate(t, 'clustermodals:upgrade.banner.title', 'Camunda components will be temporarily unavailable'), hideCloseButton: true, subtitle: safeTranslate(t, 'clustermodals:upgrade.banner.line0', 'We recommend to backup the cluster before every update to ensure safe recovery if needed.'), children: _jsx("p", { style: { margin: '0.5rem 0 0 0' }, children: safeTranslate(t, 'clustermodals:upgrade.banner.line1', 'During the update, Camunda components will restart. The update duration depends mainly on the amount of processes and data stored in the cluster.') }) }), deltas.length > 0 ? (_jsxs("div", { children: [_jsx("p", { style: { margin: 0 }, children: safeTranslate(t, 'clustermodals:upgrade.details', 'This update includes:') }), _jsx("ul", { children: deltas.map((item) => (_jsx("li", { children: item }, item))) })] })) : null, canEditCluster ? (_jsx(Checkbox, { id: 'upgrade-cluster-enable-auto-update', labelText: safeTranslate(t, 'clustermodals:upgrade.autoUpdate', 'Automatically keep my cluster up to date'), checked: autoUpdateState, onChange: () => {
|
|
440
473
|
setAutoUpdateState((prev) => !prev);
|
|
@@ -451,16 +484,20 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
451
484
|
}, [
|
|
452
485
|
apiConfig,
|
|
453
486
|
autoUpdateState,
|
|
454
|
-
bestUpgradableGeneration,
|
|
455
487
|
canEditCluster,
|
|
456
488
|
cluster,
|
|
457
489
|
clusterId,
|
|
458
490
|
data,
|
|
459
491
|
onReloadCluster,
|
|
460
492
|
orgId,
|
|
493
|
+
preferredUpgradableGeneration,
|
|
494
|
+
selectedUpgradeGeneration,
|
|
495
|
+
setSelectedUpgradeGeneration,
|
|
496
|
+
upgradableGenerations,
|
|
461
497
|
upgradeDocsUrls,
|
|
462
498
|
showTasklistV1RemovalWarning,
|
|
463
499
|
showTasklistV2Upgrade,
|
|
500
|
+
showVersionPicker,
|
|
464
501
|
t,
|
|
465
502
|
tasklistMode,
|
|
466
503
|
updateToIdentityAuthorization,
|
|
@@ -1135,7 +1172,9 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
1135
1172
|
name: 'Tasklist',
|
|
1136
1173
|
status: cluster.status?.tasklistStatus,
|
|
1137
1174
|
url: cluster.status?.tasklistUrl,
|
|
1138
|
-
version: toDisplayVersion(cluster.generation?.versions?.tasklist)
|
|
1175
|
+
version: toDisplayVersion(cluster.generation?.versions?.tasklist?.trim()
|
|
1176
|
+
? cluster.generation?.versions?.tasklist
|
|
1177
|
+
: cluster.generation?.versions?.zeebe),
|
|
1139
1178
|
description: appDescription.tasklist,
|
|
1140
1179
|
linkLabel: launchLabel,
|
|
1141
1180
|
}),
|
|
@@ -1143,7 +1182,9 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
1143
1182
|
name: 'Operate',
|
|
1144
1183
|
status: cluster.status?.operateStatus,
|
|
1145
1184
|
url: cluster.status?.operateUrl,
|
|
1146
|
-
version: toDisplayVersion(cluster.generation?.versions?.operate)
|
|
1185
|
+
version: toDisplayVersion(cluster.generation?.versions?.operate?.trim()
|
|
1186
|
+
? cluster.generation?.versions?.operate
|
|
1187
|
+
: cluster.generation?.versions?.zeebe),
|
|
1147
1188
|
description: appDescription.operate,
|
|
1148
1189
|
linkLabel: launchLabel,
|
|
1149
1190
|
}),
|
|
@@ -24,6 +24,15 @@ const hoisted = vi.hoisted(() => {
|
|
|
24
24
|
return {
|
|
25
25
|
upgradableGenerations: [],
|
|
26
26
|
upgradeClusterGenerationMock: vi.fn().mockResolvedValue(undefined),
|
|
27
|
+
getUpgradableGenerationsMock: vi.fn().mockImplementation(() => {
|
|
28
|
+
if (hoisted.upgradableGenerations.length === 0) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
preferred: hoisted.upgradableGenerations[0] || null,
|
|
33
|
+
options: hoisted.upgradableGenerations,
|
|
34
|
+
};
|
|
35
|
+
}),
|
|
27
36
|
};
|
|
28
37
|
});
|
|
29
38
|
vi.mock('@camunda/ccma-api', async () => {
|
|
@@ -61,9 +70,7 @@ vi.mock('../../../runtime/c4-console-data-context', async () => {
|
|
|
61
70
|
fetchGenerationDetails: vi.fn().mockResolvedValue(undefined),
|
|
62
71
|
upgradableGenerations: {},
|
|
63
72
|
generationDetails: {},
|
|
64
|
-
getUpgradableGenerations:
|
|
65
|
-
.fn()
|
|
66
|
-
.mockImplementation(() => hoisted.upgradableGenerations),
|
|
73
|
+
getUpgradableGenerations: hoisted.getUpgradableGenerationsMock,
|
|
67
74
|
getGenerationDetails: vi.fn().mockReturnValue(undefined),
|
|
68
75
|
upgradeClusterGeneration: hoisted.upgradeClusterGenerationMock,
|
|
69
76
|
getSseEntityVersion: vi.fn().mockReturnValue(0),
|
|
@@ -587,6 +594,141 @@ describe('C4ClusterDetailsOverviewTab upgrade wizard', () => {
|
|
|
587
594
|
expect(screen.queryByText('Update removes Tasklist V1')).toBeNull();
|
|
588
595
|
});
|
|
589
596
|
});
|
|
597
|
+
describe('C4ClusterDetailsOverviewTab version picker', () => {
|
|
598
|
+
beforeEach(() => {
|
|
599
|
+
lastOverviewProps = undefined;
|
|
600
|
+
hoisted.upgradeClusterGenerationMock.mockClear();
|
|
601
|
+
hoisted.upgradableGenerations = [];
|
|
602
|
+
});
|
|
603
|
+
afterEach(() => {
|
|
604
|
+
cleanup();
|
|
605
|
+
});
|
|
606
|
+
function renderWithVersionPickerFlag(props) {
|
|
607
|
+
return render(_jsx(C4ConsoleRuntimeProvider, { config: {
|
|
608
|
+
stage: 'dev',
|
|
609
|
+
auth: { getAccessToken: async () => 'token' },
|
|
610
|
+
backendUrls: {},
|
|
611
|
+
featureFlags: {
|
|
612
|
+
isEnabled: (key) => key === 'console.upgradeVersionSelection',
|
|
613
|
+
},
|
|
614
|
+
}, children: _jsx(C4ClusterDetailsOverviewTab, { ...defaultProps, ...props }) }));
|
|
615
|
+
}
|
|
616
|
+
it('does not show the version picker when only one upgrade option exists', async () => {
|
|
617
|
+
const cluster = buildCluster('Healthy', { zeebeVersion: 'zeebe:8.9.0' });
|
|
618
|
+
hoisted.upgradableGenerations = [
|
|
619
|
+
{
|
|
620
|
+
uuid: 'gen-810',
|
|
621
|
+
name: 'Camunda 8.10',
|
|
622
|
+
versions: {
|
|
623
|
+
zeebe: 'zeebe:8.10.0',
|
|
624
|
+
tasklist: 'tasklist:8.10.0',
|
|
625
|
+
operate: 'operate:8.10.0',
|
|
626
|
+
elasticSearchOss: 'elasticsearch:8.10.0',
|
|
627
|
+
optimize: 'optimize:8.10.0',
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
];
|
|
631
|
+
renderWithVersionPickerFlag({ cluster, canEditCluster: true });
|
|
632
|
+
await screen.findByTestId('cluster-overview');
|
|
633
|
+
act(() => {
|
|
634
|
+
lastOverviewProps?.details.generation.update.updateStates.updateAvailable.action?.();
|
|
635
|
+
});
|
|
636
|
+
await screen.findByText(/Update cluster generation from/i);
|
|
637
|
+
expect(screen.queryByText('Select target version')).toBeNull();
|
|
638
|
+
});
|
|
639
|
+
it('shows the version picker when flag is on and multiple options exist', async () => {
|
|
640
|
+
const user = userEvent.setup();
|
|
641
|
+
const cluster = buildCluster('Healthy', { zeebeVersion: 'zeebe:8.9.0' });
|
|
642
|
+
hoisted.upgradableGenerations = [
|
|
643
|
+
{
|
|
644
|
+
uuid: 'gen-810',
|
|
645
|
+
name: 'Camunda 8.10',
|
|
646
|
+
versions: {
|
|
647
|
+
zeebe: 'zeebe:8.10.0',
|
|
648
|
+
tasklist: 'tasklist:8.10.0',
|
|
649
|
+
operate: 'operate:8.10.0',
|
|
650
|
+
elasticSearchOss: 'elasticsearch:8.10.0',
|
|
651
|
+
optimize: 'optimize:8.10.0',
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
uuid: 'gen-811',
|
|
656
|
+
name: 'Camunda 8.11',
|
|
657
|
+
versions: {
|
|
658
|
+
zeebe: 'zeebe:8.11.0',
|
|
659
|
+
tasklist: 'tasklist:8.11.0',
|
|
660
|
+
operate: 'operate:8.11.0',
|
|
661
|
+
elasticSearchOss: 'elasticsearch:8.11.0',
|
|
662
|
+
optimize: 'optimize:8.11.0',
|
|
663
|
+
},
|
|
664
|
+
},
|
|
665
|
+
];
|
|
666
|
+
renderWithVersionPickerFlag({ cluster, canEditCluster: true });
|
|
667
|
+
await screen.findByTestId('cluster-overview');
|
|
668
|
+
act(() => {
|
|
669
|
+
lastOverviewProps?.details.generation.update.updateStates.updateAvailable.action?.();
|
|
670
|
+
});
|
|
671
|
+
await screen.findByText('Select target version');
|
|
672
|
+
expect(screen.getByText('Available versions')).toBeInTheDocument();
|
|
673
|
+
// Both options should be visible
|
|
674
|
+
expect(screen.getByRole('radio', { name: /Camunda 8\.10/i })).toBeInTheDocument();
|
|
675
|
+
expect(screen.getByRole('radio', { name: /Camunda 8\.11/i })).toBeInTheDocument();
|
|
676
|
+
// The preferred (first) option should be pre-selected
|
|
677
|
+
expect(screen.getByRole('radio', { name: /Camunda 8\.10/i })).toBeChecked();
|
|
678
|
+
// Advance past the picker to the confirmation step
|
|
679
|
+
await user.click(screen.getByRole('button', { name: 'Next' }));
|
|
680
|
+
await screen.findByText(/Update cluster generation from/i);
|
|
681
|
+
// Confirmation step shows the preferred generation name
|
|
682
|
+
expect(screen.getByText(/Camunda 8\.10/)).toBeInTheDocument();
|
|
683
|
+
});
|
|
684
|
+
it('selecting a non-preferred option carries through to the confirmation step', async () => {
|
|
685
|
+
const user = userEvent.setup();
|
|
686
|
+
const cluster = buildCluster('Healthy', { zeebeVersion: 'zeebe:8.9.0' });
|
|
687
|
+
hoisted.upgradableGenerations = [
|
|
688
|
+
{
|
|
689
|
+
uuid: 'gen-810',
|
|
690
|
+
name: 'Camunda 8.10',
|
|
691
|
+
versions: {
|
|
692
|
+
zeebe: 'zeebe:8.10.0',
|
|
693
|
+
tasklist: 'tasklist:8.10.0',
|
|
694
|
+
operate: 'operate:8.10.0',
|
|
695
|
+
elasticSearchOss: 'elasticsearch:8.10.0',
|
|
696
|
+
optimize: 'optimize:8.10.0',
|
|
697
|
+
},
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
uuid: 'gen-811',
|
|
701
|
+
name: 'Camunda 8.11',
|
|
702
|
+
versions: {
|
|
703
|
+
zeebe: 'zeebe:8.11.0',
|
|
704
|
+
tasklist: 'tasklist:8.11.0',
|
|
705
|
+
operate: 'operate:8.11.0',
|
|
706
|
+
elasticSearchOss: 'elasticsearch:8.11.0',
|
|
707
|
+
optimize: 'optimize:8.11.0',
|
|
708
|
+
},
|
|
709
|
+
},
|
|
710
|
+
];
|
|
711
|
+
renderWithVersionPickerFlag({ cluster, canEditCluster: true });
|
|
712
|
+
await screen.findByTestId('cluster-overview');
|
|
713
|
+
act(() => {
|
|
714
|
+
lastOverviewProps?.details.generation.update.updateStates.updateAvailable.action?.();
|
|
715
|
+
});
|
|
716
|
+
await screen.findByText('Select target version');
|
|
717
|
+
// Select the non-preferred option
|
|
718
|
+
await user.click(screen.getByRole('radio', { name: /Camunda 8\.11/i }));
|
|
719
|
+
expect(screen.getByRole('radio', { name: /Camunda 8\.11/i })).toBeChecked();
|
|
720
|
+
await user.click(screen.getByRole('button', { name: 'Next' }));
|
|
721
|
+
await screen.findByText(/Update cluster generation from/i);
|
|
722
|
+
// The confirmation step should reference the selected generation (8.11) in the "from … to …" line
|
|
723
|
+
const confirmationParagraph = await screen.findByText(/Update cluster generation from/i);
|
|
724
|
+
expect(confirmationParagraph.textContent).toContain('Camunda 8.11');
|
|
725
|
+
// Submit and verify the correct generationUuid is sent
|
|
726
|
+
await user.click(screen.getByRole('button', { name: 'Update' }));
|
|
727
|
+
await waitFor(() => {
|
|
728
|
+
expect(hoisted.upgradeClusterGenerationMock).toHaveBeenCalledWith(expect.objectContaining({ generationUuid: 'gen-811' }));
|
|
729
|
+
});
|
|
730
|
+
});
|
|
731
|
+
});
|
|
590
732
|
describe('C4ClusterDetailsOverviewTab hardware packages', () => {
|
|
591
733
|
beforeEach(() => {
|
|
592
734
|
lastOverviewProps = undefined;
|
|
@@ -844,6 +986,87 @@ describe('C4ClusterDetailsOverviewTab swagger URL', () => {
|
|
|
844
986
|
expect(lastOverviewProps?.details?.swaggerUrl?.pausedWarning).toBeUndefined();
|
|
845
987
|
});
|
|
846
988
|
});
|
|
989
|
+
describe('C4ClusterDetailsOverviewTab tasklist/operate version fallback', () => {
|
|
990
|
+
beforeEach(() => {
|
|
991
|
+
lastOverviewProps = undefined;
|
|
992
|
+
hoisted.upgradableGenerations = [];
|
|
993
|
+
hoisted.upgradeClusterGenerationMock
|
|
994
|
+
.mockReset()
|
|
995
|
+
.mockResolvedValue(undefined);
|
|
996
|
+
vi.clearAllMocks();
|
|
997
|
+
});
|
|
998
|
+
afterEach(() => {
|
|
999
|
+
cleanup();
|
|
1000
|
+
});
|
|
1001
|
+
it('falls back to the zeebe version for tasklist and operate tiles when those fields are unset', async () => {
|
|
1002
|
+
const cluster = buildCluster('Healthy', {
|
|
1003
|
+
zeebeVersion: 'reg/zeebe:8.9.0',
|
|
1004
|
+
});
|
|
1005
|
+
renderTab({ cluster });
|
|
1006
|
+
await waitFor(() => expect(lastOverviewProps).toBeDefined());
|
|
1007
|
+
const apps = lastOverviewProps?.applications.applications;
|
|
1008
|
+
expect(apps?.tasklist?.version).toBe('8.9.0');
|
|
1009
|
+
expect(apps?.operate?.version).toBe('8.9.0');
|
|
1010
|
+
});
|
|
1011
|
+
it('treats blank-string tasklist and operate as unset and falls back to zeebe', async () => {
|
|
1012
|
+
const cluster = buildCluster('Healthy', {
|
|
1013
|
+
zeebeVersion: 'reg/zeebe:8.9.0',
|
|
1014
|
+
});
|
|
1015
|
+
cluster.generation.versions = {
|
|
1016
|
+
...cluster.generation.versions,
|
|
1017
|
+
tasklist: ' ',
|
|
1018
|
+
operate: '',
|
|
1019
|
+
};
|
|
1020
|
+
renderTab({ cluster });
|
|
1021
|
+
await waitFor(() => expect(lastOverviewProps).toBeDefined());
|
|
1022
|
+
const apps = lastOverviewProps?.applications.applications;
|
|
1023
|
+
expect(apps?.tasklist?.version).toBe('8.9.0');
|
|
1024
|
+
expect(apps?.operate?.version).toBe('8.9.0');
|
|
1025
|
+
});
|
|
1026
|
+
it('uses tasklist and operate versions when explicitly set (regression)', async () => {
|
|
1027
|
+
const cluster = buildCluster('Healthy', {
|
|
1028
|
+
zeebeVersion: 'reg/zeebe:8.9.0',
|
|
1029
|
+
});
|
|
1030
|
+
cluster.generation.versions = {
|
|
1031
|
+
...cluster.generation.versions,
|
|
1032
|
+
tasklist: 'reg/tasklist:8.8.0',
|
|
1033
|
+
operate: 'reg/operate:8.8.0',
|
|
1034
|
+
};
|
|
1035
|
+
renderTab({ cluster });
|
|
1036
|
+
await waitFor(() => expect(lastOverviewProps).toBeDefined());
|
|
1037
|
+
const apps = lastOverviewProps?.applications.applications;
|
|
1038
|
+
expect(apps?.tasklist?.version).toBe('8.8.0');
|
|
1039
|
+
expect(apps?.operate?.version).toBe('8.8.0');
|
|
1040
|
+
});
|
|
1041
|
+
it('uses zeebe version for tasklist/operate deltas when upgrading across the 8.9 boundary', async () => {
|
|
1042
|
+
const cluster = buildCluster('Healthy', { zeebeVersion: 'zeebe:8.8.0' });
|
|
1043
|
+
cluster.generation.versions = {
|
|
1044
|
+
...cluster.generation.versions,
|
|
1045
|
+
tasklist: 'tasklist:8.8.0',
|
|
1046
|
+
operate: 'operate:8.8.0',
|
|
1047
|
+
};
|
|
1048
|
+
hoisted.upgradableGenerations = [
|
|
1049
|
+
{
|
|
1050
|
+
uuid: 'gen-target',
|
|
1051
|
+
name: 'Camunda 8.9',
|
|
1052
|
+
versions: {
|
|
1053
|
+
zeebe: 'zeebe:8.9.0',
|
|
1054
|
+
elasticSearchOss: 'elasticsearch:8.9.0',
|
|
1055
|
+
optimize: 'optimize:8.9.0',
|
|
1056
|
+
// No tasklist or operate — 8.9+ generations omit these.
|
|
1057
|
+
},
|
|
1058
|
+
},
|
|
1059
|
+
];
|
|
1060
|
+
renderTab({ cluster, canEditCluster: true });
|
|
1061
|
+
await screen.findByTestId('cluster-overview');
|
|
1062
|
+
act(() => {
|
|
1063
|
+
lastOverviewProps?.details.generation.update.updateStates.updateAvailable.action?.();
|
|
1064
|
+
});
|
|
1065
|
+
await screen.findByText(/Update cluster generation from/i);
|
|
1066
|
+
expect(await screen.findByText(/Tasklist - 8\.8\.0 → 8\.9\.0/)).toBeInTheDocument();
|
|
1067
|
+
expect(await screen.findByText(/Operate - 8\.8\.0 → 8\.9\.0/)).toBeInTheDocument();
|
|
1068
|
+
});
|
|
1069
|
+
});
|
|
847
1070
|
describe('C4ClusterDetailsOverviewTab disabled Optimize tile', () => {
|
|
848
1071
|
beforeEach(() => {
|
|
849
1072
|
lastOverviewProps = undefined;
|
|
@@ -258,9 +258,18 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
258
258
|
secureConnectivityStatus === undefined &&
|
|
259
259
|
!hasSeenSecureConnectivityLoadingRef.current;
|
|
260
260
|
const isSecureConnectivityLoadingVisible = secureConnectivityLoading || isInitialActiveLoadPending;
|
|
261
|
+
const cachedCluster = (data.getClusters(orgId) ?? []).find((item) => item?.uuid === clusterId);
|
|
262
|
+
// PrivateLink traffic arrives at the cluster with private VPC IPs
|
|
263
|
+
// (NLB / VPC endpoint interfaces), not the customer's public/corporate
|
|
264
|
+
// egress IPs. A cluster ipWhitelist built from public CIDRs therefore
|
|
265
|
+
// silently blocks PrivateLink traffic. Surface the conflict so users
|
|
266
|
+
// can either remove the allowlist or update it to include their VPC
|
|
267
|
+
// CIDR.
|
|
268
|
+
const hasIpAllowlist = (cachedCluster?.ipWhitelist?.length ?? 0) > 0;
|
|
269
|
+
const showActivePrivateLinkIpAllowlistConflict = hasIpAllowlist && !!secureConnectivityStatus;
|
|
270
|
+
const ipAllowlistConflictTitle = safeTranslate(t, 'clusterdetails:secureConnectivity.ipAllowlistConflict.title', 'IP allowlist may block PrivateLink traffic');
|
|
271
|
+
const ipAllowlistConflictSubtitle = 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.');
|
|
261
272
|
const defaultClusterRegion = (() => {
|
|
262
|
-
const clusters = data.getClusters(orgId) ?? [];
|
|
263
|
-
const cachedCluster = clusters.find((item) => item?.uuid === clusterId);
|
|
264
273
|
const possibleRegion = cachedCluster?.k8sContext?.name;
|
|
265
274
|
if (!possibleRegion) {
|
|
266
275
|
return undefined;
|
|
@@ -344,7 +353,11 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
344
353
|
hasTooManyAllowedPrincipals) ||
|
|
345
354
|
(secureConnectivityEditMode === 'regions' && hasTooManyAllowedRegions);
|
|
346
355
|
const emptyDescription = (_jsxs(Stack, { gap: 6, children: [_jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.description0', 'Private networking allows you to connect privately to the cluster using inbound AWS PrivateLink.') }), _jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.description1', 'With inbound PrivateLink, traffic from your AWS VPC to Camunda cluster is routed privately and never traverses the public internet. This enables job workers and inbound connectors to run inside your own network while securely accessing Camunda.') }), showActivatingTile ? (_jsx(Tile, { light: true, children: _jsxs(Stack, { gap: 2, children: [_jsx(InlineLoading, { description: safeTranslate(t, 'clusterdetails:secureConnectivity.activatingTitle', 'Activating PrivateLink endpoint service…') }), _jsxs(Stack, { gap: 1, children: [_jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.activatingText0', 'This may take a few minutes.') }), _jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.activatingText1', 'You can leave this page. We will notify you when the endpoint service is ready.') })] })] }) })) : undefined] }));
|
|
347
|
-
return (_jsxs(_Fragment, { children: [_jsx(
|
|
356
|
+
return (_jsxs(_Fragment, { children: [showActivePrivateLinkIpAllowlistConflict && (_jsx(InlineNotification, { kind: 'warning', lowContrast: true, hideCloseButton: true, title: ipAllowlistConflictTitle, subtitle: ipAllowlistConflictSubtitle, style: {
|
|
357
|
+
maxWidth: '100%',
|
|
358
|
+
width: '100%',
|
|
359
|
+
marginBottom: 'var(--cds-spacing-05)',
|
|
360
|
+
} })), _jsx(C4ClusterDetailsSecureConnectivity, { status: secureConnectivityStatus, privateEndpoints: privateEndpoints, connectInAwsUrl: 'https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html', isLoading: isSecureConnectivityLoadingVisible, isDeactivating: secureConnectivityDeactivating, text: {
|
|
348
361
|
title: safeTranslate(t, 'clusterdetails:secureConnectivity.title', 'Private networking'),
|
|
349
362
|
activatedTitle: safeTranslate(t, 'clusterdetails:secureConnectivity.title', 'Private networking'),
|
|
350
363
|
loadingDescription: safeTranslate(t, 'clusterdetails:secureConnectivity.loadingDescription', 'Loading Private Link status…'),
|
|
@@ -419,7 +432,7 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
419
432
|
}
|
|
420
433
|
closeActivateModal();
|
|
421
434
|
return true;
|
|
422
|
-
}, children: [_jsx(ModalHeader, { title: safeTranslate(t, 'clusterdetails:secureConnectivity.enableButton', 'Activate PrivateLink endpoint service') }), _jsx(ModalBody, { hasForm: true, children: _jsxs(Stack, { gap: 6, children: [secureConnectivityMutationError && (_jsx(InlineNotification, { kind: 'error', lowContrast: true, title: 'Activation failed', subtitle: secureConnectivityMutationError, onCloseButtonClick: () => setSecureConnectivityMutationError('') })), _jsxs(ProgressIndicator, { currentIndex: secureConnectivityModalStep, spaceEqually: true, onChange: setSecureConnectivityModalStep, children: [_jsx(ProgressStep, { label: 'Allowed principals' }, 'private-link-step-0'), _jsx(ProgressStep, { label: 'Supported regions' }, 'private-link-step-1')] }), (() => {
|
|
435
|
+
}, children: [_jsx(ModalHeader, { title: safeTranslate(t, 'clusterdetails:secureConnectivity.enableButton', 'Activate PrivateLink endpoint service') }), _jsx(ModalBody, { hasForm: true, children: _jsxs(Stack, { gap: 6, children: [hasIpAllowlist && (_jsx(InlineNotification, { kind: 'warning', lowContrast: true, hideCloseButton: true, title: ipAllowlistConflictTitle, subtitle: ipAllowlistConflictSubtitle })), secureConnectivityMutationError && (_jsx(InlineNotification, { kind: 'error', lowContrast: true, title: 'Activation failed', subtitle: secureConnectivityMutationError, onCloseButtonClick: () => setSecureConnectivityMutationError('') })), _jsxs(ProgressIndicator, { currentIndex: secureConnectivityModalStep, spaceEqually: true, onChange: setSecureConnectivityModalStep, children: [_jsx(ProgressStep, { label: 'Allowed principals' }, 'private-link-step-0'), _jsx(ProgressStep, { label: 'Supported regions' }, 'private-link-step-1')] }), (() => {
|
|
423
436
|
switch (secureConnectivityModalStep) {
|
|
424
437
|
case 0:
|
|
425
438
|
return renderAllowedPrincipalsEditor('activateModal');
|