@camunda/ccma-saas-frontend 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +11 -1
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +2 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.types.d.ts +2 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +24 -2
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +9 -0
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +2 -4
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +0 -4
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +9 -1
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +5 -5
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +3 -3
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.d.ts +1 -1
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +2 -2
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.types.d.ts +5 -0
- package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.js +1 -11
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +1 -14
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.d.ts +1 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +188 -71
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +52 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +1 -11
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +6 -13
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +1 -11
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +1 -18
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +1 -11
- package/lib/esm/components/c4-delete-account-modal/c4-delete-account-modal.d.ts +0 -7
- package/lib/esm/components/c4-delete-account-modal/c4-delete-account-modal.js +1 -24
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +1 -18
- package/lib/esm/components/c4-divider/c4-divider.js +12 -0
- package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +8 -0
- package/lib/esm/components/c4-empty-state/c4-empty-state.js +32 -8
- package/lib/esm/components/c4-file-uploader/c4-file-uploader.d.ts +36 -0
- package/lib/esm/components/c4-file-uploader/c4-file-uploader.js +43 -0
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +1 -11
- package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +1 -11
- package/lib/esm/components/c4-org-cluster-defaults/c4-org-cluster-defaults.d.ts +10 -0
- package/lib/esm/components/c4-org-cluster-defaults/c4-org-cluster-defaults.js +96 -0
- package/lib/esm/components/c4-org-cluster-defaults/c4-org-cluster-defaults.types.d.ts +22 -0
- package/lib/esm/components/c4-org-cluster-defaults/c4-org-cluster-defaults.types.js +6 -0
- package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +1 -11
- package/lib/esm/components/c4-segmented-control/c4-segmented-control.d.ts +50 -0
- package/lib/esm/components/c4-segmented-control/c4-segmented-control.js +130 -0
- package/lib/esm/externalUrls.const.d.ts +7 -0
- package/lib/esm/externalUrls.const.js +11 -1
- package/lib/esm/i18n/c4-console-i18n.js +3 -0
- package/lib/esm/i18n/en/modals/apiclients.json +2 -1
- package/lib/esm/i18n/en/modals/clusterclients.json +18 -1
- package/lib/esm/i18n/en/pages/clusterdetails.json +12 -7
- package/lib/esm/i18n/en/pages/createcluster.json +43 -0
- package/lib/esm/i18n/en/pages/orgmanagement.json +6 -0
- package/lib/esm/index.d.ts +4 -0
- package/lib/esm/index.js +3 -0
- package/lib/esm/runtime/c4-console-runtime-context.d.ts +1 -1
- package/lib/esm/runtime/c4-console-runtime-context.js +2 -2
- package/lib/esm/runtime/cluster-duplication.d.ts +10 -0
- package/lib/esm/runtime/cluster-duplication.js +15 -0
- package/lib/esm/runtime/org-cluster-defaults.d.ts +14 -0
- package/lib/esm/runtime/org-cluster-defaults.js +19 -0
- package/lib/esm/ui/c4-password-input.js +1 -1
- package/lib/esm/ui/index.d.ts +1 -0
- package/lib/esm/ui/index.js +16 -2
- package/lib/esm/utils/role-labels.d.ts +1 -2
- package/lib/esm/utils/role-labels.js +1 -13
- package/lib/esm/utils/safe-translate.d.ts +4 -2
- package/lib/esm/utils/safe-translate.js +9 -2
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +80 -23
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +34 -23
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +6 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +7 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +3 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-activity-tab.js +1 -19
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +1 -14
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +1 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +57 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +77 -28
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +1 -6
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +1 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +12 -22
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +1 -6
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +3 -86
- package/lib/esm/widgets/clusters/c4-clusters-page.js +72 -100
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +7 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +1 -9
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +1 -9
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +88 -1
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +285 -45
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +9 -0
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +3 -20
- package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +6 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +1 -1
- package/lib/esm/widgets/group-details/c4-group-details-page.js +1 -9
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +1 -0
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +4 -34
- package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
- package/lib/esm/widgets/management/c4-management-app.js +99 -23
- package/lib/esm/widgets/management/c4-management-app.types.d.ts +6 -0
- package/lib/esm/widgets/management/c4-management-page.d.ts +1 -1
- package/lib/esm/widgets/management/c4-management-page.js +7 -13
- package/lib/esm/widgets/management/c4-management-page.types.d.ts +1 -0
- package/lib/esm/widgets/management/management-tabs.d.ts +1 -1
- package/lib/esm/widgets/management/management-tabs.js +5 -0
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +1 -13
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -9
- package/lib/esm/widgets/management/tabs/c4-management-cluster-defaults-tab.d.ts +5 -0
- package/lib/esm/widgets/management/tabs/c4-management-cluster-defaults-tab.js +5 -0
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +1 -13
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -8
- package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +1 -24
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +1 -13
- package/lib/esm/widgets/user-account/c4-delete-account-widget.js +2 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.js +1 -9
- package/package.json +3 -3
- package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.d.ts +0 -14
- package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.js +0 -12
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import type { C4ClusterDetailsClientsProps } from './c4-cluster-details-clients.types.js';
|
|
3
|
-
export declare const C4ClusterDetailsClients: ({ clients, isLoading, hasError, hasIdentityIntegration, hasIdentityAuthorization, hasZeebeUrl, text, urls, permissions, onNavigateToClient, onCreateClient, onUpdateClient, onDeleteClient, onRefresh, onOpenIdentity, onOpenDocs, }: C4ClusterDetailsClientsProps) => JSX.Element;
|
|
3
|
+
export declare const C4ClusterDetailsClients: ({ clients, isLoading, hasError, hasIdentityIntegration, hasIdentityAuthorization, hasZeebeUrl, text, urls, permissions, onNavigateToClient, onCreateClient, onUpdateClient, onRotateClientSecret, onDeleteClient, onRefresh, onOpenIdentity, onOpenDocs, }: C4ClusterDetailsClientsProps) => JSX.Element;
|
|
@@ -21,7 +21,7 @@ const CLIENT_DATE_TIME_FORMATTER = new Intl.DateTimeFormat('en-US', {
|
|
|
21
21
|
hour: '2-digit',
|
|
22
22
|
minute: '2-digit',
|
|
23
23
|
});
|
|
24
|
-
export const C4ClusterDetailsClients = ({ clients, isLoading, hasError, hasIdentityIntegration, hasIdentityAuthorization, hasZeebeUrl, text, urls, permissions, onNavigateToClient, onCreateClient, onUpdateClient, onDeleteClient, onRefresh, onOpenIdentity, onOpenDocs, }) => {
|
|
24
|
+
export const C4ClusterDetailsClients = ({ clients, isLoading, hasError, hasIdentityIntegration, hasIdentityAuthorization, hasZeebeUrl, text, urls, permissions, onNavigateToClient, onCreateClient, onUpdateClient, onRotateClientSecret, onDeleteClient, onRefresh, onOpenIdentity, onOpenDocs, }) => {
|
|
25
25
|
const tableData = useMemo(() => clients.map((client, originalIndex) => ({
|
|
26
26
|
...client,
|
|
27
27
|
originalIndex,
|
|
@@ -153,6 +153,16 @@ export const C4ClusterDetailsClients = ({ clients, isLoading, hasError, hasIdent
|
|
|
153
153
|
onClick: (row) => onUpdateClient(row.id),
|
|
154
154
|
visible: () => permissions.canUpdate,
|
|
155
155
|
},
|
|
156
|
+
{
|
|
157
|
+
id: 'rotate-client-secret',
|
|
158
|
+
label: text.rotateSecretAction,
|
|
159
|
+
kind: 'ghost',
|
|
160
|
+
icon: Renew,
|
|
161
|
+
onClick: (row) => onRotateClientSecret(row.id),
|
|
162
|
+
// A rotation gives a new credential, thus it needs the permission that
|
|
163
|
+
// a creation needs, and not the one for a rename.
|
|
164
|
+
visible: () => permissions.canCreate,
|
|
165
|
+
},
|
|
156
166
|
{
|
|
157
167
|
id: 'delete-alert',
|
|
158
168
|
label: text.deleteAction,
|
|
@@ -15,6 +15,7 @@ export const defaultText = {
|
|
|
15
15
|
headerCreated: 'Created',
|
|
16
16
|
headerLastUsed: 'Last Used',
|
|
17
17
|
renameAction: 'Rename',
|
|
18
|
+
rotateSecretAction: 'Rotate secret',
|
|
18
19
|
deleteAction: 'Delete',
|
|
19
20
|
errorTitle: 'Oops ... something went wrong.',
|
|
20
21
|
errorDescription: 'Please try reloading!',
|
|
@@ -75,6 +76,7 @@ export const defaultProps = {
|
|
|
75
76
|
onNavigateToClient: (clientId) => console.log('Navigate to client:', clientId),
|
|
76
77
|
onCreateClient: () => console.log('Create client'),
|
|
77
78
|
onUpdateClient: (clientId) => console.log('Update client:', clientId),
|
|
79
|
+
onRotateClientSecret: (clientId) => console.log('Rotate client secret:', clientId),
|
|
78
80
|
onDeleteClient: (clientId) => console.log('Delete client:', clientId),
|
|
79
81
|
onRefresh: () => console.log('Refresh'),
|
|
80
82
|
onOpenIdentity: () => console.log('Open Identity'),
|
|
@@ -22,6 +22,7 @@ export interface C4ClusterDetailsClientsProps {
|
|
|
22
22
|
headerCreated: string;
|
|
23
23
|
headerLastUsed: string;
|
|
24
24
|
renameAction: string;
|
|
25
|
+
rotateSecretAction: string;
|
|
25
26
|
deleteAction: string;
|
|
26
27
|
errorTitle: string;
|
|
27
28
|
errorDescription: string;
|
|
@@ -46,6 +47,7 @@ export interface C4ClusterDetailsClientsProps {
|
|
|
46
47
|
onNavigateToClient: (clientId: string) => void;
|
|
47
48
|
onCreateClient: () => void;
|
|
48
49
|
onUpdateClient: (clientId: string) => void;
|
|
50
|
+
onRotateClientSecret: (clientId: string) => void;
|
|
49
51
|
onDeleteClient: (clientId: string) => void;
|
|
50
52
|
onRefresh: () => void;
|
|
51
53
|
onOpenIdentity: () => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import type { C4ClusterListProps } from './c4-cluster-list.types.js';
|
|
3
|
-
export declare const C4ClusterList: ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isFailoverSource, isOnRetiredAlphaGeneration, isRunningOnUnsupportedGeneration, scope, }: C4ClusterListProps) => JSX.Element;
|
|
3
|
+
export declare const C4ClusterList: ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, onDuplicateCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isFailoverSource, isOnRetiredAlphaGeneration, isRunningOnUnsupportedGeneration, scope, }: C4ClusterListProps) => JSX.Element;
|
|
@@ -37,7 +37,7 @@ function isPlainLeftClick(event) {
|
|
|
37
37
|
!event.ctrlKey &&
|
|
38
38
|
!event.shiftKey);
|
|
39
39
|
}
|
|
40
|
-
export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isFailoverSource, isOnRetiredAlphaGeneration, isRunningOnUnsupportedGeneration, scope = 'cluster', }) => {
|
|
40
|
+
export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, onDuplicateCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isFailoverSource, isOnRetiredAlphaGeneration, isRunningOnUnsupportedGeneration, scope = 'cluster', }) => {
|
|
41
41
|
const designSystem = useC4DesignSystem();
|
|
42
42
|
const isDsMode = designSystem === 'ds';
|
|
43
43
|
const tableContainerRef = useRef(null);
|
|
@@ -406,6 +406,25 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
406
406
|
},
|
|
407
407
|
]
|
|
408
408
|
: []),
|
|
409
|
+
...(onDuplicateCluster
|
|
410
|
+
? [
|
|
411
|
+
{
|
|
412
|
+
id: 'duplicate-cluster',
|
|
413
|
+
// Stays visible but disabled for a cluster that was failed over,
|
|
414
|
+
// with the reason in the label — as the failover action above
|
|
415
|
+
// does. console-backend rejects that cluster too.
|
|
416
|
+
label: (row) => isFailoverSource?.(row.id)
|
|
417
|
+
? (translations.overflowMenu
|
|
418
|
+
.duplicateUnavailableFailoverSource ??
|
|
419
|
+
'Duplicate (unavailable — this cluster was failed over)')
|
|
420
|
+
: (translations.overflowMenu.duplicate ?? 'Duplicate'),
|
|
421
|
+
kind: 'ghost',
|
|
422
|
+
onClick: (row) => onDuplicateCluster(row.id),
|
|
423
|
+
disabled: (row) => isFailoverSource?.(row.id) ?? false,
|
|
424
|
+
visible: () => permissions.canDuplicateCluster ?? false,
|
|
425
|
+
},
|
|
426
|
+
]
|
|
427
|
+
: []),
|
|
409
428
|
{
|
|
410
429
|
id: 'delete-cluster',
|
|
411
430
|
label: translations.overflowMenu.delete,
|
|
@@ -418,7 +437,10 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
418
437
|
if (clusterCapMessage) {
|
|
419
438
|
return _jsx("p", { children: clusterCapMessage });
|
|
420
439
|
}
|
|
421
|
-
|
|
440
|
+
// An empty list while loading means "not known yet", not "no clusters".
|
|
441
|
+
// Fall through to the table, which shows its loading skeleton. An empty
|
|
442
|
+
// state here invites the user to create a cluster that already exists.
|
|
443
|
+
if (clusters.length === 0 && !loading) {
|
|
422
444
|
return (emptyStateContent ?? (_jsxs("div", { style: {
|
|
423
445
|
paddingBlockStart: 'var(--cds-spacing-07)',
|
|
424
446
|
paddingBlockEnd: 'var(--cds-spacing-07)',
|
|
@@ -23,6 +23,11 @@ export interface ClusterListPermissions {
|
|
|
23
23
|
canSeeClusterLoad: boolean;
|
|
24
24
|
canWakeCluster: boolean;
|
|
25
25
|
canFailoverCluster?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Gated by the `console.clusterDuplication` flag as well as by the create
|
|
28
|
+
* permission: a duplicate makes a cluster.
|
|
29
|
+
*/
|
|
30
|
+
canDuplicateCluster?: boolean;
|
|
26
31
|
createClusterButtonDisabled: boolean;
|
|
27
32
|
}
|
|
28
33
|
export interface ClusterListNotification {
|
|
@@ -49,6 +54,7 @@ export interface C4ClusterListProps {
|
|
|
49
54
|
onAssignTag: (clusterId: string) => void;
|
|
50
55
|
onWakeCluster: (clusterId: string) => void;
|
|
51
56
|
onFailoverCluster?: (clusterId: string) => void;
|
|
57
|
+
onDuplicateCluster?: (clusterId: string) => void;
|
|
52
58
|
trialNotification?: React.ReactNode;
|
|
53
59
|
encryptionNotification?: ClusterListNotification;
|
|
54
60
|
clusterCapMessage?: string;
|
|
@@ -81,6 +87,9 @@ export interface C4ClusterListProps {
|
|
|
81
87
|
failoverSyncPending?: string;
|
|
82
88
|
/** Shown as the action label for a cluster that was already failed over. */
|
|
83
89
|
failoverAlreadyFailedOver?: string;
|
|
90
|
+
duplicate?: string;
|
|
91
|
+
/** Shown as the action label for a cluster that was failed over, which cannot be duplicated. */
|
|
92
|
+
duplicateUnavailableFailoverSource?: string;
|
|
84
93
|
};
|
|
85
94
|
tags: {
|
|
86
95
|
addLabel: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { C4ClusterSettingsProps } from './c4-cluster-settings.types.js';
|
|
3
|
-
export declare const C4ClusterSettings: ({ settings, tasklistSettings, optimizeFilteringSettings, sessionSettings,
|
|
3
|
+
export declare const C4ClusterSettings: ({ settings, tasklistSettings, optimizeFilteringSettings, sessionSettings, dangerZone, }: C4ClusterSettingsProps) => JSX.Element;
|
|
@@ -3,17 +3,15 @@ import { Stack } from '../../ui/index.js';
|
|
|
3
3
|
import { ClusterSettings } from './elements/cluster-settings.js';
|
|
4
4
|
import { DangerZone } from './elements/danger-zone.js';
|
|
5
5
|
import { OptimizeFilteringSettings } from './elements/optimize-filtering-settings.js';
|
|
6
|
-
import { OptionalTelemetryToggle } from './elements/optional-telemetry-toggle.js';
|
|
7
6
|
import { SessionSettings } from './elements/session-settings.js';
|
|
8
7
|
import { SettingsTile } from './elements/settings-tile.js';
|
|
9
8
|
import { TasklistSettings } from './elements/tasklist-mode-settings.js';
|
|
10
|
-
export const C4ClusterSettings = ({ settings, tasklistSettings, optimizeFilteringSettings, sessionSettings,
|
|
9
|
+
export const C4ClusterSettings = ({ settings, tasklistSettings, optimizeFilteringSettings, sessionSettings, dangerZone, }) => {
|
|
11
10
|
const settingsComponent = _jsx(ClusterSettings, { ...settings });
|
|
12
11
|
const tasklistComponent = tasklistSettings?.enabled && (_jsx(TasklistSettings, { ...tasklistSettings }));
|
|
13
12
|
const optimizeFilteringComponent = optimizeFilteringSettings ? (_jsx(SettingsTile, { title: optimizeFilteringSettings.title, children: _jsx(OptimizeFilteringSettings, { filtering: optimizeFilteringSettings.filtering, permissions: optimizeFilteringSettings.permissions, onToggle: optimizeFilteringSettings.onToggle, onSave: optimizeFilteringSettings.onSave }) })) : undefined;
|
|
14
13
|
const sessionSettingsComponent = sessionSettings ? (_jsx(SettingsTile, { title: sessionSettings.title, children: _jsx(SessionSettings, { maxInactiveIntervalMinutes: sessionSettings.maxInactiveIntervalMinutes, heartbeatEnabled: sessionSettings.heartbeatEnabled, permissions: sessionSettings.permissions, onSaveMaxInactiveInterval: sessionSettings.onSaveMaxInactiveInterval, onToggleHeartbeat: sessionSettings.onToggleHeartbeat }) })) : undefined;
|
|
15
|
-
const optionalTelemetrySettingsComponent = optionalTelemetrySettings ? (_jsx(SettingsTile, { title: optionalTelemetrySettings.title, children: _jsx(OptionalTelemetryToggle, { enabled: optionalTelemetrySettings.enabled, description: optionalTelemetrySettings.description, permissions: optionalTelemetrySettings.permissions, action: optionalTelemetrySettings.action }) })) : undefined;
|
|
16
14
|
const dangerZoneComponent = dangerZone ? (_jsx(DangerZone, { ...dangerZone })) : undefined;
|
|
17
|
-
const component = (_jsxs(Stack, { gap: 6, children: [settingsComponent, tasklistComponent, optimizeFilteringComponent, sessionSettingsComponent,
|
|
15
|
+
const component = (_jsxs(Stack, { gap: 6, children: [settingsComponent, tasklistComponent, optimizeFilteringComponent, sessionSettingsComponent, dangerZoneComponent] }));
|
|
18
16
|
return component;
|
|
19
17
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ClusterSettingsProps } from './elements/cluster-settings.js';
|
|
2
2
|
import type { DangerZoneProps } from './elements/danger-zone.js';
|
|
3
3
|
import type { OptimizeFilteringSettingsProps } from './elements/optimize-filtering-settings.js';
|
|
4
|
-
import type { OptionalTelemetryToggleProps } from './elements/optional-telemetry-toggle.js';
|
|
5
4
|
import type { SessionSettingsProps } from './elements/session-settings.js';
|
|
6
5
|
import type { SwaggerToggleProps } from './elements/swagger-toggle.js';
|
|
7
6
|
import type { TasklistModeToggleProps } from './elements/tasklist-mode-toggle.js';
|
|
@@ -17,8 +16,5 @@ export interface C4ClusterSettingsProps {
|
|
|
17
16
|
sessionSettings?: SessionSettingsProps & {
|
|
18
17
|
title: string;
|
|
19
18
|
};
|
|
20
|
-
optionalTelemetrySettings?: OptionalTelemetryToggleProps & {
|
|
21
|
-
title: string;
|
|
22
|
-
};
|
|
23
19
|
dangerZone?: DangerZoneProps;
|
|
24
20
|
}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useC4DesignSystem } from '../../../runtime/c4-console-runtime-context.js';
|
|
2
3
|
import { Button, Stack } from '../../../ui/index.js';
|
|
3
4
|
import { SECTION_SUBHEADING_STYLE } from '../../../utils/section-heading-style.js';
|
|
4
5
|
import { SettingsTile } from './settings-tile.js';
|
|
5
6
|
export const DangerZone = ({ deleteCluster, title, permissions, }) => {
|
|
6
|
-
const
|
|
7
|
+
const designSystem = useC4DesignSystem();
|
|
8
|
+
// The DS Stack adapter is a `flex flex-col` div, and a flex column stretches
|
|
9
|
+
// its items across the full width. That made the delete button as wide as the
|
|
10
|
+
// card, which reads as a page-wide destructive area and not as one button.
|
|
11
|
+
// `align-self` keeps the button at its own width. Carbon gets no style, thus
|
|
12
|
+
// carbon mode does not change.
|
|
13
|
+
const deleteButtonStyle = designSystem === 'ds' ? { alignSelf: 'flex-start' } : undefined;
|
|
14
|
+
const component = (_jsx(SettingsTile, { title: title, children: _jsx("div", { children: _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h4", { style: SECTION_SUBHEADING_STYLE, children: deleteCluster.title }), _jsx("p", { children: deleteCluster.description })] }), _jsx(Button, { onClick: deleteCluster.action.onClick, kind: 'danger', disabled: !permissions.mayDeleteCluster, size: 'md', style: deleteButtonStyle, children: deleteCluster.action.label })] }) }) }));
|
|
7
15
|
return component;
|
|
8
16
|
};
|
|
@@ -4,13 +4,13 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
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 {
|
|
7
|
+
import { StageClusterLabels, } from '@camunda/camunda-composite-components';
|
|
8
8
|
import { ChoiceCard, ChoiceCardGroup } from '@camunda/design-system';
|
|
9
9
|
import { Column, Grid } from '@carbon/react';
|
|
10
10
|
import { Information } from '@carbon/react/icons/index.esm.js';
|
|
11
11
|
import { useEffect, useState } from 'react';
|
|
12
12
|
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
13
|
-
import { Stack } from '../../ui/index.js';
|
|
13
|
+
import { ClusterTag, Stack } from '../../ui/index.js';
|
|
14
14
|
import { STYLES } from '../c4-billing-page/c4-billing-page.js';
|
|
15
15
|
import { mediaSizeByWidth } from '../c4-billing-page/elements/current-usage-metrics.js';
|
|
16
16
|
import { C4SelectableTile } from '../c4-selectable-tile/c4-selectable-tile.js';
|
|
@@ -43,9 +43,9 @@ export const C4ClusterTagSelector = (props) => {
|
|
|
43
43
|
const stage = item;
|
|
44
44
|
const { text, info } = props.boxes[stage];
|
|
45
45
|
return (_jsx(ChoiceCard, { value: item,
|
|
46
|
-
// ChoiceCard renders `title` as node children; pass the
|
|
46
|
+
// ChoiceCard renders `title` as node children; pass the stage
|
|
47
47
|
// chip so the colored badge itself serves as the card title.
|
|
48
|
-
title: (_jsx(
|
|
48
|
+
title: (_jsx(ClusterTag, { stage: stage })), description: info ? `${text} ${info}` : text, disabled: isTagDisabled(item) }, `tag-option-${item}`));
|
|
49
49
|
}) }));
|
|
50
50
|
}
|
|
51
51
|
const buildSingleTile = (item) => (_jsxs(C4SelectableTile, { value: item, checked: item === props.currentStage, onChange: () => {
|
|
@@ -54,7 +54,7 @@ export const C4ClusterTagSelector = (props) => {
|
|
|
54
54
|
(props.allowedTags && !props.allowedTags?.includes(item)), style: { height: '100%' }, children: [_jsxs("div", { style: {
|
|
55
55
|
marginBottom: props.boxes[item].info ? '24px' : '0px',
|
|
56
56
|
paddingBottom: props.boxes[item].info ? '24px' : '0px',
|
|
57
|
-
}, children: [_jsx(
|
|
57
|
+
}, children: [_jsx(ClusterTag, { stage: item }, `tag-options-name-${item}`), _jsx("p", { children: props.boxes[item].text }, `tag-options-description-${item}`)] }), (() => {
|
|
58
58
|
if (props.boxes[item].info) {
|
|
59
59
|
return (_jsx("div", { children: _jsxs("div", { style: {
|
|
60
60
|
display: 'grid',
|
|
@@ -19,7 +19,7 @@ export const C4ClustersEmptyState = (props) => {
|
|
|
19
19
|
onClick: onDocsClick,
|
|
20
20
|
}
|
|
21
21
|
: undefined;
|
|
22
|
-
return (_jsx(C4EmptyState, { icon: {
|
|
22
|
+
return (_jsx(C4EmptyState, { align: 'start', icon: {
|
|
23
23
|
path: C4_ASSET_URLS.clusterIcon,
|
|
24
24
|
altText: 'clusterIcon',
|
|
25
25
|
}, heading: texts.noClusters.heading, description: texts.noClusters.description, button: button, link: link }));
|
|
@@ -29,7 +29,7 @@ export const C4ClustersEmptyState = (props) => {
|
|
|
29
29
|
onClick: onUpgrade ?? (() => undefined),
|
|
30
30
|
label: texts.trialExpired.upgradeButtonLabel,
|
|
31
31
|
};
|
|
32
|
-
return (_jsx(C4EmptyState, { icon: {
|
|
32
|
+
return (_jsx(C4EmptyState, { align: 'start', icon: {
|
|
33
33
|
path: C4_ASSET_URLS.upgradeIcon,
|
|
34
34
|
altText: 'upgradeIcon',
|
|
35
35
|
}, heading: texts.trialExpired.heading, description: texts.trialExpired.adminDescription, button: onExtendTrial ? undefined : upgradeButton, buttons: onExtendTrial
|
|
@@ -42,7 +42,7 @@ export const C4ClustersEmptyState = (props) => {
|
|
|
42
42
|
]
|
|
43
43
|
: undefined }));
|
|
44
44
|
}
|
|
45
|
-
return (_jsx(C4EmptyState, { icon: {
|
|
45
|
+
return (_jsx(C4EmptyState, { align: 'start', icon: {
|
|
46
46
|
path: C4_ASSET_URLS.upgradeIcon,
|
|
47
47
|
altText: 'upgradeIcon',
|
|
48
48
|
}, heading: texts.trialExpired.heading, description: texts.trialExpired.memberDescription }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import type { C4ConsoleDashboardProps } from './c4-console-dashboard.types.js';
|
|
3
|
-
export declare const C4ConsoleDashboard: ({ orgId, usersAmount, taskUsersAmount, clustersAmount, clientsAmount, clusters, processInstancesChart, decisionInstancesChart, activityEntries, alerts, quickLinks, permissions, actions, urls, texts, getClusterLoad, getClusterLoadConfig: getClusterLoadConfigProp, clusterLoadTooltip, }: C4ConsoleDashboardProps) => JSX.Element;
|
|
3
|
+
export declare const C4ConsoleDashboard: ({ orgId, embedded, usersAmount, taskUsersAmount, clustersAmount, clientsAmount, clusters, processInstancesChart, decisionInstancesChart, activityEntries, alerts, quickLinks, permissions, actions, urls, texts, getClusterLoad, getClusterLoadConfig: getClusterLoadConfigProp, clusterLoadTooltip, }: C4ConsoleDashboardProps) => JSX.Element;
|
|
@@ -45,7 +45,7 @@ const limitChartToLastNDays = (chart, days) => {
|
|
|
45
45
|
}),
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
export const C4ConsoleDashboard = ({ orgId, usersAmount, taskUsersAmount, clustersAmount, clientsAmount, clusters, processInstancesChart, decisionInstancesChart, activityEntries, alerts, quickLinks, permissions, actions, urls, texts, getClusterLoad, getClusterLoadConfig: getClusterLoadConfigProp, clusterLoadTooltip, }) => {
|
|
48
|
+
export const C4ConsoleDashboard = ({ orgId, embedded = false, usersAmount, taskUsersAmount, clustersAmount, clientsAmount, clusters, processInstancesChart, decisionInstancesChart, activityEntries, alerts, quickLinks, permissions, actions, urls, texts, getClusterLoad, getClusterLoadConfig: getClusterLoadConfigProp, clusterLoadTooltip, }) => {
|
|
49
49
|
const [totalPiHeight, setTotalPiHeight] = useState(400);
|
|
50
50
|
const [totalDiHeight, setTotalDiHeight] = useState(400);
|
|
51
51
|
const decisionInstancesChartLast14Days = useMemo(() => limitChartToLastNDays(decisionInstancesChart, 14), [decisionInstancesChart]);
|
|
@@ -75,7 +75,7 @@ export const C4ConsoleDashboard = ({ orgId, usersAmount, taskUsersAmount, cluste
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}, []);
|
|
78
|
-
const component = (_jsx(C4PageLayout, { children: _jsxs(Grid, { style: { gap: '16px' }, children: [_jsx(Column, { lg: 16, md: 8, sm: 4, children: _jsx("div", { style: {
|
|
78
|
+
const component = (_jsx(C4PageLayout, { padding: embedded ? 'none' : 'default', children: _jsxs(Grid, { style: { gap: '16px' }, children: [_jsx(Column, { lg: 16, md: 8, sm: 4, children: _jsx("div", { style: {
|
|
79
79
|
display: 'flex',
|
|
80
80
|
justifyContent: 'flex-end',
|
|
81
81
|
}, children: _jsx(Button, { onClick: actions.onFeedbackClick, kind: 'ghost', renderIcon: Chat, style: {
|
|
@@ -41,6 +41,11 @@ export interface QuickLink {
|
|
|
41
41
|
}
|
|
42
42
|
export interface C4ConsoleDashboardProps {
|
|
43
43
|
orgId: string;
|
|
44
|
+
/**
|
|
45
|
+
* When true, the host owns the outer page chrome. In DS mode, this removes
|
|
46
|
+
* the page padding. Dashboard section headings stay visible.
|
|
47
|
+
*/
|
|
48
|
+
embedded?: boolean;
|
|
44
49
|
usersAmount: number | string;
|
|
45
50
|
taskUsersAmount: number;
|
|
46
51
|
clustersAmount: number;
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { safeTranslate } from '../../utils/safe-translate.js';
|
|
3
4
|
import { C4AsyncModal } from '../c4-async-modal/c4-async-modal.js';
|
|
4
|
-
function safeTranslate(t, key, defaultValue, options) {
|
|
5
|
-
if (!t)
|
|
6
|
-
return defaultValue;
|
|
7
|
-
try {
|
|
8
|
-
const translated = t(key, options);
|
|
9
|
-
return typeof translated === 'string' ? translated : defaultValue;
|
|
10
|
-
}
|
|
11
|
-
catch {
|
|
12
|
-
return defaultValue;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
5
|
function renderStrongTaggedText(text) {
|
|
16
6
|
// Supports a minimal subset of HTML used by translations (e.g. <strong>…</strong>).
|
|
17
7
|
const tokens = text.split(/(<\/?strong>)/g);
|
|
@@ -7,22 +7,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
7
7
|
import { forwardRef, useCallback, useImperativeHandle, useState, } from 'react';
|
|
8
8
|
import { Checkbox, Form, Modal, PasswordInput, Stack, TextInput, } from '../../ui/index.js';
|
|
9
9
|
import { useRadioFamily } from '../../ui/families.js';
|
|
10
|
+
import { safeTranslate } from '../../utils/safe-translate.js';
|
|
10
11
|
import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
|
|
11
12
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
12
|
-
// Helper to translate with fallback
|
|
13
|
-
function safeTranslate(translateFn, key, fallback, options) {
|
|
14
|
-
try {
|
|
15
|
-
const result = translateFn(key, options);
|
|
16
|
-
// If i18next returns the key unchanged, use fallback
|
|
17
|
-
if (result === key) {
|
|
18
|
-
return fallback;
|
|
19
|
-
}
|
|
20
|
-
return result;
|
|
21
|
-
}
|
|
22
|
-
catch {
|
|
23
|
-
return fallback;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
13
|
export const C4CreateAlertModal = forwardRef(({ t, userEmail, docsAlertsUrl, onNavigate, onCreateAlert, onCancel, onSubmitStart, onSubmitError, }, ref) => {
|
|
27
14
|
const { RadioButton, RadioButtonGroup } = useRadioFamily();
|
|
28
15
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import type { C4CreateClusterProps } from './c4-create-cluster.types.js';
|
|
3
|
-
export declare const C4CreateCluster: ({ loading, cta, formElements, autoUpdate, tasklistModeToggle, authorizationToggle, banner: { noSlotsLeft }, }: C4CreateClusterProps) => JSX.Element;
|
|
3
|
+
export declare const C4CreateCluster: ({ loading, cta, formElements, autoUpdate, tasklistModeToggle, authorizationToggle, banner: { noSlotsLeft }, initialValues, duplicate, }: C4CreateClusterProps) => JSX.Element;
|