@camunda/ccma-saas-frontend 0.5.0 → 0.6.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 (43) hide show
  1. package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +2 -2
  2. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +1 -1
  3. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +1 -1
  4. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.d.ts +1 -1
  5. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +24 -1
  6. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts +14 -1
  7. package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  8. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +24 -9
  9. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +6 -0
  10. package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +2 -0
  11. package/lib/esm/components/c4-cluster-overview/cluster-details.js +10 -1
  12. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +15 -8
  13. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.types.d.ts +1 -0
  14. package/lib/esm/components/c4-structured-list/c4-structured-list.js +15 -1
  15. package/lib/esm/components/shared-charts/ds-line-chart.js +2 -2
  16. package/lib/esm/components/shared-charts/recharts-tokens.d.ts +24 -9
  17. package/lib/esm/components/shared-charts/recharts-tokens.js +40 -13
  18. package/lib/esm/i18n/en/entities/orgroles.json +26 -0
  19. package/lib/esm/i18n/en/modals/backups.json +2 -0
  20. package/lib/esm/i18n/en/pages/clusterdetails.json +1 -0
  21. package/lib/esm/i18n/en/pages/clusters.json +4 -1
  22. package/lib/esm/runtime/nav/use-webapp-nav-data.d.ts +18 -0
  23. package/lib/esm/runtime/nav/use-webapp-nav-data.js +39 -15
  24. package/lib/esm/utils/role-labels.d.ts +25 -7
  25. package/lib/esm/utils/role-labels.js +94 -13
  26. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +11 -2
  27. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.d.ts +2 -0
  28. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +16 -3
  29. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.d.ts +19 -0
  30. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +108 -58
  31. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +3 -0
  32. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +2 -8
  33. package/lib/esm/widgets/clusters/c4-clusters-page.js +18 -1
  34. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +4 -0
  35. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  36. package/lib/esm/widgets/management/c4-management-app.js +38 -56
  37. package/lib/esm/widgets/management/c4-management-app.types.d.ts +2 -0
  38. package/lib/esm/widgets/management/tabs/c4-management-users-tab.d.ts +2 -1
  39. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +46 -17
  40. package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
  41. package/lib/esm/widgets/user-details/c4-user-details-page.js +22 -8
  42. package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +2 -0
  43. package/package.json +11 -11
@@ -8,7 +8,7 @@ import { BarChart } from '@camunda/design-system';
8
8
  import { GroupedBarChart, SimpleBarChart, StackedBarChart, } from '@carbon/charts-react';
9
9
  import { useC4DesignSystem } from '../../../runtime/c4-console-runtime-context.js';
10
10
  import { Stack, Tile } from '../../../ui/index.js';
11
- import { getDsSeriesColor } from '../../shared-charts/recharts-tokens.js';
11
+ import { getDsSeriesToken } from '../../shared-charts/recharts-tokens.js';
12
12
  /** Pivots flat {group, key, value} rows into one row per key, keyed by group. */
