@camunda/ccma-saas-frontend 0.0.36 → 0.0.38

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 (61) hide show
  1. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +1 -1
  2. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +10 -4
  3. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.d.ts +2 -0
  4. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +39 -28
  5. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +2 -1
  6. package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.d.ts +1 -0
  7. package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.js +87 -0
  8. package/lib/esm/components/c4-cluster-overview/applications.d.ts +5 -1
  9. package/lib/esm/components/c4-cluster-overview/applications.js +70 -9
  10. package/lib/esm/components/c4-cluster-overview/applications.spec.d.ts +1 -0
  11. package/lib/esm/components/c4-cluster-overview/applications.spec.js +32 -0
  12. package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +8 -0
  13. package/lib/esm/components/c4-cluster-overview/cluster-details.js +26 -7
  14. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +1 -1
  15. package/lib/esm/components/c4-page-template/c4-page-template.d.ts +1 -0
  16. package/lib/esm/components/c4-page-template/c4-page-template.js +1 -1
  17. package/lib/esm/externalUrls.const.d.ts +2 -1
  18. package/lib/esm/externalUrls.const.js +2 -1
  19. package/lib/esm/i18n/c4-console-i18n.js +0 -5
  20. package/lib/esm/i18n/en/pages/clusterdetails.json +13 -1
  21. package/lib/esm/i18n/en/pages/createcluster.json +1 -1
  22. package/lib/esm/runtime/build-cluster-swagger-url.d.ts +17 -0
  23. package/lib/esm/runtime/build-cluster-swagger-url.js +44 -0
  24. package/lib/esm/runtime/c4-console-authz.d.ts +1 -0
  25. package/lib/esm/runtime/c4-console-authz.js +4 -3
  26. package/lib/esm/runtime/c4-console-authz.spec.js +6 -2
  27. package/lib/esm/runtime/to-api-domain.d.ts +25 -0
  28. package/lib/esm/runtime/to-api-domain.js +46 -0
  29. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +5 -5
  30. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +40 -20
  31. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +26 -0
  32. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +3 -2
  33. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +18 -2
  34. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +9 -2
  35. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +1 -1
  36. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +1 -0
  37. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +69 -34
  38. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +142 -0
  39. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +47 -13
  40. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +74 -1
  41. package/lib/esm/widgets/clusters/c4-clusters-page.js +5 -8
  42. package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +97 -15
  43. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +2 -1
  44. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +1 -1
  45. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +3 -14
  46. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +0 -1
  47. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +5 -2
  48. package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
  49. package/lib/esm/widgets/group-details/c4-group-details-page.js +35 -26
  50. package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +0 -1
  51. package/lib/esm/widgets/is-cluster-reconciliation-paused.d.ts +6 -0
  52. package/lib/esm/widgets/is-cluster-reconciliation-paused.js +54 -0
  53. package/lib/esm/widgets/management/c4-management-app.js +12 -0
  54. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.d.ts +2 -1
  55. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +33 -27
  56. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.spec.d.ts +1 -0
  57. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.spec.js +246 -0
  58. package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
  59. package/lib/esm/widgets/user-details/c4-user-details-page.js +42 -67
  60. package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +0 -1
  61. package/package.json +16 -16
@@ -1,3 +1,3 @@
1
1
  import type { JSX } from 'react';
2
2
  import type { C4BreadcrumbProps } from './c4-breadcrumb.types';
3
- export declare const C4Breadcrumb: ({ loading, noTrailingSlash, elements, title, menu, tag, codeSnippet, }: C4BreadcrumbProps) => JSX.Element;
3
+ export declare const C4Breadcrumb: ({ loading, noTrailingSlash, elements, title, menu, tag, indicator, codeSnippet, }: C4BreadcrumbProps) => JSX.Element;
@@ -9,10 +9,16 @@ const breadCrumbWrapperStyles = {
9
9
  minHeight: '40px',
10
10
  display: 'grid',
11
11
  gridAutoFlow: 'column',
12
- gridAutoColumns: 'max-content',
12
+ gridAutoColumns: '1fr',
13
13
  alignItems: 'center',
14
14
  };
