@camunda/ccma-saas-frontend 0.11.0 → 0.12.0

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/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  2. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +24 -2
  3. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +9 -0
  4. package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +9 -1
  5. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +5 -5
  6. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +3 -3
  7. package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.js +1 -11
  8. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +1 -14
  9. package/lib/esm/components/c4-create-cluster/c4-create-cluster.d.ts +1 -1
  10. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +188 -71
  11. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +52 -0
  12. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +1 -11
  13. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +6 -13
  14. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +1 -11
  15. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +1 -18
  16. package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +1 -11
  17. package/lib/esm/components/c4-delete-account-modal/c4-delete-account-modal.d.ts +0 -7
  18. package/lib/esm/components/c4-delete-account-modal/c4-delete-account-modal.js +1 -24
  19. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +1 -18
  20. package/lib/esm/components/c4-divider/c4-divider.js +12 -0
  21. package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +8 -0
  22. package/lib/esm/components/c4-empty-state/c4-empty-state.js +32 -8
  23. package/lib/esm/components/c4-file-uploader/c4-file-uploader.d.ts +36 -0
  24. package/lib/esm/components/c4-file-uploader/c4-file-uploader.js +43 -0
  25. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +1 -11
  26. package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +1 -11
  27. package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +1 -11
  28. package/lib/esm/components/c4-segmented-control/c4-segmented-control.d.ts +46 -0
  29. package/lib/esm/components/c4-segmented-control/c4-segmented-control.js +117 -0
  30. package/lib/esm/externalUrls.const.d.ts +7 -0
  31. package/lib/esm/externalUrls.const.js +11 -1
  32. package/lib/esm/i18n/c4-console-i18n.js +3 -0
  33. package/lib/esm/i18n/en/modals/apiclients.json +2 -1
  34. package/lib/esm/i18n/en/modals/clusterclients.json +2 -1
  35. package/lib/esm/i18n/en/pages/clusterdetails.json +11 -1
  36. package/lib/esm/i18n/en/pages/createcluster.json +43 -0
  37. package/lib/esm/i18n/en/pages/orgmanagement.json +3 -0
  38. package/lib/esm/index.d.ts +2 -0
  39. package/lib/esm/index.js +2 -0
  40. package/lib/esm/runtime/cluster-duplication.d.ts +10 -0
  41. package/lib/esm/runtime/cluster-duplication.js +15 -0
  42. package/lib/esm/ui/c4-password-input.js +1 -1
  43. package/lib/esm/ui/index.d.ts +1 -0
  44. package/lib/esm/ui/index.js +16 -2
  45. package/lib/esm/utils/role-labels.d.ts +1 -2
  46. package/lib/esm/utils/role-labels.js +1 -13
  47. package/lib/esm/utils/safe-translate.d.ts +4 -2
  48. package/lib/esm/utils/safe-translate.js +9 -2
  49. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +2 -12
  50. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +34 -23
  51. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +6 -0
  52. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +7 -0
  53. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +3 -0
  54. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-activity-tab.js +1 -19
  55. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +1 -14
  56. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +1 -18
  57. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +1 -1
  58. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +1 -0
  59. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +77 -28
  60. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +1 -6
  61. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +1 -18
  62. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +1 -19
  63. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +1 -6
  64. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +1 -16
  65. package/lib/esm/widgets/clusters/c4-clusters-page.js +72 -100
  66. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +7 -0
  67. package/lib/esm/widgets/connector-management/c4-connector-management-page.js +1 -9
  68. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +1 -9
  69. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +88 -1
  70. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +285 -45
  71. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +9 -0
  72. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +1 -18
  73. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +1 -1
  74. package/lib/esm/widgets/group-details/c4-group-details-page.js +1 -9
  75. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +1 -0
  76. package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +4 -34
  77. package/lib/esm/widgets/management/c4-management-app.js +1 -20
  78. package/lib/esm/widgets/management/c4-management-page.js +1 -9
  79. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +1 -13
  80. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -9
  81. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +1 -13
  82. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -8
  83. package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +1 -24
  84. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +1 -13
  85. package/lib/esm/widgets/user-account/c4-delete-account-widget.js +2 -1
  86. package/lib/esm/widgets/user-details/c4-user-details-page.js +1 -9
  87. package/package.json +3 -3
@@ -138,7 +138,8 @@
138
138
  "memberScopes": "Member Scopes",
139
139
  "createdAt": "Created at",
140
140
  "createdBy": "Created by",
141
- "lastUsed": "Last used"
141
+ "lastUsed": "Last used",
142
+ "activityScopes": "Activity scopes"
142
143
  }
143
144
  },
