@camunda/ccma-saas-frontend 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +1 -1
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +9 -5
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.d.ts +6 -0
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +9 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +6 -3
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.types.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +9 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +2 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.types.d.ts +2 -0
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +19 -21
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts +19 -2
- 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 +2 -1
- 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 +20 -0
- package/lib/esm/components/c4-cluster-overview/applications.js +37 -24
- 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.mocks.d.ts +6 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +15 -2
- 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 +8 -0
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +20 -8
- 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.types.d.ts +4 -0
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +3 -1
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +7 -3
- 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.d.ts +9 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +69 -12
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +10 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +16 -2
- package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.d.ts +14 -0
- package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.d.ts +15 -0
- package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.js +10 -0
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +2 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +4 -2
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +24 -3
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +1 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +1 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +2 -0
- 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.mocks.js +10 -5
- 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.mocks.js +10 -5
- 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-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-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.types.d.ts +5 -0
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +2 -1
- package/lib/esm/externalUrls.const.d.ts +1 -1
- package/lib/esm/externalUrls.const.js +1 -1
- package/lib/esm/i18n/c4-console-i18n.js +6 -0
- package/lib/esm/i18n/en/pages/clusterdetails.json +28 -3
- package/lib/esm/i18n/en/pages/job-dashboard.json +2 -0
- package/lib/esm/index.d.ts +13 -3
- package/lib/esm/index.js +7 -3
- package/lib/esm/runtime/build-cluster-sso-callback-url.d.ts +34 -0
- package/lib/esm/runtime/build-cluster-sso-callback-url.js +49 -0
- package/lib/esm/runtime/build-cluster-swagger-url.d.ts +7 -2
- package/lib/esm/runtime/build-cluster-swagger-url.js +20 -5
- package/lib/esm/runtime/index.d.ts +2 -0
- package/lib/esm/runtime/index.js +2 -0
- package/lib/esm/ui/families.d.ts +4 -0
- package/lib/esm/ui/families.js +22 -2
- 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/cluster-details/c4-cluster-details-app.d.ts +16 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +92 -74
- 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 +81 -13
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +24 -0
- 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 +10 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +8 -13
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +42 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +38 -23
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.d.ts +7 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +26 -5
- 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 +50 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +174 -3
- package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.d.ts +13 -0
- package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.js +29 -0
- package/lib/esm/widgets/cluster-health-override.d.ts +16 -0
- package/lib/esm/widgets/cluster-health-override.js +33 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +10 -10
- 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 +10 -5
- 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 +10 -5
- 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 +10 -5
- 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 +10 -5
- package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +10 -0
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
- 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 +66 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.d.ts +21 -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 +59 -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 +22 -0
- package/lib/esm/widgets/environment/use-cluster-swagger-url.js +47 -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/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/package.json +25 -25
- package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.d.ts +0 -16
- package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +0 -40
- package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.d.ts +0 -16
- package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +0 -142
- package/lib/esm/components/c4-advanced-search-filters/FieldRow.d.ts +0 -14
- package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +0 -136
- package/lib/esm/components/c4-advanced-search-filters/FiltersSection.d.ts +0 -13
- package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +0 -58
- package/lib/esm/components/c4-advanced-search-filters/OrSection.d.ts +0 -16
- package/lib/esm/components/c4-advanced-search-filters/OrSection.js +0 -118
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.d.ts +0 -3
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +0 -408
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.types.d.ts +0 -32
- package/lib/esm/components/c4-advanced-search-filters/state.types.d.ts +0 -14
- package/lib/esm/components/c4-advanced-search-filters/utils.d.ts +0 -5
- package/lib/esm/components/c4-advanced-search-filters/utils.js +0 -58
- /package/lib/esm/{components/c4-advanced-search-filters/c4-advanced-search-filters.types.js → widgets/c4-widget-scope.types.js} +0 -0
- /package/lib/esm/{components/c4-advanced-search-filters/state.types.js → widgets/environment/c4-cluster-api-clients-widget.types.js} +0 -0
|
@@ -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,27 @@ 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
|
+
// Same "no elements, no breadcrumb" rule as the loaded branch that
|
|
22
|
+
// follows. A widget in `scope: 'environment'` passes an empty trail and a
|
|
23
|
+
// header, so `C4PageTemplate` still mounts this component. Without the
|
|
24
|
+
// guard the host page gets a stray breadcrumb skeleton for the whole load.
|
|
25
|
+
breadcrumb = elements.length > 0 ? _jsx(BreadcrumbSkeleton, {}) : null;
|
|
22
26
|
}
|
|
23
27
|
else {
|
|
24
|
-
breadcrumb = (_jsxs(Stack, { gap: 1, children: [_jsx(Breadcrumb, { noTrailingSlash: noTrailingSlash ?? false, children: elements.map((element) => {
|
|
28
|
+
breadcrumb = (_jsxs(Stack, { gap: 1, children: [elements.length > 0 && (_jsx(Breadcrumb, { noTrailingSlash: noTrailingSlash ?? false, children: elements.map((element) => {
|
|
25
29
|
return (_jsx(BreadcrumbItem, { children: _jsx(Link, { href: element.href, onClick: (event) => {
|
|
26
30
|
if (element.onClick) {
|
|
27
31
|
event.preventDefault();
|
|
28
32
|
element.onClick();
|
|
29
33
|
}
|
|
30
34
|
}, 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) => {
|
|
35
|
+
}) })), (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
36
|
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 })] }))] }));
|
|
37
|
+
}) })), indicator && _jsx("div", { style: { marginLeft: 'auto' }, children: indicator })] })), subtitleBadges && (_jsx("div", { style: { display: 'flex', alignItems: 'center', gap: '0.5rem' }, children: subtitleBadges }))] }));
|
|
34
38
|
}
|
|
35
39
|
return _jsx("div", { style: breadCrumbWrapperStyles, children: breadcrumb });
|
|
36
40
|
};
|
|
@@ -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;
|
|
@@ -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}`));
|
|
@@ -172,6 +172,15 @@ export const C4ClusterDetailsClients = ({ clients, isLoading, hasError, hasIdent
|
|
|
172
172
|
icon: Renew,
|
|
173
173
|
} }));
|
|
174
174
|
}
|
|
175
|
+
// A viewer who lacks read access never gets a populated list, so without
|
|
176
|
+
// this check they see the same "create your first client" empty state as
|
|
177
|
+
// someone who could create one — a false invitation.
|
|
178
|
+
if (!isLoading && !permissions.canRead) {
|
|
179
|
+
return (_jsx(C4EmptyState, { card: true, icon: {
|
|
180
|
+
path: C4_ASSET_URLS.errorIcon,
|
|
181
|
+
altText: 'errorIcon',
|
|
182
|
+
}, heading: text.forbiddenTitle, description: text.forbiddenDescription }));
|
|
183
|
+
}
|
|
175
184
|
if (!isLoading && clients.length === 0) {
|
|
176
185
|
return (_jsx(C4EmptyState, { card: true, icon: {
|
|
177
186
|
path: C4_ASSET_URLS.clientApiIcon,
|
|
@@ -16,12 +16,14 @@ export const defaultText = {
|
|
|
16
16
|
headerLastUsed: 'Last Used',
|
|
17
17
|
renameAction: 'Rename',
|
|
18
18
|
deleteAction: 'Delete',
|
|
19
|
-
errorTitle: '
|
|
20
|
-
errorDescription: '
|
|
21
|
-
errorButton: '
|
|
19
|
+
errorTitle: 'Oops ... something went wrong.',
|
|
20
|
+
errorDescription: 'Please try reloading!',
|
|
21
|
+
errorButton: 'Reload',
|
|
22
22
|
emptyTitle: 'Use our secure, scalable API',
|
|
23
23
|
emptyDescription: (_jsxs(_Fragment, { children: ["Click ", _jsx("strong", { children: "Create your first client" }), " to deploy processes, start instances, and interact with them programmatically."] })),
|
|
24
24
|
learnMoreLabel: 'View the Client Configuration documentation',
|
|
25
|
+
forbiddenTitle: "You don't have access to client credentials",
|
|
26
|
+
forbiddenDescription: "You don't have permission to view client credentials for this cluster. Contact an organization owner or admin for access.",
|
|
25
27
|
};
|
|
26
28
|
export const defaultUrls = {
|
|
27
29
|
clientDetails: (clientId) => `/org/123/clusters/456/clients/${clientId}`,
|
|
@@ -29,6 +31,7 @@ export const defaultUrls = {
|
|
|
29
31
|
docs: 'https://docs.camunda.io',
|
|
30
32
|
};
|
|
31
33
|
export const defaultPermissions = {
|
|
34
|
+
canRead: true,
|
|
32
35
|
canCreate: true,
|
|
33
36
|
canUpdate: true,
|
|
34
37
|
canDelete: true,
|
|
@@ -29,6 +29,8 @@ export interface C4ClusterDetailsClientsProps {
|
|
|
29
29
|
emptyTitle: string;
|
|
30
30
|
emptyDescription: string | ReactElement;
|
|
31
31
|
learnMoreLabel: string;
|
|
32
|
+
forbiddenTitle: string;
|
|
33
|
+
forbiddenDescription: string | ReactElement;
|
|
32
34
|
};
|
|
33
35
|
urls: {
|
|
34
36
|
clientDetails: (clientId: string) => string;
|
|
@@ -36,6 +38,7 @@ export interface C4ClusterDetailsClientsProps {
|
|
|
36
38
|
docs: string;
|
|
37
39
|
};
|
|
38
40
|
permissions: {
|
|
41
|
+
canRead: boolean;
|
|
39
42
|
canCreate: boolean;
|
|
40
43
|
canUpdate: boolean;
|
|
41
44
|
canDelete: boolean;
|
|
@@ -137,6 +137,15 @@ export const C4ClusterDetailsConnectorSecrets = ({ secrets, isLoading, hasError,
|
|
|
137
137
|
icon: Renew,
|
|
138
138
|
} }));
|
|
139
139
|
}
|
|
140
|
+
// A viewer who lacks read access never gets a populated list, so without
|
|
141
|
+
// this check they see the same "create your first secret" empty state as
|
|
142
|
+
// someone who could create one — a false invitation.
|
|
143
|
+
if (!permissions.canRead) {
|
|
144
|
+
return (_jsx(C4EmptyState, { card: true, icon: {
|
|
145
|
+
path: C4_ASSET_URLS.errorIcon,
|
|
146
|
+
altText: 'errorIcon',
|
|
147
|
+
}, heading: text.forbiddenTitle, description: text.forbiddenDescription }));
|
|
148
|
+
}
|
|
140
149
|
if (secrets.length === 0) {
|
|
141
150
|
return (_jsx(C4EmptyState, { card: true, icon: {
|
|
142
151
|
path: C4_ASSET_URLS.connectorSecretIcon,
|
|
@@ -43,6 +43,8 @@ export const withSecretsProps = {
|
|
|
43
43
|
infoText: 'Secrets can be used to reference encrypted authentication credentials in Connectors. See the secrets documentation for more details.',
|
|
44
44
|
// Label for the badge shown on CAMUNDA_PROVIDED_ secrets
|
|
45
45
|
protectedBadge: 'Hidden',
|
|
46
|
+
forbiddenTitle: "You don't have access to connector secrets",
|
|
47
|
+
forbiddenDescription: "You don't have permission to view connector secrets for this cluster. Contact an organization owner or admin for access.",
|
|
46
48
|
},
|
|
47
49
|
urls: {
|
|
48
50
|
docs: 'https://docs.camunda.io/docs/next/components/connectors/use-connectors/#using-secrets',
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import type { C4ClusterDetailsEncryptionProps } from './c4-cluster-details-encryption.types.js';
|
|
3
|
-
export declare const C4ClusterDetailsEncryption: ({ cluster, encryption, failoverKeyPolicy, scripts, text, urls, onSetARN, onUpdatePrimaryARN, onUpdateSecondaryARN, onDownloadScript, onDownloadKeyPolicy, disabled, }: C4ClusterDetailsEncryptionProps) => JSX.Element;
|
|
3
|
+
export declare const C4ClusterDetailsEncryption: ({ cluster, encryption, failoverKeyPolicy, failoverCloneRolePolicyStatement, secondaryReplicationNotReady, scripts, text, urls, onSetARN, onUpdatePrimaryARN, onUpdateSecondaryARN, onDownloadScript, onDownloadKeyPolicy, disabled, }: C4ClusterDetailsEncryptionProps) => JSX.Element;
|
|
@@ -9,9 +9,10 @@ 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
|
-
export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPolicy, scripts, text, urls, onSetARN, onUpdatePrimaryARN, onUpdateSecondaryARN, onDownloadScript, onDownloadKeyPolicy, disabled = false, }) => {
|
|
15
|
+
export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPolicy, failoverCloneRolePolicyStatement, secondaryReplicationNotReady, scripts, text, urls, onSetARN, onUpdatePrimaryARN, onUpdateSecondaryARN, onDownloadScript, onDownloadKeyPolicy, disabled = false, }) => {
|
|
15
16
|
const { Tabs, Tab, TabList, TabPanel, TabPanels } = useTabsFamily();
|
|
16
17
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
17
18
|
const handleTabChange = (evt) => {
|
|
@@ -49,6 +50,11 @@ export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPol
|
|
|
49
50
|
color: 'var(--cds-support-warning)',
|
|
50
51
|
}, children: _jsx(WarningAltFilled, {}) }), _jsx("span", { style: { marginLeft: '24px' }, children: "Unconfigured" })] })),
|
|
51
52
|
};
|
|
53
|
+
// Replication to the secondary region can fail silently, so this warning
|
|
54
|
+
// has to reach the customer no matter which view below is showing: the
|
|
55
|
+
// read-only "Ready" summary, the failover key-policy prompt, or the
|
|
56
|
+
// create-a-new-key flow.
|
|
57
|
+
const secondaryReplicationWarning = secondaryReplicationNotReady && (_jsx(C4InlineNotification, { style: { maxWidth: '100%', width: '100%', marginBottom: '24px' }, lowContrast: true, kind: 'warning', title: text.secondaryReplicationNotReadyTitle, subtitle: text.secondaryReplicationNotReadyText, hideCloseButton: true }));
|
|
52
58
|
const formatDate = (dateString) => {
|
|
53
59
|
const date = new Date(dateString);
|
|
54
60
|
return date.toLocaleDateString('en-US', {
|
|
@@ -57,7 +63,7 @@ export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPol
|
|
|
57
63
|
day: 'numeric',
|
|
58
64
|
});
|
|
59
65
|
};
|
|
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
|
|
66
|
+
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
67
|
? text.validationArnInvalid
|
|
62
68
|
: text.validationRegionInvalid.replace('{region}', cluster.region), invalid: encryption.primaryArnTouched &&
|
|
63
69
|
(!encryption.validArnPrimary || !encryption.validArnRegionPrimary), disabled: disabled ||
|
|
@@ -76,7 +82,7 @@ export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPol
|
|
|
76
82
|
}
|
|
77
83
|
})()] }) }));
|
|
78
84
|
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
|
|
85
|
+
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
86
|
? text.validationArnInvalid
|
|
81
87
|
: text.validationRegionInvalid.replace('{region}', cluster.region), invalid: encryption.primaryArnTouched &&
|
|
82
88
|
(!encryption.validArnPrimary || !encryption.validArnRegionPrimary), disabled: disabled ||
|
|
@@ -107,7 +113,7 @@ export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPol
|
|
|
107
113
|
})()] }));
|
|
108
114
|
}
|
|
109
115
|
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 }) })] })] }) }) })] }));
|
|
116
|
+
return (_jsxs(_Fragment, { children: [secondaryReplicationWarning, _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
117
|
}
|
|
112
118
|
// A failed-over cluster already has its keys set (they are reversed from the
|
|
113
119
|
// source at failover time), so the "create a new key" flow below would be
|
|
@@ -116,25 +122,17 @@ export const C4ClusterDetailsEncryption = ({ cluster, encryption, failoverKeyPol
|
|
|
116
122
|
// operator reports the key as usable the `Ready` branch above wins, so this
|
|
117
123
|
// is reached only while the key policy is still missing the new principals.
|
|
118
124
|
if (failoverKeyPolicy) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
value: failoverKeyPolicy.cloneRole,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
label: text.failoverKeyPolicyClusterRole,
|
|
126
|
-
value: failoverKeyPolicy.clusterRole,
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
label: text.failoverKeyPolicyReplicationRole,
|
|
130
|
-
value: failoverKeyPolicy.replicationRole,
|
|
131
|
-
},
|
|
132
|
-
];
|
|
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))) }) })] })] }));
|
|
125
|
+
return (_jsxs(_Fragment, { children: [secondaryReplicationWarning, _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: _jsxs(Stack, { gap: 4, children: [_jsx("h4", { children: cluster.isDualRegion
|
|
126
|
+
? `${text.failoverKeyPolicyPrimaryTitle} (${cluster.region})`
|
|
127
|
+
: text.failoverKeyPolicyPrimaryTitle }), _jsxs(Stack, { gap: 2, children: [_jsx("strong", { children: text.failoverKeyPolicyClusterRole }), _jsx(CodeSnippet, { type: 'single', children: failoverKeyPolicy.clusterRole })] }), _jsx("p", { children: text.failoverKeyPolicyStatementInstruction }), failoverCloneRolePolicyStatement && (_jsxs(Stack, { gap: 2, children: [_jsx("strong", { children: text.failoverKeyPolicyStatementLabel }), _jsx(CodeSnippet, { type: 'multi', wrapText: true, maxCollapsedNumberOfRows: 20, children: failoverCloneRolePolicyStatement })] }))] }) }), cluster.isDualRegion && cluster.backupRegion && (_jsx(Tile, { children: _jsxs(Stack, { gap: 4, children: [_jsxs("h4", { children: [text.failoverKeyPolicySecondaryTitle, " (", cluster.backupRegion, ")"] }), _jsx("p", { children: text.failoverKeyPolicySecondaryInstruction }), _jsxs(Stack, { gap: 2, children: [_jsx("strong", { children: text.failoverKeyPolicyClusterRole }), _jsx(CodeSnippet, { type: 'single', children: failoverKeyPolicy.clusterRole })] })] }) }))] })] }));
|
|
134
128
|
}
|
|
135
|
-
return (_jsxs(_Fragment, { children: [encryption.actionRequired && (_jsx(C4InlineNotification, { style: {
|
|
129
|
+
return (_jsxs(_Fragment, { children: [secondaryReplicationWarning, encryption.actionRequired && (_jsx(C4InlineNotification, { style: {
|
|
136
130
|
maxWidth: '100%',
|
|
137
131
|
width: '100%',
|
|
138
132
|
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", {
|
|
133
|
+
}, 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: {
|
|
134
|
+
margin: 0,
|
|
135
|
+
fontSize: '14px',
|
|
136
|
+
fontWeight: 600,
|
|
137
|
+
}, 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
138
|
};
|
package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts
CHANGED
|
@@ -9,6 +9,18 @@ export interface C4ClusterDetailsEncryptionProps {
|
|
|
9
9
|
* replaces the create-a-new-key flow.
|
|
10
10
|
*/
|
|
11
11
|
failoverKeyPolicy?: FailoverKeyPolicyPrincipals;
|
|
12
|
+
/**
|
|
13
|
+
* The IAM policy statement to add to the failover region's key policy, so
|
|
14
|
+
* the clone role can read the source cluster's backup during the restore.
|
|
15
|
+
* Rendered as-is (already JSON-stringified) next to `failoverKeyPolicy`.
|
|
16
|
+
*/
|
|
17
|
+
failoverCloneRolePolicyStatement?: string;
|
|
18
|
+
/**
|
|
19
|
+
* True when this is a dual-region BYOK cluster and the secondary region's
|
|
20
|
+
* key is not accessible, so replication to it is not working. Applies to
|
|
21
|
+
* both a normal cluster and a failover target.
|
|
22
|
+
*/
|
|
23
|
+
secondaryReplicationNotReady?: boolean;
|
|
12
24
|
scripts: {
|
|
13
25
|
cliScript: string;
|
|
14
26
|
keyPolicy: string;
|
|
@@ -50,9 +62,14 @@ export interface C4ClusterDetailsEncryptionProps {
|
|
|
50
62
|
failoverKeyPolicyTitle: string;
|
|
51
63
|
failoverKeyPolicyText: string;
|
|
52
64
|
failoverKeyPolicyInstruction: string;
|
|
53
|
-
|
|
65
|
+
failoverKeyPolicyPrimaryTitle: string;
|
|
66
|
+
failoverKeyPolicyStatementLabel: string;
|
|
67
|
+
failoverKeyPolicyStatementInstruction: string;
|
|
68
|
+
failoverKeyPolicySecondaryTitle: string;
|
|
69
|
+
failoverKeyPolicySecondaryInstruction: string;
|
|
54
70
|
failoverKeyPolicyClusterRole: string;
|
|
55
|
-
|
|
71
|
+
secondaryReplicationNotReadyTitle: string;
|
|
72
|
+
secondaryReplicationNotReadyText: string;
|
|
56
73
|
};
|
|
57
74
|
urls: {
|
|
58
75
|
byokMain: string;
|
|
@@ -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,7 +190,7 @@ 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)',
|
|
@@ -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;
|
|
@@ -14,6 +14,12 @@ export interface ApplicationTileProps {
|
|
|
14
14
|
status?: ClusterStatus;
|
|
15
15
|
version: string;
|
|
16
16
|
description?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Text for the info affordance next to the status. Shown only for a status
|
|
19
|
+
* that needs a reason — see `ClusterStatusElement`. Use it to say why the
|
|
20
|
+
* status is not healthy, for example which public routes are broken.
|
|
21
|
+
*/
|
|
22
|
+
infoTooltip?: string;
|
|
17
23
|
link?: {
|
|
18
24
|
url?: string;
|
|
19
25
|
label: string;
|
|
@@ -45,7 +51,21 @@ export interface ApplicationsProps {
|
|
|
45
51
|
optimize?: ApplicationTileProps;
|
|
46
52
|
connectors?: ApplicationTileProps;
|
|
47
53
|
identity?: ApplicationTileProps;
|
|
54
|
+
/**
|
|
55
|
+
* Public route health of the cluster (issue#9884). Unlike the tiles above
|
|
56
|
+
* it is not an application: it reports whether the routes to them are
|
|
57
|
+
* reachable. Absent when the operator does not report the condition.
|
|
58
|
+
*/
|
|
59
|
+
connectivity?: ApplicationTileProps;
|
|
48
60
|
};
|
|
49
61
|
bottomElement?: JSX.Element;
|
|
62
|
+
/**
|
|
63
|
+
* `'tile'` (default) renders the section inside `C4TileWithTitleAndAction`'s
|
|
64
|
+
* bordered, padded card — Console's own look. `'plain'` drops that card in
|
|
65
|
+
* favor of a bare heading, for a host that renders this section inline
|
|
66
|
+
* alongside its own similarly bare sections (e.g. Camunda Hub's Environments
|
|
67
|
+
* section on the same overview tab).
|
|
68
|
+
*/
|
|
69
|
+
variant?: 'tile' | 'plain';
|
|
50
70
|
}
|
|
51
71
|
export declare const Applications: (props: ApplicationsProps) => JSX.Element;
|
|
@@ -50,6 +50,13 @@ export const normalizeClusterStatus = (status) => {
|
|
|
50
50
|
};
|
|
51
51
|
export const ClusterStatusElement = (props) => {
|
|
52
52
|
const isMaintenanceStatus = props.status === 'maintenance';
|
|
53
|
+
// Which states get the info affordance next to the status text. A healthy
|
|
54
|
+
// status has nothing to explain. 'waitingForInput' tells the customer that
|
|
55
|
+
// cluster creation needs input; 'updating' and 'unhealthy' let a status
|
|
56
|
+
// name its cause, for example the broken public routes of a cluster.
|
|
57
|
+
const supportsInfoTooltip = props.status === 'waitingForInput' ||
|
|
58
|
+
props.status === 'updating' ||
|
|
59
|
+
props.status === 'unhealthy';
|
|
53
60
|
let icon = null;
|
|
54
61
|
let text = '';
|
|
55
62
|
let color;
|
|
@@ -113,7 +120,7 @@ export const ClusterStatusElement = (props) => {
|
|
|
113
120
|
display: 'inline-flex',
|
|
114
121
|
alignItems: 'center',
|
|
115
122
|
gap: '0.125rem',
|
|
116
|
-
}, children: [_jsx("span", { children: text }),
|
|
123
|
+
}, children: [_jsx("span", { children: text }), supportsInfoTooltip && props.infoTooltip && (_jsx(Tooltip, { align: 'bottom', description: _jsx("span", { style: {
|
|
117
124
|
display: 'block',
|
|
118
125
|
whiteSpace: 'normal',
|
|
119
126
|
maxWidth: '16rem',
|
|
@@ -144,10 +151,12 @@ export const ApplicationTile = (props) => {
|
|
|
144
151
|
visible: props.linkVisible !== false,
|
|
145
152
|
}
|
|
146
153
|
: 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
|
-
|
|
154
|
+
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: {
|
|
155
|
+
display: 'flex',
|
|
156
|
+
justifyContent: 'space-between',
|
|
157
|
+
alignItems: 'flex-start',
|
|
158
|
+
gap: '0.25rem',
|
|
159
|
+
}, children: [_jsx("h6", { style: { fontSize }, children: props.name }), props.status && (_jsx(ClusterStatusElement, { status: props.status, infoTooltip: props.infoTooltip }))] }), _jsx("div", { style: {
|
|
151
160
|
fontSize: '12px',
|
|
152
161
|
color: 'var(--cds-text-secondary)',
|
|
153
162
|
minHeight: '15px',
|
|
@@ -155,7 +164,7 @@ export const ApplicationTile = (props) => {
|
|
|
155
164
|
display: 'grid',
|
|
156
165
|
gridTemplateRows: '1fr auto',
|
|
157
166
|
height: props.description ? '60px' : undefined,
|
|
158
|
-
}, children: [props.description && _jsx("p", { children: props.description }), normalizedLink?.visible &&
|
|
167
|
+
}, children: [props.description && (_jsx("p", { style: { fontSize }, children: props.description })), normalizedLink?.visible &&
|
|
159
168
|
(props.status === 'healthy' ||
|
|
160
169
|
((props.status === 'suspended' || props.status === undefined) &&
|
|
161
170
|
!!normalizedLink?.onClick)) && (_jsxs(Link, { href: normalizedLink.url ?? '', style: {
|
|
@@ -208,22 +217,26 @@ export const Applications = (props) => {
|
|
|
208
217
|
window.removeEventListener('resize', handleWindowResize);
|
|
209
218
|
};
|
|
210
219
|
}, []);
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}) }
|
|
228
|
-
|
|
220
|
+
const grid = (_jsx("div", { style: {
|
|
221
|
+
display: 'grid',
|
|
222
|
+
gridTemplateColumns: templateColumnsBySize[mediaSize],
|
|
223
|
+
gap: '16px',
|
|
224
|
+
}, children: [
|
|
225
|
+
props.applications.zeebe,
|
|
226
|
+
props.applications.tasklist,
|
|
227
|
+
props.applications.operate,
|
|
228
|
+
props.applications.optimize,
|
|
229
|
+
props.applications.connectors,
|
|
230
|
+
props.applications.identity,
|
|
231
|
+
props.applications.connectivity,
|
|
232
|
+
].map((props) => {
|
|
233
|
+
if (!props) {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
return (_jsx("div", { children: _jsx(ApplicationTile, { ...props }) }, props.name));
|
|
237
|
+
}) }));
|
|
238
|
+
if (props.variant === 'plain') {
|
|
239
|
+
return (_jsxs("div", { children: [_jsx("h6", { style: { fontSize: '16px', marginBottom: '16px' }, children: props.title }), grid] }));
|
|
240
|
+
}
|
|
241
|
+
return (_jsx(C4TileWithTitleAndAction, { title: props.title, children: grid }));
|
|
229
242
|
};
|
|
@@ -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;
|