@camunda/ccma-saas-frontend 0.0.34 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/lib/esm/assetUrls.d.ts +19 -0
  2. package/lib/esm/assetUrls.js +41 -0
  3. package/lib/esm/assets/ai.svg +14 -0
  4. package/lib/esm/assets/alerts.svg +5 -0
  5. package/lib/esm/assets/auditlogs.svg +9 -0
  6. package/lib/esm/assets/backup.svg +3 -0
  7. package/lib/esm/assets/clientApi.svg +10 -0
  8. package/lib/esm/assets/cluster.svg +4 -0
  9. package/lib/esm/assets/connectorSecret.svg +3 -0
  10. package/lib/esm/assets/consoleAPI.svg +3 -0
  11. package/lib/esm/assets/error.svg +11 -0
  12. package/lib/esm/assets/fatalError.svg +5 -0
  13. package/lib/esm/assets/ipwhitelist.svg +3 -0
  14. package/lib/esm/assets/monitoring.svg +6 -0
  15. package/lib/esm/assets/operatePreview.jpg +0 -0
  16. package/lib/esm/assets/optimizePreview.jpg +0 -0
  17. package/lib/esm/assets/secureConnectivity.svg +11 -0
  18. package/lib/esm/assets/tasklistPreview.jpg +0 -0
  19. package/lib/esm/assets/upgrade.svg +4 -0
  20. package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +2 -1
  21. package/lib/esm/components/c4-audit-log/c4-audit-log.js +2 -1
  22. package/lib/esm/components/c4-billing-page/elements/value-metric.js +3 -3
  23. package/lib/esm/components/c4-billing-page/elements/value-metric.spec.d.ts +1 -0
  24. package/lib/esm/components/c4-billing-page/elements/value-metric.spec.js +49 -0
  25. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +3 -2
  26. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
  27. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +3 -2
  28. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +3 -2
  29. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +3 -2
  30. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +5 -4
  31. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +2 -1
  32. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +10 -2
  33. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +4 -3
  34. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +48 -7
  35. package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.d.ts +1 -0
  36. package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.js +303 -0
  37. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +4 -0
  38. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.d.ts +3 -0
  39. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +41 -0
  40. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.types.d.ts +10 -0
  41. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.types.js +6 -0
  42. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -0
  43. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +5 -2
  44. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +1 -1
  45. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +2 -2
  46. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +6 -1
  47. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +4 -2
  48. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +1 -1
  49. package/lib/esm/components/c4-management-api/c4-management-api.js +2 -1
  50. package/lib/esm/components/c4-management-settings/c4-management-settings.js +2 -1
  51. package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.js +25 -2
  52. package/lib/esm/externalUrls.const.d.ts +90 -0
  53. package/lib/esm/externalUrls.const.js +191 -0
  54. package/lib/esm/externalUrls.const.spec.d.ts +1 -0
  55. package/lib/esm/externalUrls.const.spec.js +108 -0
  56. package/lib/esm/i18n/en/modals/clusterclients.json +3 -0
  57. package/lib/esm/i18n/en/pages/clusterdetails.json +4 -0
  58. package/lib/esm/i18n/en/pages/createcluster.json +4 -1
  59. package/lib/esm/index.d.ts +4 -0
  60. package/lib/esm/index.js +3 -0
  61. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +2 -1
  62. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.types.d.ts +2 -2
  63. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +53 -37
  64. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.permissions.spec.js +34 -1
  65. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +69 -38
  66. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +3 -3
  67. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.js +19 -0
  68. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +6 -0
  69. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +5 -5
  70. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +33 -41
  71. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.spec.js +64 -0
  72. package/lib/esm/widgets/clusters/c4-clusters-page.js +5 -3
  73. package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +37 -2
  74. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +1 -1
  75. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +2 -1
  76. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +26 -15
  77. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +1 -1
  78. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +8 -7
  79. package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +9 -8
  80. package/lib/esm/widgets/group-details/c4-group-details-page.js +2 -3
  81. package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +1 -1
  82. package/lib/esm/widgets/management/c4-management-app.js +116 -89
  83. package/lib/esm/widgets/management/c4-management-app.types.d.ts +16 -15
  84. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +3 -4
  85. package/lib/esm/widgets/user-details/c4-user-details-page.js +2 -3
  86. package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +1 -1
  87. package/package.json +2 -2
@@ -7,7 +7,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
7
7
  import { C3ClusterTag, } from '@camunda/camunda-composite-components';
8
8
  import { ClusterPlanTypeCategory, checkVersion, VersionCheckOperator, } from '@camunda/ccma-shared-types';
9
9
  import { Button, Checkbox, Column, ContentSwitcher, FormLabel, Grid, InlineLoading, InlineNotification, Link, RadioButton, RadioButtonGroup, RadioTile, SkeletonText, Stack, Switch, Tag, TextArea, TextInput, Tile, } from '@carbon/react';
10
- import { Code, DataBase } from '@carbon/react/icons/index.esm.js';
10
+ import { ChevronDown, ChevronUp, Code, DataBase } from '@carbon/react/icons/index.esm.js';
11
11
  import { useRef, useState } from 'react';
12
12
  import styled from 'styled-components';
13
13
  import { C4ClusterTagSelector } from '../c4-cluster-tag-selector/c4-cluster-tag-selector.js';
@@ -87,6 +87,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
87
87
  const defaultClusterPlanType = formElements.clusterPlanType.options.find((option) => option.default === true && option.disabled === false);
88
88
  const [clusterPlanType, setClusterPlanType] = useState(defaultClusterPlanType ? defaultClusterPlanType?.uuid : '');
89
89
  const [selectedTag, setSelectedTag] = useState('dev');
90
+ const [showOlderGenerations, setShowOlderGenerations] = useState(false);
90
91
  const currentClusterPlanType = (clusterPlanType || defaultClusterPlanType?.uuid) ?? '';