144
145
  "update": {
@@ -145,7 +145,8 @@
145
145
  "fields": {
146
146
  "name": {
147
147
  "label": "Client name",
148
- "helperText": "can contain letters, dashes, underscores, and digits"
148
+ "helperText": "can contain letters, dashes, underscores, and digits",
149
+ "required": "Client name is required"
149
150
  }
150
151
  },
151
152
  "error": {
@@ -93,7 +93,12 @@
93
93
  "operateUrl": "Operate URL",
94
94
  "optimizeUrl": "Optimize URL",
95
95
  "oauthUrl": "OAuth URL",
96
- "restApi": "Camunda REST API"
96
+ "restApi": "Camunda REST API",
97
+ "error": {
98
+ "title": "Something went wrong",
99
+ "cluster": "Failed to load cluster.",
100
+ "clients": "Failed to load clients."
101
+ }
97
102
  },
98
103
  "fetchError": {
99
104
  "title": "Oops ... something went wrong.",
@@ -147,6 +152,11 @@
147
152
  "title": "Store credentials safely using Camunda cluster secrets",
148
153
  "description": "Accessing an external system requires authentication with credentials. To ensure the credentials are secure, use the Camunda secrets vault to store usernames, passwords, or API credentials without exposing sensitive information in your BPMN processes."
149
154
  },
155
+ "noSecretsDs": {
156
+ "title": "Store sensitive values as cluster secrets",
157
+ "description": "Cluster secrets store API keys, passwords, and other sensitive values. Reference them from credentials and supported fields.",
158
+ "link": "Learn more about cluster secrets"
159
+ },
150
160
  "forbidden": {
151
161
  "title": "You don't have access to cluster secrets",
152
162
  "description": "You don't have permission to view cluster secrets for this cluster. Contact an organization owner or admin for access."
@@ -89,5 +89,48 @@
89
89
  "prefix": "Need help?",
90
90
  "label": "Talk to an expert"
91
91
  }
92
+ },
93
+ "duplicate": {
94
+ "title": "Duplicate a cluster",
95
+ "notice": {
96
+ "title": "Copying settings from",
97
+ "copied": "Your connector secrets, alerts, IP allowlist, and other cluster settings carry over to the new cluster.",
98
+ "notCopied": "Process data is not copied — the new cluster starts empty. Each API client is recreated with a new client ID and secret, so update your applications with the new credentials."
99
+ },
100
+ "cta": {
101
+ "create": "Duplicate cluster",
102
+ "states": {
103
+ "submitting": "Duplicating cluster...",
104
+ "success": "Cluster will now be created",
105
+ "error": "Error duplicating cluster. Please try again."
106
+ }
107
+ },
108
+ "replace": {
109
+ "label": "Delete the original cluster to free up a reservation",
110
+ "description": "Your plan has no reservations left. The new cluster is created first, then the original cluster and all of its data are deleted. This cannot be undone.",
111
+ "confirm": {
112
+ "heading": "Delete the original cluster?",
113
+ "body": "The original cluster and all of its data are deleted once the new cluster is created. This cannot be undone.",
114
+ "label": "Type DELETE to confirm",
115
+ "primary": "Duplicate and delete",
116
+ "secondary": "Cancel"
117
+ }
118
+ },
119
+ "carryOverFailed": {
120
+ "title": "Some settings were not copied",
121
+ "subtitle": "Your new cluster is ready, but we could not copy everything. Check these on the new cluster:"
122
+ },
123
+ "carryOver": {
124
+ "clusterClients": "API clients",
125
+ "connectorSecrets": "connector secrets",
126
+ "alerts": "alerts",
127
+ "byom": "monitoring credentials",
128
+ "byoidp": "identity provider secret",
129
+ "backupSchedule": "backup schedule"
130
+ },
131
+ "sourceNotDeleted": {
132
+ "title": "The original cluster was not deleted",
133
+ "subtitle": "Your new cluster is ready, but we could not delete the original cluster. Delete it from the cluster list to free up its reservation."
134
+ }
92
135
  }
93
136
  }
@@ -30,6 +30,9 @@
30
30
  "trial": "Trial",
31
31
  "enterprise": "Enterprise",
32
32
  "internal": "Internal"
33
+ },
34
+ "items": {
35
+ "name": "Organization name"
33
36
  }
34
37
  },
