@camunda/ccma-saas-frontend 0.0.36 → 0.0.37

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 (44) hide show
  1. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +39 -28
  2. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +2 -1
  3. package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.d.ts +1 -0
  4. package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.js +87 -0
  5. package/lib/esm/components/c4-cluster-overview/applications.d.ts +5 -1
  6. package/lib/esm/components/c4-cluster-overview/applications.js +52 -3
  7. package/lib/esm/components/c4-cluster-overview/applications.spec.d.ts +1 -0
  8. package/lib/esm/components/c4-cluster-overview/applications.spec.js +26 -0
  9. package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +8 -0
  10. package/lib/esm/components/c4-cluster-overview/cluster-details.js +26 -7
  11. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +1 -1
  12. package/lib/esm/externalUrls.const.d.ts +2 -1
  13. package/lib/esm/externalUrls.const.js +2 -1
  14. package/lib/esm/i18n/c4-console-i18n.js +0 -5
  15. package/lib/esm/i18n/en/pages/clusterdetails.json +13 -1
  16. package/lib/esm/i18n/en/pages/createcluster.json +1 -1
  17. package/lib/esm/runtime/build-cluster-swagger-url.d.ts +17 -0
  18. package/lib/esm/runtime/build-cluster-swagger-url.js +44 -0
  19. package/lib/esm/runtime/c4-console-authz.d.ts +1 -0
  20. package/lib/esm/runtime/c4-console-authz.js +4 -3
  21. package/lib/esm/runtime/c4-console-authz.spec.js +6 -2
  22. package/lib/esm/runtime/to-api-domain.d.ts +25 -0
  23. package/lib/esm/runtime/to-api-domain.js +46 -0
  24. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +4 -5
  25. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +0 -11
  26. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +1 -1
  27. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +18 -2
  28. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +1 -0
  29. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +50 -20
  30. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +142 -0
  31. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +34 -3
  32. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +74 -1
  33. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +2 -1
  34. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +1 -1
  35. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +3 -14
  36. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +0 -1
  37. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +1 -1
  38. package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
  39. package/lib/esm/widgets/group-details/c4-group-details-page.js +35 -26
  40. package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +0 -1
  41. package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
  42. package/lib/esm/widgets/user-details/c4-user-details-page.js +42 -67
  43. package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +0 -1
  44. package/package.json +16 -16
@@ -7,8 +7,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
7
7
  import { C3ClusterTag, C3DataTable, } from '@camunda/camunda-composite-components';
8
8
  import { Button, InlineNotification, Link } from '@carbon/react';
9
9
  import { Add, WarningAltFilled } from '@carbon/react/icons/index.esm.js';
10
- import { useCallback, useEffect, useLayoutEffect, useRef, } from 'react';
11
- import { ClusterStatusElement } from '../c4-cluster-overview/applications.js';
10
+ import { useCallback, useEffect, useRef, } from 'react';
11
+ import { ClusterStatusElement, normalizeClusterStatus, } from '../c4-cluster-overview/applications.js';
12
12
  import { C4IconAndTextElement, getClusterLoadConfig, } from '../c4-cluster-overview/c4-cluster-overview.js';
13
13
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
14
14
  import { C4PageTemplate } from '../c4-page-template/c4-page-template.js';
@@ -61,6 +61,31 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
61
61
  selectedPageRef.current = page;
62
62
  }
63
63
  }, [readPageSelect]);
64
+ const applySelectedPageToDom = useCallback(() => {
65
+ const pageSelect = readPageSelect();
66
+ if (!pageSelect) {
67
+ return;
68
+ }
69
+ const currentPage = Number(pageSelect.value);
70
+ const currentPageSize = Number(readPageSizeSelect()?.value);
71
+ const pageSize = Number.isFinite(currentPageSize) && currentPageSize > 0
72
+ ? currentPageSize
73
+ : DEFAULT_PAGE_SIZE;
74
+ const maxPage = Math.max(1, Math.ceil(stableClusters.length / pageSize));
75
+ const nextPage = Math.min(selectedPageRef.current, maxPage);
76
+ selectedPageRef.current = nextPage;
77
+ if (nextPage <= 1 || currentPage === nextPage) {
78
+ return;
79
+ }
80
+ pageSelect.value = String(nextPage);
81
+ pageSelect.dispatchEvent(new Event('change', { bubbles: true }));
82
+ syncSelectedPageFromDom();
83
+ }, [
84
+ readPageSelect,
85
+ readPageSizeSelect,
86
+ stableClusters.length,
87
+ syncSelectedPageFromDom,
88
+ ]);
64
89
  const scheduleSelectedPageSync = useCallback(() => {
65
90
  if (typeof window === 'undefined') {
66
91
  return;
@@ -98,34 +123,17 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
98
123
  }
99
124
  };
100
125
  }, []);