91
92
  const setClusterPlanTypeWithEffects = (clusterPlanTypeUuid) => {
92
93
  updateNumberOfAllocatedHwPackages(1);
@@ -402,6 +403,51 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
402
403
  setAuthorizationEnabled(selection === 'true');
403
404
  }, children: [_jsx(RadioButton, { id: 'authorization-enabled', labelText: 'Enabled', value: 'true' }), _jsx(RadioButton, { id: 'authorization-disabled', labelText: 'Disabled', value: 'false' })] }, authorizationEnabled ? 'true' : 'false'), _jsxs("div", { children: [_jsx("p", { children: "When enabled, authorization-based access control is enforced." }), _jsxs("p", { children: ["When disabled, all users and clients will have full access to the cluster.", ' ', _jsx("a", { href: authorizationToggle.authorizationDocs, target: '_blank', rel: 'noopener', children: "Learn more" })] })] }), !authorizationEnabled && (_jsx(InlineNotification, { lowContrast: true, kind: ['stage', 'prod'].includes(selectedTag) ? 'warning' : 'info', hideCloseButton: true, title: 'Authorizations disabled', children: _jsx("p", { children: "All authenticated users & clients will have full access to the cluster." }) }))] }) }) })] }));
404
405
  };
406
+ const renderGenerationRadioButtons = (generations) => {
407
+ return (_jsx(RadioButtonGroupWithGrid, { children: generations.map((generation) => (_jsx(Column, { sm: 4, md: 4, lg: 3, style: {
408
+ justifySelf: 'start',
409
+ marginBottom: '0.5rem',
410
+ }, children: _jsx(RadioButton, { id: generation.uuid, value: generation.uuid, labelText: generation.title, checked: selectedGeneration === generation.uuid, onChange: (value) => {
411
+ updateSelectedGeneration(value);
412
+ }, disabled: isSubmitting() || noAvailableSlots }, generation.uuid) }, generation.uuid))) }));
413
+ };
414
+ const renderGenerationSection = () => {
415
+ const allGenerations = getSelectedChannel()?.generations ?? [];
416
+ const existingClusterGenerations = allGenerations.filter((g) => g.classification === 'existingCluster');
417
+ const orgUnlockedGenerations = allGenerations.filter((g) => g.classification === 'orgUnlocked');
418
+ const nonChannelGenerations = [
419
+ ...existingClusterGenerations,
420
+ ...orgUnlockedGenerations,
421
+ ];
422
+ const channelGenerations = allGenerations.filter((g) => g.classification !== 'existingCluster' &&
423
+ g.classification !== 'orgUnlocked');
424
+ const hasOlderGenerations = nonChannelGenerations.length > 0;
425
+ return (_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsxs(Stack, { gap: 2, children: [_jsx(FormLabel, { children: "Generation" }), renderGenerationRadioButtons(hasOlderGenerations ? channelGenerations : allGenerations), hasOlderGenerations && (_jsxs("div", { style: {
426
+ marginTop: 'var(--cds-spacing-03)',
427
+ }, children: [_jsx(Button, { kind: 'ghost', size: 'sm', type: 'button', onClick: () => {
428
+ setShowOlderGenerations((prev) => {
429
+ if (prev &&
430
+ nonChannelGenerations.some((g) => g.uuid === selectedGeneration)) {
431
+ return prev;
432
+ }
433
+ return !prev;
434
+ });
435
+ }, renderIcon: showOlderGenerations ? ChevronUp : ChevronDown, "aria-expanded": showOlderGenerations, "aria-controls": 'older-generations-panel', children: formElements.generation.olderGenerationsLabel ??
436
+ 'View older generations' }), showOlderGenerations && (_jsxs("div", { id: 'older-generations-panel', style: {
437
+ marginTop: 'var(--cds-spacing-03)',
438
+ }, children: [existingClusterGenerations.length > 0 && (_jsxs(_Fragment, { children: [renderGenerationRadioButtons(existingClusterGenerations), _jsx("p", { style: {
439
+ color: 'var(--cds-text-helper)',
440
+ }, children: formElements.generation.olderGenerationsHelperText ??
441
+ 'These are older generations that are used in your organization.' })] })), orgUnlockedGenerations.length > 0 && (_jsxs("div", { style: {
442
+ marginTop: existingClusterGenerations.length > 0
443
+ ? 'var(--cds-spacing-05)'
444
+ : undefined,
445
+ }, children: [renderGenerationRadioButtons(orgUnlockedGenerations), _jsx("p", { style: {
446
+ color: 'var(--cds-text-helper)',
447
+ }, children: formElements.generation
448
+ .orgUnlockedGenerationsHelperText ??
449
+ 'These are older generations that have been unlocked for your organization.' })] }))] }))] }))] }) }) }));
450
+ };
405
451
  const renderContent = () => {
406
452
  if (loading) {
407
453
  return (_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(SkeletonText, {}) }) }));