35
38
  "groups": {
@@ -102,6 +102,7 @@ export { C4ExternalLink } from './components/c4-external-link/c4-external-link.j
102
102
  export type { C4ExternalLinkProps } from './components/c4-external-link/c4-external-link.types.js';
103
103
  export type { C4FeedbackFormProps, C4FeedbackModalProps, C4FeedbackPayload, C4FeedbackReportType, } from './components/c4-feedback-modal/c4-feedback-modal.js';
104
104
  export { C4FeedbackForm, C4FeedbackModal, } from './components/c4-feedback-modal/c4-feedback-modal.js';
105
+ export { C4FileUploader, type C4FileUploaderProps, } from './components/c4-file-uploader/c4-file-uploader.js';
105
106
  export type { C4HelpCenterData, C4HelpCenterLink, C4HelpCenterProps, C4HelpCenterTabData, C4HelpCenterTile, } from './components/c4-help-center/c4-help-center.js';
106
107
  export { C4HelpCenter, FEEDBACK_TAB_ID, } from './components/c4-help-center/c4-help-center.js';
107
108
  export { HUB_HELP_CENTER_LINKS_FLAG, rewriteAppHostToHub, } from './components/c4-help-center/help-center-app-host.js';
@@ -158,6 +159,7 @@ export { C4Search } from './components/c4-search/c4-search.js';
158
159
  export type { C4SearchProps } from './components/c4-search/c4-search.types.js';
159
160
  export { C4SearchResults } from './components/c4-search/c4-search-results.js';
160
161
  export type { C4SearchResultsProps, SearchResultEntry, SearchResults, } from './components/c4-search/c4-search-results.types.js';
162
+ export { C4SegmentedControl, type C4SegmentedControlOption, type C4SegmentedControlProps, } from './components/c4-segmented-control/c4-segmented-control.js';
161
163
  export { C4SmClusterDetails } from './components/c4-sm-cluster-details/c4-sm-cluster-details.js';
162
164
  export type { C4SmClusterDetailsProps } from './components/c4-sm-cluster-details/c4-sm-cluster-details.types.js';
163
165
  export { C4SmDashboard } from './components/c4-sm-dashboard/c4-sm-dashboard.js';
package/lib/esm/index.js CHANGED
@@ -55,6 +55,7 @@ export { C4EmptyState, } from './components/c4-empty-state/c4-empty-state.js';
55
55
  export { C4ExtendTrialModal } from './components/c4-extend-trial-modal/c4-extend-trial-modal.js';
56
56
  export { C4ExternalLink } from './components/c4-external-link/c4-external-link.js';
57
57
  export { C4FeedbackForm, C4FeedbackModal, } from './components/c4-feedback-modal/c4-feedback-modal.js';
58
+ export { C4FileUploader, } from './components/c4-file-uploader/c4-file-uploader.js';
58
59
  export { C4HelpCenter, FEEDBACK_TAB_ID, } from './components/c4-help-center/c4-help-center.js';
59
60
  export { HUB_HELP_CENTER_LINKS_FLAG, rewriteAppHostToHub, } from './components/c4-help-center/help-center-app-host.js';
60
61
  export { C4InfoTooltip } from './components/c4-info-tooltip/c4-info-tooltip.js';
@@ -85,6 +86,7 @@ export { C4PricingCard } from './components/c4-pricing-card/c4-pricing-card.js';
85
86
  export { C4RenameOrganizationModal } from './components/c4-rename-organization-modal/c4-rename-organization-modal.js';
86
87
  export { C4Search } from './components/c4-search/c4-search.js';
87
88
  export { C4SearchResults } from './components/c4-search/c4-search-results.js';
89
+ export { C4SegmentedControl, } from './components/c4-segmented-control/c4-segmented-control.js';
88
90
  export { C4SmClusterDetails } from './components/c4-sm-cluster-details/c4-sm-cluster-details.js';
89
91
  export { C4SmDashboard } from './components/c4-sm-dashboard/c4-sm-dashboard.js';
90
92
  export { C4Stat } from './components/c4-stat/c4-stat.js';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The flag that offers a duplicate of a cluster. The create page and every menu
3
+ * that opens it read this flag, thus one name holds the dot path.
4
+ *
5
+ * console-backend answers 501 for the same flag, on
6
+ * `POST /orgs/:orgId/clusters/:clusterId/duplicate`. A host that does not know
7
+ * the flag reads it as off (see `useC4FeatureFlag`), thus no menu shows the
8
+ * entry and the create page makes a normal cluster.
9
+ */
10
+ export declare const CLUSTER_DUPLICATION_FLAG = "console.clusterDuplication";
@@ -0,0 +1,15 @@
1
+ /*
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. Licensed under a commercial license.
4
+ * You may not use this file except in compliance with the commercial license.
5
+ */
6
+ /**
7
+ * The flag that offers a duplicate of a cluster. The create page and every menu
8
+ * that opens it read this flag, thus one name holds the dot path.
9
+ *
10
+ * console-backend answers 501 for the same flag, on
11
+ * `POST /orgs/:orgId/clusters/:clusterId/duplicate`. A host that does not know
12
+ * the flag reads it as off (see `useC4FeatureFlag`), thus no menu shows the
13
+ * entry and the create page makes a normal cluster.
14
+ */
15
+ export const CLUSTER_DUPLICATION_FLAG = 'console.clusterDuplication';
@@ -91,5 +91,5 @@ export function C4PasswordInput({ className, defaultValue, disabled, helperText,
91
91
  return (_jsxs("div", { className: 'flex flex-col gap-1', children: [labelText !== undefined ? (_jsx("label", { htmlFor: resolvedId, className: cn('text-sm font-medium', hideLabel && 'sr-only'), children: labelText })) : null, _jsxs("div", { className: 'relative', children: [_jsx(Input, { ...omitCarbonOnly(rest), ...valueProps, id: resolvedId, type: inputType, disabled: disabled, readOnly: readOnly, placeholder: placeholder, onChange: onChange, onClick: onClick, "aria-invalid": invalid || undefined, "aria-errormessage": errorMessageId, "aria-describedby": describedBy, className: cn('pr-8', className) }), _jsx("button", { type: 'button', "aria-label": passwordIsVisible ? hidePasswordLabel : showPasswordLabel, disabled: disabled, onClick: (event) => {
92
92
  setInputType(passwordIsVisible ? 'password' : 'text');
93
93
  onTogglePasswordVisibility?.(event);
94
- }, className: 'absolute right-2 top-1/2 -translate-y-1/2 rounded-sm text-neutral-foreground-subtle hover:text-neutral-foreground-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', children: _jsx(ToggleIcon, { "aria-hidden": 'true', className: 'h-4 w-4' }) })] }), showInvalidText ? (_jsx("span", { id: errorId, className: 'text-xs text-danger-action-default', children: invalidText })) : null, showHelperText ? (_jsx("span", { id: helperId, className: 'text-xs text-neutral-foreground-subtle', children: helperText })) : null] }));
94
+ }, className: 'absolute right-2 top-1/2 -translate-y-1/2 rounded-sm text-neutral-foreground-subtle hover:text-neutral-foreground-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', children: _jsx(ToggleIcon, { "aria-hidden": 'true', className: 'h-4 w-4' }) })] }), showInvalidText ? (_jsx("span", { id: errorId, className: 'text-xs text-danger-foreground-subtle', children: invalidText })) : null, showHelperText ? (_jsx("span", { id: helperId, className: 'text-xs text-neutral-foreground-subtle', children: helperText })) : null] }));
95
95
  }
@@ -3,6 +3,7 @@ import { type ComponentProps, type ComponentType } from 'react';
3
3
  export declare const Button: ComponentType<import("@camunda/design-system/carbon-compat").ButtonProps<"button">>;
