@camunda/ccma-saas-frontend 0.6.0 → 0.7.1
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-billing-page/elements/value-metric.js +2 -4
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +24 -10
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +6 -2
- 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 +4 -2
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.js +1 -1
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +17 -7
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +12 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +9 -3
- package/lib/esm/components/c4-cluster-settings/elements/session-settings.d.ts +13 -0
- package/lib/esm/components/c4-cluster-settings/elements/session-settings.js +69 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +21 -3
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.js +2 -1
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.d.ts +1 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +4 -4
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +1 -2
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +2 -2
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +13 -2
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +8 -4
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +1 -2
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.d.ts +1 -1
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +3 -3
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.types.d.ts +7 -0
- package/lib/esm/components/c4-help-center/c4-help-center.js +3 -1
- package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.js +1 -1
- package/lib/esm/components/c4-management-api/c4-management-api.js +8 -3
- package/lib/esm/components/c4-navigation/c4-navigation.js +17 -9
- package/lib/esm/components/c4-sm-dashboard/health-status.js +1 -1
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +8 -2
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +2 -2
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +3 -1
- package/lib/esm/components/shared-charts/ds-line-chart.js +25 -11
- package/lib/esm/components/shared-charts/recharts-tokens.d.ts +16 -0
- package/lib/esm/components/shared-charts/recharts-tokens.js +31 -0
- package/lib/esm/i18n/en/entities/orgroles.json +2 -2
- package/lib/esm/i18n/en/modals/apiclients.json +4 -1
- package/lib/esm/i18n/en/pages/clusterdetails.json +2 -2
- package/lib/esm/i18n/en/pages/orgmanagement.json +9 -1
- package/lib/esm/runtime/build-cluster-swagger-url.js +2 -2
- package/lib/esm/runtime/nav/camunda-apps.js +2 -2
- package/lib/esm/ui/c4-definition-tooltip.d.ts +15 -0
- package/lib/esm/ui/c4-definition-tooltip.js +43 -0
- package/lib/esm/ui/index.d.ts +6 -0
- package/lib/esm/ui/index.js +20 -3
- package/lib/esm/utils/http-error-message.d.ts +14 -0
- package/lib/esm/utils/http-error-message.js +35 -0
- package/lib/esm/utils/role-labels.js +5 -4
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +5 -5
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +3 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +153 -37
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +3 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +51 -16
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +5 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +3 -4
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +16 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +16 -16
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +115 -28
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +2 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +2 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +2 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +2 -1
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +177 -17
- package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +15 -2
- package/lib/esm/widgets/group-details/c4-group-details-page.js +2 -2
- package/lib/esm/widgets/management/c4-management-app.js +369 -45
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +22 -7
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -2
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +30 -1
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +41 -15
- package/lib/esm/widgets/user-details/c4-user-details-page.js +3 -3
- package/package.json +4 -4
|
@@ -5,10 +5,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { MeterChart } from '@carbon/charts-react';
|
|
8
|
-
import { DefinitionTooltip } from '@carbon/react';
|
|
9
8
|
import { WarningAlt } from '@carbon/react/icons/index.esm.js';
|
|
10
9
|
import { useC4DesignSystem } from '../../../runtime/c4-console-runtime-context.js';
|
|
11
|
-
import {
|
|
10
|
+
import { DefinitionTooltip, Stack } from '../../../ui/index.js';
|
|
12
11
|
import { C4LinkButton } from '../../c4-link-button/c4-link-button.js';
|
|
13
12
|
import { C4TileWithTitleAndAction } from '../../c4-tile-with-title-and-action/c4-tile-with-title-and-action.js';
|
|
14
13
|
import { DsMeterChart } from '../../shared-charts/ds-meter-chart.js';
|
|
@@ -26,7 +25,6 @@ export const CHART_COLORS_DS = {
|
|
|
26
25
|
[CHART_COLORS.GREEN]: DS_STATUS_COLORS.success,
|
|
27
26
|
};
|
|
28
27
|
export const ValueMetric = ({ title, metric, loading, isEnterpriseOrg = false, }) => {
|
|
29
|
-
const designSystem = useC4DesignSystem();
|
|
30
28
|
let chartProps;
|
|
31
29
|
let simpleProps;
|
|
32
30
|
switch (metric.kind) {
|
|
@@ -56,7 +54,7 @@ export const ValueMetric = ({ title, metric, loading, isEnterpriseOrg = false, }
|
|
|
56
54
|
gap: '0.5rem',
|
|
57
55
|
}, children: [_jsx(WarningAlt, { style: {
|
|
58
56
|
color: CHART_COLORS.RED,
|
|
59
|
-
} }), _jsxs("p", { children: [
|
|
57
|
+
} }), _jsxs("p", { children: [_jsx(DefinitionTooltip, { openOnHover: true, definition: metric.overagesDescription, children: _jsx("span", { children: "Overages" }) }), ' ', "applied"] })] }))] }) }));
|
|
60
58
|
return component;
|
|
61
59
|
};
|
|
62
60
|
const SimpleText = ({ title, subTitle }) => {
|
|
@@ -8,22 +8,35 @@ import { BarChart } from '@camunda/design-system';
|
|
|
8
8
|
import { GroupedBarChart, SimpleBarChart, StackedBarChart, } from '@carbon/charts-react';
|
|
9
9
|
import { useC4DesignSystem } from '../../../runtime/c4-console-runtime-context.js';
|
|
10
10
|
import { Stack, Tile } from '../../../ui/index.js';
|
|
11
|
-
import { getDsSeriesToken } from '../../shared-charts/recharts-tokens.js';
|
|
12
|
-
/**
|
|
11
|
+
import { getDsSeriesToken, toDsSeriesKeys, } from '../../shared-charts/recharts-tokens.js';
|
|
12
|
+
/**
|
|
13
|
+
* Pivots flat {group, key, value} rows into one row per key, keyed by the
|
|
14
|
+
* group's CSS-safe series key.
|
|
15
|
+
*/
|
|
13
16
|
function pivotByKey(dataPoints) {
|
|
14
17
|
const groupSet = new Set();
|
|
15
|
-
const rowsByKey = new Map();
|
|
16
18
|
for (const point of dataPoints) {
|
|
17
19
|
groupSet.add(point.group);
|
|
18
|
-
const row = rowsByKey.get(point.key) ?? { key: point.key };
|
|
19
|
-
row[point.group] = point.value;
|
|
20
|
-
rowsByKey.set(point.key, row);
|
|
21
20
|
}
|
|
22
21
|
// Sort groups so the group→colour mapping stays stable regardless of the
|
|
23
22
|
// order the points arrive in.
|
|
23
|
+
const groups = Array.from(groupSet).sort();
|
|
24
|
+
const keyByGroup = toDsSeriesKeys(groups);
|
|
25
|
+
const rowsByKey = new Map();
|
|
26
|
+
for (const point of dataPoints) {
|
|
27
|
+
// `keyByGroup` is built from the groups of these same points, so this skips
|
|
28
|
+
// nothing. It keeps the row keys to the keys that `config` declares.
|
|
29
|
+
const seriesKey = keyByGroup.get(point.group);
|
|
30
|
+
if (!seriesKey) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const row = rowsByKey.get(point.key) ?? { key: point.key };
|
|
34
|
+
row[seriesKey] = point.value;
|
|
35
|
+
rowsByKey.set(point.key, row);
|
|
36
|
+
}
|
|
24
37
|
return {
|
|
25
38
|
rows: Array.from(rowsByKey.values()),
|
|
26
|
-
|
|
39
|
+
keyByGroup,
|
|
27
40
|
};
|
|
28
41
|
}
|
|
29
42
|
export const C4BarChart = ({ title, dataPoints, axes, stacked = false, mode, height = 400, theme, }) => {
|
|
@@ -34,9 +47,10 @@ export const C4BarChart = ({ title, dataPoints, axes, stacked = false, mode, hei
|
|
|
34
47
|
? 'stacked'
|
|
35
48
|
: 'grouped';
|
|
36
49
|
if (designSystem === 'ds') {
|
|
37
|
-
const { rows,
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
const { rows, keyByGroup } = pivotByKey(dataPoints);
|
|
51
|
+
// Iterate the map, so that every config key is a key the map produced.
|
|
52
|
+
const config = Object.fromEntries([...keyByGroup].map(([group, seriesKey], index) => [
|
|
53
|
+
seriesKey,
|
|
40
54
|
{ label: group, color: getDsSeriesToken(index) },
|
|
41
55
|
]));
|
|
42
56
|
return (_jsx(Tile, { children: _jsx(Stack, { children: _jsxs("div", { children: [title && (_jsx("div", { style: {
|
|
@@ -193,7 +193,9 @@ export const C4ClusterDetailsSecureConnectivity = ({ status, privateEndpoints, c
|
|
|
193
193
|
display: 'flex',
|
|
194
194
|
alignItems: 'center',
|
|
195
195
|
gap: 'var(--cds-spacing-05)',
|
|
196
|
-
}, children: _jsx("h4", { style: { margin: 0 }, children: text.serviceDetailsTitle ?? 'Service details' }) }), _jsx("div", { children: isNarrowLayout ? (
|
|
196
|
+
}, children: _jsx("h4", { style: { margin: 0 }, children: text.serviceDetailsTitle ?? 'Service details' }) }), _jsx("div", { children: isNarrowLayout ? (
|
|
197
|
+
// Single-column layout: each field on its own row
|
|
198
|
+
_jsx(C4StructuredListWrapper, { isCondensed: true, isFlush: true, style: { borderTop: 'none' }, children: _jsxs(C4StructuredListBody, { children: [_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, style: labelCellLeftStyle, children: text.enabledStatusLabel ?? 'Status' }), _jsx(C4StructuredListCell, { style: { borderTop: 'none' }, children: _jsxs("div", { style: {
|
|
197
199
|
display: 'flex',
|
|
198
200
|
justifyContent: 'space-between',
|
|
199
201
|
alignItems: 'center',
|
|
@@ -208,7 +210,9 @@ export const C4ClusterDetailsSecureConnectivity = ({ status, privateEndpoints, c
|
|
|
208
210
|
editLabel: 'Edit supported regions',
|
|
209
211
|
alignToSingleSnippet: true,
|
|
210
212
|
wrapItems: true,
|
|
211
|
-
}) })] })] }) })) : (
|
|
213
|
+
}) })] })] }) })) : (
|
|
214
|
+
// Two-column layout: pairs of fields side-by-side
|
|
215
|
+
_jsx(C4StructuredListWrapper, { isCondensed: true, isFlush: true, style: { borderTop: 'none', overflowX: 'auto' }, children: _jsxs(C4StructuredListBody, { children: [_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, style: labelCellLeftStyle, children: text.enabledStatusLabel ?? 'Status' }), _jsx(C4StructuredListCell, { style: { borderTop: 'none' }, children: statusElement }), _jsx(C4StructuredListCell, { noWrap: true, style: labelCellRightStyle, children: _jsx("span", { style: { opacity: 0 }, children: "\u2014" }) }), _jsx(C4StructuredListCell, { style: {
|
|
212
216
|
borderTop: 'none',
|
|
213
217
|
textAlign: 'right',
|
|
214
218
|
}, children: deactivateLinkElement })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, style: labelCellLeftStyle, children: text.serviceNameLabel ?? 'Service name' }), _jsx(C4StructuredListCell, { style: {
|
|
@@ -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, dangerZone, }: C4ClusterSettingsProps) => JSX.Element;
|
|
3
|
+
export declare const C4ClusterSettings: ({ settings, tasklistSettings, optimizeFilteringSettings, sessionSettings, dangerZone, }: C4ClusterSettingsProps) => JSX.Element;
|
|
@@ -3,13 +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 { SessionSettings } from './elements/session-settings.js';
|
|
6
7
|
import { SettingsTile } from './elements/settings-tile.js';
|
|
7
8
|
import { TasklistSettings } from './elements/tasklist-mode-settings.js';
|
|
8
|
-
export const C4ClusterSettings = ({ settings, tasklistSettings, optimizeFilteringSettings, dangerZone, }) => {
|
|
9
|
+
export const C4ClusterSettings = ({ settings, tasklistSettings, optimizeFilteringSettings, sessionSettings, dangerZone, }) => {
|
|
9
10
|
const settingsComponent = _jsx(ClusterSettings, { ...settings });
|
|
10
11
|
const tasklistComponent = tasklistSettings?.enabled && (_jsx(TasklistSettings, { ...tasklistSettings }));
|
|
11
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;
|
|
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;
|
|
12
14
|
const dangerZoneComponent = dangerZone ? (_jsx(DangerZone, { ...dangerZone })) : undefined;
|
|
13
|
-
const component = (_jsxs(Stack, { gap: 6, children: [settingsComponent, tasklistComponent, optimizeFilteringComponent, dangerZoneComponent] }));
|
|
15
|
+
const component = (_jsxs(Stack, { gap: 6, children: [settingsComponent, tasklistComponent, optimizeFilteringComponent, sessionSettingsComponent, dangerZoneComponent] }));
|
|
14
16
|
return component;
|
|
15
17
|
};
|
|
@@ -34,7 +34,7 @@ export const autoUpdate = {
|
|
|
34
34
|
};
|
|
35
35
|
export const lowLatencyToggle = {
|
|
36
36
|
enabled: true,
|
|
37
|
-
description: (_jsxs(_Fragment, { children: ["When enabled, updates and changes in Modeler
|
|
37
|
+
description: (_jsxs(_Fragment, { children: ["When enabled, updates and changes in Modeler Test mode, Operate and Tasklist are applied quicker, which is ideal for testing purposes.", _jsx("br", {}), _jsx("br", {}), "This setting is not recommended for production environments, as it might reduce individual process instance latency but can slow down general throughput."] })),
|
|
38
38
|
permissions: {
|
|
39
39
|
mayChange: true,
|
|
40
40
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
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 { SessionSettingsProps } from './elements/session-settings.js';
|
|
4
5
|
import type { SwaggerToggleProps } from './elements/swagger-toggle.js';
|
|
5
6
|
import type { TasklistModeToggleProps } from './elements/tasklist-mode-toggle.js';
|
|
6
7
|
export interface C4ClusterSettingsProps {
|
|
@@ -12,5 +13,8 @@ export interface C4ClusterSettingsProps {
|
|
|
12
13
|
optimizeFilteringSettings?: OptimizeFilteringSettingsProps & {
|
|
13
14
|
title: string;
|
|
14
15
|
};
|
|
16
|
+
sessionSettings?: SessionSettingsProps & {
|
|
17
|
+
title: string;
|
|
18
|
+
};
|
|
15
19
|
dangerZone?: DangerZoneProps;
|
|
16
20
|
}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { PasswordInput } from '@carbon/react';
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
|
-
import { Checkbox, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
4
|
+
import { Checkbox, Form, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
5
5
|
import { C4InlineNotification } from '../../c4-inline-notification/c4-inline-notification.js';
|
|
6
6
|
// ponytail: English placeholder copy — final UX copy + lockout wording are a Product
|
|
7
7
|
// Design action item (design §1). Kept inline until it lands.
|
|
8
|
-
|
|
8
|
+
//
|
|
9
|
+
// Matches ZeebeCluster's oidcProviders[].name validation exactly
|
|
10
|
+
// (camunda-operator's api/cloud/v1alpha1/zeebecluster_types.go): Spring
|
|
11
|
+
// lowercases every registration id it reads from an env var name, so the
|
|
12
|
+
// operator's CRD requires the value already in that form (lowercase; uppercase,
|
|
13
|
+
// which this used to enforce, always failed CR admission). 'oidc' is reserved for
|
|
14
|
+
// the default registration slot.
|
|
15
|
+
const NAME_PATTERN = /^[a-z][a-z0-9]*$/;
|
|
16
|
+
const RESERVED_NAME = 'oidc';
|
|
9
17
|
function isValidUrl(value) {
|
|
10
18
|
try {
|
|
11
19
|
return Boolean(new URL(value));
|
|
@@ -43,7 +51,7 @@ export const ExternalIdentityProviderModal = ({ open, initialConfig, saving, err
|
|
|
43
51
|
setLockoutAck(false);
|
|
44
52
|
setShowErrors(false);
|
|
45
53
|
}, [open, initialConfig]);
|
|
46
|
-
const nameInvalid = !NAME_PATTERN.test(name);
|
|
54
|
+
const nameInvalid = !NAME_PATTERN.test(name) || name === RESERVED_NAME;
|
|
47
55
|
const clientNameInvalid = clientName.trim().length === 0;
|
|
48
56
|
const issuerInvalid = !isValidUrl(issuerUri);
|
|
49
57
|
const clientIdInvalid = clientId.trim().length === 0;
|
|
@@ -79,7 +87,9 @@ export const ExternalIdentityProviderModal = ({ open, initialConfig, saving, err
|
|
|
79
87
|
};
|
|
80
88
|
return (_jsx(Modal, { open: open, modalHeading: isEdit
|
|
81
89
|
? 'Edit external identity provider'
|
|
82
|
-
: 'Configure external identity provider', primaryButtonText: 'Save', secondaryButtonText: 'Cancel', primaryButtonDisabled: saving, onRequestClose: onClose, onRequestSubmit: handleSubmit, id: 'c4-external-identity-provider-modal', size: 'sm', children: _jsxs(Stack, { gap: 6, children: [error && (_jsx(C4InlineNotification, { kind: 'error', title: 'Error', subtitle: error, hideCloseButton: true, lowContrast: true })), _jsx(Form, { noValidate: true, children: _jsxs(Stack, { gap: 5, children: [_jsx(TextInput, { id: 'c4-idp-name', labelText: 'Name (identifier)', helperText: '
|
|
83
|
-
? '
|
|
84
|
-
: '
|
|
90
|
+
: 'Configure external identity provider', primaryButtonText: 'Save', secondaryButtonText: 'Cancel', primaryButtonDisabled: saving, onRequestClose: onClose, onRequestSubmit: handleSubmit, id: 'c4-external-identity-provider-modal', size: 'sm', children: _jsxs(Stack, { gap: 6, children: [error && (_jsx(C4InlineNotification, { kind: 'error', title: 'Error', subtitle: error, hideCloseButton: true, lowContrast: true })), _jsx(Form, { noValidate: true, children: _jsxs(Stack, { gap: 5, children: [_jsx(TextInput, { id: 'c4-idp-name', labelText: 'Name (identifier)', helperText: 'Lowercase letters and digits, starting with a letter (e.g. acmesso).', value: name, disabled: saving || isEdit, invalid: showErrors && nameInvalid, invalidText: name === RESERVED_NAME
|
|
91
|
+
? "'oidc' is reserved for the default identity provider"
|
|
92
|
+
: 'Must match ^[a-z][a-z0-9]*$', onChange: (e) => setName(e.target.value.toLowerCase()) }), _jsx(TextInput, { id: 'c4-idp-client-name', labelText: 'Display name', helperText: 'Shown on the login screen.', value: clientName, disabled: saving, invalid: showErrors && clientNameInvalid, invalidText: 'Display name is required', onChange: (e) => setClientName(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-issuer', labelText: 'Issuer URL', value: issuerUri, disabled: saving, invalid: showErrors && issuerInvalid, invalidText: 'Enter a valid URL', onChange: (e) => setIssuerUri(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-client-id', labelText: 'Client ID', value: clientId, disabled: saving, invalid: showErrors && clientIdInvalid, invalidText: 'Client ID is required', onChange: (e) => setClientId(e.target.value) }), _jsx(PasswordInput, { id: 'c4-idp-client-secret', labelText: 'Client secret', helperText: isEdit
|
|
93
|
+
? 'Leave blank to keep the current secret. Changes can take up to a minute to sync to the cluster.'
|
|
94
|
+
: 'Stored securely; never displayed after saving. Can take up to a minute to sync to the cluster.', value: clientSecret, disabled: saving, invalid: showErrors && secretInvalid, invalidText: 'Client secret is required', onChange: (e) => setClientSecret(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-scopes', labelText: 'Scopes', helperText: 'Space-separated. Defaults to "openid profile".', value: scopes, disabled: saving, onChange: (e) => setScopes(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-username-claim', labelText: 'Username claim', helperText: 'Defaults to "sub".', value: usernameClaim, disabled: saving, onChange: (e) => setUsernameClaim(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-groups-claim', labelText: 'Groups claim (optional)', value: groupsClaim, disabled: saving, onChange: (e) => setGroupsClaim(e.target.value) }), _jsx(TextInput, { id: 'c4-idp-client-id-claim', labelText: 'Client ID claim (optional)', value: clientIdClaim, disabled: saving, onChange: (e) => setClientIdClaim(e.target.value) }), _jsx(Checkbox, { id: 'c4-idp-lockout-ack', labelText: 'I understand that a misconfigured identity provider can lock users out of this cluster.', checked: lockoutAck, disabled: saving, invalid: showErrors && !lockoutAck, invalidText: 'Please confirm you understand the lockout risk', onChange: (_e, { checked }) => setLockoutAck(checked) })] }) })] }) }));
|
|
85
95
|
};
|
|
@@ -16,5 +16,16 @@ export interface ExternalIdentityProviderProps {
|
|
|
16
16
|
description: ReactNode;
|
|
17
17
|
/** Status line, e.g. "Configured: Acme SSO" / "Not configured". */
|
|
18
18
|
statusText: string;
|
|
19
|
+
/**
|
|
20
|
+
* False when the cluster's SecretSource isn't provisioned yet — saving would
|
|
21
|
+
* create a SecretSync that can never reconcile. Defaults to `true` (fail
|
|
22
|
+
* open) so older callers/DTOs without this concept keep working. Mirrors
|
|
23
|
+
* ResourceBasedAuthorizationsProps' supported/unsupportedNotification shape.
|
|
24
|
+
*/
|
|
25
|
+
supported?: boolean;
|
|
26
|
+
unsupportedNotification?: {
|
|
27
|
+
title: string;
|
|
28
|
+
subtitle: string;
|
|
29
|
+
};
|
|
19
30
|
}
|
|
20
|
-
export declare const ExternalIdentityProvider: ({ enabled, action, onToggle, permissions, description, statusText, }: ExternalIdentityProviderProps) => JSX.Element;
|
|
31
|
+
export declare const ExternalIdentityProvider: ({ enabled, action, onToggle, permissions, description, statusText, supported, unsupportedNotification, }: ExternalIdentityProviderProps) => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { C4Toggle } from '../../c4-toggle/c4-toggle.js';
|
|
3
|
-
export const ExternalIdentityProvider = ({ enabled, action, onToggle, permissions, description, statusText, }) => {
|
|
4
|
-
return (_jsx(C4Toggle, { id: 'external-identity-provider-toggle', enabled: enabled, supported:
|
|
3
|
+
export const ExternalIdentityProvider = ({ enabled, action, onToggle, permissions, description, statusText, supported = true, unsupportedNotification, }) => {
|
|
4
|
+
return (_jsx(C4Toggle, { id: 'external-identity-provider-toggle', enabled: enabled, supported: supported, title: 'External identity provider', notices: [
|
|
5
5
|
{ notice: description },
|
|
6
6
|
{
|
|
7
7
|
notice: statusText,
|
|
@@ -11,5 +11,11 @@ export const ExternalIdentityProvider = ({ enabled, action, onToggle, permission
|
|
|
11
11
|
},
|
|
12
12
|
], onClick: onToggle, permissions: {
|
|
13
13
|
mayToggle: permissions.mayToggle,
|
|
14
|
-
}
|
|
14
|
+
}, unsupportedNotification: unsupportedNotification
|
|
15
|
+
? {
|
|
16
|
+
kind: 'info',
|
|
17
|
+
title: unsupportedNotification.title,
|
|
18
|
+
subtitle: unsupportedNotification.subtitle,
|
|
19
|
+
}
|
|
20
|
+
: undefined }));
|
|
15
21
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type JSX } from 'react';
|
|
2
|
+
export declare const SESSION_MAX_INACTIVE_INTERVAL_MIN_MINUTES = 1;
|
|
3
|
+
export declare const SESSION_MAX_INACTIVE_INTERVAL_MAX_MINUTES = 1440;
|
|
4
|
+
export interface SessionSettingsProps {
|
|
5
|
+
maxInactiveIntervalMinutes: number;
|
|
6
|
+
heartbeatEnabled: boolean;
|
|
7
|
+
permissions: {
|
|
8
|
+
mayChange: boolean;
|
|
9
|
+
};
|
|
10
|
+
onSaveMaxInactiveInterval: (minutes: number) => Promise<void>;
|
|
11
|
+
onToggleHeartbeat: (enabled: boolean) => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export declare const SessionSettings: ({ maxInactiveIntervalMinutes, heartbeatEnabled, permissions, onSaveMaxInactiveInterval, onToggleHeartbeat, }: SessionSettingsProps) => JSX.Element;
|
|
@@ -0,0 +1,69 @@
|
|
|
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 { useEffect, useState } from 'react';
|
|
8
|
+
import { Button, Stack } from '../../../ui/index.js';
|
|
9
|
+
import { C4Divider } from '../../c4-divider/c4-divider.js';
|
|
10
|
+
import { C4NumberInput } from '../../c4-number-input/c4-number-input.js';
|
|
11
|
+
import { C4Toggle } from '../../c4-toggle/c4-toggle.js';
|
|
12
|
+
// Mirrors the operator CRD's kubebuilder validation on
|
|
13
|
+
// Spec.Identity.SessionMaxInactiveIntervalMinutes (camunda-operator#5863).
|
|
14
|
+
export const SESSION_MAX_INACTIVE_INTERVAL_MIN_MINUTES = 1;
|
|
15
|
+
export const SESSION_MAX_INACTIVE_INTERVAL_MAX_MINUTES = 1440;
|
|
16
|
+
const helperTextStyle = {
|
|
17
|
+
color: 'var(--cds-text-secondary)',
|
|
18
|
+
fontSize: 'var(--cds-body-compact-01-font-size)',
|
|
19
|
+
maxWidth: '650px',
|
|
20
|
+
};
|
|
21
|
+
export const SessionSettings = ({ maxInactiveIntervalMinutes, heartbeatEnabled, permissions, onSaveMaxInactiveInterval, onToggleHeartbeat, }) => {
|
|
22
|
+
const [minutes, setMinutes] = useState(maxInactiveIntervalMinutes);
|
|
23
|
+
const [error, setError] = useState(undefined);
|
|
24
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
25
|
+
const [isTogglingHeartbeat, setIsTogglingHeartbeat] = useState(false);
|
|
26
|
+
// Resync local edit state whenever the server value changes (a successful
|
|
27
|
+
// save, or a background reload) so the Save button only appears while there
|
|
28
|
+
// is a genuine unsaved edit.
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
setMinutes(maxInactiveIntervalMinutes);
|
|
31
|
+
setError(undefined);
|
|
32
|
+
}, [maxInactiveIntervalMinutes]);
|
|
33
|
+
const isPending = isSaving || isTogglingHeartbeat;
|
|
34
|
+
const isDirty = minutes !== maxInactiveIntervalMinutes;
|
|
35
|
+
const handleSave = async () => {
|
|
36
|
+
if (minutes < SESSION_MAX_INACTIVE_INTERVAL_MIN_MINUTES ||
|
|
37
|
+
minutes > SESSION_MAX_INACTIVE_INTERVAL_MAX_MINUTES) {
|
|
38
|
+
setError(`Enter a value between ${SESSION_MAX_INACTIVE_INTERVAL_MIN_MINUTES} and ${SESSION_MAX_INACTIVE_INTERVAL_MAX_MINUTES}.`);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
setError(undefined);
|
|
42
|
+
setIsSaving(true);
|
|
43
|
+
try {
|
|
44
|
+
await onSaveMaxInactiveInterval(minutes);
|
|
45
|
+
}
|
|
46
|
+
finally {
|
|
47
|
+
setIsSaving(false);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
const handleHeartbeatToggle = async () => {
|
|
51
|
+
setIsTogglingHeartbeat(true);
|
|
52
|
+
try {
|
|
53
|
+
await onToggleHeartbeat(!heartbeatEnabled);
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
setIsTogglingHeartbeat(false);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return (_jsxs(Stack, { gap: 6, children: [_jsx(C4Toggle, { id: 'session-heartbeat-toggle', enabled: heartbeatEnabled, supported: true, title: 'Measure session activity by heartbeat', notices: [
|
|
60
|
+
{
|
|
61
|
+
notice: 'When enabled, activity for the idle timeout below is measured by genuine user interaction — mouse movement, clicks, and keystrokes — instead of ordinary application requests, which no longer reset the clock.',
|
|
62
|
+
},
|
|
63
|
+
], onClick: handleHeartbeatToggle, permissions: {
|
|
64
|
+
mayToggle: permissions.mayChange && !isPending,
|
|
65
|
+
} }), _jsx(C4Divider, {}), _jsxs(Stack, { gap: 4, style: { maxWidth: '350px' }, children: [_jsx(C4NumberInput, { label: 'Idle session timeout (minutes)', min: SESSION_MAX_INACTIVE_INTERVAL_MIN_MINUTES, max: SESSION_MAX_INACTIVE_INTERVAL_MAX_MINUTES, step: 1, value: minutes, invalid: !!error, invalidText: error, disabled: !heartbeatEnabled || !permissions.mayChange || isPending, onChange: (value) => {
|
|
66
|
+
setMinutes(Number(value));
|
|
67
|
+
setError(undefined);
|
|
68
|
+
} }), _jsxs("p", { style: helperTextStyle, children: ["How long a web session may sit idle, from", ' ', SESSION_MAX_INACTIVE_INTERVAL_MIN_MINUTES, " to", ' ', SESSION_MAX_INACTIVE_INTERVAL_MAX_MINUTES, " minutes, before Camunda signs the user out. Applies to Operate, Tasklist, and the unified Camunda application. Available once heartbeat measurement is enabled."] }), heartbeatEnabled && permissions.mayChange && isDirty && (_jsx("div", { children: _jsx(Button, { size: 'md', kind: 'primary', onClick: handleSave, disabled: isPending, children: isSaving ? 'Saving…' : 'Save' }) }))] })] }));
|
|
69
|
+
};
|
|
@@ -4,9 +4,9 @@ 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 { PasswordInput } from '@carbon/react';
|
|
8
8
|
import { forwardRef, useCallback, useImperativeHandle, useState, } from 'react';
|
|
9
|
-
import { Checkbox, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
9
|
+
import { Checkbox, Form, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
10
10
|
import { useRadioFamily } from '../../ui/families.js';
|
|
11
11
|
import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
|
|
12
12
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
@@ -33,6 +33,12 @@ export const C4CreateAlertModal = forwardRef(({ t, userEmail, docsAlertsUrl, onN
|
|
|
33
33
|
const [webhookUrl, setWebhookUrl] = useState('');
|
|
34
34
|
const [wantsHmac, setWantsHmac] = useState(false);
|
|
35
35
|
const [hmacSecret, setHmacSecret] = useState('');
|
|
36
|
+
// Whether the customer opted to skip the server-side webhook URL
|
|
37
|
+
// verification (the backend `ignoreHead` bypass). Only surfaced after a
|
|
38
|
+
// webhook create attempt has failed (mirrors the original "show after the
|
|
39
|
+
// HEAD check failed" behaviour), so it is never encouraged by default.
|
|
40
|
+
const [skipVerification, setSkipVerification] = useState(false);
|
|
41
|
+
const [showSkipVerification, setShowSkipVerification] = useState(false);
|
|
36
42
|
const [urlInvalid, setUrlInvalid] = useState(false);
|
|
37
43
|
const [urlInvalidText, setUrlInvalidText] = useState('');
|
|
38
44
|
const [hmacInvalid, setHmacInvalid] = useState(false);
|
|
@@ -50,6 +56,8 @@ export const C4CreateAlertModal = forwardRef(({ t, userEmail, docsAlertsUrl, onN
|
|
|
50
56
|
setWebhookUrl('');
|
|
51
57
|
setWantsHmac(false);
|
|
52
58
|
setHmacSecret('');
|
|
59
|
+
setSkipVerification(false);
|
|
60
|
+
setShowSkipVerification(false);
|
|
53
61
|
setUrlInvalid(false);
|
|
54
62
|
setUrlInvalidText('');
|
|
55
63
|
setHmacInvalid(false);
|
|
@@ -95,11 +103,21 @@ export const C4CreateAlertModal = forwardRef(({ t, userEmail, docsAlertsUrl, onN
|
|
|
95
103
|
hmacSecret: reportType === 'Webhook' && wantsHmac
|
|
96
104
|
? hmacSecret
|
|
97
105
|
: undefined,
|
|
106
|
+
ignoreHead: reportType === 'Webhook' && skipVerification
|
|
107
|
+
? true
|
|
108
|
+
: undefined,
|
|
98
109
|
});
|
|
99
110
|
close();
|
|
100
111
|
}
|
|
101
112
|
catch (submitError) {
|
|
102
113
|
setError(submitError instanceof Error ? submitError.message : 'Failed');
|
|
114
|
+
// A webhook create failure is most often the server-side URL
|
|
115
|
+
// verification (HEAD check). Surface the opt-in to skip it so the
|
|
116
|
+
// customer can retry without leaving the modal, mirroring the
|
|
117
|
+
// original "show after the HEAD check failed" behaviour.
|
|
118
|
+
if (reportType === 'Webhook') {
|
|
119
|
+
setShowSkipVerification(true);
|
|
120
|
+
}
|
|
103
121
|
onSubmitError?.(submitError);
|
|
104
122
|
}
|
|
105
123
|
finally {
|
|
@@ -127,6 +145,6 @@ export const C4CreateAlertModal = forwardRef(({ t, userEmail, docsAlertsUrl, onN
|
|
|
127
145
|
kind: 'openUrl',
|
|
128
146
|
url: docsAlertsUrl,
|
|
129
147
|
});
|
|
130
|
-
} })] }))] }))] }) }) }));
|
|
148
|
+
} })] })), showSkipVerification && (_jsxs("div", { children: [_jsx("fieldset", { className: 'cds--fieldset', children: _jsx("legend", { className: 'cds--label', children: safeTranslate(t, 'alerts:create.fields.ignoreHead.intro', 'Payload URL verification') }) }), _jsx(Checkbox, { id: 'alert-create-ignore-head-checkbox', labelText: safeTranslate(t, 'alerts:create.fields.ignoreHead.label', 'Skip payload URL verification. Please make sure that the URL is correct and can be accessed by Camunda.'), checked: skipVerification, onChange: (event) => setSkipVerification(event.target.checked) })] }))] }))] }) }) }));
|
|
131
149
|
});
|
|
132
150
|
C4CreateAlertModal.displayName = 'C4CreateAlertModal';
|
|
@@ -10,11 +10,12 @@ export const basicCreateAlertModalProps = {
|
|
|
10
10
|
onNavigate: ({ url }) => {
|
|
11
11
|
console.log('Navigate requested', { url });
|
|
12
12
|
},
|
|
13
|
-
onCreateAlert: async ({ reportType, webhookUrl, hmacSecret }) => {
|
|
13
|
+
onCreateAlert: async ({ reportType, webhookUrl, hmacSecret, ignoreHead }) => {
|
|
14
14
|
console.log('Create alert requested', {
|
|
15
15
|
reportType,
|
|
16
16
|
webhookUrl,
|
|
17
17
|
hmacSecret,
|
|
18
|
+
ignoreHead,
|
|
18
19
|
});
|
|
19
20
|
},
|
|
20
21
|
};
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { ClusterPlanTypeCategory, checkVersion, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
8
|
+
import { AUTHORIZATION_TOGGLE_MIN_VERSION, ClusterPlanTypeCategory, checkVersion, LINE_8_10_MIN_VERSION, TASKLIST_MODE_TOGGLE_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
9
9
|
import { ChoiceCard, ChoiceCardGroup, Input, Textarea, } from '@camunda/design-system';
|
|
10
10
|
import { Column, FormLabel, Grid, InlineLoading, Stack, TextArea, TextInput, } from '@carbon/react';
|
|
11
11
|
import { ChevronDown, ChevronUp, Code, DataBase } from '@carbon/react/icons/index.esm.js';
|
|
@@ -344,7 +344,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
|
|
|
344
344
|
return checkVersion({
|
|
345
345
|
possiblyVersionOrDockerPath: foundGeneration.version,
|
|
346
346
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
347
|
-
versionToCompareTo:
|
|
347
|
+
versionToCompareTo: AUTHORIZATION_TOGGLE_MIN_VERSION,
|
|
348
348
|
trueForSnapshot: true,
|
|
349
349
|
});
|
|
350
350
|
}
|
|
@@ -364,14 +364,14 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
|
|
|
364
364
|
return (checkVersion({
|
|
365
365
|
possiblyVersionOrDockerPath: foundGeneration.version,
|
|
366
366
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
367
|
-
versionToCompareTo:
|
|
367
|
+
versionToCompareTo: TASKLIST_MODE_TOGGLE_MIN_VERSION,
|
|
368
368
|
trueForSnapshot: 'compare',
|
|
369
369
|
trueOnInvalidVersion: false,
|
|
370
370
|
}) &&
|
|
371
371
|
checkVersion({
|
|
372
372
|
possiblyVersionOrDockerPath: foundGeneration.version,
|
|
373
373
|
operator: VersionCheckOperator.LessThan,
|
|
374
|
-
versionToCompareTo:
|
|
374
|
+
versionToCompareTo: LINE_8_10_MIN_VERSION,
|
|
375
375
|
trueForSnapshot: 'compare',
|
|
376
376
|
trueOnInvalidVersion: false,
|
|
377
377
|
}));
|
package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js
CHANGED
|
@@ -4,9 +4,8 @@ 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 { Form } from '@carbon/react';
|
|
8
7
|
import { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from 'react';
|
|
9
|
-
import { Checkbox, Link, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
8
|
+
import { Checkbox, Form, Link, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
10
9
|
import { C4ClusterClientCredentialsModal } from '../c4-cluster-client-credentials/c4-cluster-client-credentials.js';
|
|
11
10
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
12
11
|
function safeTranslate(t, key, defaultValue, options) {
|
package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js
CHANGED
|
@@ -5,9 +5,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { SECRETS_MAX_LENGTH } from '@camunda/ccma-shared-types';
|
|
8
|
-
import {
|
|
8
|
+
import { PasswordInput } from '@carbon/react';
|
|
9
9
|
import { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from 'react';
|
|
10
|
-
import { Modal, Stack, TextInput } from '../../ui/index.js';
|
|
10
|
+
import { Form, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
11
11
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
12
12
|
function safeTranslate(t, key, defaultValue, options) {
|
|
13
13
|
if (!t)
|
package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js
CHANGED
|
@@ -4,9 +4,8 @@ import { jsxs as _jsxs, jsx as _jsx, 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 { Form, FormGroup } from '@carbon/react';
|
|
8
7
|
import { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from 'react';
|
|
9
|
-
import { Checkbox, Link, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
8
|
+
import { Checkbox, Form, FormGroup, Link, Modal, Stack, TextInput, } from '../../ui/index.js';
|
|
10
9
|
import { C4ClusterClientCredentialsModal } from '../c4-cluster-client-credentials/c4-cluster-client-credentials.js';
|
|
11
10
|
function isApiClientNameValid(name) {
|
|
12
11
|
if (!name.trim()) {
|
|
@@ -225,6 +224,18 @@ function getAvailableScopes(t) {
|
|
|
225
224
|
label: safeTranslate(t, 'apiclients:create.fields.scopes.hotBackups.getRestore', 'Get restore status'),
|
|
226
225
|
value: 'GetHotBackupRestore',
|
|
227
226
|
},
|
|
227
|
+
{
|
|
228
|
+
label: safeTranslate(t, 'apiclients:create.fields.scopes.hotBackups.getSchedule', 'Get schedule'),
|
|
229
|
+
value: 'GetHotBackupSchedule',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
label: safeTranslate(t, 'apiclients:create.fields.scopes.hotBackups.updateSchedule', 'Create + update schedule'),
|
|
233
|
+
value: 'UpdateHotBackupSchedule',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
label: safeTranslate(t, 'apiclients:create.fields.scopes.hotBackups.deleteSchedule', 'Delete schedule'),
|
|
237
|
+
value: 'DeleteHotBackupSchedule',
|
|
238
|
+
},
|
|
228
239
|
],
|
|
229
240
|
},
|
|
230
241
|
];
|
|
@@ -4,9 +4,9 @@ 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 {
|
|
7
|
+
import { normalizeCIDRList } from '@camunda/ccma-shared-types';
|
|
8
8
|
import { forwardRef, useCallback, useImperativeHandle, useState, } from 'react';
|
|
9
|
-
import { Modal, Stack, TextInput } from '../../ui/index.js';
|
|
9
|
+
import { Form, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
10
10
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
11
11
|
// Helper function to ensure translations work
|
|
12
12
|
function safeTranslate(t, key, fallback) {
|
|
@@ -57,7 +57,7 @@ export const C4CreateIpWhitelistModal = forwardRef(({ t, onCreateIpWhitelist, on
|
|
|
57
57
|
setError('');
|
|
58
58
|
try {
|
|
59
59
|
await onCreateIpWhitelist({
|
|
60
|
-
ip: ipValue,
|
|
60
|
+
ip: normalizeCIDRList(ipValue),
|
|
61
61
|
description: ipDescription,
|
|
62
62
|
});
|
|
63
63
|
close();
|
|
@@ -72,6 +72,10 @@ export const C4CreateIpWhitelistModal = forwardRef(({ t, onCreateIpWhitelist, on
|
|
|
72
72
|
})();
|
|
73
73
|
}, children: _jsx(Form, { onSubmit: (e) => {
|
|
74
74
|
e.preventDefault();
|
|
75
|
-
}, children: _jsxs(Stack, { gap: 6, children: [error && (_jsx(C4InlineNotification, { kind: 'error', title: safeTranslate(t, 'ipwhitelist:create.error.generic', "We're having trouble adding the IP(s)"), subtitle: error, lowContrast: true, hideCloseButton: true })), _jsx(TextInput, { id: 'ip-input-whitelist-create', labelText: safeTranslate(t, 'ipwhitelist:create.fields.ips', 'IP(s)'), helperText: safeTranslate(t, 'ipwhitelist:create.fields.ipsHelper', 'Comma separated list of CIDRs, e.g. 10.0.0.0/24,172.10.0.1'), value: ipValue, maxLength: 50,
|
|
75
|
+
}, children: _jsxs(Stack, { gap: 6, children: [error && (_jsx(C4InlineNotification, { kind: 'error', title: safeTranslate(t, 'ipwhitelist:create.error.generic', "We're having trouble adding the IP(s)"), subtitle: error, lowContrast: true, hideCloseButton: true })), _jsx(TextInput, { id: 'ip-input-whitelist-create', labelText: safeTranslate(t, 'ipwhitelist:create.fields.ips', 'IP(s)'), helperText: safeTranslate(t, 'ipwhitelist:create.fields.ipsHelper', 'Comma separated list of CIDRs, e.g. 10.0.0.0/24,172.10.0.1'), value: ipValue, maxLength: 50,
|
|
76
|
+
// Whitespace is never valid in a CIDR list, and a stray space
|
|
77
|
+
// (typed or pasted) is stored verbatim and breaks the cluster
|
|
78
|
+
// controller — so strip it as the user types.
|
|
79
|
+
onChange: (event) => setIpValue(normalizeCIDRList(event.target.value)) }), _jsx(TextInput, { id: 'name-input-whitelist-create', labelText: safeTranslate(t, 'ipwhitelist:create.fields.description', 'Description (optional)'), value: ipDescription, maxLength: 1024, onChange: (event) => setIpDescription(event.target.value) })] }) }) }));
|
|
76
80
|
});
|
|
77
81
|
C4CreateIpWhitelistModal.displayName = 'C4CreateIpWhitelistModal';
|
package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js
CHANGED
|
@@ -4,9 +4,8 @@ import { jsx as _jsx } 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 { Form } from '@carbon/react';
|
|
8
7
|
import { useCallback, useRef } from 'react';
|
|
9
|
-
import { Stack, TextInput } from '../../ui/index.js';
|
|
8
|
+
import { Form, Stack, TextInput } from '../../ui/index.js';
|
|
10
9
|
import { C4AsyncModal } from '../c4-async-modal/c4-async-modal.js';
|
|
11
10
|
function safeTranslate(t, key, defaultValue, options) {
|
|
12
11
|
if (!t)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import type { C4DeleteOrganizationModalProps } from './c4-delete-organization-modal.types.js';
|
|
3
|
-
export declare const C4DeleteOrganizationModal: ({ t, open, loading, error, organizationName, onRequestClose, onRequestSubmit, preventCloseOnClickOutside, }: C4DeleteOrganizationModalProps) => JSX.Element;
|
|
3
|
+
export declare const C4DeleteOrganizationModal: ({ t, open, loading, error, errorMessage, organizationName, onRequestClose, onRequestSubmit, preventCloseOnClickOutside, }: C4DeleteOrganizationModalProps) => JSX.Element;
|
|
@@ -25,7 +25,7 @@ function safeTranslate(t, key, fallback, options) {
|
|
|
25
25
|
return fallback;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
export const C4DeleteOrganizationModal = ({ t, open, loading, error, organizationName, onRequestClose, onRequestSubmit, preventCloseOnClickOutside, }) => {
|
|
28
|
+
export const C4DeleteOrganizationModal = ({ t, open, loading, error, errorMessage, organizationName, onRequestClose, onRequestSubmit, preventCloseOnClickOutside, }) => {
|
|
29
29
|
const [confirmText, setConfirmText] = useState('');
|
|
30
30
|
useEffect(() => {
|
|
31
31
|
if (!open) {
|
|
@@ -37,6 +37,6 @@ export const C4DeleteOrganizationModal = ({ t, open, loading, error, organizatio
|
|
|
37
37
|
const secondaryButtonText = safeTranslate(t, 'common:cancel', 'Cancel');
|
|
38
38
|
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 });
|
|
39
39
|
const confirmLabel = safeTranslate(t, 'orgmanagement:tabs.settings.orgmanagement.deleteConfirmLabel', 'Type the word DELETE to confirm');
|
|
40
|
-
const
|
|
41
|
-
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(C4InlineNotification, { 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 })] }) }));
|
|
40
|
+
const genericErrorMessage = safeTranslate(t, 'orgmanagement:tabs.settings.orgmanagement.deleteError', 'Failed to delete organization. Please try again.');
|
|
41
|
+
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(C4InlineNotification, { kind: 'error', title: errorMessage ?? genericErrorMessage, 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 })] }) }));
|
|
42
42
|
};
|