@@ -481,12 +527,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
481
527
  : enableMap.prod }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx("p", { children: formElements.stageLabel.textBelow }) }) })] }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4Divider, {}) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsxs(Stack, { gap: 2, children: [_jsx(FormElementTitle, { title: formElements.generation.title }), _jsx("div", { style: { overflowX: 'auto', marginBottom: '0.5rem' }, children: _jsx(ContentSwitcher, { size: 'md', style: {
482
528
  height: '100%',
483
529
  width: `${7 * formElements.generation.channels.length}rem`,
484
- }, onChange: (data) => updateSelectedChannel(String(data.name ?? '')), selectedIndex: defaultChannelIndex, children: formElements.generation.channels.map((channel) => (_jsx(Switch, { name: channel.uuid, disabled: noAvailableSlots, children: channel.title }, channel.uuid))) }) }), getSelectedChannel() && (_jsxs(Stack, { gap: 4, children: [_jsx(Grid, { children: _jsx(Column, { span: 7, children: _jsx("p", { children: getSelectedChannel()?.description }) }) }), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsxs(Stack, { gap: 2, children: [_jsx(FormLabel, { children: "Generation" }), _jsx(RadioButtonGroupWithGrid, { children: (getSelectedChannel()?.generations ?? []).map((generation) => (_jsx(Column, { sm: 4, md: 4, lg: 3, style: {
485
- justifySelf: 'start',
486
- marginBottom: '0.5rem',
487
- }, children: _jsx(RadioButton, { id: generation.uuid, value: generation.uuid, labelText: generation.title, checked: selectedGeneration === generation.uuid, onChange: (value) => {
488
- updateSelectedGeneration(value);
489
- }, disabled: isSubmitting() || noAvailableSlots }, generation.uuid) }, generation.uuid))) })] }) }) })] }))] }) }) }), authorizationToggle?.enabled && renderAuthorizationRadio(), tasklistModeToggle?.enabled && renderTasklistV2Content(), autoUpdate?.enabled && (_jsxs(_Fragment, { children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4Divider, {}) }) }), _jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: formElements.autoUpdate?.title ?? '' }) }) }), autoUpdateEnabled && (_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(Checkbox, { id: 'autoupdate', labelText: formElements.autoUpdate?.label ?? '', checked: autoUpdateChecked, onChange: (event) => {
530
+ }, onChange: (data) => updateSelectedChannel(String(data.name ?? '')), selectedIndex: defaultChannelIndex, children: formElements.generation.channels.map((channel) => (_jsx(Switch, { name: channel.uuid, disabled: noAvailableSlots, children: channel.title }, channel.uuid))) }) }), getSelectedChannel() && (_jsxs(Stack, { gap: 4, children: [_jsx(Grid, { children: _jsx(Column, { span: 7, children: _jsx("p", { children: getSelectedChannel()?.description }) }) }), renderGenerationSection()] }))] }) }) }), authorizationToggle?.enabled && renderAuthorizationRadio(), tasklistModeToggle?.enabled && renderTasklistV2Content(), autoUpdate?.enabled && (_jsxs(_Fragment, { children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(C4Divider, {}) }) }), _jsxs(Stack, { gap: 2, children: [_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(FormElementTitle, { title: formElements.autoUpdate?.title ?? '' }) }) }), autoUpdateEnabled && (_jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx(Checkbox, { id: 'autoupdate', labelText: formElements.autoUpdate?.label ?? '', checked: autoUpdateChecked, onChange: (event) => {
490
531
  setAutoUpdateChecked(event.target.checked);
491
532
  }, disabled: isSubmitting() || !autoUpdateEnabled || noAvailableSlots }, 'autoupdate') }) })), _jsx(Grid, { children: _jsx(Column, { span: 12, children: _jsx("p", { children: autoUpdateEnabled
492
533
  ? formElements.autoUpdate?.description
@@ -0,0 +1,303 @@
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 { C4CreateCluster } from './c4-create-cluster.js';
10
+ function buildChannelsWithClassification() {
11
+ return [
12
+ {
13
+ title: 'Stable',
14
+ description: 'Stable channel',
15
+ uuid: 'stable',
16
+ default: true,
17
+ generations: [
18
+ {
19
+ title: 'Camunda 8.8+gen18',
20
+ uuid: 'gen-8.8-18',
21
+ default: true,
22
+ classification: 'channel',
23
+ },
24
+ {
25
+ title: 'Camunda 8.7+gen24',
26
+ uuid: 'gen-8.7-24',
27
+ default: false,
28
+ classification: 'channel',
29
+ },
30
+ {
31
+ title: 'Camunda 8.4+gen15',
32
+ uuid: 'gen-8.4-15',
33
+ default: false,
34
+ classification: 'existingCluster',
35
+ },
36
+ {
37
+ title: 'Camunda 8.3+gen10',
38
+ uuid: 'gen-8.3-10',
39
+ default: false,
40
+ classification: 'existingCluster',
41
+ },
42
+ ],
43
+ },
44
+ ];
45
+ }
46
+ function buildChannelsWithoutClassification() {
47
+ return [
48
+ {
49
+ title: 'Stable',
50
+ description: 'Stable channel',
51
+ uuid: 'stable',
52
+ default: true,
53
+ generations: [
54
+ {
55
+ title: 'Camunda 8.8+gen18',
56
+ uuid: 'gen-8.8-18',
57
+ default: true,
58
+ },
59
+ {
60
+ title: 'Camunda 8.7+gen24',
61
+ uuid: 'gen-8.7-24',
62
+ default: false,
63
+ },
64
+ ],
65
+ },
66
+ ];
67
+ }
68
+ function buildChannelsWithOrgUnlocked() {
69
+ return [
70
+ {
71
+ title: 'Stable',
72
+ description: 'Stable channel',
73
+ uuid: 'stable',
74
+ default: true,
75
+ generations: [
76
+ {
77
+ title: 'Camunda 8.8+gen18',
78
+ uuid: 'gen-8.8-18',
79
+ default: true,
80
+ classification: 'channel',
81
+ },
82
+ {
83
+ title: 'Camunda 8.7+gen24',
84
+ uuid: 'gen-8.7-24',
85
+ default: false,
86
+ classification: 'channel',
87
+ },
88
+ {
89
+ title: 'Camunda 8.2+gen5',
90
+ uuid: 'gen-8.2-5',
91
+ default: false,
92
+ classification: 'orgUnlocked',
93
+ },
94
+ ],
95
+ },
96
+ ];
97
+ }
98
+ function buildChannelsWithMixedNonChannel() {
99
+ return [
100
+ {
101
+ title: 'Stable',
102
+ description: 'Stable channel',
103
+ uuid: 'stable',
104
+ default: true,
105
+ generations: [
106
+ {
107
+ title: 'Camunda 8.8+gen18',
108
+ uuid: 'gen-8.8-18',
109
+ default: true,
110
+ classification: 'channel',
111
+ },
112
+ {
113
+ title: 'Camunda 8.4+gen15',
114
+ uuid: 'gen-8.4-15',
115
+ default: false,
116
+ classification: 'existingCluster',
117
+ },
118
+ {
119
+ title: 'Camunda 8.2+gen5',
120
+ uuid: 'gen-8.2-5',
121
+ default: false,
122
+ classification: 'orgUnlocked',
123
+ },
124
+ ],
125
+ },
126
+ ];
127
+ }
128
+ function buildProps(channels) {
129
+ return {
130
+ loading: false,
131
+ banner: {
132
+ noSlotsLeft: {
133
+ title: 'No slots',
134
+ description: 'No slots available',
135
+ },
136
+ },
137
+ cta: {
138
+ label: 'Create cluster',
139
+ states: {
140
+ submitting: 'Creating...',
141
+ success: 'Created',
142
+ error: 'Error',
143
+ },
144
+ create: vi.fn().mockResolvedValue({ success: true, clusterId: 'c-1' }),
145
+ postCreate: vi.fn(),
146
+ },
147
+ formElements: {
148
+ name: {
149
+ title: 'Cluster name',
150
+ placeholder: 'Name',
151
+ validation: () => ({ isValid: true, message: '' }),
152
+ },
153
+ clusterPlanType: {
154
+ title: 'Cluster type',
155
+ options: [
156
+ {
157
+ title: 'Production',
158
+ type: 'prod',
159
+ uuid: 'prod',
160
+ description: 'Production cluster',
161
+ default: true,
162
+ },
163
+ ],
164
+ },
165
+ region: {
166
+ title: 'Region',
167
+ backupRegionTitle: 'Backup',
168
+ description: 'Select region',
169
+ backupDescription: 'Select backup',
170
+ dualRegionBackups: false,
171
+ options: [
172
+ {
173
+ title: 'EU West',
174
+ uuid: 'eu-west',
175
+ provider: 'aws',
176
+ default: true,
177
+ backups: [],
178
+ },
179
+ ],
180
+ },
181
+ generation: {
182
+ title: 'Channel',
183
+ channels,
184
+ olderGenerationsLabel: 'View older generations',
185
+ olderGenerationsHelperText: 'These are older generations that are used in your organization.',
186
+ orgUnlockedGenerationsHelperText: 'These are older generations that have been unlocked for your organization.',
187
+ },
188
+ stageLabel: {
189
+ title: 'Tag',
190
+ textBelow: 'Assign a tag',
191
+ boxes: {
192
+ dev: { text: 'dev' },
193
+ test: { text: 'test' },
194
+ stage: { text: 'stage' },
195
+ prod: { text: 'prod' },
196
+ },
197
+ },
198
+ },
199
+ };
200
+ }
201
+ describe('C4CreateCluster older generations toggle', () => {
202
+ it('hides existingCluster generations by default', () => {
203
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithClassification()) }));
204
+ expect(screen.getByLabelText('Camunda 8.8+gen18')).toBeInTheDocument();
205
+ expect(screen.getByLabelText('Camunda 8.7+gen24')).toBeInTheDocument();
206
+ expect(screen.queryByLabelText('Camunda 8.4+gen15')).not.toBeInTheDocument();
207
+ expect(screen.queryByLabelText('Camunda 8.3+gen10')).not.toBeInTheDocument();
208
+ expect(screen.getByRole('button', { name: /view older generations/i })).toBeInTheDocument();
209
+ });
210
+ it('shows existingCluster generations when toggle is clicked', async () => {
211
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithClassification()) }));
212
+ const toggle = screen.getByRole('button', {
213
+ name: /view older generations/i,
214
+ });
215
+ await userEvent.click(toggle);
216
+ expect(screen.getByLabelText('Camunda 8.4+gen15')).toBeInTheDocument();
217
+ expect(screen.getByLabelText('Camunda 8.3+gen10')).toBeInTheDocument();
218
+ expect(screen.getByText('These are older generations that are used in your organization.')).toBeInTheDocument();
219
+ });
220
+ it('prevents collapsing when an older generation is selected', async () => {
221
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithClassification()) }));
222
+ const toggle = screen.getByRole('button', {
223
+ name: /view older generations/i,
224
+ });
225
+ await userEvent.click(toggle);
226
+ const olderRadio = screen.getByLabelText('Camunda 8.4+gen15');
227
+ await userEvent.click(olderRadio);
228
+ await userEvent.click(toggle);
229
+ expect(screen.getByLabelText('Camunda 8.4+gen15')).toBeInTheDocument();
230
+ expect(screen.getByLabelText('Camunda 8.3+gen10')).toBeInTheDocument();
231
+ });
232
+ it('allows collapsing when a channel generation is selected', async () => {
233
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithClassification()) }));
234
+ const toggle = screen.getByRole('button', {
235
+ name: /view older generations/i,
236
+ });
237
+ await userEvent.click(toggle);
238
+ expect(screen.getByLabelText('Camunda 8.4+gen15')).toBeInTheDocument();
239
+ await userEvent.click(toggle);
240
+ expect(screen.queryByLabelText('Camunda 8.4+gen15')).not.toBeInTheDocument();
241
+ });
242
+ it('does not render the toggle when no existingCluster generations exist', () => {
243
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithoutClassification()) }));
244
+ expect(screen.queryByRole('button', { name: /view older generations/i })).not.toBeInTheDocument();
245
+ expect(screen.getByLabelText('Camunda 8.8+gen18')).toBeInTheDocument();
246
+ expect(screen.getByLabelText('Camunda 8.7+gen24')).toBeInTheDocument();
247
+ });
248
+ it('hides orgUnlocked generations by default', () => {
249
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithOrgUnlocked()) }));
250
+ expect(screen.getByLabelText('Camunda 8.8+gen18')).toBeInTheDocument();
251
+ expect(screen.getByLabelText('Camunda 8.7+gen24')).toBeInTheDocument();
252
+ expect(screen.queryByLabelText('Camunda 8.2+gen5')).not.toBeInTheDocument();
253
+ expect(screen.getByRole('button', { name: /view older generations/i })).toBeInTheDocument();
254
+ });
255
+ it('shows orgUnlocked generations when toggle is clicked', async () => {
256
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithOrgUnlocked()) }));
257
+ const toggle = screen.getByRole('button', {
258
+ name: /view older generations/i,
259
+ });
260
+ await userEvent.click(toggle);
261
+ expect(screen.getByLabelText('Camunda 8.2+gen5')).toBeInTheDocument();
262
+ });
263
+ it('shows orgUnlockedGenerationsHelperText but not existingCluster helper text for orgUnlocked-only', async () => {
264
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithOrgUnlocked()) }));
265
+ const toggle = screen.getByRole('button', {
266
+ name: /view older generations/i,
267
+ });
268
+ await userEvent.click(toggle);
269
+ expect(screen.getByText('These are older generations that have been unlocked for your organization.')).toBeInTheDocument();
270
+ expect(screen.queryByText('These are older generations that are used in your organization.')).not.toBeInTheDocument();
271
+ });
272
+ it('shows both helper texts separately for mixed existingCluster and orgUnlocked', async () => {
273
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithMixedNonChannel()) }));
274
+ const toggle = screen.getByRole('button', {
275
+ name: /view older generations/i,
276
+ });
277
+ await userEvent.click(toggle);
278
+ expect(screen.getByText('These are older generations that are used in your organization.')).toBeInTheDocument();
279
+ expect(screen.getByText('These are older generations that have been unlocked for your organization.')).toBeInTheDocument();
280
+ });
281
+ it('groups orgUnlocked and existingCluster generations together under the toggle', async () => {
282
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithMixedNonChannel()) }));
283
+ expect(screen.queryByLabelText('Camunda 8.4+gen15')).not.toBeInTheDocument();
284
+ expect(screen.queryByLabelText('Camunda 8.2+gen5')).not.toBeInTheDocument();
285
+ const toggle = screen.getByRole('button', {
286
+ name: /view older generations/i,
287
+ });
288
+ await userEvent.click(toggle);
289
+ expect(screen.getByLabelText('Camunda 8.4+gen15')).toBeInTheDocument();
290
+ expect(screen.getByLabelText('Camunda 8.2+gen5')).toBeInTheDocument();
291
+ });
292
+ it('prevents collapsing when an orgUnlocked generation is selected', async () => {
293
+ render(_jsx(C4CreateCluster, { ...buildProps(buildChannelsWithOrgUnlocked()) }));
294
+ const toggle = screen.getByRole('button', {
295
+ name: /view older generations/i,
296
+ });
297
+ await userEvent.click(toggle);
298
+ const olderRadio = screen.getByLabelText('Camunda 8.2+gen5');
299
+ await userEvent.click(olderRadio);
300
+ await userEvent.click(toggle);
301
+ expect(screen.getByLabelText('Camunda 8.2+gen5')).toBeInTheDocument();
302
+ });
303
+ });
@@ -61,6 +61,7 @@ export interface C4CreateClusterChannelWithGenerations {
61
61
  default: boolean;
62
62
  uuid: string;
63
63
  version?: string;
64
+ classification?: 'channel' | 'existingCluster' | 'orgUnlocked';
64
65
  }>;
