@camunda/ccma-saas-frontend 0.0.34 → 0.0.36

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 (87) hide show
  1. package/lib/esm/assetUrls.d.ts +19 -0
  2. package/lib/esm/assetUrls.js +41 -0
  3. package/lib/esm/assets/ai.svg +14 -0
  4. package/lib/esm/assets/alerts.svg +5 -0
  5. package/lib/esm/assets/auditlogs.svg +9 -0
  6. package/lib/esm/assets/backup.svg +3 -0
  7. package/lib/esm/assets/clientApi.svg +10 -0
  8. package/lib/esm/assets/cluster.svg +4 -0
  9. package/lib/esm/assets/connectorSecret.svg +3 -0
  10. package/lib/esm/assets/consoleAPI.svg +3 -0
  11. package/lib/esm/assets/error.svg +11 -0
  12. package/lib/esm/assets/fatalError.svg +5 -0
  13. package/lib/esm/assets/ipwhitelist.svg +3 -0
  14. package/lib/esm/assets/monitoring.svg +6 -0
  15. package/lib/esm/assets/operatePreview.jpg +0 -0
  16. package/lib/esm/assets/optimizePreview.jpg +0 -0
  17. package/lib/esm/assets/secureConnectivity.svg +11 -0
  18. package/lib/esm/assets/tasklistPreview.jpg +0 -0
  19. package/lib/esm/assets/upgrade.svg +4 -0
  20. package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +2 -1
  21. package/lib/esm/components/c4-audit-log/c4-audit-log.js +2 -1
  22. package/lib/esm/components/c4-billing-page/elements/value-metric.js +3 -3
  23. package/lib/esm/components/c4-billing-page/elements/value-metric.spec.d.ts +1 -0
  24. package/lib/esm/components/c4-billing-page/elements/value-metric.spec.js +49 -0
  25. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +3 -2
  26. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
  27. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +3 -2
  28. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +3 -2
  29. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +3 -2
  30. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +5 -4
  31. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +2 -1
  32. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +10 -2
  33. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +4 -3
  34. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +48 -7
  35. package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.d.ts +1 -0
  36. package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.js +303 -0
  37. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +4 -0
  38. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.d.ts +3 -0
  39. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +41 -0
  40. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.types.d.ts +10 -0
  41. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.types.js +6 -0
  42. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -0
  43. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +5 -2
  44. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +1 -1
  45. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +2 -2
  46. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +6 -1
  47. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +4 -2
  48. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +1 -1
  49. package/lib/esm/components/c4-management-api/c4-management-api.js +2 -1
  50. package/lib/esm/components/c4-management-settings/c4-management-settings.js +2 -1
  51. package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.js +25 -2
  52. package/lib/esm/externalUrls.const.d.ts +90 -0
  53. package/lib/esm/externalUrls.const.js +191 -0
  54. package/lib/esm/externalUrls.const.spec.d.ts +1 -0
  55. package/lib/esm/externalUrls.const.spec.js +108 -0
  56. package/lib/esm/i18n/en/modals/clusterclients.json +3 -0
  57. package/lib/esm/i18n/en/pages/clusterdetails.json +4 -0
  58. package/lib/esm/i18n/en/pages/createcluster.json +4 -1
  59. package/lib/esm/index.d.ts +4 -0
  60. package/lib/esm/index.js +3 -0
  61. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +2 -1
  62. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.types.d.ts +2 -2
  63. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +53 -37
  64. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.permissions.spec.js +34 -1
  65. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +69 -38
  66. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +3 -3
  67. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.js +19 -0
  68. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +6 -0
  69. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +5 -5
  70. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +33 -41
  71. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.spec.js +64 -0
  72. package/lib/esm/widgets/clusters/c4-clusters-page.js +5 -3
  73. package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +37 -2
  74. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +1 -1
  75. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +2 -1
  76. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +26 -15
  77. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +1 -1
  78. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +8 -7
  79. package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +9 -8
  80. package/lib/esm/widgets/group-details/c4-group-details-page.js +2 -3
  81. package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +1 -1
  82. package/lib/esm/widgets/management/c4-management-app.js +116 -89
  83. package/lib/esm/widgets/management/c4-management-app.types.d.ts +16 -15
  84. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +3 -4
  85. package/lib/esm/widgets/user-details/c4-user-details-page.js +2 -3
  86. package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +1 -1
  87. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { ConsoleSecureConnectivityService } from '@camunda/ccma-api';
3
3
  import { isValidAwsArn, isValidPrivateLinkRegion, PRIVATE_LINK_REGIONS, SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT, SseEntity, } from '@camunda/ccma-shared-types';
4
- import { Button, ButtonSet, ComposedModal, Dropdown, InlineLoading, InlineNotification, Modal, ModalBody, ModalFooter, ModalHeader, ProgressIndicator, ProgressStep, Stack, StructuredListBody, StructuredListCell, StructuredListRow, StructuredListWrapper, TextInput, Tile, } from '@carbon/react';
4
+ import { Button, ButtonSet, ComposedModal, FilterableMultiSelect, InlineLoading, InlineNotification, Modal, ModalBody, ModalFooter, ModalHeader, ProgressIndicator, ProgressStep, Stack, StructuredListBody, StructuredListCell, StructuredListRow, StructuredListWrapper, TextInput, Tile, } from '@carbon/react';
5
5
  import { Checkmark, Close } from '@carbon/react/icons/index.esm.js';
6
6
  import { useCallback, useEffect, useRef, useState } from 'react';
7
7
  import { C4ClusterDetailsSecureConnectivity } from '../../../components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js';
