@camunda/ccma-saas-frontend 0.7.0 → 0.7.2
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-breadcrumb/c4-breadcrumb.d.ts +1 -1
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +4 -4
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.d.ts +6 -0
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +24 -10
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +10 -5
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +4 -3
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +8 -3
- 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 +6 -4
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +8 -0
- package/lib/esm/components/c4-cluster-overview/applications.js +28 -23
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +1 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +5 -5
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.types.d.ts +10 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +5 -2
- package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +9 -5
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +2 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +2 -2
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +2 -1
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +2 -2
- 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 +1 -2
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +1 -2
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +1 -2
- 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-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +2 -2
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +10 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +2 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -2
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +7 -2
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +8 -0
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +2 -2
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +10 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +3 -2
- package/lib/esm/components/c4-link-button/c4-link-button.d.ts +1 -1
- package/lib/esm/components/c4-link-button/c4-link-button.js +2 -2
- package/lib/esm/components/c4-link-button/c4-link-button.types.d.ts +6 -0
- package/lib/esm/components/c4-management-api/c4-management-api.js +8 -3
- package/lib/esm/components/c4-page-template/c4-page-template.d.ts +13 -1
- package/lib/esm/components/c4-page-template/c4-page-template.js +3 -3
- 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 +1 -1
- 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/pages/clusterdetails.json +3 -0
- package/lib/esm/i18n/en/pages/job-dashboard.json +2 -0
- package/lib/esm/index.d.ts +13 -1
- package/lib/esm/index.js +7 -1
- package/lib/esm/runtime/build-cluster-swagger-url.js +2 -2
- package/lib/esm/runtime/index.d.ts +1 -0
- package/lib/esm/runtime/index.js +1 -0
- 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/role-labels.js +5 -4
- package/lib/esm/utils/safe-translate.d.ts +27 -0
- package/lib/esm/utils/safe-translate.js +56 -0
- package/lib/esm/utils/section-heading-style.d.ts +13 -0
- package/lib/esm/utils/section-heading-style.js +25 -0
- package/lib/esm/widgets/c4-widget-scope.types.d.ts +20 -0
- package/lib/esm/widgets/c4-widget-scope.types.js +6 -0
- 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.js +26 -57
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +27 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +63 -19
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +14 -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-byom-clients-tab.js +3 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +9 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +8 -17
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +31 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +34 -24
- 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.js +1 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +16 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +23 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +13 -15
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +2 -2
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +7 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +10 -0
- 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/environment/c4-cluster-api-clients-widget.d.ts +5 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.js +61 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.d.ts +21 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.js +6 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.d.ts +5 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +58 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.d.ts +22 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.js +6 -0
- package/lib/esm/widgets/environment/use-cluster-api-clients.d.ts +26 -0
- package/lib/esm/widgets/environment/use-cluster-api-clients.js +48 -0
- package/lib/esm/widgets/environment/use-cluster-swagger-url.d.ts +19 -0
- package/lib/esm/widgets/environment/use-cluster-swagger-url.js +44 -0
- package/lib/esm/widgets/environment/use-cluster-version-flags.d.ts +16 -0
- package/lib/esm/widgets/environment/use-cluster-version-flags.js +40 -0
- package/lib/esm/widgets/group-details/c4-group-details-page.js +2 -2
- package/lib/esm/widgets/job-worker/c4-job-worker-details-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker-details-page.js +34 -25
- package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.js +26 -21
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +12 -0
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +6 -0
- package/lib/esm/widgets/job-worker/c4-job-worker.types.d.ts +19 -0
- package/lib/esm/widgets/management/c4-management-app.js +3 -3
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +1 -7
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -2
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +7 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.js +3 -3
- package/package.json +7 -7
|
@@ -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 }) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { C4BreadcrumbProps } from './c4-breadcrumb.types.js';
|
|
3
|
-
export declare const C4Breadcrumb: ({ loading, noTrailingSlash, elements, title, menu, tag, indicator, codeSnippet, }: C4BreadcrumbProps) => JSX.Element;
|
|
3
|
+
export declare const C4Breadcrumb: ({ loading, noTrailingSlash, elements, title, menu, tag, indicator, subtitleBadges, codeSnippet, }: C4BreadcrumbProps) => JSX.Element;
|
|
@@ -14,23 +14,23 @@ const headerRowStyles = {
|
|
|
14
14
|
alignItems: 'center',
|
|
15
15
|
gap: '1rem',
|
|
16
16
|
};
|
|
17
|
-
export const C4Breadcrumb = ({ loading, noTrailingSlash, elements, title, menu, tag, indicator, codeSnippet, }) => {
|
|
17
|
+
export const C4Breadcrumb = ({ loading, noTrailingSlash, elements, title, menu, tag, indicator, subtitleBadges, codeSnippet, }) => {
|
|
18
18
|
const { Breadcrumb, BreadcrumbItem } = useBreadcrumbFamily();
|
|
19
19
|
let breadcrumb = null;
|
|
20
20
|
if (loading) {
|
|
21
21
|
breadcrumb = _jsx(BreadcrumbSkeleton, {});
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
breadcrumb = (_jsxs(Stack, { gap: 1, children: [_jsx(Breadcrumb, { noTrailingSlash: noTrailingSlash ?? false, children: elements.map((element) => {
|
|
24
|
+
breadcrumb = (_jsxs(Stack, { gap: 1, children: [elements.length > 0 && (_jsx(Breadcrumb, { noTrailingSlash: noTrailingSlash ?? false, children: elements.map((element) => {
|
|
25
25
|
return (_jsx(BreadcrumbItem, { children: _jsx(Link, { href: element.href, onClick: (event) => {
|
|
26
26
|
if (element.onClick) {
|
|
27
27
|
event.preventDefault();
|
|
28
28
|
element.onClick();
|
|
29
29
|
}
|
|
30
30
|
}, style: { cursor: 'pointer' }, children: element.label }) }, element.key));
|
|
31
|
-
}) }), (menu || title || tag || indicator || codeSnippet) && (_jsxs("div", { style: headerRowStyles, children: [_jsxs(Stack, { orientation: 'horizontal', gap: 4, children: [title && _jsx("h2", { style: { marginTop: '2px' }, children: title }), tag && _jsx(Tag, { type: 'blue', children: tag }), codeSnippet?.text && (_jsx(CodeSnippet, { feedback: codeSnippet?.copyFeedback, type: 'inline', children: codeSnippet.text }))] }), menu && (_jsx(OverflowMenu, { "aria-label": 'cluster operations', children: menu.map((item) => {
|
|
31
|
+
}) })), (menu || title || tag || indicator || codeSnippet) && (_jsxs("div", { style: headerRowStyles, children: [_jsxs(Stack, { orientation: 'horizontal', gap: 4, children: [title && _jsx("h2", { style: { marginTop: '2px' }, children: title }), tag && _jsx(Tag, { type: 'blue', children: tag }), codeSnippet?.text && (_jsx(CodeSnippet, { feedback: codeSnippet?.copyFeedback, type: 'inline', children: codeSnippet.text }))] }), menu && (_jsx(OverflowMenu, { "aria-label": 'cluster operations', children: menu.map((item) => {
|
|
32
32
|
return (_jsx(OverflowMenuItem, { id: item.key, onClick: () => item.onClick(), itemText: item.label, isDelete: item.isDelete }, item.key));
|
|
33
|
-
}) })), indicator && _jsx("div", { style: { marginLeft: 'auto' }, children: indicator })] }))] }));
|
|
33
|
+
}) })), indicator && _jsx("div", { style: { marginLeft: 'auto' }, children: indicator })] })), subtitleBadges && (_jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '0.5rem' }, children: subtitleBadges }))] }));
|
|
34
34
|
}
|
|
35
35
|
return _jsx("div", { style: breadCrumbWrapperStyles, children: breadcrumb });
|
|
36
36
|
};
|
|
@@ -11,6 +11,12 @@ export interface C4BreadcrumbProps {
|
|
|
11
11
|
title?: string;
|
|
12
12
|
tag?: string;
|
|
13
13
|
indicator?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* A second row directly under the title, for facts about the page's subject rather than an action or
|
|
16
|
+
* warning (that's what `indicator` is for, and it stays on the title's own row). Camunda Hub's cluster
|
|
17
|
+
* header uses it for the cluster's phase/health/generation badges.
|
|
18
|
+
*/
|
|
19
|
+
subtitleBadges?: ReactNode;
|
|
14
20
|
codeSnippet?: {
|
|
15
21
|
text: string;
|
|
16
22
|
copyFeedback: string;
|
|
@@ -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: {
|
|
@@ -7,6 +7,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import { Renew } from '@carbon/react/icons/index.esm.js';
|
|
8
8
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
9
9
|
import { Stack } from '../../ui/index.js';
|
|
10
|
+
import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
|
|
10
11
|
import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
|
|
11
12
|
import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListSkeleton, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
|
|
12
13
|
export const C4ClusterDetailsActivity = ({ activityGroups, isLoading, hasError, text, onRefresh, }) => {
|
|
@@ -25,7 +26,7 @@ export const C4ClusterDetailsActivity = ({ activityGroups, isLoading, hasError,
|
|
|
25
26
|
if (group.items.length === 0) {
|
|
26
27
|
return null;
|
|
27
28
|
}
|
|
28
|
-
return (_jsxs(Stack, { gap: 3, children: [_jsx("h2", { children: group.heading }), isLoading ? (_jsx(C4StructuredListSkeleton, {})) : (_jsx(C4StructuredListWrapper, { isCondensed: true, children: _jsx(C4StructuredListBody, { children: group.items.map((item) => {
|
|
29
|
+
return (_jsxs(Stack, { gap: 3, children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: group.heading }), isLoading ? (_jsx(C4StructuredListSkeleton, {})) : (_jsx(C4StructuredListWrapper, { isCondensed: true, children: _jsx(C4StructuredListBody, { children: group.items.map((item) => {
|
|
29
30
|
const formattedDateTime = formatDateTime(new Date(item.timestamp));
|
|
30
31
|
return (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '250px' }, children: _jsx("strong", { children: formattedDateTime }) }), _jsxs(C4StructuredListCell, { children: [item.userName, ": ", item.audit] })] }, `audit-row-${item.entityId}-${item.timestamp}`));
|
|
31
32
|
}) }) }))] }, `activity-group-${groupIndex}`));
|
|
@@ -9,6 +9,7 @@ import { CheckmarkFilled, Download, ErrorFilled, RuleLocked, WarningAltFilled, }
|
|
|
9
9
|
import { useState } from 'react';
|
|
10
10
|
import { Button, CodeSnippet, Link, Stack, TextInput, Tile } from '../../ui/index.js';
|
|
11
11
|
import { useTabsFamily } from '../../ui/tabs.js';
|
|
12
|
+
import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
|
|
12
13
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
13
14
|
import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
|
|
14
15
|
export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPolicy, scripts, text, urls, onSetARN, onUpdatePrimaryARN, onUpdateSecondaryARN, onDownloadScript, onDownloadKeyPolicy, disabled = false, }) => {
|
|
@@ -57,7 +58,7 @@ export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPol
|
|
|
57
58
|
day: 'numeric',
|
|
58
59
|
});
|
|
59
60
|
};
|
|
60
|
-
let inputTab = (_jsx(_Fragment, { children: _jsxs(Stack, { style: { maxWidth: '768px' }, children: [_jsx("h3", { children: text.inputTileTitle }), _jsx("p", { children: text.inputTileInfoText }), _jsx(TextInput, { "data-modal-primary-focus": true, id: 'arn-input', labelText: 'ARN', value: encryption.primaryArn, invalidText: !encryption.validArnPrimary
|
|
61
|
+
let inputTab = (_jsx(_Fragment, { children: _jsxs(Stack, { style: { maxWidth: '768px' }, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: text.inputTileTitle }), _jsx("p", { children: text.inputTileInfoText }), _jsx(TextInput, { "data-modal-primary-focus": true, id: 'arn-input', labelText: 'ARN', value: encryption.primaryArn, invalidText: !encryption.validArnPrimary
|
|
61
62
|
? text.validationArnInvalid
|
|
62
63
|
: text.validationRegionInvalid.replace('{region}', cluster.region), invalid: encryption.primaryArnTouched &&
|
|
63
64
|
(!encryption.validArnPrimary || !encryption.validArnRegionPrimary), disabled: disabled ||
|
|
@@ -76,7 +77,7 @@ export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPol
|
|
|
76
77
|
}
|
|
77
78
|
})()] }) }));
|
|
78
79
|
if (cluster.isDualRegion) {
|
|
79
|
-
inputTab = (_jsxs(Stack, { style: { maxWidth: '768px' }, children: [_jsx("h3", { children: text.inputTileTitle }), _jsx("p", { children: text.inputTileInfoText }), _jsx(TextInput, { "data-modal-primary-focus": true, id: 'primary-arn-input', labelText: `ARN (${cluster.region})`, value: encryption.primaryArn, invalidText: !encryption.validArnPrimary
|
|
80
|
+
inputTab = (_jsxs(Stack, { style: { maxWidth: '768px' }, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: text.inputTileTitle }), _jsx("p", { children: text.inputTileInfoText }), _jsx(TextInput, { "data-modal-primary-focus": true, id: 'primary-arn-input', labelText: `ARN (${cluster.region})`, value: encryption.primaryArn, invalidText: !encryption.validArnPrimary
|
|
80
81
|
? text.validationArnInvalid
|
|
81
82
|
: text.validationRegionInvalid.replace('{region}', cluster.region), invalid: encryption.primaryArnTouched &&
|
|
82
83
|
(!encryption.validArnPrimary || !encryption.validArnRegionPrimary), disabled: disabled ||
|
|
@@ -107,7 +108,7 @@ export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPol
|
|
|
107
108
|
})()] }));
|
|
108
109
|
}
|
|
109
110
|
if (cluster.status === 'Ready') {
|
|
110
|
-
return (_jsxs(Stack, { gap: 6, children: [_jsx("h3", { children: text.title }), _jsx("p", { children: text.infoText }), _jsx(Link, { target: '_blank', href: urls.byokMain, children: text.dokuLink }), _jsx(Tile, { children: _jsx(C4StructuredListWrapper, { children: _jsxs(C4StructuredListBody, { children: [_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileEncryptionType }), _jsx(C4StructuredListCell, { children: "External / AWS" })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileStatus }), _jsx(C4StructuredListCell, { children: status[cluster.status] })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileCreated }), _jsx(C4StructuredListCell, { children: cluster.created ? formatDate(cluster.created) : '' })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileRegion }), _jsx(C4StructuredListCell, { children: cluster.region })] }), cluster.isDualRegion && cluster.backupRegion && (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileSecondaryRegion }), _jsx(C4StructuredListCell, { children: cluster.backupRegion })] })), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: "ARN" }), _jsx(C4StructuredListCell, { children: _jsx(CodeSnippet, { className: 'cds--layer-two', type: 'single', children: cluster.primaryEncryptionKeyId }) })] }), cluster.isDualRegion && cluster.secondaryEncryptionKeyId && (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: "ARN" }), _jsx(C4StructuredListCell, { children: _jsx(CodeSnippet, { className: 'cds--layer-two', type: 'single', children: cluster.secondaryEncryptionKeyId }) })] })), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: "Key Policy" }), _jsx(C4StructuredListCell, { children: _jsx(CodeSnippet, { type: 'multi', wrapText: true, maxCollapsedNumberOfRows: 20, className: 'cds--layer-two', children: scripts.keyPolicy }) })] })] }) }) })] }));
|
|
111
|
+
return (_jsxs(Stack, { gap: 6, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: text.title }), _jsx("p", { children: text.infoText }), _jsx(Link, { target: '_blank', href: urls.byokMain, children: text.dokuLink }), _jsx(Tile, { children: _jsx(C4StructuredListWrapper, { children: _jsxs(C4StructuredListBody, { children: [_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileEncryptionType }), _jsx(C4StructuredListCell, { children: "External / AWS" })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileStatus }), _jsx(C4StructuredListCell, { children: status[cluster.status] })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileCreated }), _jsx(C4StructuredListCell, { children: cluster.created ? formatDate(cluster.created) : '' })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileRegion }), _jsx(C4StructuredListCell, { children: cluster.region })] }), cluster.isDualRegion && cluster.backupRegion && (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileSecondaryRegion }), _jsx(C4StructuredListCell, { children: cluster.backupRegion })] })), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: "ARN" }), _jsx(C4StructuredListCell, { children: _jsx(CodeSnippet, { className: 'cds--layer-two', type: 'single', children: cluster.primaryEncryptionKeyId }) })] }), cluster.isDualRegion && cluster.secondaryEncryptionKeyId && (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: "ARN" }), _jsx(C4StructuredListCell, { children: _jsx(CodeSnippet, { className: 'cds--layer-two', type: 'single', children: cluster.secondaryEncryptionKeyId }) })] })), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: "Key Policy" }), _jsx(C4StructuredListCell, { children: _jsx(CodeSnippet, { type: 'multi', wrapText: true, maxCollapsedNumberOfRows: 20, className: 'cds--layer-two', children: scripts.keyPolicy }) })] })] }) }) })] }));
|
|
111
112
|
}
|
|
112
113
|
// A failed-over cluster already has its keys set (they are reversed from the
|
|
113
114
|
// source at failover time), so the "create a new key" flow below would be
|
|
@@ -130,11 +131,15 @@ export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPol
|
|
|
130
131
|
value: failoverKeyPolicy.replicationRole,
|
|
131
132
|
},
|
|
132
133
|
];
|
|
133
|
-
return (_jsxs(_Fragment, { children: [_jsx(C4InlineNotification, { style: { maxWidth: '100%', width: '100%', marginBottom: '24px' }, lowContrast: true, kind: 'warning', title: text.failoverKeyPolicyTitle, subtitle: text.failoverKeyPolicyText, hideCloseButton: true }), _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h3", { children: text.title }), _jsxs("p", { children: [text.failoverKeyPolicyInstruction, ' ', _jsx("span", { children: _jsx(Link, { target: '_blank', rel: 'noopener noreferrer', href: urls.byokMain, children: text.dokuLink }) })] })] }), _jsx(Tile, { children: _jsx(Stack, { gap: 4, children: roles.map((role) => (_jsxs(Stack, { gap: 2, children: [_jsx("strong", { children: role.label }), _jsx(CodeSnippet, { type: 'single', children: role.value })] }, role.value))) }) })] })] }));
|
|
134
|
+
return (_jsxs(_Fragment, { children: [_jsx(C4InlineNotification, { style: { maxWidth: '100%', width: '100%', marginBottom: '24px' }, lowContrast: true, kind: 'warning', title: text.failoverKeyPolicyTitle, subtitle: text.failoverKeyPolicyText, hideCloseButton: true }), _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: text.title }), _jsxs("p", { children: [text.failoverKeyPolicyInstruction, ' ', _jsx("span", { children: _jsx(Link, { target: '_blank', rel: 'noopener noreferrer', href: urls.byokMain, children: text.dokuLink }) })] })] }), _jsx(Tile, { children: _jsx(Stack, { gap: 4, children: roles.map((role) => (_jsxs(Stack, { gap: 2, children: [_jsx("strong", { children: role.label }), _jsx(CodeSnippet, { type: 'single', children: role.value })] }, role.value))) }) })] })] }));
|
|
134
135
|
}
|
|
135
136
|
return (_jsxs(_Fragment, { children: [encryption.actionRequired && (_jsx(C4InlineNotification, { style: {
|
|
136
137
|
maxWidth: '100%',
|
|
137
138
|
width: '100%',
|
|
138
139
|
marginBottom: '24px',
|
|
139
|
-
}, lowContrast: true, kind: 'warning', title: text.notificationTitle, subtitle: text.notificationText, hideCloseButton: true })), _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h3", { children: text.title }), _jsxs("p", { children: [text.infoText, ' ', _jsx("span", { children: _jsx(Link, { target: '_blank', href: urls.byokMain, children: text.dokuLink }) })] })] }), _jsxs(Stack, { orientation: 'vertical', gap: 6, style: { gridTemplateColumns: '1fr' }, children: [_jsx(Tile, { children: _jsx(C4StructuredListWrapper, { isCondensed: true, children: _jsxs(C4StructuredListBody, { children: [_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileEncryptionType }), _jsx(C4StructuredListCell, { children: "External / AWS" })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileStatus }), _jsx(C4StructuredListCell, { children: status[cluster.status] })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileCreated }), _jsx(C4StructuredListCell, { children: cluster.created ? formatDate(cluster.created) : '' })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileRegion }), _jsx(C4StructuredListCell, { children: cluster.region })] }), cluster.isDualRegion && cluster.backupRegion && (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileSecondaryRegion }), _jsx(C4StructuredListCell, { children: cluster.backupRegion })] }))] }) }) }), _jsx(Tile, { children: _jsxs(Stack, { children: [_jsx("h3", { children: "1. Key creation & configuration (select preferred method)" }), _jsx(Layer, { children: _jsxs(Tabs, { selectedIndex: selectedIndex, onChange: handleTabChange, children: [_jsxs(TabList, { "aria-label": 'List of tabs', contained: true, children: [_jsx(Tab, { children: text.cliTabTitle }), _jsx(Tab, { children: text.manualTabTitle })] }), _jsxs(TabPanels, { children: [_jsx(TabPanel, { style: { padding: '16px' }, children: _jsxs(Stack, { children: [_jsx("h4", {
|
|
140
|
+
}, lowContrast: true, kind: 'warning', title: text.notificationTitle, subtitle: text.notificationText, hideCloseButton: true })), _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: text.title }), _jsxs("p", { children: [text.infoText, ' ', _jsx("span", { children: _jsx(Link, { target: '_blank', href: urls.byokMain, children: text.dokuLink }) })] })] }), _jsxs(Stack, { orientation: 'vertical', gap: 6, style: { gridTemplateColumns: '1fr' }, children: [_jsx(Tile, { children: _jsx(C4StructuredListWrapper, { isCondensed: true, children: _jsxs(C4StructuredListBody, { children: [_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileEncryptionType }), _jsx(C4StructuredListCell, { children: "External / AWS" })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileStatus }), _jsx(C4StructuredListCell, { children: status[cluster.status] })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileCreated }), _jsx(C4StructuredListCell, { children: cluster.created ? formatDate(cluster.created) : '' })] }), _jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileRegion }), _jsx(C4StructuredListCell, { children: cluster.region })] }), cluster.isDualRegion && cluster.backupRegion && (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { style: { width: '216px' }, children: text.dataTileSecondaryRegion }), _jsx(C4StructuredListCell, { children: cluster.backupRegion })] }))] }) }) }), _jsx(Tile, { children: _jsxs(Stack, { children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: "1. Key creation & configuration (select preferred method)" }), _jsx(Layer, { children: _jsxs(Tabs, { selectedIndex: selectedIndex, onChange: handleTabChange, children: [_jsxs(TabList, { "aria-label": 'List of tabs', contained: true, children: [_jsx(Tab, { children: text.cliTabTitle }), _jsx(Tab, { children: text.manualTabTitle })] }), _jsxs(TabPanels, { children: [_jsx(TabPanel, { style: { padding: '16px' }, children: _jsxs(Stack, { children: [_jsx("h4", { style: {
|
|
141
|
+
margin: 0,
|
|
142
|
+
fontSize: '14px',
|
|
143
|
+
fontWeight: 600,
|
|
144
|
+
}, children: "Create your Key using the below CLI script" }), _jsx("p", { children: text.cliTabStep1 }), _jsx(Button, { size: 'md', kind: 'tertiary', renderIcon: Download, onClick: onDownloadScript, children: text.downloadCliScript }), _jsx("p", { children: text.cliTabStep2 }), _jsx("p", { children: text.cliTabStep3 }), _jsx("span", { children: _jsx(Link, { href: urls.cliScriptLearnMore, target: '_blank', children: text.cliTabLearnMore }) })] }) }), _jsx(TabPanel, { style: { padding: '16px' }, children: _jsxs(Stack, { children: [_jsx("h4", { children: "Create and configure your KMS key in your AWS console" }), _jsxs("p", { children: [text.manualTabStep1.replace('{region}', cluster.region), ' '] }), cluster.isDualRegion ? (_jsxs(_Fragment, { children: [_jsxs("p", { children: [text.manualTabStep2.replace('{region}', cluster.backupRegion || ''), ' '] }), _jsx("p", { children: text.manualTabStep3Dual })] })) : (_jsx("p", { children: text.manualTabStep2Single })), _jsx("label", { children: text.manualTabKeyPolicyLabel }), _jsx(CodeSnippet, { className: 'cds--layer-one', type: 'multi', wrapText: true, maxCollapsedNumberOfRows: 20, children: scripts.keyPolicy }), _jsx(Button, { size: 'md', kind: 'tertiary', renderIcon: Download, onClick: onDownloadKeyPolicy, children: text.downloadKeyPolicy }), _jsx("span", { children: _jsx(Link, { target: '_blank', href: urls.learnMoreAboutCreatingKmsKey, children: text.snippedTileDokuLink }) })] }) })] })] }) })] }) }), _jsx(Tile, { children: _jsx(Layer, { children: inputTab }) })] })] })] }));
|
|
140
145
|
};
|
|
@@ -10,6 +10,7 @@ import styled from 'styled-components';
|
|
|
10
10
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
11
11
|
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
12
12
|
import { Button, Stack, Tile } from '../../ui/index.js';
|
|
13
|
+
import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
|
|
13
14
|
import { C4DataTable } from '../c4-data-table/c4-data-table.js';
|
|
14
15
|
import { C4DataTableSkeleton } from '../c4-data-table/c4-data-table-skeleton.js';
|
|
15
16
|
import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
|
|
@@ -214,7 +215,7 @@ export const C4ClusterDetailsHotBackups = ({ backups, backupSchedule, isLoading,
|
|
|
214
215
|
paddingLeft: '5rem',
|
|
215
216
|
paddingTop: '3rem',
|
|
216
217
|
paddingBottom: '3rem',
|
|
217
|
-
}, children: _jsxs(C3ResponsiveStack, { orientation: 'horizontal', gap: 6, children: [_jsx("div", { style: { maxWidth: '80px', width: '100%' }, children: _jsx("img", { src: C4_ASSET_URLS.backupIcon, alt: 'backupsIcon', style: { width: '100%' } }) }), _jsxs(Stack, { gap: 3, children: [_jsx("h2", { children: text.noBackupsTitle }), _jsxs(Stack, { gap: 6, children: [_jsx("p", { style: { maxWidth: '400px' }, children: text.noBackupsDescription }), _jsxs(Stack, { gap: 5, children: [_jsxs(C3ResponsiveStack, { orientation: 'horizontal', gap: '1rem', children: [_jsx(Button, { id: 'createBackupCTA', size: 'md', onClick: onCreateBackup, renderIcon: Add, disabled: !permissions.canCreate ||
|
|
218
|
+
}, children: _jsxs(C3ResponsiveStack, { orientation: 'horizontal', gap: 6, children: [_jsx("div", { style: { maxWidth: '80px', width: '100%' }, children: _jsx("img", { src: C4_ASSET_URLS.backupIcon, alt: 'backupsIcon', style: { width: '100%' } }) }), _jsxs(Stack, { gap: 3, children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: text.noBackupsTitle }), _jsxs(Stack, { gap: 6, children: [_jsx("p", { style: { maxWidth: '400px' }, children: text.noBackupsDescription }), _jsxs(Stack, { gap: 5, children: [_jsxs(C3ResponsiveStack, { orientation: 'horizontal', gap: '1rem', children: [_jsx(Button, { id: 'createBackupCTA', size: 'md', onClick: onCreateBackup, renderIcon: Add, disabled: !permissions.canCreate ||
|
|
218
219
|
!clusterSupportsHotBackups ||
|
|
219
220
|
isRestoring, children: text.createButton }), _jsx(Button, { id: 'createScheduleCTA', size: 'md', onClick: onCreateSchedule, renderIcon: EventSchedule, disabled: !permissions.canCreate ||
|
|
220
221
|
!clusterSupportsHotBackups ||
|
|
@@ -233,7 +234,7 @@ export const C4ClusterDetailsHotBackups = ({ backups, backupSchedule, isLoading,
|
|
|
233
234
|
return -1;
|
|
234
235
|
return b.started.getTime() - a.started.getTime();
|
|
235
236
|
});
|
|
236
|
-
return (_jsxs(Stack, { gap: 6, children: [restoreInProgress && (_jsx(C4InlineNotification, { style: { maxWidth: '100%', width: '100%' }, kind: 'info', title: text.restoreInProgressTitle.replace('{backupName}', restoreInProgress.backupName), subtitle: text.restoreInProgressText, hideCloseButton: true })), restoreError && (_jsx(C4InlineNotification, { style: { maxWidth: '100%', width: '100%' }, kind: 'error', lowContrast: true, title: text.restoreErrorTitle, subtitle: text.restoreErrorMessage.replace('{backupName}', restoreError.backupName), onClose: restoreError.onDismiss, onCloseButtonClick: restoreError.onDismiss })), !canCreateBackupBasedOnTime && (_jsx(C4InlineNotification, { style: { maxWidth: '100%', width: '100%' }, kind: 'info', title: text.backupsUnavailableTitle, subtitle: text.backupsUnavailableText, hideCloseButton: true })), !backupSchedule ? (_jsx(BackupScheduleWrapper, { children: _jsx(Tile, { children: _jsxs(Stack, { children: [_jsx("h3", { children: text.scheduleTileTitle }), _jsx("p", { children: text.scheduleTileDescription }), _jsx(Button, { disabled: !permissions.canCreate || isRestoring, size: 'sm', onClick: onCreateSchedule, kind: 'tertiary', renderIcon: EventSchedule, children: text.scheduleTileButton })] }) }) })) : (_jsx(Tile, { style: { width: '450px' }, children: _jsx(Stack, { gap: 2, children: _jsxs("div", { style: {
|
|
237
|
+
return (_jsxs(Stack, { gap: 6, children: [restoreInProgress && (_jsx(C4InlineNotification, { style: { maxWidth: '100%', width: '100%' }, kind: 'info', title: text.restoreInProgressTitle.replace('{backupName}', restoreInProgress.backupName), subtitle: text.restoreInProgressText, hideCloseButton: true })), restoreError && (_jsx(C4InlineNotification, { style: { maxWidth: '100%', width: '100%' }, kind: 'error', lowContrast: true, title: text.restoreErrorTitle, subtitle: text.restoreErrorMessage.replace('{backupName}', restoreError.backupName), onClose: restoreError.onDismiss, onCloseButtonClick: restoreError.onDismiss })), !canCreateBackupBasedOnTime && (_jsx(C4InlineNotification, { style: { maxWidth: '100%', width: '100%' }, kind: 'info', title: text.backupsUnavailableTitle, subtitle: text.backupsUnavailableText, hideCloseButton: true })), !backupSchedule ? (_jsx(BackupScheduleWrapper, { children: _jsx(Tile, { children: _jsxs(Stack, { children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: text.scheduleTileTitle }), _jsx("p", { children: text.scheduleTileDescription }), _jsx(Button, { disabled: !permissions.canCreate || isRestoring, size: 'sm', onClick: onCreateSchedule, kind: 'tertiary', renderIcon: EventSchedule, children: text.scheduleTileButton })] }) }) })) : (_jsx(Tile, { style: { width: '450px' }, children: _jsx(Stack, { gap: 2, children: _jsxs("div", { style: {
|
|
237
238
|
display: 'grid',
|
|
238
239
|
gridTemplateColumns: '1fr 1fr',
|
|
239
240
|
gridGap: '5px 0px',
|
|
@@ -253,7 +254,7 @@ export const C4ClusterDetailsHotBackups = ({ backups, backupSchedule, isLoading,
|
|
|
253
254
|
paddingLeft: '5rem',
|
|
254
255
|
paddingTop: '3rem',
|
|
255
256
|
paddingBottom: '3rem',
|
|
256
|
-
}, children: _jsxs(Stack, { orientation: 'horizontal', gap: 6, children: [_jsx("img", { src: C4_ASSET_URLS.backupIcon, alt: 'backupsIcon' }), _jsxs(Stack, { gap: 3, children: [_jsx("h2", { children: text.emptyTitle }), _jsx(Stack, { gap: 6, children: _jsx("p", { style: { maxWidth: '400px' }, children: text.emptyDescription }) })] })] }) })), _jsxs(Stack, { orientation: 'horizontal', children: [_jsx("span", { className: 'legalText', children: text.infoText }), _jsx(Button, { onClick: onGiveFeedback, kind: 'ghost', renderIcon: Chat, style: {
|
|
257
|
+
}, children: _jsxs(Stack, { orientation: 'horizontal', gap: 6, children: [_jsx("img", { src: C4_ASSET_URLS.backupIcon, alt: 'backupsIcon' }), _jsxs(Stack, { gap: 3, children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: text.emptyTitle }), _jsx(Stack, { gap: 6, children: _jsx("p", { style: { maxWidth: '400px' }, children: text.emptyDescription }) })] })] }) })), _jsxs(Stack, { orientation: 'horizontal', children: [_jsx("span", { className: 'legalText', children: text.infoText }), _jsx(Button, { onClick: onGiveFeedback, kind: 'ghost', renderIcon: Chat, style: {
|
|
257
258
|
marginTop: '-13px',
|
|
258
259
|
marginRight: '0px',
|
|
259
260
|
marginLeft: 'auto',
|
|
@@ -4,6 +4,7 @@ import { CheckmarkFilled, Edit, Launch, PendingFilled, } from '@carbon/react/ico
|
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
5
5
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
6
6
|
import { Button, CodeSnippet, Link, Stack, Tile } from '../../ui/index.js';
|
|
7
|
+
import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
|
|
7
8
|
import { C4DataTable } from '../c4-data-table/c4-data-table.js';
|
|
8
9
|
import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
|
|
9
10
|
import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../c4-structured-list/c4-structured-list.js';
|
|
@@ -189,11 +190,13 @@ export const C4ClusterDetailsSecureConnectivity = ({ status, privateEndpoints, c
|
|
|
189
190
|
onClick: onOpenDocs,
|
|
190
191
|
} }));
|
|
191
192
|
}
|
|
192
|
-
return (_jsxs(Stack, { gap: 6, children: [_jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsx("h2", { children: text.activatedTitle ?? text.title }), text.activatedDescription ? (_jsx("p", { style: { maxWidth: '500px' }, children: text.activatedDescription })) : undefined, text.enabledFooterText ? (_jsx("p", { style: { maxWidth: '500px' }, children: text.enabledFooterText })) : undefined, _jsxs(Stack, { gap: 5, children: [_jsx("div", { style: {
|
|
193
|
+
return (_jsxs(Stack, { gap: 6, children: [_jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: text.activatedTitle ?? text.title }), text.activatedDescription ? (_jsx("p", { style: { maxWidth: '500px' }, children: text.activatedDescription })) : undefined, text.enabledFooterText ? (_jsx("p", { style: { maxWidth: '500px' }, children: text.enabledFooterText })) : undefined, _jsxs(Stack, { gap: 5, children: [_jsx("div", { style: {
|
|
193
194
|
display: 'flex',
|
|
194
195
|
alignItems: 'center',
|
|
195
196
|
gap: 'var(--cds-spacing-05)',
|
|
196
|
-
}, children: _jsx("h4", { style: { margin: 0 }, children: text.serviceDetailsTitle ?? 'Service details' }) }), _jsx("div", { children: isNarrowLayout ? (
|
|
197
|
+
}, children: _jsx("h4", { style: { margin: 0 }, children: text.serviceDetailsTitle ?? 'Service details' }) }), _jsx("div", { children: isNarrowLayout ? (
|
|
198
|
+
// Single-column layout: each field on its own row
|
|
199
|
+
_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
200
|
display: 'flex',
|
|
198
201
|
justifyContent: 'space-between',
|
|
199
202
|
alignItems: 'center',
|
|
@@ -208,7 +211,9 @@ export const C4ClusterDetailsSecureConnectivity = ({ status, privateEndpoints, c
|
|
|
208
211
|
editLabel: 'Edit supported regions',
|
|
209
212
|
alignToSingleSnippet: true,
|
|
210
213
|
wrapItems: true,
|
|
211
|
-
}) })] })] }) })) : (
|
|
214
|
+
}) })] })] }) })) : (
|
|
215
|
+
// Two-column layout: pairs of fields side-by-side
|
|
216
|
+
_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
217
|
borderTop: 'none',
|
|
213
218
|
textAlign: 'right',
|
|
214
219
|
}, 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 { 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, isRunningOnUnsupportedGeneration, }: C4ClusterListProps) => JSX.Element;
|
|
3
|
+
export declare const C4ClusterList: ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isFailoverSource, 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, isRunningOnUnsupportedGeneration, }) => {
|
|
40
|
+
export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isFailoverSource, isRunningOnUnsupportedGeneration, scope = 'cluster', }) => {
|
|
41
41
|
const designSystem = useC4DesignSystem();
|
|
42
42
|
const isDsMode = designSystem === 'ds';
|
|
43
43
|
const tableContainerRef = useRef(null);
|
|
@@ -420,9 +420,11 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
420
420
|
pageSizes: [10, DEFAULT_PAGE_SIZE, 50, 100],
|
|
421
421
|
} }) }));
|
|
422
422
|
};
|
|
423
|
-
return (_jsxs(_Fragment, { children: [trialNotification, _jsxs(C4PageTemplate, { loading: loading,
|
|
424
|
-
|
|
425
|
-
|
|
423
|
+
return (_jsxs(_Fragment, { children: [trialNotification, _jsxs(C4PageTemplate, { loading: loading,
|
|
424
|
+
// In environment scope the host page owns the title and padding —
|
|
425
|
+
// it's already showing "Clusters" as a tab, so this widget stays
|
|
426
|
+
// chromeless (see C4WidgetScope).
|
|
427
|
+
header: scope === 'environment' ? undefined : { title: translations.title }, padding: scope === 'environment' ? 'none' : 'default', children: [encryptionNotification && (_jsx(C4InlineNotification, { style: {
|
|
426
428
|
maxWidth: '100%',
|
|
427
429
|
width: '100%',
|
|
428
430
|
marginBottom: '24px',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { C4WidgetScope } from '../../widgets/c4-widget-scope.types.js';
|
|
1
2
|
export interface ClusterListItem {
|
|
2
3
|
id: string;
|
|
3
4
|
name: string;
|
|
@@ -37,6 +38,12 @@ export interface C4ClusterListProps {
|
|
|
37
38
|
loading: boolean;
|
|
38
39
|
urls: ClusterListUrls;
|
|
39
40
|
permissions: ClusterListPermissions;
|
|
41
|
+
/**
|
|
42
|
+
* `'environment'` embeds this list in a host's own page (see
|
|
43
|
+
* `C4WidgetScope`) — suppresses the "Clusters" title and page padding,
|
|
44
|
+
* since the host already provides both. Defaults to `'cluster'`.
|
|
45
|
+
*/
|
|
46
|
+
scope?: C4WidgetScope;
|
|
40
47
|
onNavigate: (url: string) => void;
|
|
41
48
|
onDeleteCluster: (clusterId: string) => void;
|
|
42
49
|
onAssignTag: (clusterId: string) => void;
|
|
@@ -47,5 +47,13 @@ export interface ApplicationsProps {
|
|
|
47
47
|
identity?: ApplicationTileProps;
|
|
48
48
|
};
|
|
49
49
|
bottomElement?: JSX.Element;
|
|
50
|
+
/**
|
|
51
|
+
* `'tile'` (default) renders the section inside `C4TileWithTitleAndAction`'s
|
|
52
|
+
* bordered, padded card — Console's own look. `'plain'` drops that card in
|
|
53
|
+
* favor of a bare heading, for a host that renders this section inline
|
|
54
|
+
* alongside its own similarly bare sections (e.g. Camunda Hub's Environments
|
|
55
|
+
* section on the same overview tab).
|
|
56
|
+
*/
|
|
57
|
+
variant?: 'tile' | 'plain';
|
|
50
58
|
}
|
|
51
59
|
export declare const Applications: (props: ApplicationsProps) => JSX.Element;
|
|
@@ -144,10 +144,12 @@ export const ApplicationTile = (props) => {
|
|
|
144
144
|
visible: props.linkVisible !== false,
|
|
145
145
|
}
|
|
146
146
|
: undefined);
|
|
147
|
-
const component = (_jsx(Layer, { children: _jsx(Tile, { style: { height: '100%', borderColor, borderWidth, borderStyle }, children: _jsxs(Stack, { gap: 3, children: [_jsxs(Stack, { gap: 1, children: [_jsxs(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
const component = (_jsx(Layer, { children: _jsx(Tile, { style: { height: '100%', borderColor, borderWidth, borderStyle }, children: _jsxs(Stack, { gap: 3, children: [_jsxs(Stack, { gap: 1, children: [_jsxs("div", { style: {
|
|
148
|
+
display: 'flex',
|
|
149
|
+
justifyContent: 'space-between',
|
|
150
|
+
alignItems: 'flex-start',
|
|
151
|
+
gap: '0.25rem',
|
|
152
|
+
}, children: [_jsx("h6", { style: { fontSize }, children: props.name }), props.status && _jsx(ClusterStatusElement, { status: props.status })] }), _jsx("div", { style: {
|
|
151
153
|
fontSize: '12px',
|
|
152
154
|
color: 'var(--cds-text-secondary)',
|
|
153
155
|
minHeight: '15px',
|
|
@@ -155,7 +157,7 @@ export const ApplicationTile = (props) => {
|
|
|
155
157
|
display: 'grid',
|
|
156
158
|
gridTemplateRows: '1fr auto',
|
|
157
159
|
height: props.description ? '60px' : undefined,
|
|
158
|
-
}, children: [props.description && _jsx("p", { children: props.description }), normalizedLink?.visible &&
|
|
160
|
+
}, children: [props.description && (_jsx("p", { style: { fontSize }, children: props.description })), normalizedLink?.visible &&
|
|
159
161
|
(props.status === 'healthy' ||
|
|
160
162
|
((props.status === 'suspended' || props.status === undefined) &&
|
|
161
163
|
!!normalizedLink?.onClick)) && (_jsxs(Link, { href: normalizedLink.url ?? '', style: {
|
|
@@ -208,22 +210,25 @@ export const Applications = (props) => {
|
|
|
208
210
|
window.removeEventListener('resize', handleWindowResize);
|
|
209
211
|
};
|
|
210
212
|
}, []);
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
213
|
+
const grid = (_jsx("div", { style: {
|
|
214
|
+
display: 'grid',
|
|
215
|
+
gridTemplateColumns: templateColumnsBySize[mediaSize],
|
|
216
|
+
gap: '16px',
|
|
217
|
+
}, children: [
|
|
218
|
+
props.applications.zeebe,
|
|
219
|
+
props.applications.tasklist,
|
|
220
|
+
props.applications.operate,
|
|
221
|
+
props.applications.optimize,
|
|
222
|
+
props.applications.connectors,
|
|
223
|
+
props.applications.identity,
|
|
224
|
+
].map((props) => {
|
|
225
|
+
if (!props) {
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
return (_jsx("div", { children: _jsx(ApplicationTile, { ...props }) }, props.name));
|
|
229
|
+
}) }));
|
|
230
|
+
if (props.variant === 'plain') {
|
|
231
|
+
return (_jsxs("div", { children: [_jsx("h6", { style: { fontSize: '16px', marginBottom: '16px' }, children: props.title }), grid] }));
|
|
232
|
+
}
|
|
233
|
+
return (_jsx(C4TileWithTitleAndAction, { title: props.title, children: grid }));
|
|
229
234
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, JSX } from 'react';
|
|
2
2
|
import type { C4ClusterOverviewProps } from './c4-cluster-overview.types.js';
|
|
3
|
-
export declare const C4ClusterOverview: ({ applications, details, clusterLoad, rbaNotification, jobDashboard, }: C4ClusterOverviewProps) => JSX.Element;
|
|
3
|
+
export declare const C4ClusterOverview: ({ applications, details, clusterLoad, rbaNotification, jobDashboard, overviewSection, }: C4ClusterOverviewProps) => JSX.Element;
|
|
4
4
|
export declare const C4IconAndTextElement: (props: {
|
|
5
5
|
icon: any;
|
|
6
6
|
text: string;
|
|
@@ -26,7 +26,7 @@ const ResponsiveOverviewGrid = styled.div `
|
|
|
26
26
|
const ClusterDetailsWrapper = styled.div `
|
|
27
27
|
width: calc(100vw - 64px);
|
|
28
28
|
overflow-x: auto;
|
|
29
|
-
background-color: var(--cds-layer);
|
|
29
|
+
${({ $plain }) => !$plain && 'background-color: var(--cds-layer);'}
|
|
30
30
|
|
|
31
31
|
@media (min-width: 768px) {
|
|
32
32
|
width: 100%;
|
|
@@ -35,7 +35,7 @@ const ClusterDetailsWrapper = styled.div `
|
|
|
35
35
|
const SecondColumnContainer = styled.div `
|
|
36
36
|
height: max-content
|
|
37
37
|
`;
|
|
38
|
-
export const C4ClusterOverview = ({ applications, details, clusterLoad, rbaNotification, jobDashboard, }) => {
|
|
38
|
+
export const C4ClusterOverview = ({ applications, details, clusterLoad, rbaNotification, jobDashboard, overviewSection, }) => {
|
|
39
39
|
let rbaNotificationElement = null;
|
|
40
40
|
if (rbaNotification?.visible) {
|
|
41
41
|
if (rbaNotification.canManageUsers) {
|
|
@@ -47,12 +47,12 @@ export const C4ClusterOverview = ({ applications, details, clusterLoad, rbaNotif
|
|
|
47
47
|
}
|
|
48
48
|
let secondRow = _jsx(_Fragment, {});
|
|
49
49
|
if (clusterLoad || jobDashboard) {
|
|
50
|
-
secondRow = (_jsxs(ResponsiveOverviewGrid, { children: [_jsx(ClusterDetailsWrapper, { children: _jsx(ClusterDetails, { ...details }) }), _jsxs(Stack, { gap: 6, children: [clusterLoad && (_jsx(SecondColumnContainer, { children: _jsx(ClusterLoad, { ...clusterLoad }) })), jobDashboard && (_jsx(SecondColumnContainer, { children: _jsx(C4JobDashboardEntryPoint, { ...jobDashboard }) }))] })] }));
|
|
50
|
+
secondRow = (_jsxs(ResponsiveOverviewGrid, { children: [_jsx(ClusterDetailsWrapper, { "$plain": details.variant === 'plain', children: _jsx(ClusterDetails, { ...details }) }), _jsxs(Stack, { gap: 6, children: [clusterLoad && (_jsx(SecondColumnContainer, { children: _jsx(ClusterLoad, { ...clusterLoad }) })), jobDashboard && (_jsx(SecondColumnContainer, { children: _jsx(C4JobDashboardEntryPoint, { ...jobDashboard }) }))] })] }));
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
|
-
secondRow = (_jsx(ClusterDetailsWrapper, { children: _jsx(ClusterDetails, { ...details }) }));
|
|
53
|
+
secondRow = (_jsx(ClusterDetailsWrapper, { "$plain": details.variant === 'plain', children: _jsx(ClusterDetails, { ...details }) }));
|
|
54
54
|
}
|
|
55
|
-
const component = (_jsxs(Stack, { gap: 8, children: [rbaNotificationElement, _jsxs(Stack, { gap: 6, children: [_jsx(Applications, { ...applications }), secondRow] })] }));
|
|
55
|
+
const component = (_jsxs(Stack, { gap: 8, children: [rbaNotificationElement, overviewSection, _jsxs(Stack, { gap: 6, children: [_jsx(Applications, { ...applications }), secondRow] })] }));
|
|
56
56
|
return component;
|
|
57
57
|
};
|
|
58
58
|
export const C4IconAndTextElement = (props) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
import type { C4JobDashboardEntryPointProps } from '../c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.js';
|
|
2
3
|
import type { ApplicationsProps } from './applications.js';
|
|
3
4
|
import type { ClusterDetailsProps } from './cluster-details.js';
|
|
@@ -19,4 +20,13 @@ export interface C4ClusterOverviewProps {
|
|
|
19
20
|
clusterLoad?: ClusterLoadProps;
|
|
20
21
|
rbaNotification?: RbaNotificationProps;
|
|
21
22
|
jobDashboard?: C4JobDashboardEntryPointProps;
|
|
23
|
+
/**
|
|
24
|
+
* Caller-supplied content rendered directly above the Components section.
|
|
25
|
+
*
|
|
26
|
+
* An untyped slot, so this component models none of its content. Reaches here
|
|
27
|
+
* from `C4ClusterDetailsAppProps['overviewSection']`, which an embedding host
|
|
28
|
+
* fills. Omitted → nothing is rendered there, so Console's overview is
|
|
29
|
+
* unchanged.
|
|
30
|
+
*/
|
|
31
|
+
overviewSection?: ReactNode;
|
|
22
32
|
}
|
|
@@ -99,6 +99,13 @@ export interface ClusterDetailsProps {
|
|
|
99
99
|
linkLabel: string;
|
|
100
100
|
pausedWarning?: string;
|
|
101
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* `'tile'` (default) renders this section inside `C4TileWithTitleAndAction`'s
|
|
104
|
+
* bordered, padded card — Console's own look. `'plain'` drops that card in
|
|
105
|
+
* favor of a bare heading, for a host that renders this section inline
|
|
106
|
+
* alongside its own similarly bare sections.
|
|
107
|
+
*/
|
|
108
|
+
variant?: 'tile' | 'plain';
|
|
102
109
|
}
|
|
103
110
|
export declare const ClusterDetails: (props: ClusterDetailsProps) => JSX.Element;
|
|
104
111
|
export interface ClusterDetailsGenerationUpdateProps {
|
|
@@ -120,7 +120,7 @@ export const ClusterDetails = (props) => {
|
|
|
120
120
|
}
|
|
121
121
|
return null;
|
|
122
122
|
};
|
|
123
|
-
const
|
|
123
|
+
const inner = (_jsxs(_Fragment, { children: [(() => {
|
|
124
124
|
if (props.cta) {
|
|
125
125
|
return (_jsx(C4ActionableNotification, { appearance: 'banner', kind: 'info', title: props.cta.title, subtitle: props.cta.text, actionButtonLabel: props.cta.actionLabel, onActionButtonClick: props.cta.action, lowContrast: true, orientation: 'vertical' }));
|
|
126
126
|
}
|
|
@@ -193,7 +193,10 @@ export const ClusterDetails = (props) => {
|
|
|
193
193
|
marginLeft: 'var(--cds-spacing-02)',
|
|
194
194
|
verticalAlign: 'middle',
|
|
195
195
|
} })] })] }) })] })), props.created && (_jsxs(C4StructuredListRow, { style: rowStyle, children: [_jsx(C4StructuredListCell, { noWrap: true, children: props.created.label }), _jsx(C4StructuredListCell, { noWrap: true, children: props.created.value })] }))] }) })] }));
|
|
196
|
-
|
|
196
|
+
if (props.variant === 'plain') {
|
|
197
|
+
return (_jsxs("div", { children: [_jsx("h6", { style: { fontSize: '16px', marginBottom: '16px' }, children: props.title }), inner] }));
|
|
198
|
+
}
|
|
199
|
+
return (_jsx(C4TileWithTitleAndAction, { title: props.title, children: inner }));
|
|
197
200
|
};
|
|
198
201
|
export const ClusterDetailsGenerationUpdate = (props) => {
|
|
199
202
|
let component = _jsx(_Fragment, {});
|
|
@@ -29,6 +29,13 @@ export interface ClusterLoadProps {
|
|
|
29
29
|
suspended?: boolean;
|
|
30
30
|
reload: () => void;
|
|
31
31
|
loading?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* `'tile'` (default) renders this section inside `C4TileWithTitleAndAction`'s
|
|
34
|
+
* bordered, padded card — Console's own look. `'plain'` drops that card in
|
|
35
|
+
* favor of a bare heading, for a host that renders this section inline
|
|
36
|
+
* alongside its own similarly bare sections.
|
|
37
|
+
*/
|
|
38
|
+
variant?: 'tile' | 'plain';
|
|
32
39
|
}
|
|
33
40
|
export declare const ClusterLoad: (props: ClusterLoadProps) => JSX.Element;
|
|
34
41
|
export declare const MeterVisualization: (props: ClusterLoadProps) => JSX.Element;
|