101
- useLayoutEffect(() => {
126
+ useEffect(() => {
102
127
  if (typeof window === 'undefined') {
103
128
  return;
104
129
  }
105
- const pageSelect = readPageSelect();
106
- if (!pageSelect) {
107
- return;
108
- }
109
- const currentPage = Number(pageSelect.value);
110
- const currentPageSize = Number(readPageSizeSelect()?.value);
111
- const pageSize = Number.isFinite(currentPageSize) && currentPageSize > 0
112
- ? currentPageSize
113
- : DEFAULT_PAGE_SIZE;
114
- const maxPage = Math.max(1, Math.ceil(stableClusters.length / pageSize));
115
- const nextPage = Math.min(selectedPageRef.current, maxPage);
116
- selectedPageRef.current = nextPage;
117
- if (nextPage <= 1 || currentPage === nextPage) {
118
- return;
119
- }
120
- pageSelect.value = String(nextPage);
121
- pageSelect.dispatchEvent(new Event('change', { bubbles: true }));
122
- syncSelectedPageFromDom();
123
- }, [
124
- readPageSelect,
125
- readPageSizeSelect,
126
- stableClusters,
127
- syncSelectedPageFromDom,
128
- ]);
130
+ const timeoutId = window.setTimeout(() => {
131
+ applySelectedPageToDom();
132
+ }, 0);
133
+ return () => {
134
+ window.clearTimeout(timeoutId);
135
+ };
136
+ }, [applySelectedPageToDom, stableClusters]);
129
137
  const headerData = [
130
138
  {
131
139
  label: translations.headers.name,
@@ -203,7 +211,10 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
203
211
  options: {
204
212
  wrapperOptions: {
205
213
  wrapper: (row) => {
206
- return _jsx(ClusterStatusElement, { status: row.status.toLowerCase() });
214
+ const normalizedStatus = normalizeClusterStatus(row.status);
215
+ return normalizedStatus ? (_jsx(ClusterStatusElement, { status: normalizedStatus, infoTooltip: row.statusInfoTooltip, onInfoClick: normalizedStatus === 'waitingForInput'
216
+ ? () => onNavigate(`${urls.clusterDetails(row.id)}/encryption`)
217
+ : undefined })) : (row.status);
207
218
  },
208
219
  },
209
220
  },
@@ -4,7 +4,8 @@ export interface ClusterListItem {
4
4
  generation: string;
5
5
  type: string;
6
6
  region: string;
7
- status: 'healthy' | 'unhealthy' | 'creating' | 'updating' | 'suspended' | 'resuming' | 'deleting' | string;
7
+ status: 'healthy' | 'unhealthy' | 'creating' | 'updating' | 'waitingForInput' | 'suspended' | 'resuming' | 'deleting' | string;
8
+ statusInfoTooltip?: string;
8
9
  tags: string[];
9
10
  currentClusterLoad?: number;
10
11
  originalIndex?: number;
@@ -0,0 +1,87 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
+ * under one or more contributor license agreements. Licensed under a commercial license.
5
+ * You may not use this file except in compliance with the commercial license.
6
+ */
7
+ import { render, screen } from '@testing-library/react';
8
+ import userEvent from '@testing-library/user-event';
9
+ import { describe, expect, it, vi } from 'vitest';
10
+ import { C4ClusterList } from './c4-cluster-list.js';
11
+ function buildProps() {
12
+ return {
13
+ orgId: 'org-1',
14
+ clusters: [
15
+ {
16
+ id: 'cluster-1',
17
+ name: 'Encryption Setup Cluster',
18
+ generation: '8.9',
19
+ type: 'Production',
20
+ region: 'eu-central-1',
21
+ status: 'waitingForInput',
22
+ statusInfoTooltip: 'Waiting for external encryption to be configured',
23
+ tags: ['prod'],
24
+ originalIndex: 0,
25
+ },
26
+ ],
27
+ loading: false,
28
+ urls: {
29
+ clusterDetails: (clusterId) => `/org/org-1/clusters/${clusterId}`,
30
+ createCluster: '/org/org-1/clusters/create',
31
+ },
32
+ permissions: {
33
+ canCreateCluster: true,
34
+ canEditCluster: true,
35
+ canDeleteCluster: true,
36
+ canUpdateTag: true,
37
+ canSeeClusterLoad: false,
38
+ canWakeCluster: true,
39
+ createClusterButtonDisabled: false,
40
+ },
41
+ onNavigate: vi.fn(),
42
+ onDeleteCluster: vi.fn(),
43
+ onAssignTag: vi.fn(),
44
+ onWakeCluster: vi.fn(),
45
+ translations: {
46
+ title: 'Clusters',
47
+ createButton: 'Create cluster',
48
+ searchLabel: 'Search',
49
+ emptyState: {
50
+ noClusters: 'No clusters',
51
+ },
52
+ headers: {
53
+ name: 'Name',
54
+ generation: 'Generation',
55
+ type: 'Type',
56
+ region: 'Region',
57
+ status: 'Status',
58
+ tags: 'Tags',
59
+ },
60
+ overflowMenu: {
61
+ delete: 'Delete',
62
+ resume: 'Resume',
63
+ },
64
+ tags: {
65
+ addLabel: 'Add tag',
66
+ },
67
+ tooltips: {
68
+ clusterLoad: 'Cluster load',
69
+ },
70
+ },
71
+ isClusterPaused: () => false,
72
+ isRunningOnUnsupportedGeneration: () => false,
73
+ };
74
+ }
75
+ describe('C4ClusterList waitingForInput status', () => {
76
+ it('shows the info icon and routes to encryption details', async () => {
77
+ const user = userEvent.setup();
78
+ const props = buildProps();
79
+ render(_jsx(C4ClusterList, { ...props }));
80
+ const infoButton = screen.getByRole('button', {
81
+ name: 'Waiting for external encryption to be configured',
82
+ });
83
+ expect(infoButton).toBeInTheDocument();
84
+ await user.click(infoButton);
85
+ expect(props.onNavigate).toHaveBeenCalledWith('/org/org-1/clusters/cluster-1/encryption');
86
+ });
87
+ });
@@ -4,9 +4,11 @@ export declare enum StatusColor {
4
4
  UNHEALTHY = "var(--cds-support-error)",
5
5
  CREATING = "var(--cds-support-warning)",
6
6
  UPDATING = "var(--cds-support-warning)",
7
+ WAITING = "var(--cds-support-warning)",
7
8
  SUSPENDED = "var(--cds-icon-secondary)"
8
9
  }
9
- export type ClusterStatus = 'healthy' | 'unhealthy' | 'creating' | 'updating' | 'suspended' | 'resuming';
10
+ export type ClusterStatus = 'healthy' | 'unhealthy' | 'creating' | 'updating' | 'waitingForInput' | 'suspended' | 'resuming';
11
+ export declare const normalizeClusterStatus: (status: string | undefined) => ClusterStatus | undefined;
10
12
  export interface ApplicationTileProps {
11
13
  name: string;
12
14
  status: ClusterStatus;
@@ -30,6 +32,8 @@ export interface ApplicationTileProps {
30
32
  export declare const ClusterStatusElement: (props: {
31
33
  status: ClusterStatus;
32
34
  style?: React.CSSProperties;
35
+ infoTooltip?: string;
36
+ onInfoClick?: () => void;
33
37
  }) => JSX.Element;
34
38
  export declare const ApplicationTile: (props: ApplicationTileProps) => JSX.Element;
35
39
  export interface ApplicationsProps {
@@ -4,8 +4,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  * under one or more contributor license agreements. Licensed under a commercial license.
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
- import { Layer, Link, Loading, Stack, Tile } from '@carbon/react';
8
- import { ArrowRight, CheckmarkFilled, PauseOutlineFilled, PendingFilled, WarningFilled, } from '@carbon/react/icons/index.esm.js';
7
+ import { Layer, Link, Loading, Stack, Tile, Tooltip } from '@carbon/react';
8
+ import { ArrowRight, CheckmarkFilled, Information, PauseOutlineFilled, PendingFilled, WarningFilled, } from '@carbon/react/icons/index.esm.js';
9
9
  import { useEffect, useState } from 'react';
10
10
  import { mediaSizeByWidth } from '../c4-billing-page/elements/current-usage-metrics.js';
11
11
  import { C4TileWithTitleAndAction } from '../c4-tile-with-title-and-action/c4-tile-with-title-and-action.js';
@@ -15,8 +15,32 @@ export var StatusColor;
15
15
  StatusColor["UNHEALTHY"] = "var(--cds-support-error)";
16
16
  StatusColor["CREATING"] = "var(--cds-support-warning)";
17
17
  StatusColor["UPDATING"] = "var(--cds-support-warning)";
18
+ StatusColor["WAITING"] = "var(--cds-support-warning)";
18
19
  StatusColor["SUSPENDED"] = "var(--cds-icon-secondary)";
19
20
  })(StatusColor || (StatusColor = {}));
21
+ export const normalizeClusterStatus = (status) => {
22
+ if (!status) {
23
+ return undefined;
24
+ }
25
+ switch (status.trim().toLowerCase()) {
26
+ case 'healthy':
27
+ return 'healthy';
28
+ case 'unhealthy':
29
+ return 'unhealthy';
30
+ case 'creating':
31
+ return 'creating';
32
+ case 'updating':
33
+ return 'updating';
34
+ case 'waitingforinput':
35
+ return 'waitingForInput';
36
+ case 'suspended':
37
+ return 'suspended';
38
+ case 'resuming':
39
+ return 'resuming';
40
+ default:
41
+ return undefined;
42
+ }
43
+ };
20
44
  export const ClusterStatusElement = (props) => {
21
45
  let icon = null;
22
46
  let text = '';
@@ -42,6 +66,11 @@ export const ClusterStatusElement = (props) => {
42
66
  text = 'Updating';
43
67
  color = StatusColor.UPDATING;
44
68
  break;
69
+ case 'waitingForInput':
70
+ icon = _jsx(PendingFilled, {});
71
+ text = 'Waiting';
72
+ color = StatusColor.WAITING;
73
+ break;
45
74
  case 'suspended':
46
75
  icon = _jsx(PauseOutlineFilled, {});
47
76
  text = 'Paused';
@@ -59,7 +88,27 @@ export const ClusterStatusElement = (props) => {
59
88
  transform: 'translateY(-50%)',
60
89
  display: 'flex',
61
90
  color,
62
- }, children: icon })), _jsx("span", { style: { paddingInlineStart: icon ? '1.2rem' : '0rem' }, children: text })] }) }));
91
+ }, children: icon })), _jsxs("span", { style: {
92
+ paddingInlineStart: icon ? '1.2rem' : '0rem',
93
+ display: 'inline-flex',
94
+ alignItems: 'center',
95
+ gap: '0.125rem',
96
+ }, children: [_jsx("span", { children: text }), props.status === 'waitingForInput' && props.infoTooltip && (_jsx(Tooltip, { align: 'bottom', description: _jsx("span", { style: {
97
+ display: 'block',
98
+ whiteSpace: 'normal',
99
+ maxWidth: '16rem',
100
+ }, children: props.infoTooltip }), children: _jsx("button", { type: 'button', "aria-label": props.infoTooltip, onClick: () => props.onInfoClick?.(), style: {
101
+ display: 'inline-flex',
102
+ alignItems: 'center',
103
+ justifyContent: 'center',
104
+ minBlockSize: '1.5rem',
105
+ minInlineSize: '1.5rem',
106
+ padding: 0,
107
+ border: 0,
108
+ background: 'transparent',
109
+ color: 'var(--cds-icon-primary)',
110
+ cursor: 'pointer',
111
+ }, children: _jsx(Information, {}) }) }))] })] }) }));
63
112
  return component;