65
66
  }
66
67
  export interface C4CreateClusterProps {
@@ -143,6 +144,9 @@ export interface C4CreateClusterProps {
143
144
  generation: {
144
145
  title: string;
145
146
  channels: C4CreateClusterChannelWithGenerations[];
147
+ olderGenerationsLabel?: string;
148
+ olderGenerationsHelperText?: string;
149
+ orgUnlockedGenerationsHelperText?: string;
146
150
  };
147
151
  autoUpdate?: {
148
152
  title: string;
@@ -0,0 +1,3 @@
1
+ import { type JSX } from 'react';
2
+ import type { C4DeleteOrganizationModalProps } from './c4-delete-organization-modal.types';
3
+ export declare const C4DeleteOrganizationModal: ({ t, open, loading, error, organizationName, onRequestClose, onRequestSubmit, preventCloseOnClickOutside, }: C4DeleteOrganizationModalProps) => JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } 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 { InlineNotification, Modal, Stack, TextInput } from '@carbon/react';
8
+ import { useEffect, useState } from 'react';
9
+ function safeTranslate(t, key, fallback, options) {
10
+ try {
11
+ const translated = t?.(key, options);
12
+ if (!translated || translated === key) {
13
+ return fallback;
14
+ }
15
+ if (key.includes(':')) {
16
+ const withoutNamespace = key.split(':').slice(1).join(':');
17
+ if (translated === withoutNamespace) {
18
+ return fallback;
19
+ }
20
+ }
21
+ return translated;
22
+ }
23
+ catch {
24
+ return fallback;
25
+ }
26
+ }
27
+ export const C4DeleteOrganizationModal = ({ t, open, loading, error, organizationName, onRequestClose, onRequestSubmit, preventCloseOnClickOutside, }) => {
28
+ const [confirmText, setConfirmText] = useState('');
29
+ useEffect(() => {
30
+ if (!open) {
31
+ setConfirmText('');
32
+ }
33
+ }, [open]);
34
+ const modalHeading = safeTranslate(t, 'orgmanagement:tabs.settings.orgmanagement.deleteOrganization', 'Delete organization');
35
+ const primaryButtonText = safeTranslate(t, 'orgmanagement:tabs.overview.actions.deleteOrg', 'Delete');
36
+ const secondaryButtonText = safeTranslate(t, 'common:cancel', 'Cancel');
37
+ const message = safeTranslate(t, 'orgmanagement:tabs.settings.orgmanagement.deleteConfirmation', `Are you sure you want to delete "${organizationName}"? The organization and its clusters, Web Modeler files, and other assets will be deleted. This action cannot be undone.`, { organizationName });
38
+ const confirmLabel = safeTranslate(t, 'orgmanagement:tabs.settings.orgmanagement.deleteConfirmLabel', 'Type the word DELETE to confirm');
39
+ const errorMessage = safeTranslate(t, 'orgmanagement:tabs.settings.orgmanagement.deleteError', 'Failed to delete organization. Please try again.');
40
+ return (_jsx(Modal, { modalHeading: modalHeading, open: open, onRequestClose: onRequestClose, onRequestSubmit: onRequestSubmit, primaryButtonText: primaryButtonText, primaryButtonDisabled: loading || confirmText.trim() !== 'DELETE', secondaryButtonText: secondaryButtonText, size: 'sm', danger: true, id: 'delete-organization-modal', preventCloseOnClickOutside: preventCloseOnClickOutside ?? true, children: _jsxs(Stack, { gap: 6, children: [error && (_jsx(InlineNotification, { kind: 'error', title: errorMessage, hideCloseButton: true })), _jsx("p", { children: message }), _jsx(TextInput, { id: 'c4-delete-organization-confirmation', labelText: confirmLabel, value: confirmText, onChange: (e) => setConfirmText(e.target.value), disabled: loading })] }) }));
41
+ };
@@ -0,0 +1,10 @@
1
+ export interface C4DeleteOrganizationModalProps {
2
+ t?: (key: string, options?: Record<string, unknown>) => string;
3
+ open: boolean;
4
+ loading: boolean;
5
+ error?: boolean;
6
+ organizationName: string;
7
+ onRequestClose: () => void;
8
+ onRequestSubmit: () => void | Promise<void>;
9
+ preventCloseOnClickOutside?: boolean;
10
+ }
@@ -0,0 +1,6 @@
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
+ export {};
@@ -5,4 +5,5 @@ export interface ColorScale {
5
5
  Failed: string;
6
6
  }
7
7
  export declare const CHART_HEIGHT = "20vh";
8
+ export declare const PIE_CHART_MAX_WIDTH_PX = 400;
8
9
  export declare const C4JobDashboardDetailsPage: ({ jobType, config, isLoadingConfig, lastUpdatedAt, errorData, timeSeries, workerData, jobData, onTimeRangeChange, breadcrumb, translations, docsUrls, trackErrorClick, }: C4JobDashboardDetailsPageProps) => import("react/jsx-runtime").JSX.Element;
@@ -6,6 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  */
7
7
  import { InlineNotification, Stack, Tile } from '@carbon/react';
8
8
  import styled from 'styled-components';
9
+ import { getC4JobDashboardDocsUrls } from '../../externalUrls.const.js';
9
10
  import { C4Breadcrumb } from '../c4-breadcrumb/c4-breadcrumb.js';
10
11
  import { C4JobDashboardErrorHandler } from '../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
11
12
  import C4JobDashboardTimeRangeDropdown from '../c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js';
@@ -41,7 +42,9 @@ const PieChartWrapper = styled(TileWithShadow) `
41
42
  }
42
43
  `;
43
44
  export const CHART_HEIGHT = '20vh';
45
+ export const PIE_CHART_MAX_WIDTH_PX = 400;
44
46
  export const C4JobDashboardDetailsPage = ({ jobType, config, isLoadingConfig, lastUpdatedAt, errorData, timeSeries, workerData, jobData, onTimeRangeChange, breadcrumb, translations, docsUrls, trackErrorClick, }) => {
47
+ const resolvedDocsUrls = getC4JobDashboardDocsUrls(docsUrls);
45
48
  const colorScale = {
46
49
  Created: '#002D9C',
47
50
  Completed: '#009D9A',
@@ -50,7 +53,7 @@ export const C4JobDashboardDetailsPage = ({ jobType, config, isLoadingConfig, la
50
53
  const featureIsDisabled = !isLoadingConfig && config && !config.enabled;
51
54
  if (featureIsDisabled) {
52
55
  const error = { status: 403, details: 'Feature is disabled', message: '' };
53
- return (_jsx(C4JobDashboardErrorHandler, { itemsLength: 0, showIcons: true, translations: translations.errorHandler, error: error, docsUrls: docsUrls }));
56
+ return (_jsx(C4JobDashboardErrorHandler, { itemsLength: 0, showIcons: true, translations: translations.errorHandler, error: error, docsUrls: resolvedDocsUrls }));
54
57
  }
55
- return (_jsxs(Stack, { gap: 4, children: [_jsx(C4Breadcrumb, { title: translations.title, elements: breadcrumb.elements }), _jsxs("p", { children: [translations.jobTypeLabel, " ", _jsx("strong", { children: jobType })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), jobData.isIncomplete && (_jsx(InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(ChartContainer, { children: _jsxs(ChartGrid, { children: [_jsx(TimeChartWrapper, { children: _jsx(C4JobDashboardTimeChart, { timeSeries: timeSeries.items, colorScale: colorScale, isLoading: timeSeries.isLoading, translations: translations, error: timeSeries.error, docsUrls: docsUrls }) }), _jsx(PieChartWrapper, { children: _jsx(C4JobDashboardPieChart, { jobData: jobData.data, colorScale: colorScale, isLoading: jobData.isLoading, translations: translations, error: jobData.error, docsUrls: docsUrls }) })] }) }), _jsx(TileWithShadow, { children: _jsx(C4JobDashboardWorkerTable, { workerData: workerData.items, isLoading: workerData.isLoading, translations: translations, error: workerData.error, docsUrls: docsUrls }) }), _jsx(TileWithShadow, { children: _jsx(C4JobDashboardErrorTable, { errors: errorData.items, operateBaseUrl: errorData.operateBaseUrl, isLoading: errorData.isLoading, translations: translations, error: errorData.error, docsUrls: docsUrls, trackErrorClick: trackErrorClick }) })] }));
58
+ return (_jsxs(Stack, { gap: 4, children: [_jsx(C4Breadcrumb, { title: translations.title, elements: breadcrumb.elements }), _jsxs("p", { children: [translations.jobTypeLabel, " ", _jsx("strong", { children: jobType })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), jobData.isIncomplete && (_jsx(InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(ChartContainer, { children: _jsxs(ChartGrid, { children: [_jsx(TimeChartWrapper, { children: _jsx(C4JobDashboardTimeChart, { timeSeries: timeSeries.items, colorScale: colorScale, isLoading: timeSeries.isLoading, translations: translations, error: timeSeries.error, docsUrls: resolvedDocsUrls }) }), _jsx(PieChartWrapper, { children: _jsx(C4JobDashboardPieChart, { jobData: jobData.data, colorScale: colorScale, isLoading: jobData.isLoading, translations: translations, error: jobData.error, docsUrls: resolvedDocsUrls }) })] }) }), _jsx(TileWithShadow, { children: _jsx(C4JobDashboardWorkerTable, { workerData: workerData.items, isLoading: workerData.isLoading, translations: translations, error: workerData.error, docsUrls: resolvedDocsUrls }) }), _jsx(TileWithShadow, { children: _jsx(C4JobDashboardErrorTable, { errors: errorData.items, operateBaseUrl: errorData.operateBaseUrl, isLoading: errorData.isLoading, translations: translations, error: errorData.error, docsUrls: resolvedDocsUrls, trackErrorClick: trackErrorClick }) })] }));
56
59
  };
@@ -100,5 +100,5 @@ export interface C4JobDashboardDetailsPageProps {
100
100
  onTimeRangeChange: (value: number) => void;
101
101
  breadcrumb: C4BreadcrumbProps;
102
102
  translations: JobDashboardDetailsTranslations;
103
- docsUrls: DocsUrls;
103
+ docsUrls?: DocsUrls;
104
104
  }
@@ -6,7 +6,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
6
6
  */
7
7
  import { DonutChart } from '@carbon/charts-react';
8
8
  import { C4JobDashboardErrorHandler } from '../../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
9
- import { CHART_HEIGHT } from '../c4-job-dashboard-details-page.js';
9
+ import { CHART_HEIGHT, PIE_CHART_MAX_WIDTH_PX, } from '../c4-job-dashboard-details-page.js';
10
10
  import C4JobDashboardChartHeading from './c4-job-dashboard-chart-heading.js';
11
11
  function C4JobDashboardPieChart({ jobData, error, colorScale, isLoading, translations, docsUrls, }) {
12
12
  const completedCount = jobData?.completed?.count ?? 0;
@@ -70,6 +70,6 @@ function C4JobDashboardPieChart({ jobData, error, colorScale, isLoading, transla
70
70
  const noData = (jobData?.created.count === jobData?.failed.count &&
71
71
  jobData?.completed.count === 0) ||
72
72
  !jobData;
73
- return (_jsxs(_Fragment, { children: [_jsx("div", { style: { marginBottom: 25 }, children: _jsx(C4JobDashboardChartHeading, { title: translations.charts.createdVsCompleted.title, tooltipLabel: translations.charts.createdVsCompleted.tooltip }) }), (!jobData || noData || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: noData ? 0 : 1, showIcons: false, translations: translations.errorHandler, error: error, docsUrls: docsUrls })) : (_jsx("div", { children: _jsx(DonutChart, { data: pieData, options: pieOptions }) }))] }));
73
+ return (_jsxs(_Fragment, { children: [_jsx("div", { style: { marginBottom: 25 }, children: _jsx(C4JobDashboardChartHeading, { title: translations.charts.createdVsCompleted.title, tooltipLabel: translations.charts.createdVsCompleted.tooltip }) }), (!jobData || noData || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: noData ? 0 : 1, showIcons: false, translations: translations.errorHandler, error: error, docsUrls: docsUrls })) : (_jsx("div", { style: { maxWidth: PIE_CHART_MAX_WIDTH_PX, margin: '0 auto' }, children: _jsx(DonutChart, { data: pieData, options: pieOptions }) }))] }));
74
74
  }
75
75
  export default C4JobDashboardPieChart;
@@ -44,6 +44,11 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, colorScale, translatio
44
44
  const lastTimeDataPoint = Math.max(...timeSeries.map((t) => new Date(t.time).getTime()));
45
45
  const coversMultipleDays = new Date(firstTimeDataPoint).toDateString() !==
46
46
  new Date(lastTimeDataPoint).toDateString();
47
+ const formattedColorScale = {
48
+ [translations.charts.legend.completed]: colorScale.Completed,
49
+ [translations.charts.legend.failed]: colorScale.Failed,
50
+ [translations.charts.legend.created]: colorScale.Created,
51
+ };
47
52
  const areaOptions = {
48
53
  resizable: true,
49
54
  toolbar: {
@@ -89,7 +94,7 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, colorScale, translatio
89
94
  },
90
95
  },
91
96
  color: {
92
- scale: colorScale,
97
+ scale: formattedColorScale,
93
98
  },
94
99
  };
95
100
  return (_jsxs(Stack, { gap: 6, children: [_jsx(C4JobDashboardChartHeading, { title: translations.charts.jobWorkload.title, tooltipLabel: translations.charts.jobWorkload.tooltip }), _jsxs("strong", { children: [translations.charts.jobWorkload.subtitle, " "] }), (!timeSeries || timeSeries.length === 0 || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: timeSeries.length, showIcons: false, translations: translations.errorHandler, error: error, docsUrls: docsUrls })) : (_jsx("div", { style: { height: CHART_HEIGHT }, children: _jsx(StackedAreaChart, { data: chartData, options: areaOptions }) }))] }));
@@ -8,6 +8,7 @@ import { C3DataTable, } from '@camunda/camunda-composite-components';
8
8
  import { InlineNotification, Stack } from '@carbon/react';
9
9
  import { Launch } from '@carbon/react/icons/index.esm.js';
10
10
  import { useEffect, useState } from 'react';
11
+ import { getC4JobDashboardDocsUrls } from '../../externalUrls.const.js';
11
12
  import { C4Breadcrumb } from '../c4-breadcrumb/c4-breadcrumb.js';
12
13
  import { C4BackgroundFetchingIndicator } from '../c4-job-dashboard-shared/c4-background-fetching-indicator.js';
13
14
  import { C4JobDashboardErrorHandler } from '../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
@@ -16,6 +17,7 @@ import C4JobDashboardTimeRangeDropdown from '../c4-job-dashboard-shared/c4-job-d
16
17
  import C4TimestampInformation from '../c4-job-dashboard-shared/c4-timestamp-information.js';
17
18
  import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
18
19
  export const C4JobDashboardOverviewPage = ({ error, items, isIncomplete, config, onTimeRangeChange, breadcrumb, isLoadingConfig, isLoadingTable, translations, lastUpdatedAt, docsUrls, }) => {
20
+ const resolvedDocsUrls = getC4JobDashboardDocsUrls(docsUrls);
19
21
  const [rows, setRows] = useState([]);
20
22
  useEffect(() => {
21
23
  const originalRows = items.map((row, index) => ({
@@ -51,9 +53,9 @@ export const C4JobDashboardOverviewPage = ({ error, items, isIncomplete, config,
51
53
  details: 'Feature is disabled',
52
54
  message: '',
53
55
  };
54
- return (_jsx(C4JobDashboardErrorHandler, { itemsLength: 0, showIcons: true, translations: translations.errorHandler, error: error, docsUrls: docsUrls }));
56
+ return (_jsx(C4JobDashboardErrorHandler, { itemsLength: 0, showIcons: true, translations: translations.errorHandler, error: error, docsUrls: resolvedDocsUrls }));
55
57
  }
56
- return (_jsxs(Stack, { gap: 3, children: [_jsx(C4Breadcrumb, { loading: false, elements: breadcrumb.elements, title: translations.title }), _jsxs("p", { children: [translations.description, ' ', _jsx(C4LinkButton, { onClick: () => window.open('https://docs.camunda.io/docs/components/concepts/job-workers/'), label: translations.learnMoreLabel, icon: _jsx(Launch, {}) })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), shouldShowErrorHandler ? (_jsx(C4JobDashboardErrorHandler, { error: error, itemsLength: items.length, showIcons: true, translations: translations.errorHandler, docsUrls: docsUrls })) : (_jsxs(_Fragment, { children: [isIncomplete && (_jsx(InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(C3DataTable, { id: 'usage-history-table', data: rows, toolbar: toolbar, headers: [
58
+ return (_jsxs(Stack, { gap: 3, children: [_jsx(C4Breadcrumb, { loading: false, elements: breadcrumb.elements, title: translations.title }), _jsxs("p", { children: [translations.description, ' ', _jsx(C4LinkButton, { onClick: () => window.open('https://docs.camunda.io/docs/components/concepts/job-workers/'), label: translations.learnMoreLabel, icon: _jsx(Launch, {}) })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), shouldShowErrorHandler ? (_jsx(C4JobDashboardErrorHandler, { error: error, itemsLength: items.length, showIcons: true, translations: translations.errorHandler, docsUrls: resolvedDocsUrls })) : (_jsxs(_Fragment, { children: [isIncomplete && (_jsx(InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(C3DataTable, { id: 'usage-history-table', data: rows, toolbar: toolbar, headers: [
57
59
  {
58
60
  key: 'jobType',
59
61
  label: translations.tableHeaders.jobType,
@@ -43,5 +43,5 @@ export interface C4JobDashboardOverviewPageProps {
43
43
  isLoadingConfig: boolean;
44
44
  isLoadingTable: boolean;
45
45
  translations: JobDashboardOverviewTranslations;
46
- docsUrls: DocsUrls;
46
+ docsUrls?: DocsUrls;
47
47
  }
@@ -6,13 +6,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  */
7
7
  import { C3DataTable, C3EmptyState, } from '@camunda/camunda-composite-components';
8
8
  import { CodeSnippet, DataTableSkeleton, ListItem, Stack, UnorderedList, } from '@carbon/react';
9
+ import { C4_ASSET_URLS } from '../../assetUrls.js';
9
10
  export const C4ManagementApi = ({ clients, loading, showIpWhitelistColumn, showHotBackupColumn, text, urls, permissions, onShowDetails, onUpdateClient, onDeleteClient, onCreate, onOpenDocs, }) => {
10
11
  if (loading) {
11
12
  return _jsx(DataTableSkeleton, { showToolbar: false, showHeader: false });
12
13
  }
13
14
  if (clients.length === 0) {
14
15
  return (_jsx(C3EmptyState, { icon: {
15
- path: `../../../../assets/consoleAPI.svg`,
16
+ path: C4_ASSET_URLS.consoleApiIcon,
16
17
  altText: 'consoleAPI',
17
18
  }, heading: text.emptyStateTitle, description: text.emptyStateDescription, button: permissions.canCreate
18
19
  ? {