4
4
  export declare const Checkbox: ComponentType<import("@carbon/react").CheckboxProps & import("react").RefAttributes<unknown>>;
5
5
  export declare const CodeSnippet: ComponentType<import("@camunda/design-system/carbon-compat").CodeSnippetProps>;
6
+ export declare const ClusterTag: ComponentType<import("@camunda/design-system/carbon-compat").C3ClusterTagProps>;
6
7
  export declare const DefinitionTooltip: ComponentType<import("@carbon/react").DefinitionTooltipProps>;
7
8
  export declare const Dropdown: ComponentType<import("@carbon/react").DropdownProps<unknown> & {
8
9
  ref?: import("react").Ref<HTMLButtonElement>;
@@ -36,7 +36,8 @@
36
36
  * To add a leaf: import the Carbon + carbon-compat versions and wrap with
37
37
  * `switchable(...)`, then point the consuming component's import at this module.
38
38
  */
39
- import { BreadcrumbSkeleton as DsBreadcrumbSkeleton, Button as DsButton, Checkbox as DsCheckbox, CodeSnippet as DsCodeSnippet, ComposedModal as DsComposedModal, Dropdown as DsDropdown, FilterableMultiSelect as DsFilterableMultiSelect, Form as DsForm, FormGroup as DsFormGroup, IconButton as DsIconButton, Link as DsLink, ListItem as DsListItem, Loading as DsLoading, ModalBody as DsModalBody, ModalFooter as DsModalFooter, ModalHeader as DsModalHeader, MultiSelect as DsMultiSelect, OverflowMenu as DsOverflowMenu, OverflowMenuItem as DsOverflowMenuItem, ProgressBar as DsProgressBar, Search as DsSearch, SkeletonPlaceholder as DsSkeletonPlaceholder, SkeletonText as DsSkeletonText, Stack as DsStack, TabsSkeleton as DsTabsSkeleton, Tag as DsTag, TextArea as DsTextArea, TextInput as DsTextInput, Tile as DsTile, Toggle as DsToggle, Tooltip as DsTooltip, UnorderedList as DsUnorderedList, } from '@camunda/design-system/carbon-compat';
39
+ import { C3ClusterTag as CarbonClusterTag } from '@camunda/camunda-composite-components';
40
+ import { BreadcrumbSkeleton as DsBreadcrumbSkeleton, Button as DsButton, Checkbox as DsCheckbox, C3ClusterTag as DsClusterTag, CodeSnippet as DsCodeSnippet, ComposedModal as DsComposedModal, Dropdown as DsDropdown, FilterableMultiSelect as DsFilterableMultiSelect, Form as DsForm, FormGroup as DsFormGroup, IconButton as DsIconButton, Link as DsLink, ListItem as DsListItem, Loading as DsLoading, ModalBody as DsModalBody, ModalFooter as DsModalFooter, ModalHeader as DsModalHeader, MultiSelect as DsMultiSelect, OverflowMenu as DsOverflowMenu, OverflowMenuItem as DsOverflowMenuItem, ProgressBar as DsProgressBar, Search as DsSearch, SkeletonPlaceholder as DsSkeletonPlaceholder, SkeletonText as DsSkeletonText, Stack as DsStack, TabsSkeleton as DsTabsSkeleton, Tag as DsTag, TextArea as DsTextArea, TextInput as DsTextInput, Tile as DsTile, Toggle as DsToggle, Tooltip as DsTooltip, UnorderedList as DsUnorderedList, } from '@camunda/design-system/carbon-compat';
40
41
  import { BreadcrumbSkeleton as CarbonBreadcrumbSkeleton, Button as CarbonButton, Checkbox as CarbonCheckbox, CodeSnippet as CarbonCodeSnippet, ComposedModal as CarbonComposedModal, DefinitionTooltip as CarbonDefinitionTooltip, Dropdown as CarbonDropdown, FilterableMultiSelect as CarbonFilterableMultiSelect, Form as CarbonForm, FormGroup as CarbonFormGroup, IconButton as CarbonIconButton, Link as CarbonLink, ListItem as CarbonListItem, Loading as CarbonLoading, Modal as CarbonModal, ModalBody as CarbonModalBody, ModalFooter as CarbonModalFooter, ModalHeader as CarbonModalHeader, MultiSelect as CarbonMultiSelect, OverflowMenu as CarbonOverflowMenu, OverflowMenuItem as CarbonOverflowMenuItem, PasswordInput as CarbonPasswordInput, ProgressBar as CarbonProgressBar, Search as CarbonSearch, SkeletonPlaceholder as CarbonSkeletonPlaceholder, SkeletonText as CarbonSkeletonText, Stack as CarbonStack, TabsSkeleton as CarbonTabsSkeleton, Tag as CarbonTag, TextArea as CarbonTextArea, TextInput as CarbonTextInput, Tile as CarbonTile, Toggle as CarbonToggle, Tooltip as CarbonTooltip, UnorderedList as CarbonUnorderedList, } from '@carbon/react';
41
42
  import { createElement, Fragment, } from 'react';
42
43
  import { useC4DesignSystem } from '../runtime/c4-console-runtime-context.js';
@@ -47,6 +48,13 @@ import { switchable } from './switchable.js';
47
48
  export const Button = switchable(CarbonButton, DsButton);
48
49
  export const Checkbox = switchable(CarbonCheckbox, DsCheckbox);
49
50
  export const CodeSnippet = switchable(CarbonCodeSnippet, DsCodeSnippet);
51
+ // The c3 stage chip. c3 is public and renders the Carbon `Tag` itself, thus the
52
+ // ds branch is the carbon-compat adapter, which renders the DS `Badge` and
53
+ // gives each stage a semantic variant (dev/test/stage/prod →
54
+ // success/info/warning/danger). The adapter supports the `stage` form alone:
55
+ // it drops `clusterUuid` with a warning, because it cannot read the c3 profile
56
+ // store. Look the stage up at the call site before you pass it.
57
+ export const ClusterTag = switchable(CarbonClusterTag, DsClusterTag);
50
58
  // carbon-compat ships no definition-tooltip adapter, so the ds branch is the DS
51
59
  // component directly (see ./c4-definition-tooltip). Unlike Carbon's, it renders
52
60
  // the definition through a portal, so an ancestor that hides overflow does not
@@ -97,6 +105,12 @@ export const Tag = switchable(CarbonTag, DsTag);
97
105
  // TextInput adapter, which DOES render them: append a helper/error `<span>`
98
106
  // sibling after the DS TextArea, with the same classes and error-over-helper
99
107
  // precedence. Carbon mode stays byte-identical.
108
+ //
109
+ // The error class must be one that the DS stylesheet holds. A c4 consumer
110
+ // loads the built `@camunda/design-system/styles.css` and compiles no Tailwind
111
+ // of its own, thus a utility class that no DS component uses has no rule, and
112
+ // the error text then renders in the normal color. `text-danger-foreground-
113
+ // subtle` is the class of the DS TextInput adapter, so it is always there.
100
114
  function C4TextArea(props) {
101
115
  const designSystem = useC4DesignSystem();
102
116
  if (designSystem !== 'ds') {
@@ -109,7 +123,7 @@ function C4TextArea(props) {
109
123
  const { invalid, invalidText, helperText, ...dsProps } = props;
110
124
  let message;
111
125
  if (invalid && invalidText !== undefined) {
112
- message = createElement('span', { className: 'text-xs text-danger-action-default' }, invalidText);
126
+ message = createElement('span', { className: 'text-xs text-danger-foreground-subtle' }, invalidText);
113
127
  }
114
128
  else if (helperText !== undefined) {
115
129
  message = createElement('span', { className: 'text-xs text-neutral-foreground-subtle' }, helperText);
@@ -1,5 +1,5 @@
1
1
  import { type AssignableOrganizationRoleType } from '@camunda/ccma-shared-types';
2
- type TranslateFn = (key: string, options?: Record<string, unknown>) => string;
2
+ import { type TranslateFn } from './safe-translate.js';
3
3
  /** The 8.7-cluster legacy section, minus anything the aligned model promotes. */
4
4
  export declare function legacySectionRoles(permissionsReworkEnabled: boolean): AssignableOrganizationRoleType[];
5
5
  /**
@@ -35,4 +35,3 @@ export declare function roleLabelDescription(t: TranslateFn | undefined, role: s
35
35
  label: string;
36
36
  description: string;
37
37
  };
38
- export {};
@@ -4,19 +4,7 @@
4
4
  * You may not use this file except in compliance with the commercial license.
5
5
  */
6
6
  import { LegacyHeldOrganizationRole, OrganizationRole, } from '@camunda/ccma-shared-types';
7
- function safeTranslate(t, key, defaultValue) {
8
- if (!t)
9
- return defaultValue;
10
- try {
11
- const translated = t(key);
12
- return typeof translated === 'string' && translated !== key
13
- ? translated
14
- : defaultValue;
15
- }
16
- catch {
17
- return defaultValue;
18
- }
19
- }
7
+ import { safeTranslate } from './safe-translate.js';
20
8
  // Historical UI order of the 8.7-cluster roles section.
21
9
  const LEGACY_SECTION_ROLES = [
22
10
  OrganizationRole.VISITOR,
@@ -1,5 +1,5 @@
1
1
  import type { C4WidgetScope } from '../widgets/c4-widget-scope.types.js';
2
- export type TranslateFn = (key: string) => string;
2
+ export type TranslateFn = (key: string, options?: Record<string, unknown>) => string;
3
3
  /**
4
4
  * Key suffix carrying the environment-scoped wording of a copy string. Follows
5
5
  * the i18next context convention so both wordings can be translated
@@ -14,7 +14,9 @@ export declare const ENVIRONMENT_KEY_SUFFIX = "_environment";
14
14
  * c4 widgets take `t` from the host runtime, which may not have the c4 bundles
15
15
  * registered at all, so every lookup needs a built-in English fallback.
16
16
  */
17
- export declare function safeTranslate(t: TranslateFn | undefined, key: string, fallback: string): string;
17
+ export declare function safeTranslate(t: TranslateFn | undefined, key: string, fallback: string,
18
+ /** Interpolation values for the string, such as `{ email }`. */
19
+ options?: Record<string, unknown>): string;
18
20
  /**
19
21
  * Resolves a copy string that reads differently per scope: `key` in `'cluster'`
20
22
  * scope, `<key>_environment` in `'environment'` scope, each with its own English
@@ -17,16 +17,23 @@ export const ENVIRONMENT_KEY_SUFFIX = '_environment';
17
17
  * c4 widgets take `t` from the host runtime, which may not have the c4 bundles
18
18
  * registered at all, so every lookup needs a built-in English fallback.
19
19
  */
20
- export function safeTranslate(t, key, fallback) {
20
+ export function safeTranslate(t, key, fallback,
21
+ /** Interpolation values for the string, such as `{ email }`. */
22
+ options) {
21
23
  if (!t)
22
24
  return fallback;
23
25
  let translated;
24
26
  try {
25
- translated = t(key);
27
+ translated = t(key, options);
26
28
  }
27
29
  catch {
28
30
  return fallback;
29
31
  }
32
+ // A host can answer with something that is not a string. The type says it
33
+ // cannot, thus only a host that breaks the type gets here.
34
+ if (typeof translated !== 'string') {
35
+ return fallback;
36
+ }
30
37
  if (!translated || translated === key) {
31
38
  return fallback;
32
39
  }
@@ -11,17 +11,7 @@ import { useC4ConsoleAuthz } from '../../runtime/c4-console-authz.js';
11
11
  import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
12
12
  import { toApiConfig } from '../../runtime/to-api-config.js';
13
13
  import { BreadcrumbSkeleton, CodeSnippet, Modal, Stack, TextInput, } from '../../ui/index.js';
14
- function safeTranslate(t, key, fallback) {
15
- if (!t)
16
- return fallback;
17
- try {
18
- const translated = t(key);
19
- return translated && translated !== key ? translated : fallback;
20
- }
21
- catch {
22
- return fallback;
23
- }
24
- }
14
+ import { safeTranslate } from '../../utils/safe-translate.js';
25
15
  function joinUrl(baseUrl, path) {
26
16
  const base = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl;
27
17
  const nextPath = path.startsWith('/') ? path : `/${path}`;
@@ -62,7 +52,7 @@ function toListFormat(values) {
62
52
  function validateClientName(opts) {
63
53
  const { value, clients, currentClientUuid, t } = opts;
64
54
  if (!value) {
65
- return safeTranslate(t, 'clusterclients:update.fields.name.required', 'Client Name is required');
55
+ return safeTranslate(t, 'clusterclients:update.fields.name.required', 'Client name is required');
66
56
  }
67
57
  const isAllowed = /^[A-Za-z0-9_-]+$/.test(value);
68
58
  if (!isAllowed) {
@@ -10,11 +10,14 @@ import { observer } from 'mobx-react-lite';
10
10
  import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
11
11
  import { normalizeClusterStatus } from '../../components/c4-cluster-overview/applications.js';
12
12
  import { getC4ClusterDetailsUrls } from '../../externalUrls.const.js';
13
- import { useC4ConsoleAuthz } from '../../runtime/c4-console-authz.js';
13
+ import { isDeveloperBlockedFromClusterCreate, useC4ConsoleAuthz, } from '../../runtime/c4-console-authz.js';
14
14
  import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
15
- import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
15
+ import { useC4ConsoleRuntime, useC4FeatureFlag, } from '../../runtime/c4-console-runtime-context.js';
16
+ import { CLUSTER_CREATION_BLOCKED_FLAG } from '../../runtime/cluster-creation-blocked.js';
17
+ import { CLUSTER_DUPLICATION_FLAG } from '../../runtime/cluster-duplication.js';
16
18
  import { toApiConfig } from '../../runtime/to-api-config.js';
17
19
  import { Modal, Stack, TextInput } from '../../ui/index.js';
20
+ import { safeTranslate } from '../../utils/safe-translate.js';
18
21
  import { clusterHealthOverride } from '../cluster-health-override.js';
19
22
  import { useClusterApiClients } from '../environment/use-cluster-api-clients.js';
20
23
  import { useClusterVersionFlags } from '../environment/use-cluster-version-flags.js';
@@ -32,26 +35,6 @@ import { C4ClusterDetailsIpWhitelistTab } from './tabs/c4-cluster-details-ip-whi
32
35
  import { C4ClusterDetailsOverviewTab } from './tabs/c4-cluster-details-overview-tab.js';
33
36
  import { C4ClusterDetailsSecureConnectivityTab } from './tabs/c4-cluster-details-secure-connectivity-tab.js';
34
37
  import { C4ClusterDetailsSettingsTab } from './tabs/c4-cluster-details-settings-tab.js';
35
- function safeTranslate(t, key, fallback, options) {
36
- try {
37
- const translated = t?.(key, options);
38
- if (!translated || translated === key) {
39
- return fallback;
40
- }
41
- // i18next can return the key *without* the namespace when the namespace is missing.
42
- // Example: `c4console:clusterDetails.tabs.overview` -> `clusterDetails.tabs.overview`
43
- if (key.includes(':')) {
44
- const withoutNamespace = key.split(':').slice(1).join(':');
45
- if (translated === withoutNamespace) {
46
- return fallback;
47
- }
48
- }
49
- return translated;
50
- }
51
- catch {
52
- return fallback;
53
- }
54
- }
55
38
  function renderInlineStrong(value) {
56
39
  const match = value.match(/^(.*)<strong>(.*)<\/strong>(.*)$/);
57
40
  if (!match)
@@ -305,6 +288,8 @@ function isUnsupportedGenerationStarted(isUnsupportedStarting) {
305
288
  }
306
289
  export const C4ClusterDetailsApp = observer((props) => {
307
290
  const runtime = useC4ConsoleRuntime();
291
+ const clusterDuplicationEnabled = useC4FeatureFlag(CLUSTER_DUPLICATION_FLAG);
292
+ const clusterCreationBlocked = useC4FeatureFlag(CLUSTER_CREATION_BLOCKED_FLAG);
308
293
  const data = useC4ConsoleData();
309
294
  const t = runtime.i18n?.t;
310
295
  const urls = useMemo(() => getC4ClusterDetailsUrls(props.urls), [props.urls]);
@@ -1035,6 +1020,24 @@ export const C4ClusterDetailsApp = observer((props) => {
1035
1020
  const ignoreGracePeriod = Boolean(orgInfo?.organizationToSalesPlan?.limits?.ignoreGracePeriod);
1036
1021
  const clusterPlanTypeReservations = orgInfo?.organizationToSalesPlan
1037
1022
  ?.clusterPlanTypesToReserved;
1023
+ // A duplicate makes a cluster, thus it needs the create permission and not
1024
+ // the edit permission of this cluster. The three guards after it mirror the
1025
+ // ones of the cluster list and of console-backend, so that this menu offers
1026
+ // nothing that the endpoint refuses:
1027
+ // - `developerNoClusterCreate` makes `developerClusterCreateValidator`
1028
+ // answer 403 for a developer of that org.
1029
+ // - A cluster that was failed over is suspended, and the duplicate route
1030
+ // answers 409 for it.
1031
+ const developerBlockedFromClusterCreate = isDeveloperBlockedFromClusterCreate({
1032
+ developerNoClusterCreateLimit: orgInfo?.organizationToSalesPlan?.limits?.developerNoClusterCreate ===
1033
+ true,
1034
+ orgRoles: authz.orgRoles,
1035
+ });
1036
+ const canDuplicate = Boolean(authz.visibilities.clusters?.canCreate) &&
1037
+ clusterDuplicationEnabled &&
1038
+ !clusterCreationBlocked &&
1039
+ !developerBlockedFromClusterCreate &&
1040
+ cluster?.isFailoverSource !== true;
1038
1041
  // -----------------------------
1039
1042
  // Tabs
1040
1043
  // -----------------------------
@@ -1242,7 +1245,7 @@ export const C4ClusterDetailsApp = observer((props) => {
1242
1245
  canRead: Boolean(orgPermissions?.cluster.connectorSecrets.read),
1243
1246
  canUpdate: Boolean(orgPermissions?.cluster.connectorSecrets.update),
1244
1247
  canDelete: Boolean(orgPermissions?.cluster.connectorSecrets.delete),
1245
- }, docsUrl: urls.docs.connectorSecrets, t: t, onNavigate: props.onNavigate }));
1248
+ }, docsUrl: urls.docs.connectorSecrets, clusterSecretsDocsUrl: urls.docs.clusterSecrets, t: t, onNavigate: props.onNavigate }));
1246
1249
  const hotBackupsComponent = (_jsx(C4ClusterDetailsHotBackupsTab, { cluster: cluster, orgId: props.orgId, clusterId: props.clusterId, apiConfig: apiConfig, canMutateCluster: canMutateCluster, isHotBackupEnabled: Boolean(orgInfo?.organizationToSalesPlan?.limits?.hotBackup), manualBackupRetainedCount: orgInfo?.organizationToSalesPlan?.limits?.hotBackupManualRetainedCount, scheduledBackupRetainedCount: orgInfo?.organizationToSalesPlan?.limits
1247
1250
  ?.hotBackupScheduledRetainedCount, docsUrls: {
1248
1251
  hotBackups: urls.docs.hotBackups,
@@ -1540,8 +1543,16 @@ export const C4ClusterDetailsApp = observer((props) => {
1540
1543
  return (_jsxs(_Fragment, { children: [_jsx(C4ClusterDetailsPage, { loading: isClusterLoading || authz.isLoading, padding: props.padding, clusterName: cluster?.name, phaseTag: headerPhaseTag, healthStatus: headerHealthStatus, versionLabel: headerVersionLabel, isDevelopmentPlan: cluster?.planType?.development, urls: { clusters: urls.clusters }, onNavigateToClusters: () => props.onNavigate?.({ kind: 'clusters', orgId: props.orgId }), menu: {
1541
1544
  canRename,
1542
1545
  canDelete,
1546
+ canDuplicate,
1543
1547
  onRename: canRename ? () => setRenameOpen(true) : undefined,
1544
1548
  onDelete: canDelete ? () => setDeleteOpen(true) : undefined,
1549
+ onDuplicate: canDuplicate
1550
+ ? () => props.onNavigate?.({
1551
+ kind: 'duplicateCluster',
1552
+ orgId: props.orgId,
1553
+ clusterId: props.clusterId,
1554
+ })
1555
+ : undefined,
1545
1556
  }, banner: banner, secondaryReplicationNotReady: secondaryReplicationNotReady, onGoToEncryptionTab: () => handleTabChange('encryption'), tabs: {
1546
1557
  list: tabs,
1547
1558
  desiredTabId: activeTabId,
@@ -8,6 +8,10 @@ export type C4ClusterDetailsNavigateEvent = {
8
8
  } | {
9
9
  kind: 'clusters';
10
10
  orgId: string;
11
+ } | {
12
+ kind: 'duplicateCluster';
13
+ orgId: string;
14
+ clusterId: string;
11
15
  } | {
12
16
  kind: 'dashboard';
13
17
  orgId: string;
@@ -78,6 +82,7 @@ export interface C4ClusterDetailsDocsUrls {
78
82
  ipWhitelist: string;
79
83
  clients: string;
80
84
  connectorSecrets: string;
85
+ clusterSecrets: string;
81
86
  mcpSetup: string;
82
87
  upgrade: C4ClusterDetailsUpgradeDocsUrls;
83
88
  byom: string;
@@ -110,6 +115,7 @@ export interface C4ClusterDetailsUrls {
110
115
  ipWhitelist?: string;
111
116
  clients?: string;
112
117
  connectorSecrets?: string;
118
+ clusterSecrets?: string;
113
119
  mcpSetup?: string;
114
120
  upgrade?: Partial<C4ClusterDetailsUpgradeDocsUrls>;
115
121
  byom?: string;
@@ -55,6 +55,13 @@ function buildMenuItems(opts) {
55
55
  label: safeTranslate(t, 'c4console:clusterDetails.menu.rename', 'Rename'),
56
56
  });
57
57
  }
58
+ if (menu.canDuplicate && menu.onDuplicate) {
59
+ items.push({
60
+ key: 'clusterDuplicateOperation',
61
+ onClick: menu.onDuplicate,
62
+ label: safeTranslate(t, 'c4console:clusterDetails.menu.duplicate', 'Duplicate'),
63
+ });
64
+ }
58
65
  if (menu.canDelete && menu.onDelete) {
59
66
  items.push({
60
67
  key: 'clusterDeleteOperation',
@@ -44,8 +44,11 @@ export interface C4ClusterDetailsPageProps {
44
44
  menu?: {
45
45
  canRename: boolean;
46
46
  canDelete: boolean;
47
+ /** Gated by the `console.clusterDuplication` flag and by the create permission. */
48
+ canDuplicate?: boolean;
47
49
  onRename?: () => void;
48
50
  onDelete?: () => void;
51
+ onDuplicate?: () => void;
49
52
  };
50
53
  banner?: C4ClusterDetailsPageBanner;
51
54
  /**
@@ -1,24 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { C4ClusterDetailsActivity } from '../../../components/c4-cluster-details-activity/c4-cluster-details-activity.js';
3
- function safeTranslate(t, key, fallback) {
4
- try {
5
- const translated = t?.(key);
6
- if (!translated || translated === key) {
7
- return fallback;
8
- }
9
- // i18next can return the key *without* the namespace when the namespace is missing.
10
- if (key.includes(':')) {
11
- const withoutNamespace = key.split(':').slice(1).join(':');
12
- if (translated === withoutNamespace) {
13
- return fallback;
14
- }
15
- }
16
- return translated;
17
- }
18
- catch {
19
- return fallback;
20
- }
21
- }
3
+ import { safeTranslate } from '../../../utils/safe-translate.js';
22
4
  export const C4ClusterDetailsActivityTab = (props) => {
23
5
  return (_jsx(C4ClusterDetailsActivity, { activityGroups: props.activityGroups, isLoading: props.isLoading, hasError: props.hasError, text: {
24
6
  today: safeTranslate(props.t, 'clusterdetails:activity.today', 'Today'),
@@ -12,20 +12,7 @@ import { C4InlineNotification } from '../../../components/c4-inline-notification
12
12
  import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
13
13
  import { Checkbox, Form, Link, Modal, PasswordInput, Stack, TextInput, } from '../../../ui/index.js';
14
14
  import { useRadioFamily } from '../../../ui/families.js';
15
- // Helper to translate with fallback
16
- function safeTranslate(translateFn, key, fallback, options) {
17
- try {
18
- const result = translateFn(key, options);
19
- // If i18next returns the key unchanged, use fallback
20
- if (result === key) {
21
- return fallback;
22
- }
23
- return result;
24
- }
25
- catch {
26
- return fallback;
27
- }
28
- }
15
+ import { safeTranslate } from '../../../utils/safe-translate.js';
29
16
  export function resolveUpdatedAlertHmacSecret(params) {
30
17
  const { reportType, wantsHmac, hadHmacOnOpen, hmacSecret } = params;
31
18
  if (reportType !== 'Webhook') {
@@ -7,25 +7,8 @@ import { C4ClusterByomClients } from '../../../components/c4-cluster-byom-client
7
7
  import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
8
8
  import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
9
9
  import { Button, CodeSnippet, Modal, Stack, TextInput } from '../../../ui/index.js';
10
+ import { safeTranslate } from '../../../utils/safe-translate.js';
10
11
  import { SECTION_HEADING_STYLE } from '../../../utils/section-heading-style.js';
11
- // Helper function to ensure translations work
12
- function safeTranslate(t, key, fallback) {
13
- if (!t)
14
- return fallback;
15
- const result = t(key);
16
- if (!result || result === key) {
17
- return fallback;
18
- }
19
- // i18next can return the key *without* the namespace when the namespace is missing.
20
- // Example: `clusterdetails:byomClients.noClientsMessage.title` -> `byomClients.noClientsMessage.title`
21
- if (key.includes(':')) {
22
- const withoutNamespace = key.split(':').slice(1).join(':');
23
- if (result === withoutNamespace) {
24
- return fallback;
25
- }
26
- }
27
- return result;
28
- }
29
12
  function asByomStatusLike(value) {
30
13
  if (!value || typeof value !== 'object')
31
14
  return undefined;
@@ -92,7 +92,7 @@ export const C4ClusterDetailsClientsTab = (props) => {
92
92
  const [clientCreatedScopes, setClientCreatedScopes] = useState([]);
93
93
  const validateClientName = useCallback((value) => {
94
94
  if (!value) {
95
- return 'Client Name is required';
95
+ return safeTranslate(t, 'clusterclients:update.fields.name.required', 'Client name is required');
96
96
  }
97
97
  const isAllowed = /^[A-Za-z0-9_-]+$/.test(value);
98
98
  if (!isAllowed) {
@@ -14,6 +14,7 @@ interface C4ClusterDetailsConnectorSecretsTabProps {
14
14
  canDelete: boolean;
15
15
  };
16
16
  docsUrl?: string;
17
+ clusterSecretsDocsUrl?: string;
17
18
  t?: SecretsTranslateFn;
18
19
  onNavigate?: (event: {
19
20
  kind: string;