13
13
  function pivotByKey(dataPoints) {
14
14
  const groupSet = new Set();
@@ -37,7 +37,7 @@ export const C4BarChart = ({ title, dataPoints, axes, stacked = false, mode, hei
37
37
  const { rows, groups } = pivotByKey(dataPoints);
38
38
  const config = Object.fromEntries(groups.map((group, index) => [
39
39
  group,
40
- { label: group, color: getDsSeriesColor(index) },
40
+ { label: group, color: getDsSeriesToken(index) },
41
41
  ]));
42
42
  return (_jsx(Tile, { children: _jsx(Stack, { children: _jsxs("div", { children: [title && (_jsx("div", { style: {
43
43
  fontWeight: 600,
@@ -13,7 +13,7 @@ import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notifi
13
13
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
14
14
  export const C4ClusterClientCredentialsModal = (props) => {
15
15
  const { Tabs, Tab, TabList, TabPanel, TabPanels } = useTabsFamily();
16
- return (_jsx(Modal, { passiveModal: true, onRequestClose: props.onRequestClose, open: props.isOpen, modalHeading: props.heading, size: 'md', children: _jsxs(Stack, { gap: 6, children: [_jsx("div", { children: props.description }), _jsx(C4InlineNotification, { lowContrast: true, kind: 'warning', title: props.notificationText, hideCloseButton: true }), _jsxs(Tabs, { children: [_jsx(TabList, { "aria-label": 'download', children: props.variants.map((variant) => (_jsx(Tab, { children: variant.tabTitle }, variant.key))) }), _jsx(TabPanels, { children: props.variants.map((variant) => {
16
+ return (_jsx(Modal, { passiveModal: true, onRequestClose: props.onRequestClose, open: props.isOpen, modalHeading: props.heading, size: 'lg', children: _jsxs(Stack, { gap: 6, children: [_jsx("div", { children: props.description }), _jsx(C4InlineNotification, { lowContrast: true, kind: 'warning', title: props.notificationText, hideCloseButton: true }), _jsxs(Tabs, { children: [_jsx(TabList, { "aria-label": 'download', children: props.variants.map((variant) => (_jsx(Tab, { children: variant.tabTitle }, variant.key))) }), _jsx(TabPanels, { children: props.variants.map((variant) => {
17
17
  const { key, ...variantProps } = variant;
18
18
  return (_jsxs(TabPanel, { children: [variant.type === 'codesnippet' && (_jsx(C4ClusterClientCredentialsVariantCodeSnippet, { ...variantProps })), variant.type === 'items' && (_jsx(C4ClusterClientCredentialsVariantItems, { ...variantProps }))] }, key));
19
19
  }) })] })] }) }));
@@ -14,7 +14,7 @@ import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notifi
14
14
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
15
15
  export const C4ClusterClientCredentialsIdentityModal = (props) => {
16
16
  const { Tabs, Tab, TabList, TabPanel, TabPanels } = useTabsFamily();
17
- return (_jsx(Modal, { passiveModal: true, onRequestClose: props.onRequestClose, open: props.isOpen, modalHeading: props.heading, preventCloseOnClickOutside: true, selectorPrimaryFocus: '.cds--btn--tertiary', size: 'md', children: _jsxs(Stack, { gap: 4, children: [_jsx("strong", { children: props.step1Header }), _jsxs(Tabs, { children: [_jsx(TabList, { "aria-label": 'download', contained: true, children: props.variants.map((variant) => (_jsx(Tab, { children: variant.tabTitle }, variant.key))) }), _jsx(TabPanels, { children: props.variants.map((variant) => {
17
+ return (_jsx(Modal, { passiveModal: true, onRequestClose: props.onRequestClose, open: props.isOpen, modalHeading: props.heading, preventCloseOnClickOutside: true, selectorPrimaryFocus: '.cds--btn--tertiary', size: 'lg', children: _jsxs(Stack, { gap: 4, children: [_jsx("strong", { children: props.step1Header }), _jsxs(Tabs, { children: [_jsx(TabList, { "aria-label": 'download', contained: true, children: props.variants.map((variant) => (_jsx(Tab, { children: variant.tabTitle }, variant.key))) }), _jsx(TabPanels, { children: props.variants.map((variant) => {
18
18
  const { key, ...variantProps } = variant;
19
19
  return (_jsxs(TabPanel, { style: { marginTop: '-12px', padding: '1rem' }, children: [variant.type === 'codesnippet' && (_jsx(C4ClusterClientCredentialsIdentitysVariantCodeSnippet, { ...variantProps })), variant.type === 'items' && (_jsx(C4ClusterClientCredentialsIdentitysVariantItems, { ...variantProps }))] }, key));
20
20
  }) })] }), _jsx(C4Divider, {}), _jsx("strong", { children: props.step2Header }), _jsx("div", { children: props.step2Description }), _jsxs(Stack, { gap: 2, children: [_jsx("p", { style: { color: 'var(--cds-text-helper)', alignSelf: 'end' }, children: "Client ID" }), _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.clientId })] }), _jsx(Button, { kind: 'primary', size: 'md', onClick: () => {
@@ -1,3 +1,3 @@
1
1
  import { type JSX } from 'react';
2
2
  import type { C4ClusterDetailsEncryptionProps } from './c4-cluster-details-encryption.types.js';
3
- export declare const C4ClusterDetailsEncryption: ({ cluster, encryption, scripts, text, urls, onSetARN, onUpdatePrimaryARN, onUpdateSecondaryARN, onDownloadScript, onDownloadKeyPolicy, disabled, }: C4ClusterDetailsEncryptionProps) => JSX.Element;
3
+ export declare const C4ClusterDetailsEncryption: ({ cluster, encryption, failoverKeyPolicy, scripts, text, urls, onSetARN, onUpdatePrimaryARN, onUpdateSecondaryARN, onDownloadScript, onDownloadKeyPolicy, disabled, }: C4ClusterDetailsEncryptionProps) => JSX.Element;
@@ -11,7 +11,7 @@ import { Button, CodeSnippet, Link, Stack, TextInput, Tile } from '../../ui/inde
11
11
  import { useTabsFamily } from '../../ui/tabs.js';
12
12
  import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
13
13
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
14
- export const C4ClusterDetailsEncryption = ({ cluster, encryption, scripts, text, urls, onSetARN, onUpdatePrimaryARN, onUpdateSecondaryARN, onDownloadScript, onDownloadKeyPolicy, disabled = false, }) => {
14
+ export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPolicy, scripts, text, urls, onSetARN, onUpdatePrimaryARN, onUpdateSecondaryARN, onDownloadScript, onDownloadKeyPolicy, disabled = false, }) => {
15
15
  const { Tabs, Tab, TabList, TabPanel, TabPanels } = useTabsFamily();
16
16
  const [selectedIndex, setSelectedIndex] = useState(0);
17
17
  const handleTabChange = (evt) => {
@@ -109,6 +109,29 @@ export const C4ClusterDetailsEncryption = ({ cluster, encryption, scripts, text,
109
109
  if (cluster.status === 'Ready') {
110
110
  return (_jsxs(Stack, { gap: 6, children: [_jsx("h3", { children: text.title }), _jsx("p", { children: text.infoText }), _jsx(Link, { target: '_blank', href: urls.byokMain, children: text.dokuLink }), _jsx(Tile, { children: _jsx(C4StructuredListWrapper, { children: _jsxs(C4StructuredListBody, { children: [_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileEncryptionType }), _jsx(C4StructuredListCell, { children: "External / AWS" })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileStatus }), _jsx(C4StructuredListCell, { children: status[cluster.status] })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileCreated }), _jsx(C4StructuredListCell, { children: cluster.created ? formatDate(cluster.created) : '' })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileRegion }), _jsx(C4StructuredListCell, { children: cluster.region })] }), cluster.isDualRegion && cluster.backupRegion && (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileSecondaryRegion }), _jsx(C4StructuredListCell, { children: cluster.backupRegion })] })), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: "ARN" }), _jsx(C4StructuredListCell, { children: _jsx(CodeSnippet, { className: 'cds--layer-two', type: 'single', children: cluster.primaryEncryptionKeyId }) })] }), cluster.isDualRegion && cluster.secondaryEncryptionKeyId && (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: "ARN" }), _jsx(C4StructuredListCell, { children: _jsx(CodeSnippet, { className: 'cds--layer-two', type: 'single', children: cluster.secondaryEncryptionKeyId }) })] })), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: "Key Policy" }), _jsx(C4StructuredListCell, { children: _jsx(CodeSnippet, { type: 'multi', wrapText: true, maxCollapsedNumberOfRows: 20, className: 'cds--layer-two', children: scripts.keyPolicy }) })] })] }) }) })] }));
111
111
  }
112
+ // A failed-over cluster already has its keys set (they are reversed from the
113
+ // source at failover time), so the "create a new key" flow below would be
114
+ // actively misleading — the customer's key already exists, it just has to
115
+ // grant access to the new region's principals. Show that instead. Once the
116
+ // operator reports the key as usable the `Ready` branch above wins, so this
117
+ // is reached only while the key policy is still missing the new principals.
118
+ if (failoverKeyPolicy) {
119
+ const roles = [
120
+ {
121
+ label: text.failoverKeyPolicyCloneRole,
122
+ value: failoverKeyPolicy.cloneRole,
123
+ },
124
+ {
125
+ label: text.failoverKeyPolicyClusterRole,
126
+ value: failoverKeyPolicy.clusterRole,
127
+ },
128
+ {
129
+ label: text.failoverKeyPolicyReplicationRole,
130
+ value: failoverKeyPolicy.replicationRole,
131
+ },
132
+ ];
133
+ return (_jsxs(_Fragment, { children: [_jsx(C4InlineNotification, { style: { maxWidth: '100%', width: '100%', marginBottom: '24px' }, lowContrast: true, kind: 'warning', title: text.failoverKeyPolicyTitle, subtitle: text.failoverKeyPolicyText, hideCloseButton: true }), _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h3", { children: text.title }), _jsxs("p", { children: [text.failoverKeyPolicyInstruction, ' ', _jsx("span", { children: _jsx(Link, { target: '_blank', rel: 'noopener noreferrer', href: urls.byokMain, children: text.dokuLink }) })] })] }), _jsx(Tile, { children: _jsx(Stack, { gap: 4, children: roles.map((role) => (_jsxs(Stack, { gap: 2, children: [_jsx("strong", { children: role.label }), _jsx(CodeSnippet, { type: 'single', children: role.value })] }, role.value))) }) })] })] }));
134
+ }
112
135
  return (_jsxs(_Fragment, { children: [encryption.actionRequired && (_jsx(C4InlineNotification, { style: {
113
136
  maxWidth: '100%',
114
137
  width: '100%',
@@ -1,7 +1,14 @@
1
- import type { EncryptionStatus } from '@camunda/ccma-shared-types';
1
+ import type { EncryptionStatus, FailoverKeyPolicyPrincipals } from '@camunda/ccma-shared-types';
2
2
  export interface C4ClusterDetailsEncryptionProps {
3
3
  cluster: ClusterEncryptionData;
4
4
  encryption: EncryptionFormData;
5
+ /**
6
+ * Set only for a failed-over cluster whose keys are already configured but
7
+ * whose key policy still has to grant the failover region's principals.
8
+ * When set (and encryption is not yet `Ready`), the key-policy guidance
9
+ * replaces the create-a-new-key flow.
10
+ */
11
+ failoverKeyPolicy?: FailoverKeyPolicyPrincipals;
5
12
  scripts: {
6
13
  cliScript: string;
7
14
  keyPolicy: string;
@@ -40,6 +47,12 @@ export interface C4ClusterDetailsEncryptionProps {
40
47
  confirmEncryptionBothRegions: string;
41
48
  downloadCliScript: string;
42
49
  downloadKeyPolicy: string;
50
+ failoverKeyPolicyTitle: string;
51
+ failoverKeyPolicyText: string;
52
+ failoverKeyPolicyInstruction: string;
53
+ failoverKeyPolicyCloneRole: string;
54
+ failoverKeyPolicyClusterRole: string;
55
+ failoverKeyPolicyReplicationRole: string;
43
56
  };
44
57
  urls: {
45
58
  byokMain: string;
@@ -1,3 +1,3 @@
1
1
  import { type JSX } from 'react';
2
2
  import type { C4ClusterListProps } from './c4-cluster-list.types.js';
3
- export declare const C4ClusterList: ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isRunningOnUnsupportedGeneration, }: C4ClusterListProps) => JSX.Element;
3
+ export declare const C4ClusterList: ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isFailoverSource, isRunningOnUnsupportedGeneration, }: C4ClusterListProps) => JSX.Element;
@@ -37,7 +37,7 @@ function isPlainLeftClick(event) {
37
37
  !event.ctrlKey &&
38
38
  !event.shiftKey);
39
39
  }
40
- export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isRunningOnUnsupportedGeneration, }) => {
40
+ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isFailoverSource, isRunningOnUnsupportedGeneration, }) => {
41
41
  const designSystem = useC4DesignSystem();
42
42
  const isDsMode = designSystem === 'ds';
43
43
  const tableContainerRef = useRef(null);
@@ -359,24 +359,39 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
359
359
  const actions = [
360
360
  {
361
361
  id: 'wake-cluster',
362
- label: translations.overflowMenu.resume,
362
+ // A failed-over source cluster stays visible in the list (so it can
363
+ // still be inspected) but can never be resumed — the label explains why.
364
+ label: (row) => isFailoverSource?.(row.id)
365
+ ? (translations.overflowMenu.resumeUnavailableFailoverSource ??
366
+ 'Resume (unavailable — this cluster was failed over)')
367
+ : translations.overflowMenu.resume,
363
368
  kind: 'ghost',
364
369
  onClick: (row) => onWakeCluster(row.id),
370
+ disabled: (row) => isFailoverSource?.(row.id) ?? false,
365
371
  visible: (row) => isClusterPaused(row.id) && permissions.canWakeCluster,
366
372
  },
367
373
  ...(onFailoverCluster && isMultiRegionCluster
368
374
  ? [
369
375
  {
370
376
  id: 'failover-cluster',
371
- // While the initial secondary bucket sync is pending the action stays
372
- // visible but disabled, with the reason in the label (#9141).
373
- label: (row) => isFailoverSyncPending?.(row.id)
374
- ? (translations.overflowMenu.failoverSyncPending ??
375
- 'Failover (unavailable until backup data is synced to the secondary region)')
376
- : (translations.overflowMenu.failover ?? 'Failover'),
377
+ // Two reasons this stays visible but disabled, with the reason in
378
+ // the label: the cluster was already failed over (a source cluster
379
+ // can never be failed over again), or the initial secondary bucket
380
+ // sync is still pending (#9141).
381
+ label: (row) => {
382
+ if (isFailoverSource?.(row.id)) {
383
+ return (translations.overflowMenu.failoverAlreadyFailedOver ??
384
+ 'Failover (unavailable — this cluster was already failed over)');
385
+ }
386
+ return isFailoverSyncPending?.(row.id)
387
+ ? (translations.overflowMenu.failoverSyncPending ??
388
+ 'Failover (unavailable until backup data is synced to the secondary region)')
389
+ : (translations.overflowMenu.failover ?? 'Failover');
390
+ },
377
391
  kind: 'ghost',
378
392
  onClick: (row) => onFailoverCluster(row.id),
379
- disabled: (row) => isFailoverSyncPending?.(row.id) ?? false,
393
+ disabled: (row) => (isFailoverSource?.(row.id) ?? false) ||
394
+ (isFailoverSyncPending?.(row.id) ?? false),
380
395
  visible: (row) => (permissions.canFailoverCluster ?? false) &&
381
396
  isMultiRegionCluster(row.id),
382
397
  },
@@ -65,9 +65,13 @@ export interface C4ClusterListProps {
65
65
  overflowMenu: {
66
66
  delete: string;
67
67
  resume: string;
68
+ /** Shown as the action label for a cluster that was failed over and can never be resumed. */
69
+ resumeUnavailableFailoverSource?: string;
68
70
  failover?: string;
69
71
  /** Shown as the action label while the initial secondary bucket sync is pending. */
70
72
  failoverSyncPending?: string;
73
+ /** Shown as the action label for a cluster that was already failed over. */
74
+ failoverAlreadyFailedOver?: string;
71
75
  };
72
76
  tags: {
73
77
  addLabel: string;
@@ -83,5 +87,7 @@ export interface C4ClusterListProps {
83
87
  * sync has not completed — the action is shown disabled with a reason.
84
88
  */
85
89
  isFailoverSyncPending?: (clusterId: string) => boolean;
90
+ /** True for a cluster that was failed over to a sibling — it can never be resumed. */
91
+ isFailoverSource?: (clusterId: string) => boolean;
86
92
  isRunningOnUnsupportedGeneration: (clusterId: string) => boolean;
87
93
  }
@@ -33,6 +33,8 @@ export interface ClusterDetailsProps {
33
33
  wakeAction: () => void;
34
34
  wakeLabel: string;
35
35
  wakeVisibility: boolean;
36
+ /** When set, the resume button is shown disabled with this reason as a tooltip (e.g. a failed-over source cluster). */
37
+ wakeDisabledReason?: string;
36
38
  sleepAction?: () => void;
37
39
  sleepLabel?: string;
38
40
  infoTooltip?: string;
@@ -97,7 +97,16 @@ export const ClusterDetails = (props) => {
97
97
  };
98
98
  const renderStatusButton = () => {
99
99
  if (normalizedStatus === 'suspended' && props?.status?.wakeVisibility) {
100
- return (_jsx(Button, { onClick: () => props.status?.wakeAction(), size: 'sm', renderIcon: Play, children: props.status.wakeLabel }));
100
+ const wakeDisabledReason = props.status.wakeDisabledReason;
101
+ const button = (_jsx(Button, { onClick: () => props.status?.wakeAction(), size: 'sm', renderIcon: Play, disabled: !!wakeDisabledReason, children: props.status.wakeLabel }));
102
+ if (!wakeDisabledReason) {
103
+ return button;
104
+ }
105
+ return (_jsx(Tooltip, { align: 'bottom', description: _jsx("span", { style: {
106
+ display: 'block',
107
+ whiteSpace: 'normal',
108
+ maxWidth: '16rem',
109
+ }, children: wakeDisabledReason }), children: _jsx("span", { style: { display: 'inline-block' }, children: button }) }));
101
110
  }
102
111
  if (props?.status?.sleepAction) {
103
112
  return (_jsx(Button, { onClick: () => props.status?.sleepAction?.(), size: 'sm', renderIcon: Pause, children: props.status.sleepLabel }));
@@ -7,7 +7,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
7
7
  import { OrganizationRole } from '@camunda/ccma-shared-types';
8
8
  import { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from 'react';
9
9
  import { Checkbox, Link, Modal, Stack, TextInput } from '../../ui/index.js';
10
- import { LEGACY_SECTION_ROLES, roleLabelDescription, } from '../../utils/role-labels.js';
10
+ import { legacySectionRoles, orderPrimaryRoles, roleLabelDescription, } from '../../utils/role-labels.js';
11
11
  import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
12
12
  function safeTranslate(t, key, defaultValue, options) {
13
13
  if (!t)
@@ -24,7 +24,7 @@ function isValidEmail(email) {
24
24
  // Intentionally simple: enough for UI validation without being overly strict.
25
25
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(email);
26
26
  }
27
- export const C4InviteUserToOrganizationModal = forwardRef(({ t, onInviteUser, showAdminRole = true, showLegacyClusterRoles = false, learnMoreUrl = 'https://docs.camunda.io/', telemetry, }, ref) => {
27
+ export const C4InviteUserToOrganizationModal = forwardRef(({ t, onInviteUser, showAdminRole = true, showLegacyClusterRoles = false, permissionsReworkEnabled = false, learnMoreUrl = 'https://docs.camunda.io/', telemetry, }, ref) => {
28
28
  const [isOpen, setIsOpen] = useState(false);
29
29
  const [orgId, setOrgId] = useState('');
30
30
  const [inviteEmail, setInviteEmail] = useState('');
@@ -121,19 +121,24 @@ export const C4InviteUserToOrganizationModal = forwardRef(({ t, onInviteUser, sh
121
121
  if (showAdminRole) {
122
122
  roles.push(OrganizationRole.ADMIN);
123
123
  }
124
- return roles;
125
- }, [showAdminRole]);
124
+ if (permissionsReworkEnabled) {
125
+ roles.push(OrganizationRole.OPERATIONS_ENGINEER);
126
+ }
127
+ return orderPrimaryRoles(roles, permissionsReworkEnabled);
128
+ }, [showAdminRole, permissionsReworkEnabled]);
126
129
  const legacyClusterRoles = useMemo(() => {
127
130
  if (!showLegacyClusterRoles) {
128
131
  return [];
129
132
  }
130
- return LEGACY_SECTION_ROLES;
131
- }, [showLegacyClusterRoles]);
133
+ return legacySectionRoles(permissionsReworkEnabled);
134
+ }, [showLegacyClusterRoles, permissionsReworkEnabled]);
132
135
  return (_jsx(Modal, { open: isOpen, modalHeading: modalHeading, primaryButtonText: safeTranslate(t, 'invitations:invite.buttons.primary', 'Send invite'), secondaryButtonText: safeTranslate(t, 'orgmanagement:common.cancel', 'Cancel'), primaryButtonDisabled: inviteSaving, onRequestClose: close, onRequestSubmit: onSubmit, children: _jsxs(Stack, { gap: 5, children: [_jsx(TextInput, { id: 'c4-invite-email', labelText: safeTranslate(t, 'invitations:invite.form.email', 'Email address'), value: inviteEmail, onChange: (e) => {
133
136
  setInviteError(undefined);
134
137
  setInviteEmail(e.currentTarget.value);
135
138
  }, disabled: inviteSaving, invalid: Boolean(inviteError), invalidText: inviteError }), rolesError && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', title: '', subtitle: rolesError })), _jsxs("fieldset", { className: 'cds--fieldset', children: [_jsx("legend", { className: 'cds--label', children: safeTranslate(t, 'invitations:invite.form.roles', 'Select role(s) to the platform') }), primaryRoles.map((role) => {
136
- const enriched = roleLabelDescription(t, role);
139
+ const enriched = roleLabelDescription(t, role, {
140
+ permissionsReworkEnabled,
141
+ });
137
142
  return (_jsxs("span", { children: [_jsx(Checkbox, { labelText: enriched.label, id: `c4-invite-role-${role}`, checked: inviteRoles.has(role), disabled: inviteSaving, onChange: (_, data) => {
138
143
  setRolesError(undefined);
139
144
  setInviteRoles((current) => {
@@ -153,7 +158,9 @@ export const C4InviteUserToOrganizationModal = forwardRef(({ t, onInviteUser, sh
153
158
  fontSize: 'var(--cds-label-01-font-size, 0.75rem)',
154
159
  marginBlockEnd: '0.5rem',
155
160
  }, children: safeTranslate(t, 'invitations:invite.form.moreRoles', 'Select additional role(s) to clusters on version 8.7 or older') }), legacyClusterRoles.map((role) => {
156
- const enriched = roleLabelDescription(t, role);
161
+ const enriched = roleLabelDescription(t, role, {
162
+ permissionsReworkEnabled,
163
+ });
157
164
  return (_jsxs("span", { children: [_jsx(Checkbox, { labelText: enriched.label, id: `c4-invite-role-${role}`, checked: inviteRoles.has(role), disabled: inviteSaving, onChange: (_, data) => {
158
165
  setRolesError(undefined);
159
166
  setInviteRoles((current) => {
@@ -13,6 +13,7 @@ export interface C4InviteUserToOrganizationModalProps {
13
13
  t?: (key: string, options?: Record<string, unknown>) => string;
14
14
  showAdminRole?: boolean;
15
15
  showLegacyClusterRoles?: boolean;
16
+ permissionsReworkEnabled?: boolean;
16
17
  learnMoreUrl?: string;
17
18
  telemetry?: {
18
19
  track?: (eventName: string, data?: Record<string, unknown>) => void;
@@ -61,7 +61,21 @@ export function C4StructuredListCell(props) {
61
61
  // (only `bottom`/`baseline` would drop it out). Call sites that need
62
62
  // top-alignment (e.g. the multi-line description editor) pass `verticalAlign`
63
63
  // via `style`, which wins over this default.
64
- const style = { verticalAlign: 'middle', ...props.style };
64
+ //
65
+ // Carbon's `noWrap` prop was silently dropped here, so a label cell that
66
+ // asked for it (e.g. the client-credentials "Cluster URL"/"Client Id" rows)
67
+ // fell back to the app-wide DS table-cell rule in `c4-ui.css`
68
+ // (`white-space: normal; overflow-wrap: anywhere`, added for DataTable long
69
+ // content). With no minimum content width to hold it up, the browser's table
70
+ // layout shrank the label column far below its `width` hint whenever the
71
+ // sibling value cell wanted more space, and the label text hard-wrapped one
72
+ // character per line. Re-assert `nowrap` inline (it beats that attribute
73
+ // selector on specificity) to match Carbon's rendering.
74
+ const style = {
75
+ verticalAlign: 'middle',
76
+ ...(props.noWrap && { whiteSpace: 'nowrap', overflowWrap: 'normal' }),
77
+ ...props.style,
78
+ };
65
79
  // A `head` cell is the row label (Carbon's bold left column) → row-scoped th.
66
80
  return props.head ? (_jsx(TableHead, { scope: 'row', style: style, children: props.children })) : (_jsx(TableCell, { style: style, children: props.children }));
67
81
  }
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  */
7
7
  import { LineChart } from '@camunda/design-system';
8
8
  import { useMemo } from 'react';
9
- import { getDsSeriesColor } from './recharts-tokens.js';
9
+ import { getDsSeriesToken } from './recharts-tokens.js';
10
10
  function formatDate(value) {
11
11
  const date = new Date(String(value));
12
12
  return Number.isNaN(date.getTime())
@@ -40,7 +40,7 @@ export function DsLineChart({ title, dataPoints, thresholds, height = 400, }) {
40
40
  const { rows, groups } = useMemo(() => pivotByDate(dataPoints), [dataPoints]);
41
41
  const config = useMemo(() => Object.fromEntries(groups.map((group, index) => [
42
42
  group,
43
- { label: group, color: getDsSeriesColor(index) },
43
+ { label: group, color: getDsSeriesToken(index) },
44
44
  ])), [groups]);
45
45
  const referenceLines = thresholds?.map((threshold) => ({
46
46
  value: threshold.value,
@@ -1,3 +1,4 @@
1
+ import type { ChartSeriesColor } from '@camunda/design-system';
1
2
  import type { TooltipProps } from 'recharts';
2
3
  /**
3
4
  * Design-system chart tokens for recharts (ds mode only).
@@ -12,17 +13,31 @@ import type { TooltipProps } from 'recharts';
12
13
  * Categorical series palette.
13
14
  *
14
15
  * The first five entries reference `@camunda/design-system`'s theme-aware
15
- * `--chart-*` CSS custom properties (the only chart colours shipped in its
16
- * `styles.css`). Charts can render more than five series at once — the Usage
17
- * tab caps at a top-12 clusters + "Other" — so the palette is extended with
18
- * plain colour literals for indices beyond five. These are safe to add here
19
- * (unlike Tailwind-looking classNames, plain colour values need no matching
20
- * entry in the shipped design-system stylesheet) and are mid-tone hues chosen
21
- * to read on both light and dark chart surfaces. Keep the total at or above the
22
- * chart cap so `getDsSeriesColor` only wraps for pathological group counts.
16
+ * `--chart-*` CSS custom properties. DS 0.40 renamed these from numbered
17
+ * (`--chart-1..5`) to named hues and now ships ten of them; these five are the
18
+ * first of the DS's own categorical order. Charts can render more than five
19
+ * series at once — the Usage tab caps at a top-12 clusters + "Other" — so the
20
+ * palette is extended with plain colour literals for indices beyond five. These
21
+ * are safe to add here (unlike Tailwind-looking classNames, plain colour values
22
+ * need no matching entry in the shipped design-system stylesheet) and are
23
+ * mid-tone hues chosen to read on both light and dark chart surfaces. Keep the
24
+ * total at or above the chart cap so `getDsSeriesColor` only wraps for
25
+ * pathological group counts.
23
26
  */
24
- export declare const DS_CHART_CATEGORICAL_COLORS: readonly ["var(--chart-1)", "var(--chart-2)", "var(--chart-3)", "var(--chart-4)", "var(--chart-5)", "#8b5cf6", "#ec4899", "#22c55e", "#3b82f6", "#ef4444", "#06b6d4", "#6366f1", "#84cc16", "#a16207"];
27
+ export declare const DS_CHART_CATEGORICAL_COLORS: readonly ["var(--chart-sky)", "var(--chart-teal)", "var(--chart-orange)", "var(--chart-purple)", "var(--chart-pink)", "#8b5cf6", "#ec4899", "#22c55e", "#3b82f6", "#ef4444", "#06b6d4", "#6366f1", "#84cc16", "#a16207"];
25
28
  export declare function getDsSeriesColor(index: number): string;
29
+ /**
30
+ * The same palette as design-system chart token *names*, for the DS chart
31
+ * components (`ChartConfig.color`) rather than raw recharts props.
32
+ *
33
+ * DS 0.40 narrowed `ChartConfig.color` from an arbitrary CSS string to this
34
+ * token union, which DS expands to `var(--<name>)` itself — so the colour
35
+ * literals above are not usable there. This is the DS's full categorical order
36
+ * (ten hues, the first five shared with `DS_CHART_CATEGORICAL_COLORS`), so DS
37
+ * charts and raw-recharts charts agree for the common ≤5-series case.
38
+ */
39
+ export declare const DS_CHART_SERIES_TOKENS: readonly ["chart-sky", "chart-teal", "chart-orange", "chart-purple", "chart-pink", "chart-blue", "chart-cyan", "chart-fuchsia", "chart-lime", "chart-indigo"];
40
+ export declare function getDsSeriesToken(index: number): ChartSeriesColor;
26
41
  export declare const DS_CHART_GRID_COLOR = "var(--neutral-border-subtle)";
27
42
  export declare const DS_CHART_AXIS_COLOR = "var(--neutral-foreground-subtle)";
28
43
  /** Semantic status colors, for range/threshold-driven charts (meters, gauges). */
@@ -16,21 +16,23 @@
16
16
  * Categorical series palette.
17
17
  *
18
18
  * The first five entries reference `@camunda/design-system`'s theme-aware
19
- * `--chart-*` CSS custom properties (the only chart colours shipped in its
20
- * `styles.css`). Charts can render more than five series at once — the Usage
21
- * tab caps at a top-12 clusters + "Other" — so the palette is extended with
22
- * plain colour literals for indices beyond five. These are safe to add here
23
- * (unlike Tailwind-looking classNames, plain colour values need no matching
24
- * entry in the shipped design-system stylesheet) and are mid-tone hues chosen
25
- * to read on both light and dark chart surfaces. Keep the total at or above the
26
- * chart cap so `getDsSeriesColor` only wraps for pathological group counts.
19
+ * `--chart-*` CSS custom properties. DS 0.40 renamed these from numbered
20
+ * (`--chart-1..5`) to named hues and now ships ten of them; these five are the
21
+ * first of the DS's own categorical order. Charts can render more than five
22
+ * series at once — the Usage tab caps at a top-12 clusters + "Other" — so the
23
+ * palette is extended with plain colour literals for indices beyond five. These
24
+ * are safe to add here (unlike Tailwind-looking classNames, plain colour values
25
+ * need no matching entry in the shipped design-system stylesheet) and are
26
+ * mid-tone hues chosen to read on both light and dark chart surfaces. Keep the
27
+ * total at or above the chart cap so `getDsSeriesColor` only wraps for
28
+ * pathological group counts.
27
29
  */
28
30
  export const DS_CHART_CATEGORICAL_COLORS = [
29
- 'var(--chart-1)',
30
- 'var(--chart-2)',
31
- 'var(--chart-3)',
32
- 'var(--chart-4)',
33
- 'var(--chart-5)',
31
+ 'var(--chart-sky)',
32
+ 'var(--chart-teal)',
33
+ 'var(--chart-orange)',
34
+ 'var(--chart-purple)',
35
+ 'var(--chart-pink)',
34
36
  '#8b5cf6', // violet
35
37
  '#ec4899', // pink
36
38
  '#22c55e', // green
@@ -44,6 +46,31 @@ export const DS_CHART_CATEGORICAL_COLORS = [
44
46
  export function getDsSeriesColor(index) {
45
47
  return DS_CHART_CATEGORICAL_COLORS[index % DS_CHART_CATEGORICAL_COLORS.length];
46
48
  }
49
+ /**
50
+ * The same palette as design-system chart token *names*, for the DS chart
51
+ * components (`ChartConfig.color`) rather than raw recharts props.
52
+ *
53
+ * DS 0.40 narrowed `ChartConfig.color` from an arbitrary CSS string to this
54
+ * token union, which DS expands to `var(--<name>)` itself — so the colour
55
+ * literals above are not usable there. This is the DS's full categorical order
56
+ * (ten hues, the first five shared with `DS_CHART_CATEGORICAL_COLORS`), so DS
57
+ * charts and raw-recharts charts agree for the common ≤5-series case.
58
+ */
59
+ export const DS_CHART_SERIES_TOKENS = [
60
+ 'chart-sky',
61
+ 'chart-teal',
62
+ 'chart-orange',
63
+ 'chart-purple',
64
+ 'chart-pink',
65
+ 'chart-blue',
66
+ 'chart-cyan',
67
+ 'chart-fuchsia',
68
+ 'chart-lime',
69
+ 'chart-indigo',
70
+ ];
71
+ export function getDsSeriesToken(index) {
72
+ return DS_CHART_SERIES_TOKENS[index % DS_CHART_SERIES_TOKENS.length];
73
+ }
47
74
  export const DS_CHART_GRID_COLOR = 'var(--neutral-border-subtle)';
48
75
  export const DS_CHART_AXIS_COLOR = 'var(--neutral-foreground-subtle)';
49
76
  /** Semantic status colors, for range/threshold-driven charts (meters, gauges). */
@@ -41,6 +41,32 @@
41
41
  "label": "Analyst",
42
42
  "description": "Includes Modeler permissions and has full access to Optimize to build process dashboards and reports."
43
43
  },
44
+ "aligned": {
45
+ "owner": {
46
+ "label": "Org Owner",
47
+ "description": "All rights in the organization, including settings, billing, and ownership transfer. Formerly the Owner role."
48
+ },
49
+ "admin": {
50
+ "label": "Org Admin",
51
+ "description": "Manages the organization, its members, and workspaces, and acts as the super-user. Formerly the Admin role."
52
+ },
53
+ "member": {
54
+ "label": "Console Member",
55
+ "description": "Full access to clusters. A legacy role from before 8.8, kept only for the users who already hold it. Formerly the Member role, renamed to distinguish it from the current Member role."
56
+ },
57
+ "modeler": {
58
+ "label": "Member",
59
+ "description": "Full modeling access, the ability to create workspaces and projects, and organization view access. Formerly the Modeler role."
60
+ },
61
+ "operationsengineer": {
62
+ "label": "DevOps",
63
+ "description": "Infrastructure management (clusters, cluster clients, connector secrets, and connectivity) plus Member-level modeling. No member, billing, or organization settings management. Formerly the Operations Engineer role."
64
+ },
65
+ "analyst": {
66
+ "label": "Analyst",
67
+ "description": "Includes Member permissions and adds full access to Optimize to build process dashboards and reports. Optimize access is granted by the Analyst role; access to specific dashboards and reports is governed separately by Optimize collection roles."
68
+ }
69
+ },
44
70
  "oldDescriptions": {
45
71
  "owner": {
46
72
  "label": "Owner",
@@ -46,6 +46,8 @@
46
46
  "label": "Enter a start time."
47
47
  }
48
48
  },
49
+ "15min": "Create a backup every 15 minutes",
50
+ "30min": "Create a backup every 30 minutes",
49
51
  "hourly": "Create a backup every hour starting at",
50
52
  "daily": "Create a backup every day at",
51
53
  "weekly": "Create a backup on specified days at"
@@ -354,6 +354,7 @@
354
354
  "status": {
355
355
  "label": "Status",
356
356
  "wakeLabel": "Resume cluster",
357
+ "wakeDisabledFailoverSource": "This cluster was failed over and can no longer be resumed.",
357
358
  "sleepLabel": "Suspend cluster (internal)",
358
359
  "waitingForInputTooltip": "Waiting for external encryption to be configured",
359
360
  "wakeError": {
@@ -33,7 +33,10 @@
33
33
  "rename": "Rename",
34
34
  "delete": "Delete",
35
35
  "resume": "Resume",
36
- "failover": "Failover"
36
+ "resumeUnavailableFailoverSource": "Resume (unavailable — this cluster was failed over)",
37
+ "failover": "Failover",
38
+ "failoverSyncPending": "Failover (unavailable until backup data is synced to the secondary region)",
39
+ "failoverAlreadyFailedOver": "Failover (unavailable — this cluster was already failed over)"
37
40
  }
38
41
  },
39
42
  "details": {
@@ -25,6 +25,14 @@ export interface UseC4ClusterNavEntriesOptions {
25
25
  appTeaserHrefs?: Partial<Record<CamundaWebApp, string>>;
26
26
  /** Consumer label overrides, keyed by resolved alias. */
27
27
  appLabels?: Partial<Record<CamundaWebApp, string>>;
28
+ /**
29
+ * When `false`, the hook is fully idle: it fetches nothing, reads (and so
30
+ * subscribes to) nothing in the data store, and returns an empty array. Use
31
+ * this to prevent unauthenticated requests when mounting above the auth
32
+ * boundary — a truthy `orgId` is not the same precondition as having a
33
+ * session. Defaults to `true`.
34
+ */
35
+ enabled?: boolean;
28
36
  }
29
37
  /**
30
38
  * Headless equivalent of c3's `useClusterSidebarEntries`. Reads the org's
@@ -33,6 +41,8 @@ export interface UseC4ClusterNavEntriesOptions {
33
41
  * presentational navigation library maps `app` to its own icon and renders the
34
42
  * rows. Returns `[]` while data is loading or nothing is renderable.
35
43
  *
44
+ * Pass `enabled: false` to keep it idle when mounted above authentication.
45
+ *
36
46
  * Requires `C4ConsoleRuntimeProvider` + `C4ConsoleDataProvider`.
37
47
  */
38
48
  export declare function useC4ClusterNavEntries(orgId: string, options?: UseC4ClusterNavEntriesOptions): C4ClusterNavEntry[];
@@ -62,6 +72,14 @@ export interface UseC4WebappBreadcrumbDataOptions {
62
72
  * (`webappLinks.modeler`). Falls back to `runtime.publicUrls.modelerBaseUrl`.
63
73
  */
64
74
  webappLinks?: Partial<Record<CamundaWebApp, string>>;
75
+ /**
76
+ * When `false`, the hook is fully idle: it fetches nothing, reads (and so
77
+ * subscribes to) nothing in the data store, and returns an empty array. Use
78
+ * this to prevent unauthenticated requests when mounting above the auth
79
+ * boundary — e.g. `enabled={isAuthenticated && Boolean(orgId)}`. Defaults to
80
+ * `true`.
81
+ */
82
+ enabled?: boolean;
65
83
  }
66
84
  /**
67
85
  * Headless equivalent of c3's `useClusterWebappBreadcrumbs`. Builds the