15
- export const C4Breadcrumb = ({ loading, noTrailingSlash, elements, title, menu, tag, codeSnippet, }) => {
15
+ const headerRowStyles = {
16
+ minHeight: '40px',
17
+ display: 'flex',
18
+ alignItems: 'center',
19
+ gap: '1rem',
20
+ };
21
+ export const C4Breadcrumb = ({ loading, noTrailingSlash, elements, title, menu, tag, indicator, codeSnippet, }) => {
16
22
  let breadcrumb = null;
17
23
  if (loading) {
18
24
  breadcrumb = _jsx(BreadcrumbSkeleton, {});
@@ -25,9 +31,9 @@ export const C4Breadcrumb = ({ loading, noTrailingSlash, elements, title, menu,
25
31
  element.onClick();
26
32
  }
27
33
  }, style: { cursor: 'pointer' }, children: element.label }) }, element.key));
28
- }) }), (menu || title || tag || codeSnippet) && (_jsxs("div", { style: breadCrumbWrapperStyles, children: [_jsxs(Stack, { orientation: 'horizontal', gap: 4, children: [title && _jsx("h2", { style: { marginTop: '2px' }, children: title }), tag && _jsx(Tag, { type: 'blue', children: tag }), codeSnippet?.text && (_jsx(CodeSnippet, { feedback: codeSnippet?.copyFeedback, type: 'inline', children: codeSnippet.text }))] }), menu && (_jsx(OverflowMenu, { style: { float: 'right' }, "aria-label": 'cluster operations', children: menu.map((item) => {
34
+ }) }), (menu || title || tag || indicator || codeSnippet) && (_jsxs("div", { style: headerRowStyles, children: [_jsxs(Stack, { orientation: 'horizontal', gap: 4, children: [title && _jsx("h2", { style: { marginTop: '2px' }, children: title }), tag && _jsx(Tag, { type: 'blue', children: tag }), codeSnippet?.text && (_jsx(CodeSnippet, { feedback: codeSnippet?.copyFeedback, type: 'inline', children: codeSnippet.text }))] }), menu && (_jsx(OverflowMenu, { "aria-label": 'cluster operations', children: menu.map((item) => {
29
35
  return (_jsx(OverflowMenuItem, { id: item.key, onClick: () => item.onClick(), itemText: item.label, isDelete: item.isDelete }, item.key));
30
- }) }))] }))] }));
36
+ }) })), indicator && _jsx("div", { style: { marginLeft: 'auto' }, children: indicator })] }))] }));
31
37
  }
32
38
  return _jsx("div", { style: breadCrumbWrapperStyles, children: breadcrumb });