@@ -68,9 +68,9 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
68
68
  const [secureConnectivityDeactivating, setSecureConnectivityDeactivating] = useState(false);
69
69
  const [secureConnectivityDeactivateOpen, setSecureConnectivityDeactivateOpen,] = useState(false);
70
70
  const [allowedPrincipalInput, setAllowedPrincipalInput] = useState('');
71
- const [allowedRegionInput, setAllowedRegionInput] = useState('');
72
71
  const [allowedPrincipals, setAllowedPrincipals] = useState([]);
73
72
  const [allowedRegions, setAllowedRegions] = useState([]);
73
+ const [showAllowedRegionsLimitReached, setShowAllowedRegionsLimitReached] = useState(false);
74
74
  const [showNoPrincipalsError, setShowNoPrincipalsError] = useState(false);
75
75
  const [showNoRegionsError, setShowNoRegionsError] = useState(false);
76
76
  const [secureConnectivityMutationBusy, setSecureConnectivityMutationBusy] = useState(false);
@@ -78,11 +78,9 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
78
78
  const hasTooManyAllowedPrincipals = allowedPrincipals.length > SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT;
79
79
  const hasTooManyAllowedRegions = allowedRegions.length > SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT;
80
80
  const hasReachedAllowedPrincipalsLimit = allowedPrincipals.length >= SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT;
81
- const hasReachedAllowedRegionsLimit = allowedRegions.length >= SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT;
82
81
  const showAllowedPrincipalsLimitError = hasTooManyAllowedPrincipals ||
83
82
  (hasReachedAllowedPrincipalsLimit && allowedPrincipalInput.length > 0);
84
- const showAllowedRegionsLimitError = hasTooManyAllowedRegions ||
85
- (hasReachedAllowedRegionsLimit && allowedRegionInput.length > 0);
83
+ const showAllowedRegionsLimitError = hasTooManyAllowedRegions || showAllowedRegionsLimitReached;
86
84
  const allowedPrincipalsLimitText = `Up to ${SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT} principals can be added.`;
87
85
  const allowedRegionsLimitText = `Up to ${SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT} regions can be added.`;
88
86
  const validateArn = (possibleArn) => {
@@ -156,48 +154,38 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
156
154
  }, children: _jsx("span", { style: { flexGrow: 1 }, children: "No principals added" }) }) }) })) }) })] }));
157
155
  };