64
113
  };
65
114
  export const ApplicationTile = (props) => {
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
4
+ * under one or more contributor license agreements. Licensed under a commercial license.
5
+ * You may not use this file except in compliance with the commercial license.
6
+ */
7
+ import { render, screen } from '@testing-library/react';
8
+ import userEvent from '@testing-library/user-event';
9
+ import { describe, expect, it, vi } from 'vitest';
10
+ import { ClusterStatusElement, normalizeClusterStatus } from './applications.js';
11
+ describe('ClusterStatusElement', () => {
12
+ it('renders waiting for input as waiting and forwards info clicks', async () => {
13
+ const onInfoClick = vi.fn();
14
+ const user = userEvent.setup();
15
+ render(_jsx(ClusterStatusElement, { status: 'waitingForInput', infoTooltip: 'Waiting for external encryption to be configured', onInfoClick: onInfoClick }));
16
+ expect(screen.getByText('Waiting')).toBeInTheDocument();
17
+ await user.click(screen.getByRole('button', {
18
+ name: 'Waiting for external encryption to be configured',
19
+ }));
20
+ expect(onInfoClick).toHaveBeenCalledTimes(1);
21
+ });
22
+ it('normalizes waiting for input status values', () => {
23
+ expect(normalizeClusterStatus('WaitingForInput')).toBe('waitingForInput');
24
+ expect(normalizeClusterStatus('waitingforinput')).toBe('waitingForInput');
25
+ });
26
+ });
@@ -33,6 +33,8 @@ export interface ClusterDetailsProps {
33
33
  wakeVisibility: boolean;
34
34
  sleepAction?: () => void;
35
35
  sleepLabel?: string;
36
+ infoTooltip?: string;
37
+ onInfoClick?: () => void;
36
38
  };
37
39
  generation: {
38
40
  label: string;
@@ -87,6 +89,12 @@ export interface ClusterDetailsProps {
87
89
  label: string;
88
90
  value: string;
89
91
  };
92
+ swaggerUrl?: {
93
+ label: string;
94
+ url: string;
95
+ linkLabel: string;
96
+ pausedWarning?: string;
97
+ };
90
98
  }
91
99
  export declare const ClusterDetails: (props: ClusterDetailsProps) => JSX.Element;
92
100
  export interface ClusterDetailsGenerationUpdateProps {
@@ -5,13 +5,13 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { C3ClusterTag, } from '@camunda/camunda-composite-components';
8
- import { Button, CodeSnippet, Layer, StructuredListBody, StructuredListCell, StructuredListRow, StructuredListWrapper, TextArea, } from '@carbon/react';
9
- import { Add, Information, Pause, Play, UpdateNow } from '@carbon/react/icons/index.esm.js';
8
+ import { Button, CodeSnippet, Layer, Link, StructuredListBody, StructuredListCell, StructuredListRow, StructuredListWrapper, TextArea, Tooltip, } from '@carbon/react';
9
+ import { Add, Information, Launch, Pause, Play, UpdateNow, WarningAltFilled, } from '@carbon/react/icons/index.esm.js';
10
10
  import { useEffect, useRef, useState } from 'react';
11
11
  import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
12
12
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
13
13
  import { C4TileWithTitleAndAction } from '../c4-tile-with-title-and-action/c4-tile-with-title-and-action.js';
14
- import { ClusterStatusElement } from './applications.js';
14
+ import { ClusterStatusElement, normalizeClusterStatus, } from './applications.js';
15
15
  export const ClusterDetails = (props) => {
16
16
  const [isEditingDescription, setIsEditingDescription] = useState(false);
17
17
  const [descriptionValue, setDescriptionValue] = useState('');
@@ -42,14 +42,14 @@ export const ClusterDetails = (props) => {
42
42
  setDescriptionError('');
43
43
  setIsEditingDescription(false);
44
44
  };
45
+ const normalizedStatus = normalizeClusterStatus(props.status?.value);
45
46
  const rowStyle = {
46
47
  height: '61px',
47
48
  maxHeight: '61px',
48
49
  minHeight: '61px',
49
50
  };
50
51
  const renderStatusButton = () => {
51
- if (props?.status?.value.toLowerCase() === 'suspended' &&
52
- props?.status.wakeVisibility) {
52
+ if (normalizedStatus === 'suspended' && props?.status?.wakeVisibility) {
53
53
  return (_jsx(Button, { onClick: () => props.status?.wakeAction(), size: 'sm', renderIcon: Play, children: props.status.wakeLabel }));
54
54
  }
55
55
  if (props?.status?.sleepAction) {
@@ -98,7 +98,7 @@ export const ClusterDetails = (props) => {
98
98
  gridAutoFlow: 'column',
99
99
  gap: '1.5rem',
100
100
  alignItems: 'center',
101
- }, children: [_jsx(ClusterStatusElement, { status: props.status.value.toLowerCase() }), renderStatusButton()] }) })] })), _jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.generation.label }), _jsx(StructuredListCell, { children: _jsxs("div", { style: {
101
+ }, children: [normalizedStatus ? (_jsx(ClusterStatusElement, { status: normalizedStatus, infoTooltip: props.status.infoTooltip, onInfoClick: props.status.onInfoClick })) : (props.status.value), renderStatusButton()] }) })] })), _jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.generation.label }), _jsx(StructuredListCell, { children: _jsxs("div", { style: {
102
102
  display: 'grid',
103
103
  gridTemplateColumns: 'auto 1fr',
104
104
  gap: '0.5rem',
@@ -112,7 +112,26 @@ export const ClusterDetails = (props) => {
112
112
  display: 'grid',
113
113
  gridTemplateColumns: 'auto 1fr',
114
114
  gap: '0.5rem',
115
- }, children: props.tags.value?.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("div", { children: props.tags.value.map((tag) => (_jsx(C3ClusterTag, { stage: tag }, `cluster-tag-${tag}`))) }), props.tags.updateVisible && (_jsx(C4LinkButton, { label: props.tags.updateTagLabel, onClick: () => props.tags?.updateAction(), style: { alignSelf: 'center' }, disabled: props.tags.updateDisabled }))] })) : (props.tags.updateVisible && (_jsx(C4LinkButton, { label: props.tags.addTagLabel, onClick: () => props.tags?.updateAction(), style: { alignSelf: 'center' }, icon: _jsx(Add, {}), disabled: props.tags.updateDisabled }))) }) })] })), props.regionId && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.regionId.label }), _jsx(StructuredListCell, { children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.regionId.value }) }) })] })), props.backupRegionId && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.backupRegionId.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.backupRegionId.value }) }) })] })), _jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.id.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.id.value }) }) })] }), props.created && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.created.label }), _jsx(StructuredListCell, { noWrap: true, children: props.created.value })] }))] }) })] }));
115
+ }, children: props.tags.value?.length > 0 ? (_jsxs(_Fragment, { children: [_jsx("div", { children: props.tags.value.map((tag) => (_jsx(C3ClusterTag, { stage: tag }, `cluster-tag-${tag}`))) }), props.tags.updateVisible && (_jsx(C4LinkButton, { label: props.tags.updateTagLabel, onClick: () => props.tags?.updateAction(), style: { alignSelf: 'center' }, disabled: props.tags.updateDisabled }))] })) : (props.tags.updateVisible && (_jsx(C4LinkButton, { label: props.tags.addTagLabel, onClick: () => props.tags?.updateAction(), style: { alignSelf: 'center' }, icon: _jsx(Add, {}), disabled: props.tags.updateDisabled }))) }) })] })), props.regionId && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.regionId.label }), _jsx(StructuredListCell, { children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.regionId.value }) }) })] })), props.backupRegionId && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.backupRegionId.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.backupRegionId.value }) }) })] })), _jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.id.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsx(Layer, { style: { height: '0px', width: 'calc(100% - 4rem)' }, children: _jsx(CodeSnippet, { type: 'single', style: { maxWidth: '22rem' }, children: props.id.value }) }) })] }), props.swaggerUrl && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.swaggerUrl.label }), _jsx(StructuredListCell, { noWrap: true, children: _jsxs("span", { style: {
116
+ display: 'inline-flex',
117
+ alignItems: 'center',
118
+ gap: 'var(--cds-spacing-02)',
119
+ }, children: [props.swaggerUrl.pausedWarning && (_jsx(Tooltip, { align: 'bottom', description: _jsx("span", { style: {
120
+ display: 'block',
121
+ whiteSpace: 'normal',
122
+ maxWidth: '16rem',
123
+ }, children: props.swaggerUrl.pausedWarning }), children: _jsx("button", { type: 'button', "aria-label": props.swaggerUrl.pausedWarning, style: {
124
+ display: 'inline-flex',
125
+ alignItems: 'center',
126
+ padding: 0,
127
+ border: 0,
128
+ background: 'transparent',
129
+ color: 'var(--cds-support-warning)',
130
+ cursor: 'default',
131
+ }, children: _jsx(WarningAltFilled, {}) }) })), _jsxs(Link, { href: props.swaggerUrl.url, target: '_blank', rel: 'noopener noreferrer', children: [props.swaggerUrl.linkLabel, _jsx(Launch, { style: {
132
+ marginLeft: 'var(--cds-spacing-02)',
133
+ verticalAlign: 'middle',
134
+ } })] })] }) })] })), props.created && (_jsxs(StructuredListRow, { style: rowStyle, children: [_jsx(StructuredListCell, { noWrap: true, children: props.created.label }), _jsx(StructuredListCell, { noWrap: true, children: props.created.value })] }))] }) })] }));
116
135
  return component;