33
39
  };
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from 'react';
1
2
  export interface C4BreadcrumbProps {
2
3
  loading?: boolean;
3
4
  noTrailingSlash?: boolean;
@@ -9,6 +10,7 @@ export interface C4BreadcrumbProps {
9
10
  }>;
10
11
  title?: string;
11
12
  tag?: string;
13
+ indicator?: ReactNode;
12
14
  codeSnippet?: {
13
15
  text: string;
14
16
  copyFeedback: string;
@@ -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' | 'maintenance';
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,20 +4,49 @@ 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 { preview__IconIndicator as IconIndicator, 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';
12
+ const MAINTENANCE_STATUS_TEXT = 'Maintenance';
13
+ const MAINTENANCE_INDICATOR_KIND = 'undefined';
12
14
  export var StatusColor;
13
15
  (function (StatusColor) {
14
16
  StatusColor["HEALTHY"] = "var(--cds-support-success)";
15
17
  StatusColor["UNHEALTHY"] = "var(--cds-support-error)";
16
18
  StatusColor["CREATING"] = "var(--cds-support-warning)";
17
19
  StatusColor["UPDATING"] = "var(--cds-support-warning)";
20
+ StatusColor["WAITING"] = "var(--cds-support-warning)";
18
21
  StatusColor["SUSPENDED"] = "var(--cds-icon-secondary)";
19
22
  })(StatusColor || (StatusColor = {}));
23
+ export const normalizeClusterStatus = (status) => {
24
+ if (!status) {
25
+ return undefined;
26
+ }
27
+ switch (status.trim().toLowerCase()) {
28
+ case 'healthy':
29
+ return 'healthy';
30
+ case 'unhealthy':
31
+ return 'unhealthy';
32
+ case 'creating':
33
+ return 'creating';
34
+ case 'updating':
35
+ return 'updating';
36
+ case 'waitingforinput':
37
+ return 'waitingForInput';
38
+ case 'suspended':
39
+ return 'suspended';
40
+ case 'resuming':
41
+ return 'resuming';
42
+ case 'maintenance':
43
+ return 'maintenance';
44
+ default:
45
+ return undefined;
46
+ }
47
+ };
20
48
  export const ClusterStatusElement = (props) => {
49
+ const isMaintenanceStatus = props.status === 'maintenance';
21
50
  let icon = null;
22
51
  let text = '';
23
52
  let color;
@@ -42,6 +71,11 @@ export const ClusterStatusElement = (props) => {
42
71
  text = 'Updating';
43
72
  color = StatusColor.UPDATING;
44
73
  break;
74
+ case 'waitingForInput':
75
+ icon = _jsx(PendingFilled, {});
76
+ text = 'Waiting';
77
+ color = StatusColor.WAITING;
78
+ break;
45
79
  case 'suspended':
46
80
  icon = _jsx(PauseOutlineFilled, {});
47
81
  text = 'Paused';
@@ -52,14 +86,41 @@ export const ClusterStatusElement = (props) => {
52
86
  text = 'Resuming cluster...';
53
87
  color = StatusColor.SUSPENDED;
54
88
  break;
89
+ case 'maintenance':
90
+ text = MAINTENANCE_STATUS_TEXT;
91
+ icon = (_jsx(IconIndicator, { kind: MAINTENANCE_INDICATOR_KIND, label: MAINTENANCE_STATUS_TEXT }));
92
+ break;
55
93
  }
56
- const component = (_jsx("div", { style: { ...props.style }, children: _jsxs("div", { style: { position: 'relative' }, children: [icon && (_jsx("div", { style: {
57
- position: 'absolute',
58
- top: '50%',
59
- transform: 'translateY(-50%)',
60
- display: 'flex',
61
- color,
62
- }, children: icon })), _jsx("span", { style: { paddingInlineStart: icon ? '1.2rem' : '0rem' }, children: text })] }) }));
94
+ const iconWrapperStyle = isMaintenanceStatus
95
+ ? { display: 'flex' }
96
+ : {
97
+ display: 'flex',
98
+ position: 'absolute',
99
+ top: '50%',
100
+ transform: 'translateY(-50%)',
101
+ color,
102
+ };
103
+ const component = (_jsx("div", { style: { ...props.style }, children: _jsxs("div", { style: { position: 'relative' }, children: [icon && _jsx("div", { style: iconWrapperStyle, children: icon }), !isMaintenanceStatus && (_jsxs("span", { style: {
104
+ paddingInlineStart: icon ? '1.2rem' : '0rem',
105
+ display: 'inline-flex',
106
+ alignItems: 'center',
107
+ gap: '0.125rem',
108
+ }, children: [_jsx("span", { children: text }), props.status === 'waitingForInput' && props.infoTooltip && (_jsx(Tooltip, { align: 'bottom', description: _jsx("span", { style: {
109
+ display: 'block',
110
+ whiteSpace: 'normal',
111
+ maxWidth: '16rem',
112
+ }, children: props.infoTooltip }), children: _jsx("button", { type: 'button', "aria-label": props.infoTooltip, onClick: () => props.onInfoClick?.(), style: {
113
+ display: 'inline-flex',
114
+ alignItems: 'center',
115
+ justifyContent: 'center',
116
+ minBlockSize: '1.5rem',
117
+ minInlineSize: '1.5rem',
118
+ padding: 0,
119
+ border: 0,
120
+ background: 'transparent',
121
+ color: 'var(--cds-icon-primary)',
122
+ cursor: 'pointer',
123
+ }, children: _jsx(Information, {}) }) }))] }))] }) }));
63
124
  return component;
64
125
  };
65
126
  export const ApplicationTile = (props) => {
@@ -0,0 +1,32 @@
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
+ it('renders maintenance with Carbon undefined icon indicator', () => {
27
+ const { container } = render(_jsx(ClusterStatusElement, { status: 'maintenance' }));
28
+ expect(screen.getByText('Maintenance')).toBeInTheDocument();
29
+ expect(screen.queryAllByText('Maintenance')).toHaveLength(1);
30
+ expect(container.querySelector('.cds--icon-indicator--undefined')).toBeInTheDocument();
31
+ });
32
+ });
@@ -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
  {
@@ -5,6 +5,7 @@ type C4PageProps = {
5
5
  header?: {
6
6
  title?: string;
7
7
  tag?: string;
8
+ indicator?: React.ReactNode;
8
9
  menuItems?: C4BreadcrumbProps['menu'];
9
10
  codeSnippet?: C4BreadcrumbProps['codeSnippet'];
10
11
  };
@@ -11,7 +11,7 @@ import { C4Tabs } from '../c4-tabs/c4-tabs.js';
11
11
  const gridStyles = { paddingRight: 0, paddingLeft: 0 };
12
12
  const gridColumnStyles = { marginInline: 0 };
13
13
  const C4PageTemplate = ({ header, tabs, banner, children, loading = false, breadcrumbs = { elements: [] }, }) => {
14
- return (_jsx(Grid, { style: gridStyles, children: _jsx(Column, { span: '100%', style: gridColumnStyles, children: _jsxs("div", { style: { display: 'flex', gap: '2rem', flexDirection: 'column' }, children: [(breadcrumbs.elements?.length || header) && (_jsx(C4Breadcrumb, { ...breadcrumbs, title: header?.title, menu: header?.menuItems, tag: header?.tag, loading: loading, codeSnippet: header?.codeSnippet })), banner &&
14
+ return (_jsx(Grid, { style: gridStyles, children: _jsx(Column, { span: '100%', style: gridColumnStyles, children: _jsxs("div", { style: { display: 'flex', gap: '2rem', flexDirection: 'column' }, children: [(breadcrumbs.elements?.length || header) && (_jsx(C4Breadcrumb, { ...breadcrumbs, title: header?.title, menu: header?.menuItems, tag: header?.tag, indicator: header?.indicator, loading: loading, codeSnippet: header?.codeSnippet })), banner &&
15
15
  (banner.action ? (_jsx(C4ActionableNotification, { kind: banner.kind, title: banner.title, subtitle: banner.subtitle, actionButtonLabel: banner.action.label, onActionButtonClick: banner.action.onClick, lowContrast: true })) : (_jsx(InlineNotification, { kind: banner.kind, hideCloseButton: true, title: banner.title, subtitle: banner.subtitle, lowContrast: true }))), tabs && (_jsx(Stack, { orientation: 'vertical', gap: 5, children: _jsx(C4Tabs, { tabs: tabs.list, desiredTabId: tabs?.desiredTabId, onTabChange: tabs?.onChange, loading: loading }) })), children] }) }) }));
16
16
  };
17
17
  export { C4PageTemplate };
@@ -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.',