158
156
  const renderAllowedRegionsEditor = () => {
159
- return (_jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 3, children: [_jsx("h4", { style: headingCompact01Style, children: "Supported regions for the endpoint service" }), _jsx("p", { style: { margin: 0 }, children: "Define the supported regions for endpoint connections that can connect to the service. Use of cross regions may incur extra costs." })] }), _jsxs("div", { style: {
160
- display: 'flex',
161
- flexDirection: 'row',
162
- gap: 'var(--cds-spacing-05)',
163
- alignItems: 'flex-start',
164
- }, children: [_jsx(Dropdown, { id: 'private-link-allowed-region-input', titleText: 'Region code', label: 'Select region', direction: 'top', autoAlign: true, invalidText: showAllowedRegionsLimitError
165
- ? allowedRegionsLimitText
166
- : showNoRegionsError
167
- ? 'At least one region must be added.'
168
- : 'Invalid region id', invalid: showAllowedRegionsLimitError ||
169
- (!!allowedRegionInput &&
170
- allowedRegions.includes(allowedRegionInput)) ||
171
- showNoRegionsError, selectedItem: allowedRegionInput, items: [...PRIVATE_LINK_REGIONS]
172
- .sort()
173
- .filter((region) => !allowedRegions.includes(region)), itemToString: (item) => item || '', onChange: (e) => {
174
- setShowNoRegionsError(false);
175
- setSecureConnectivityMutationError('');
176
- setAllowedRegionInput(e.selectedItem || '');
177
- }, style: { width: '100%' } }), _jsx(Button, { kind: 'tertiary', renderIcon: Checkmark, style: {
178
- paddingTop: '11px',
179
- height: '41px',
180
- minHeight: '0px',
181
- whiteSpace: 'nowrap',
182
- marginTop: 'var(--cds-spacing-06)',
183
- }, disabled: hasReachedAllowedRegionsLimit ||
184
- !allowedRegionInput ||
185
- allowedRegions.includes(allowedRegionInput), onClick: () => {
186
- setAllowedRegions([...allowedRegions, allowedRegionInput]);
187
- setAllowedRegionInput('');
188
- setShowNoRegionsError(false);
189
- setSecureConnectivityMutationError('');
190
- }, children: "Add region" })] }), _jsx("p", { style: {
157
+ const regionItems = [...PRIVATE_LINK_REGIONS]
158
+ .sort()
159
+ .map((region) => ({
160
+ id: region,
161
+ label: region,
162
+ }));
163
+ const selectedRegionItems = regionItems.filter((region) => allowedRegions.includes(region.id));
164
+ return (_jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 3, children: [_jsx("h4", { style: headingCompact01Style, children: "Supported regions for the endpoint service" }), _jsx("p", { style: { margin: 0 }, children: "Define the supported regions for endpoint connections that can connect to the service. Use of cross regions may incur extra costs." })] }), _jsx(FilterableMultiSelect, { id: 'private-link-allowed-region-input', titleText: 'Region code', placeholder: 'Select region', helperText: 'Search and select one or more AWS regions.', direction: 'top', autoAlign: true, items: regionItems, itemToString: (item) => item?.label ?? '', selectedItems: selectedRegionItems, invalidText: showAllowedRegionsLimitError
165
+ ? allowedRegionsLimitText
166
+ : showNoRegionsError
167
+ ? 'At least one region must be added.'
168
+ : 'Invalid region id', invalid: showAllowedRegionsLimitError || showNoRegionsError, onChange: (e) => {
169
+ const nextAllowedRegions = (e.selectedItems ?? [])
170
+ .filter((region) => typeof region?.id === 'string')
171
+ .map((region) => region.id);
172
+ setShowNoRegionsError(false);
173
+ setShowAllowedRegionsLimitReached(nextAllowedRegions.length >
174
+ SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT);
175
+ setSecureConnectivityMutationError('');
176
+ setAllowedRegions(nextAllowedRegions.slice(0, SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT));
177
+ } }), _jsx("p", { style: {
191
178
  margin: 0,
192
179
  fontSize: '0.875rem',
193
180
  fontWeight: 600,
194
181
  color: 'var(--cds-text-secondary)',
195
- }, children: "Regions" }), _jsx(StructuredListWrapper, { isCondensed: true, isFlush: true, children: _jsx(StructuredListBody, { children: allowedRegions.length > 0 ? (allowedRegions.map((region) => (_jsx(StructuredListRow, { children: _jsx(StructuredListCell, { children: _jsxs("div", { style: {
182
+ }, children: "Selected regions" }), _jsx(StructuredListWrapper, { isCondensed: true, isFlush: true, children: _jsx(StructuredListBody, { children: allowedRegions.length > 0 ? (allowedRegions.map((region) => (_jsx(StructuredListRow, { children: _jsx(StructuredListCell, { children: _jsxs("div", { style: {
196
183
  display: 'flex',
197
184
  alignItems: 'center',
198
185
  justifyContent: 'space-between',
199
186
  gap: 'var(--cds-spacing-05)',
200
187
  }, children: [_jsx("span", { style: { flexGrow: 1 }, children: region }), _jsx(Button, { kind: 'ghost', size: 'sm', hasIconOnly: true, renderIcon: Close, iconDescription: 'Remove region', onClick: () => {
188
+ setShowAllowedRegionsLimitReached(false);
201
189
  setSecureConnectivityMutationError('');
202
190
  setAllowedRegions(allowedRegions.filter((item) => item !== region));
203
191
  } })] }) }) }, region)))) : (_jsx(StructuredListRow, { children: _jsx(StructuredListCell, { children: _jsx("div", { style: {
@@ -286,9 +274,9 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
286
274
  })();
287
275
  const resetSecureConnectivityForm = useCallback(() => {
288
276
  setAllowedPrincipalInput('');
289
- setAllowedRegionInput('');
290
277
  setAllowedPrincipals([]);
291
278
  setAllowedRegions([]);
279
+ setShowAllowedRegionsLimitReached(false);
292
280
  setShowNoPrincipalsError(false);
293
281
  setShowNoRegionsError(false);
294
282
  setSecureConnectivityMutationError('');
@@ -298,9 +286,9 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
298
286
  }, [defaultClusterRegion]);
299
287
  const loadExistingSecureConnectivityValues = useCallback(() => {
300
288
  setAllowedPrincipalInput('');
301
- setAllowedRegionInput('');
302
289
  setAllowedPrincipals(secureConnectivityStatus?.spec.allowedPrincipals ?? []);
303
290
  const regionsFromStatus = secureConnectivityStatus?.spec.allowedRegions ?? [];
291
+ setShowAllowedRegionsLimitReached(false);
304
292
  setAllowedRegions(regionsFromStatus.length ? regionsFromStatus : getDefaultAllowedRegions());
305
293
  setShowNoPrincipalsError(false);
306
294
  setShowNoRegionsError(false);
@@ -351,6 +339,10 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
351
339
  : safeTranslate(t, 'clusterdetails:secureConnectivity.updatePrincipalsModalHeading', 'Edit allowed principals');
352
340
  const updateModalErrorTitle = safeTranslate(t, 'clusterdetails:secureConnectivity.updateModalErrorTitle', 'Update failed');
353
341
  const updateModalSaveLabel = safeTranslate(t, 'clusterdetails:secureConnectivity.updateModalSave', 'Save changes');
342
+ const isUpdateModalSaveDisabled = secureConnectivityMutationBusy ||
343
+ (secureConnectivityEditMode === 'principals' &&
344
+ hasTooManyAllowedPrincipals) ||
345
+ (secureConnectivityEditMode === 'regions' && hasTooManyAllowedRegions);
354
346
  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] }));
355
347
  return (_jsxs(_Fragment, { children: [_jsx(C4ClusterDetailsSecureConnectivity, { status: secureConnectivityStatus, privateEndpoints: privateEndpoints, connectInAwsUrl: 'https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html', isLoading: isSecureConnectivityLoadingVisible, isDeactivating: secureConnectivityDeactivating, text: {
356
348
  title: safeTranslate(t, 'clusterdetails:secureConnectivity.title', 'Private networking'),
@@ -519,7 +511,7 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
519
511
  return true;
520
512
  }, children: [_jsx(ModalHeader, { title: updateModalTitle }), _jsx(ModalBody, { hasForm: true, children: _jsxs(Stack, { gap: 6, children: [secureConnectivityMutationError && (_jsx(InlineNotification, { kind: 'error', lowContrast: true, title: updateModalErrorTitle, subtitle: secureConnectivityMutationError, onCloseButtonClick: () => setSecureConnectivityMutationError('') })), secureConnectivityEditMode === 'regions'
521
513
  ? renderAllowedRegionsEditor()
522
- : renderAllowedPrincipalsEditor('updateModal')] }) }), _jsx(ModalFooter, { children: _jsxs(ButtonSet, { style: { width: '100%' }, children: [_jsx(Button, { kind: 'secondary', disabled: secureConnectivityMutationBusy, onClick: closeUpdateModal, size: 'xl', style: { flex: 1, maxInlineSize: '100%' }, children: "Cancel" }), _jsx(Button, { kind: 'primary', disabled: secureConnectivityMutationBusy, onClick: () => {
514
+ : renderAllowedPrincipalsEditor('updateModal')] }) }), _jsx(ModalFooter, { children: _jsxs(ButtonSet, { style: { width: '100%' }, children: [_jsx(Button, { kind: 'secondary', disabled: secureConnectivityMutationBusy, onClick: closeUpdateModal, size: 'xl', style: { flex: 1, maxInlineSize: '100%' }, children: "Cancel" }), _jsx(Button, { kind: 'primary', disabled: isUpdateModalSaveDisabled, onClick: () => {
523
515
  if (secureConnectivityEditMode === 'principals') {
524
516
  if (hasTooManyAllowedPrincipals) {
525
517
  setSecureConnectivityMutationError(allowedPrincipalsLimitText);
@@ -243,10 +243,74 @@ describe('C4ClusterDetailsSecureConnectivityTab telemetry', () => {
243
243
  expect(screen.getByRole('button', { name: 'Edit supported regions' })).toBeInTheDocument();
244
244
  });
245
245
  await userEvent.click(screen.getByRole('button', { name: 'Edit supported regions' }));
246
+ expect(screen.getByRole('button', { name: 'Save changes' })).toBeDisabled();
246
247
  await userEvent.click(screen.getByRole('button', { name: 'Save changes' }));
247
248
  expect(ConsoleSecureConnectivityService.update).not.toHaveBeenCalled();
248
249
  expect(screen.getAllByText(`Up to ${SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT} regions can be added.`).length).toBeGreaterThan(0);
249
250
  });
251
+ it('allows selecting an additional region in the update modal', async () => {
252
+ vi.mocked(ConsoleSecureConnectivityService.getStatus).mockResolvedValue({
253
+ metadata: { namespace: 'ns' },
254
+ spec: {
255
+ allowedPrincipals: ['arn:aws:iam::123456789012:role/test'],
256
+ allowedRegions: ['us-east-1'],
257
+ },
258
+ status: {
259
+ endpointConnectionCount: 0,
260
+ endpointConnections: [],
261
+ conditions: [{ type: 'Ready', status: 'True' }],
262
+ },
263
+ });
264
+ vi.mocked(ConsoleSecureConnectivityService.update).mockResolvedValue(undefined);
265
+ renderTab();
266
+ await userEvent.click(await screen.findByRole('button', { name: 'Edit supported regions' }));
267
+ await userEvent.click(screen.getByRole('button', { name: 'Open' }));
268
+ await userEvent.click(await screen.findByText('eu-central-1'));
269
+ await userEvent.click(screen.getByRole('button', { name: 'Save changes' }));
270
+ await waitFor(() => {
271
+ expect(ConsoleSecureConnectivityService.update).toHaveBeenCalledWith(expect.objectContaining({
272
+ body: expect.objectContaining({
273
+ allowedPrincipals: ['arn:aws:iam::123456789012:role/test'],
274
+ allowedRegions: ['us-east-1', 'eu-central-1'],
275
+ }),
276
+ }));
277
+ });
278
+ });
279
+ it('caps region selection at the limit when choosing more than the allowed number', async () => {
280
+ const allowedRegionsAtLimit = PRIVATE_LINK_REGIONS.slice(0, SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT);
281
+ const extraRegion = PRIVATE_LINK_REGIONS.at(SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT);
282
+ if (!extraRegion) {
283
+ throw new Error('Expected an extra region beyond the configured limit');
284
+ }
285
+ vi.mocked(ConsoleSecureConnectivityService.getStatus).mockResolvedValue({
286
+ metadata: { namespace: 'ns' },
287
+ spec: {
288
+ allowedPrincipals: ['arn:aws:iam::123456789012:role/test'],
289
+ allowedRegions: allowedRegionsAtLimit,
290
+ },
291
+ status: {
292
+ endpointConnectionCount: 0,
293
+ endpointConnections: [],
294
+ conditions: [{ type: 'Ready', status: 'True' }],
295
+ },
296
+ });
297
+ vi.mocked(ConsoleSecureConnectivityService.update).mockResolvedValue(undefined);
298
+ renderTab();
299
+ await userEvent.click(await screen.findByRole('button', { name: 'Edit supported regions' }));
300
+ await userEvent.click(screen.getByRole('button', { name: 'Open' }));
301
+ await userEvent.click(await screen.findByText(extraRegion));
302
+ expect(screen.getAllByText(`Up to ${SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT} regions can be added.`).length).toBeGreaterThan(0);
303
+ expect(screen.queryAllByText(extraRegion)).toHaveLength(1);
304
+ await userEvent.click(screen.getByRole('button', { name: 'Save changes' }));
305
+ await waitFor(() => {
306
+ expect(ConsoleSecureConnectivityService.update).toHaveBeenCalledWith(expect.objectContaining({
307
+ body: expect.objectContaining({
308
+ allowedPrincipals: ['arn:aws:iam::123456789012:role/test'],
309
+ allowedRegions: allowedRegionsAtLimit,
310
+ }),
311
+ }));
312
+ });
313
+ });
250
314
  it('reloads status when the tab becomes active again after being inactive', async () => {
251
315
  vi.mocked(ConsoleSecureConnectivityService.getStatus)
252
316
  .mockResolvedValueOnce({
@@ -6,6 +6,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
6
6
  import { C4ClusterList } from '../../components/c4-cluster-list/c4-cluster-list.js';
7
7
  import { C4ClustersEmptyState } from '../../components/c4-clusters-empty-state/c4-clusters-empty-state.js';
8
8
  import { C4ClustersTrialNotification } from '../../components/c4-clusters-trial-notification/c4-clusters-trial-notification.js';
9
+ import { getC4ClustersGettingStartedHref } from '../../externalUrls.const.js';
9
10
  import { useC4ConsoleAuthz } from '../../runtime/c4-console-authz.js';
10
11
  import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
11
12
  import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
@@ -209,6 +210,7 @@ function mergePermissions(base, override) {
209
210
  return { ...base, ...override };
210
211
  }
211
212
  export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate, translations, permissionsOverride, clusterCapMessage, isClusterPaused: isClusterPausedOverride, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride, onRequestAssignTag, onRequestDeleteCluster, onRequestWakeCluster, }) => {
213
+ const resolvedGettingStartedHref = useMemo(() => getC4ClustersGettingStartedHref(gettingStartedHref), [gettingStartedHref]);
212
214
  const runtime = useC4ConsoleRuntime();
213
215
  const data = useC4ConsoleData();
214
216
  const authz = useC4ConsoleAuthz({ orgId });
@@ -526,7 +528,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
526
528
  }
527
529
  if (trialState.isTrial && trialState.trialStateExpired) {
528
530
  const variant = isOrgAdmin ? 'trialExpiredAdmin' : 'trialExpiredMember';
529
- return (_jsx(C4ClustersEmptyState, { variant: variant, docsHref: gettingStartedHref, onUpgrade: isOrgAdmin ? () => openUrlInNewTab(contactUrl) : undefined, texts: {
531
+ return (_jsx(C4ClustersEmptyState, { variant: variant, docsHref: resolvedGettingStartedHref, onUpgrade: isOrgAdmin ? () => openUrlInNewTab(contactUrl) : undefined, texts: {
530
532
  noClusters: {
531
533
  heading: safeTranslate('c4console:clusters.emptyState.noClusters.heading', 'Processes run on clusters'),
532
534
  description: safeTranslate('c4console:clusters.emptyState.noClusters.description', 'Create a cluster to get started.'),
@@ -547,7 +549,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
547
549
  const createButtonLabel = safeTranslate('c4console:clusters.emptyState.noClusters.createButtonLabel', 'Create new cluster');
548
550
  const descriptionPrefix = safeTranslate('c4console:clusters.emptyState.noClusters.descriptionPrefix', 'Click ');
549
551
  const descriptionSuffix = safeTranslate('c4console:clusters.emptyState.noClusters.descriptionSuffix', ' to have a place to execute your processes');
550
- return (_jsx(C4ClustersEmptyState, { variant: 'noClusters', docsHref: gettingStartedHref, onCreateCluster: derivedPermissions.canCreateCluster
552
+ return (_jsx(C4ClustersEmptyState, { variant: 'noClusters', docsHref: resolvedGettingStartedHref, onCreateCluster: derivedPermissions.canCreateCluster
551
553
  ? () => handleNavigate(urls.createCluster)
552
554
  : undefined, createClusterButtonDisabled: derivedPermissions.createClusterButtonDisabled, texts: {
553
555
  noClusters: {
@@ -569,7 +571,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
569
571
  contactUrl,
570
572
  derivedPermissions.canCreateCluster,
571
573
  derivedPermissions.createClusterButtonDisabled,
572
- gettingStartedHref,
574
+ resolvedGettingStartedHref,
573
575
  handleNavigate,
574
576
  isLoading,
575
577
  isOrgAdmin,
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /*
3
3
  * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
4
  * under one or more contributor license agreements. Licensed under a commercial license.
@@ -11,6 +11,7 @@ import { C4ConsoleDataProvider } from '../../runtime/c4-console-data-context.js'
11
11
  import { C4ConsoleRuntimeProvider } from '../../runtime/c4-console-runtime-context.js';
12
12
  import { C4ClustersPage } from './c4-clusters-page.js';
13
13
  let lastClusterListProps;
14
+ let lastClustersEmptyStateProps;
14
15
  vi.mock('@camunda/ccma-api', async () => {
15
16
  const actual = await vi.importActual('@camunda/ccma-api');
16
17
  return {
@@ -60,13 +61,22 @@ vi.mock('../../components/c4-cluster-list/c4-cluster-list', () => {
60
61
  return {
61
62
  C4ClusterList: (props) => {
62
63
  lastClusterListProps = props;
63
- return _jsx("div", { "data-testid": 'C4ClusterList' });
64
+ return (_jsxs(_Fragment, { children: [_jsx("div", { "data-testid": 'C4ClusterList' }), props.emptyStateContent] }));
65
+ },
66
+ };
67
+ });
68
+ vi.mock('../../components/c4-clusters-empty-state/c4-clusters-empty-state', () => {
69
+ return {
70
+ C4ClustersEmptyState: (props) => {
71
+ lastClustersEmptyStateProps = props;
72
+ return _jsx("div", { "data-testid": 'C4ClustersEmptyState' });
64
73
  },
65
74
  };
66
75
  });
67
76
  describe('C4ClustersPage', () => {
68
77
  beforeEach(() => {
69
78
  lastClusterListProps = undefined;
79
+ lastClustersEmptyStateProps = undefined;
70
80
  vi.mocked(ConsoleClusterService.getClusters).mockReset();
71
81
  vi.mocked(HdpService.getClusterCapacity).mockReset();
72
82
  vi.mocked(OrgsService.getOrgInfo).mockReset();
@@ -162,4 +172,29 @@ describe('C4ClustersPage', () => {
162
172
  });
163
173
  expect(lastClusterListProps?.permissions.canCreateCluster).toBe(false);
164
174
  });
175
+ it('falls back to the default getting started href for blank values', async () => {
176
+ vi.mocked(ConsoleClusterService.getClusters).mockResolvedValue([]);
177
+ vi.mocked(HdpService.getClusterCapacity).mockResolvedValue([]);
178
+ vi.mocked(OrgsService.getOrgInfo).mockResolvedValue({
179
+ uuid: 'org-1',
180
+ organizationToSalesPlan: {
181
+ trialStateExpired: false,
182
+ salesPlan: {
183
+ salesPlanType: 'trial',
184
+ },
185
+ trialExpirationDate: new Date(Date.now() + 10 * 24 * 60 * 60 * 1000).toISOString(),
186
+ },
187
+ });
188
+ render(_jsx(C4ConsoleRuntimeProvider, { config: {
189
+ stage: 'dev',
190
+ auth: {
191
+ getAccessToken: async () => 'token',
192
+ },
193
+ backendUrls: {},
194
+ }, children: _jsx(C4ConsoleDataProvider, { children: _jsx(C4ClustersPage, { orgId: 'org-1', gettingStartedHref: ' ' }) }) }));
195
+ await waitFor(() => {
196
+ expect(lastClustersEmptyStateProps?.variant).toBe('noClusters');
197
+ });
198
+ expect(lastClustersEmptyStateProps?.docsHref).toBe('https://docs.camunda.io/docs/guides/');
199
+ });
165
200
  });
@@ -36,7 +36,7 @@ export interface C4ClustersPageTranslations {
36
36
  }
37
37
  export interface C4ClustersPageProps {
38
38
  orgId: string;
39
- gettingStartedHref: string;
39
+ gettingStartedHref?: string;
40
40
  onNavigate?: (event: C4ClustersNavigateEvent) => void;
41
41
  translations?: C4ClustersPageTranslations;
42
42
  permissionsOverride?: Partial<ClusterListPermissions>;
@@ -7,6 +7,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
7
7
  import { C4ConnectorsContextProvider } from '@camunda/c4-connectors';
8
8
  import { C3EmptyState } from '@camunda/camunda-composite-components';
9
9
  import { useEffect, useMemo, useState } from 'react';
10
+ import { C4_ASSET_URLS } from '../../assetUrls.js';
10
11
  import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
11
12
  import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
12
13
  function isRecord(value) {
@@ -84,7 +85,7 @@ export const C4ConnectorManagementErrorBoundaryFallback = () => {
84
85
  const runtime = useC4ConsoleRuntime();
85
86
  const t = runtime.i18n?.t;
86
87
  return (_jsx(C3EmptyState, { icon: {
87
- path: `/assets/fatalError.svg`,
88
+ path: C4_ASSET_URLS.fatalErrorIcon,
88
89
  altText: 'errorIcon',
89
90
  }, heading: safeTranslate(t, 'connectormanagement:error-boundary-fallback.title', 'Error'), description: safeTranslate(t, 'connectormanagement:error-boundary-fallback.description', 'An error occurred while rendering this page. Please try again later.'), button: {
90
91
  onClick: () => (window.location.href = window.location.origin),
@@ -11,6 +11,7 @@ import { observer } from 'mobx-react-lite';
11
11
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
12
12
  import { C4CreateCluster } from '../../components/c4-create-cluster/c4-create-cluster.js';
13
13
  import { C4PageTemplate } from '../../components/c4-page-template/c4-page-template.js';
14
+ import { getC4CreateClusterExternalLinks, getC4TalkToAnExpertUrl, } from '../../externalUrls.const.js';
14
15
  import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
15
16
  import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
16
17
  import { toApiConfig } from '../../runtime/to-api-config.js';
@@ -165,16 +166,7 @@ function sendNavigate(onNavigate, event) {
165
166
  onNavigate?.(event);
166
167
  }
167
168
  function resolveExternalLinks(input) {
168
- if (!input) {
169
- throw new Error('C4CreateClusterPage: externalLinks prop is required but was not provided');
170
- }
171
- return {
172
- docsEncryption: input.docsEncryption,
173
- docsByok: input.docsByok,
174
- docsAutopause: input.docsAutopause,
175
- docsTasklistApiVersions: input.docsTasklistApiVersions,
176
- identityAuthorizations: input.identityAuthorizations,
177
- };
169
+ return getC4CreateClusterExternalLinks(input);
178
170
  }
179
171
  function buildCreateClusterTranslations(t) {
180
172
  const translate = (key, fallback) => {
@@ -210,6 +202,9 @@ function buildCreateClusterTranslations(t) {
210
202
  backupRegionTitle: translate('createcluster:form.backupRegion.title', 'Backup location'),
211
203
  backupRegionDescription: translate('createcluster:form.backupRegion.description', 'Choose single region to keep your data in one place, or select dual region for higher redundancy across geographically dispersed locations, ensuring better protection against local disruptions.'),
212
204
  generationTitle: translate('createcluster:form.generation.title', 'Channel'),
205
+ olderGenerationsLabel: translate('createcluster:form.generation.olderGenerationsLabel', 'View older generations'),
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 older generations that have been unlocked for your organization.'),
213
208
  autoUpdateTitle: translate('createcluster:form.autoUpdate.title', 'Automatic cluster patch updates'),
214
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.'),
215
210
  autoUpdateDescriptionIfDisabled: translate('createcluster:form.autoUpdate.descriptionIfDisabled', 'Only available for generations in the stable channel.'),
@@ -244,6 +239,11 @@ function buildCreateClusterTranslations(t) {
244
239
  export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkToAnExpertUrl, externalLinks, visibilities, onNavigate, }) => {
245
240
  const runtime = useC4ConsoleRuntime();
246
241
  const data = useC4ConsoleData();
242
+ const resolvedTalkToAnExpertUrl = useMemo(() => talkToAnExpertUrl ??
243
+ getC4TalkToAnExpertUrl({
244
+ email: runtime.user?.email,
245
+ utm_content: 'clusters',
246
+ }), [runtime.user?.email, talkToAnExpertUrl]);
247
247
  const apiConfig = useMemo(() => {
248
248
  return toApiConfig(runtime);
249
249
  }, [runtime]);
@@ -498,11 +498,18 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
498
498
  'defaultGeneration',
499
499
  'uuid',
500
500
  ]);
501
+ const rawClassification = getString(generation, 'classification');
502
+ const classification = rawClassification === 'channel' ||
503
+ rawClassification === 'existingCluster' ||
504
+ rawClassification === 'orgUnlocked'
505
+ ? rawClassification
506
+ : undefined;
501
507
  return {
502
508
  title: getString(generation, 'name') ?? generationUuid,
503
509
  default: defaultGenerationUuid === generationUuid,
504
510
  uuid: generationUuid,
505
511
  version: getPathString(generation, ['versions', 'zeebe']),
512
+ ...(classification ? { classification } : {}),
506
513
  };
507
514
  })
508
515
  : [];
@@ -704,8 +711,9 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
704
711
  title: translations.regionTitle,
705
712
  backupRegionTitle: translations.backupRegionTitle,
706
713
  dualRegionBackups,
707
- description: (_jsxs(_Fragment, { children: [translations.regionDescription, displayedSalesPlan !== 'Enterprise' && talkToAnExpertUrl ? (_jsxs(_Fragment, { children: [_jsx("br", {}), renderLinkPlaceholder(translations.regionTeaseForEnterprise, {
708
- href: talkToAnExpertUrl,
714
+ description: (_jsxs(_Fragment, { children: [translations.regionDescription, displayedSalesPlan !== 'Enterprise' &&
715
+ resolvedTalkToAnExpertUrl ? (_jsxs(_Fragment, { children: [_jsx("br", {}), renderLinkPlaceholder(translations.regionTeaseForEnterprise, {
716
+ href: resolvedTalkToAnExpertUrl,
709
717
  labelFallback: translations.ctaHelpLabel,
710
718
  onClick: () => {
711
719
  runtime.telemetry?.track?.('createCluster:contactUs', {
@@ -721,6 +729,9 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
721
729
  generation: {
722
730
  title: translations.generationTitle,
723
731
  channels: channelsWithGenerations,
732
+ olderGenerationsLabel: translations.olderGenerationsLabel,
733
+ olderGenerationsHelperText: translations.olderGenerationsHelperText,
734
+ orgUnlockedGenerationsHelperText: translations.orgUnlockedGenerationsHelperText,
724
735
  },
725
736
  autoUpdate: {
726
737
  title: translations.autoUpdateTitle,
@@ -785,11 +796,11 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
785
796
  label: translations.ctaCancel,
786
797
  onClick: cancel,
787
798
  },
788
- help: talkToAnExpertUrl
799
+ help: resolvedTalkToAnExpertUrl
789
800
  ? {
790
801
  prefix: translations.ctaHelpPrefix,
791
802
  label: translations.ctaHelpLabel,
792
- href: talkToAnExpertUrl,
803
+ href: resolvedTalkToAnExpertUrl,
793
804
  }
794
805
  : undefined,
795
806
  },
@@ -817,7 +828,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
817
828
  planTypes,
818
829
  dualRegionBackups,
819
830
  displayedSalesPlan,
820
- talkToAnExpertUrl,
831
+ resolvedTalkToAnExpertUrl,
821
832
  runtime.telemetry,
822
833
  orgId,
823
834
  orgIdSubjectToSleep,
@@ -25,7 +25,7 @@ export interface C4CreateClusterPageProps {
25
25
  orgId: string;
26
26
  afterCreateModalUrl?: string;
27
27
  talkToAnExpertUrl?: string;
28
- externalLinks: C4CreateClusterExternalLinks;
28
+ externalLinks?: C4CreateClusterExternalLinks;
29
29
  visibilities?: unknown;
30
30
  onNavigate?: (event: C4CreateClusterNavigateEvent) => void;
31
31
  }
@@ -4,6 +4,7 @@ import { useCallback, useEffect, useMemo } from 'react';
4
4
  import { getClusterLoadConfig } from '../../components/c4-cluster-overview/c4-cluster-overview.js';
5
5
  import { C4ConsoleDashboard } from '../../components/c4-console-dashboard/c4-console-dashboard.js';
6
6
  import { C4OldDashboard } from '../../components/c4-old-dashboard/c4-old-dashboard.js';
7
+ import { getC4DashboardUrls } from '../../externalUrls.const.js';
7
8
  import { useC4ConsoleAuthz } from '../../runtime/c4-console-authz.js';
8
9
  import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
9
10
  const DAY = 24 * 60 * 60 * 1000;
@@ -58,6 +59,7 @@ export const C4DashboardApp = observer((props) => {
58
59
  const { orgId, t, onNavigate, urls, billing, theme = 'white' } = props;
59
60
  const authz = useC4ConsoleAuthz({ orgId });
60
61
  const data = useC4ConsoleData();
62
+ const externalUrls = useMemo(() => getC4DashboardUrls({ orgId, overrides: urls }), [orgId, urls]);
61
63
  const { fetchClusters, fetchMembers, fetchAudits, fetchClusterCapacity, getClusters, } = data;
62
64
  const orgInfo = data.getOrgInfo(orgId);
63
65
  // Permissions derived from orgInfo. If orgInfo isn't loaded yet, default to
@@ -203,18 +205,17 @@ export const C4DashboardApp = observer((props) => {
203
205
  {
204
206
  iconName: 'SoftwareResourceCluster',
205
207
  text: safeTranslate(t, 'dashboard:sections.quickLinks.links.intro', 'Introduction to Console'),
206
- to: urls?.docs?.introToConsole ||
207
- 'https://docs.camunda.io/docs/components/console/introduction-to-console/',
208
+ to: externalUrls.docs.introToConsole,
208
209
  },
209
210
  {
210
211
  iconName: 'Document',
211
212
  text: safeTranslate(t, 'dashboard:sections.quickLinks.links.docs', 'Guides'),
212
- to: urls?.docs?.guides || 'https://docs.camunda.io/docs/guides/',
213
+ to: externalUrls.docs.guides,
213
214
  },
214
215
  {
215
216
  iconName: 'FlowConnection',
216
217
  text: safeTranslate(t, 'dashboard:sections.quickLinks.links.modeller', 'Web Modeler'),
217
- to: urls?.modeler || `/org/${orgId}`,
218
+ to: externalUrls.modeler,
218
219
  },
219
220
  ];
220
221
  // Permissions
@@ -247,19 +248,19 @@ export const C4DashboardApp = observer((props) => {
247
248
  showMembersLink: true,
248
249
  }, actions: {
249
250
  onModelProcess: () => {
250
- const modelerUrl = urls?.modeler;
251
+ const modelerUrl = externalUrls.modeler;
251
252
  if (modelerUrl) {
252
253
  onNavigate?.({ kind: 'openUrl', url: modelerUrl });
253
254
  }
254
255
  },
255
256
  onGettingStartedGuide: () => {
256
- const guideUrl = urls?.docs?.guides;
257
+ const guideUrl = externalUrls.docs.guides;
257
258
  if (guideUrl) {
258
259
  onNavigate?.({ kind: 'openUrl', url: guideUrl });
259
260
  }
260
261
  },
261
262
  onWatchDemo: () => {
262
- const demoUrl = urls?.academyDemo;
263
+ const demoUrl = externalUrls.academyDemo;
263
264
  if (demoUrl) {
264
265
  onNavigate?.({ kind: 'openUrl', url: demoUrl });
265
266
  }
@@ -15,14 +15,7 @@ export interface C4DashboardAppProps {
15
15
  /**
16
16
  * URLs for documentation and external links
17
17
  */
18
- urls: {
19
- docs: {
20
- introToConsole: string;
21
- guides: string;
22
- };
23
- modeler: string;
24
- academyDemo: string;
25
- };
18
+ urls?: C4DashboardUrls;
26
19
  /**
27
20
  * Optional billing/metrics data
28
21
  * If not provided, the widget will use fallback values
@@ -49,6 +42,14 @@ export interface C4DashboardAppProps {
49
42
  */
50
43
  theme?: 'white' | 'g10' | 'g90' | 'g100';
51
44
  }
45
+ export interface C4DashboardUrls {
46
+ docs?: {
47
+ introToConsole?: string;
48
+ guides?: string;
49
+ };
50
+ modeler?: string;
51
+ academyDemo?: string;
52
+ }
52
53
  export type C4DashboardNavigateEvent = {
53
54
  kind: 'users';
54
55
  orgId: string;
@@ -9,6 +9,7 @@ import { OrganizationRole } from '@camunda/ccma-shared-types';
9
9
  import { observer } from 'mobx-react-lite';
10
10
  import { useEffect, useMemo, useState } from 'react';
11
11
  import { C4PageTemplate } from '../../components/c4-page-template/c4-page-template.js';
12
+ import { getC4GroupDetailsExternalLinks } from '../../externalUrls.const.js';
12
13
  import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
13
14
  import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
14
15
  import { toIdentityApiBaseUrl } from '../../runtime/to-identity-api-base-url.js';
@@ -38,9 +39,7 @@ function sendNavigate(onNavigate, event) {
38
39
  onNavigate?.(event);
39
40
  }
40
41
  function resolveLinks(links) {
41
- return {
42
- docsUrl: links?.docsUrl ?? 'https://docs.camunda.io',
43
- };
42
+ return getC4GroupDetailsExternalLinks(links);
44
43
  }
45
44
  export const C4GroupDetailsPage = observer(({ orgId, groupId, externalLinks, visibilities, onNavigate, }) => {
46
45
  const runtime = useC4ConsoleRuntime();
@@ -11,7 +11,7 @@ export interface C4GroupDetailsExternalLinks {
11
11
  export interface C4GroupDetailsPageProps {
12
12
  orgId: string;
13
13
  groupId: string;
14
- externalLinks: C4GroupDetailsExternalLinks;
14
+ externalLinks?: C4GroupDetailsExternalLinks;
15
15
  visibilities?: unknown;
16
16
  onNavigate?: (event: C4GroupDetailsNavigateEvent) => void;
17
17
  }