117
136
  };
118
137
  export const ClusterDetailsGenerationUpdate = (props) => {
@@ -49,7 +49,7 @@ function C4JobDashboardErrorTable({ errors, operateBaseUrl, isLoading, translati
49
49
  : [];
50
50
  return (_jsxs(_Fragment, { children: [_jsx("h2", { children: translations.errorTable.title }), _jsx(C3DataTable, { id: 'errors-data-table', data: rows, headers: [
51
51
  {
52
- key: 'errorType',
52
+ key: 'errorCode',
53
53
  label: noWrapLabel(translations.errorTable.headers.errorType),
54
54
  },
55
55
  {
@@ -10,6 +10,7 @@ export declare const C4_EXTERNAL_URLS: {
10
10
  readonly consoleApiClients: "https://docs.camunda.io/docs/next/apis-tools/administration-api/administration-api-reference/";
11
11
  readonly consoleAlerts: "https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-alerts/";
12
12
  readonly consoleClusterClients: "https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-api-clients/";
13
+ readonly consoleManageConnectors: "https://docs.camunda.io/docs/components/console/manage-connectors/";
13
14
  readonly connectorSecrets: "https://docs.camunda.io/docs/next/components/connectors/use-connectors/#using-secrets";
14
15
  readonly consoleIpWhitelist: "https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-ip-allowlists/";
15
16
  readonly conceptsRBA: "https://docs.camunda.io/docs/components/concepts/resource-authorizations/";
@@ -41,7 +42,7 @@ export declare const C4_EXTERNAL_URLS: {
41
42
  readonly autoPause: "https://docs.camunda.io/docs/components/concepts/clusters/#auto-pause";
42
43
  };
43
44
  readonly auditLog: "https://docs.camunda.io/docs/next/components/audit-log/overview/";
44
- readonly secureConnectivity: "https://docs.camunda.io/components/saas/secure-connectivity/";
45
+ readonly secureConnectivity: "https://docs.camunda.io/docs/components/saas/secure-connectivity/secure-connectivity-AWS/";
45
46
  readonly releasePolicy: "https://camunda.com/release-policy/";
46
47
  readonly jobDashboard: {
47
48
  readonly roles: "https://docs.camunda.io/docs/components/identity/role/";
@@ -8,6 +8,7 @@ export const C4_EXTERNAL_URLS = {
8
8
  consoleApiClients: 'https://docs.camunda.io/docs/next/apis-tools/administration-api/administration-api-reference/',
9
9
  consoleAlerts: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-alerts/',
10
10
  consoleClusterClients: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-api-clients/',
11
+ consoleManageConnectors: 'https://docs.camunda.io/docs/components/console/manage-connectors/',
11
12
  connectorSecrets: 'https://docs.camunda.io/docs/next/components/connectors/use-connectors/#using-secrets',
12
13
  consoleIpWhitelist: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/manage-ip-allowlists/',
13
14
  conceptsRBA: 'https://docs.camunda.io/docs/components/concepts/resource-authorizations/',
@@ -39,7 +40,7 @@ export const C4_EXTERNAL_URLS = {
39
40
  autoPause: 'https://docs.camunda.io/docs/components/concepts/clusters/#auto-pause',
40
41
  },
41
42
  auditLog: 'https://docs.camunda.io/docs/next/components/audit-log/overview/',
42
- secureConnectivity: 'https://docs.camunda.io/components/saas/secure-connectivity/',
43
+ secureConnectivity: 'https://docs.camunda.io/docs/components/saas/secure-connectivity/secure-connectivity-AWS/',
43
44
  releasePolicy: 'https://camunda.com/release-policy/',
44
45
  jobDashboard: {
45
46
  roles: 'https://docs.camunda.io/docs/components/identity/role/',
@@ -81,11 +81,6 @@ const resources = {
81
81
  subtitle: 'Update the cluster to access the latest features.',
82
82
  actionLabel: 'Learn more',
83
83
  },
84
- authorizationsEnabled: {
85
- title: 'Authorizations enabled',
86
- subtitle: 'Access to this cluster’s resources is restricted based on permissions set in the Admin component.',
87
- actionLabel: 'Learn more about managing authorizations',
88
- },
89
84
  authorizationsDisabled: {
90
85
  title: 'Authorizations disabled',
91
86
  subtitle: 'All authenticated users & clients have full access to this cluster’s resources. To restrict access, enable authorizations in the settings.',
@@ -303,11 +303,15 @@
303
303
  "status": {
304
304
  "label": "Status",
305
305
  "wakeLabel": "Resume cluster",
306
- "sleepLabel": "Suspend cluster (internal)"
306
+ "sleepLabel": "Suspend cluster (internal)",
307
+ "waitingForInputTooltip": "Waiting for external encryption to be configured"
307
308
  },
308
309
  "title": "Cluster Details",
309
310
  "clusterId": "Cluster Id",
310
311
  "createdAt": "Created at",
312
+ "swaggerUrl": "Swagger UI",
313
+ "openSwaggerUi": "Open Swagger UI",
314
+ "swaggerUiPausedWarning": "Not accessible while the cluster is paused",
311
315
  "provider": "Provider",
312
316
  "region": "Region",
313
317
  "regionId": "Region Id",
@@ -539,6 +543,7 @@
539
543
  "description": "The Orchestration Cluster REST API is documented using the",
540
544
  "spec": "OpenAPI specification",
541
545
  "description2": ". When enabled, it is accessible via Swagger UI.",
546
+ "accessSwagger": "Access your cluster Swagger UI:",
542
547
  "description3": "Learn more about ",
543
548
  "description4": "accessing API endpoints via Swagger UI.",
544
549
  "action": {
@@ -588,6 +593,13 @@
588
593
  "button": {
589
594
  "enable": "Enable",
590
595
  "disable": "Disable"
596
+ },
597
+ "modal": {
598
+ "heading": "Upgrade to Tasklist v2",
599
+ "description": "This action cannot be undone. Once upgraded to Tasklist v2, downgrading back to v1 will not be possible.",
600
+ "confirm": "Upgrade to Tasklist v2",
601
+ "cancel": "Cancel",
602
+ "error": "We're having trouble upgrading to Tasklist v2. Please try again later."
591
603
  }
592
604
  },
593
605
  "tags": {
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "region": {
38
38
  "title": "Select region",
39
- "description": "To minimze network latency and traffic costs, select your prefered cloud provider and a region near your client application and/or users.",
39
+ "description": "To minimize network latency and traffic costs, select your preferred cloud provider and a region near your client application and/or users.",
40
40
  "teaseForEnterprise": "Custom regions are available in the Enterprise plan and you can <0>contact us</0> to know more.",
41
41
  "validationMessage": "Please select a region for your cluster"
42
42
  },
@@ -0,0 +1,17 @@
1
+ import type { ConsoleClusterDto } from '@camunda/ccma-shared-types';
2
+ import type { ConsoleStage } from './c4-console-runtime.types';
3
+ /**
4
+ * Builds the cluster-specific Swagger UI URL.
5
+ *
6
+ * Returns `undefined` when the swagger feature is disabled or when the cluster
7
+ * status does not yet carry an operateUrl (e.g. cluster is still being created).
8
+ *
9
+ * URL format depends on the cluster generation version:
10
+ * - Camunda 8.8.x: https://{regionId}.operate.{domain}/{clusterId}/swagger-ui/index.html
11
+ * - Camunda 8.9+: https://{regionId}.api.{domain}/{clusterId}/swagger
12
+ */
13
+ export declare function buildClusterSwaggerUrl(params: {
14
+ cluster: Pick<ConsoleClusterDto, 'status' | 'externalMetadata' | 'generation'>;
15
+ clusterId: string;
16
+ stage: ConsoleStage;
17
+ }): string | undefined;
@@ -0,0 +1,44 @@
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
+ import { checkVersion, VersionCheckOperator } from '@camunda/ccma-shared-types';
7
+ import { toServiceDomain } from './to-api-domain.js';
8
+ /**
9
+ * Builds the cluster-specific Swagger UI URL.
10
+ *
11
+ * Returns `undefined` when the swagger feature is disabled or when the cluster
12
+ * status does not yet carry an operateUrl (e.g. cluster is still being created).
13
+ *
14
+ * URL format depends on the cluster generation version:
15
+ * - Camunda 8.8.x: https://{regionId}.operate.{domain}/{clusterId}/swagger-ui/index.html
16
+ * - Camunda 8.9+: https://{regionId}.api.{domain}/{clusterId}/swagger
17
+ */
18
+ export function buildClusterSwaggerUrl(params) {
19
+ const swaggerEnabled = params.cluster.externalMetadata?.swagger ?? true;
20
+ const operateUrl = params.cluster?.status?.operateUrl;
21
+ if (!swaggerEnabled || !operateUrl) {
22
+ return undefined;
23
+ }
24
+ let regionId;
25
+ try {
26
+ regionId = new URL(operateUrl).hostname.split('.')[0];
27
+ }
28
+ catch {
29
+ return undefined;
30
+ }
31
+ const zeebeVersion = params.cluster.generation?.versions?.zeebe;
32
+ const is89OrHigher = checkVersion({
33
+ possiblyVersionOrDockerPath: zeebeVersion,
34
+ trueForSnapshot: true,
35
+ trueOnInvalidVersion: false,
36
+ versionToCompareTo: '8.9.0',
37
+ operator: VersionCheckOperator.GreaterThanOrEqual,
38
+ });
39
+ if (is89OrHigher) {
40
+ return `https://${regionId}.${toServiceDomain(params.stage, 'api')}/${params.clusterId}/swagger`;
41
+ }
42
+ // Camunda 8.8.x format
43
+ return `https://${regionId}.${toServiceDomain(params.stage, 'operate')}/${params.clusterId}/swagger-ui/index.html`;
44
+ }
@@ -10,6 +10,7 @@ export interface C4ConsoleVisibilities {
10
10
  canDelete?: boolean;
11
11
  canUpdateTag?: boolean;
12
12
  canWake?: boolean;
13
+ canSleep?: boolean;
13
14
  canSeeClusterLoad?: boolean;
14
15
  };
15
16
  }
@@ -120,9 +120,10 @@ export function deriveConsoleAuthzFromAccessToken(params) {
120
120
  clusters: {
121
121
  canCreate: canCreateFromOrgPermissions ?? clusters.createOnBehalf,
122
122
  canDelete: canDeleteFromOrgPermissions ?? clusters.canDeleteAllClusters,
123
- // Prefer org-level permissions where available (see useC4ConsoleAuthz).
124
- // This token-scope is kept as a fallback for internal users.
125
- canWake: canWakeFromOrgPermissions ?? clusters.canSendToSleep,
123
+ // Users must be able to resume auto-suspended clusters via org access.
124
+ // Internal manual sleep stays token-scoped via canSleep.
125
+ canWake: Boolean(canWakeFromOrgPermissions || clusters.canSendToSleep),
126
+ canSleep: clusters.canSendToSleep,
126
127
  canEdit: canEditFromOrgPermissions ??
127
128
  (clusters.canOverrideEnvVars ||
128
129
  clusters.canUpdateClusterPlanType ||