@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
|
@@ -13,19 +13,23 @@ import { Loading, Stack, Tag, Tooltip } from '../../ui/index.js';
|
|
|
13
13
|
import { CHART_COLORS } from '../c4-billing-page/elements/value-metric.js';
|
|
14
14
|
import { C4Divider } from '../c4-divider/c4-divider.js';
|
|
15
15
|
import { C4ExternalLink } from '../c4-external-link/c4-external-link.js';
|
|
16
|
+
import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
|
|
16
17
|
import { C4TileWithTitleAndAction } from '../c4-tile-with-title-and-action/c4-tile-with-title-and-action.js';
|
|
17
18
|
import { DsMeterChart } from '../shared-charts/ds-meter-chart.js';
|
|
18
19
|
import { DS_CHART_AXIS_COLOR, DS_CHART_GRID_COLOR, DS_CHART_TOOLTIP_PROPS, DS_STATUS_COLORS, getDsSeriesColor, } from '../shared-charts/recharts-tokens.js';
|
|
19
20
|
import { getClusterLoadConfig } from './c4-cluster-overview.js';
|
|
20
21
|
export const ClusterLoad = (props) => {
|
|
21
|
-
const
|
|
22
|
+
const body = props.loading ? (_jsxs(_Fragment, { children: [_jsx(Loading, {}), _jsx("div", { style: { minHeight: '465px' } })] })) : (_jsxs(Stack, { gap: 3, children: [_jsx(LatestChart, { ...props }), _jsx("span", { style: { marginTop: '0.5rem' }, children: _jsx(C4Divider, {}) }), _jsx(HistoricChart, { ...props }), _jsx("span", { style: { marginTop: '0.75rem' }, children: _jsx(C4ExternalLink, { id: 'cluster-load-documentation', label: props.texts.docs, href: props.docs.url, onClick: () => {
|
|
23
|
+
props.docs.onClick();
|
|
24
|
+
}, target: '_blank', hideIcon: true }) })] }));
|
|
25
|
+
if (props.variant === 'plain') {
|
|
26
|
+
return (_jsxs("div", { style: { position: 'relative' }, className: 'cluster-load', children: [_jsxs(Stack, { orientation: 'horizontal', style: { marginBottom: '16px' }, children: [_jsx("h6", { style: { margin: 0, fontSize: '16px' }, children: props.texts.title }), !props.loading && (_jsx(C4LinkButton, { label: '', ariaLabel: 'Reload', onClick: () => props.reload(), style: { justifySelf: 'end', alignSelf: 'start' }, icon: _jsx(Renew, {}) }))] }), body] }));
|
|
27
|
+
}
|
|
28
|
+
return (_jsx("div", { style: { position: 'relative' }, className: 'cluster-load', children: _jsx(C4TileWithTitleAndAction, { title: props.texts.title, action: {
|
|
22
29
|
label: '',
|
|
23
30
|
icon: _jsx(Renew, {}),
|
|
24
31
|
onClick: () => props.reload(),
|
|
25
|
-
}, children:
|
|
26
|
-
props.docs.onClick();
|
|
27
|
-
}, target: '_blank', hideIcon: true }) })] })) }) }));
|
|
28
|
-
return component;
|
|
32
|
+
}, children: body }) }));
|
|
29
33
|
};
|
|
30
34
|
const HistoricChart = (props) => {
|
|
31
35
|
const designSystem = useC4DesignSystem();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Stack } from '../../../ui/index.js';
|
|
3
|
+
import { SECTION_SUBHEADING_STYLE } from '../../../utils/section-heading-style.js';
|
|
3
4
|
import { SettingsTile } from './settings-tile.js';
|
|
4
5
|
export const DangerZone = ({ deleteCluster, title, permissions, }) => {
|
|
5
|
-
const component = (_jsx(SettingsTile, { title: title, children: _jsx("div", { children: _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h4", { children: deleteCluster.title }), _jsx("p", { children: deleteCluster.description })] }), _jsx(Button, { onClick: deleteCluster.action.onClick, kind: 'danger', disabled: !permissions.mayDeleteCluster, size: 'md', children: deleteCluster.action.label })] }) }) }));
|
|
6
|
+
const component = (_jsx(SettingsTile, { title: title, children: _jsx("div", { children: _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h4", { style: SECTION_SUBHEADING_STYLE, children: deleteCluster.title }), _jsx("p", { children: deleteCluster.description })] }), _jsx(Button, { onClick: deleteCluster.action.onClick, kind: 'danger', disabled: !permissions.mayDeleteCluster, size: 'md', children: deleteCluster.action.label })] }) }) }));
|
|
6
7
|
return component;
|
|
7
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { PasswordInput } from '@carbon/react';
|
|
3
3
|
import { useEffect, useState } from 'react';
|
|
4
|
-
import { Checkbox, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
4
|
+
import { Checkbox, Form, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
5
5
|
import { C4InlineNotification } from '../../c4-inline-notification/c4-inline-notification.js';
|
|
6
6
|
// ponytail: English placeholder copy — final UX copy + lockout wording are a Product
|
|
7
7
|
// Design action item (design §1). Kept inline until it lands.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Stack, Tile } from '../../../ui/index.js';
|
|
3
|
+
import { SECTION_HEADING_STYLE } from '../../../utils/section-heading-style.js';
|
|
3
4
|
import { C4Divider } from '../../c4-divider/c4-divider.js';
|
|
4
5
|
export const SettingsTile = ({ description, title, children, }) => {
|
|
5
|
-
const component = (_jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h3", { children: title }), description && _jsx("p", { style: { maxWidth: '650px' }, children: description }), _jsx(C4Divider, {})] }), children] }) }));
|
|
6
|
+
const component = (_jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsxs(Stack, { gap: 4, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: title }), description && _jsx("p", { style: { maxWidth: '650px' }, children: description }), _jsx(C4Divider, {})] }), children] }) }));
|
|
6
7
|
return component;
|
|
7
8
|
};
|
|
@@ -4,9 +4,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { PasswordInput } from '@carbon/react';
|
|
8
8
|
import { forwardRef, useCallback, useImperativeHandle, useState, } from 'react';
|
|
9
|
-
import { Checkbox, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
9
|
+
import { Checkbox, Form, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
10
10
|
import { useRadioFamily } from '../../ui/families.js';
|
|
11
11
|
import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
|
|
12
12
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { C3ClusterTag, } from '@camunda/camunda-composite-components';
|
|
8
|
-
import { ClusterPlanTypeCategory, checkVersion, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
8
|
+
import { AUTHORIZATION_TOGGLE_MIN_VERSION, ClusterPlanTypeCategory, checkVersion, LINE_8_10_MIN_VERSION, TASKLIST_MODE_TOGGLE_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
9
9
|
import { ChoiceCard, ChoiceCardGroup, Input, Textarea, } from '@camunda/design-system';
|
|
10
10
|
import { Column, FormLabel, Grid, InlineLoading, Stack, TextArea, TextInput, } from '@carbon/react';
|
|
11
11
|
import { ChevronDown, ChevronUp, Code, DataBase } from '@carbon/react/icons/index.esm.js';
|
|
@@ -344,7 +344,7 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
|
|
|
344
344
|
return checkVersion({
|
|
345
345
|
possiblyVersionOrDockerPath: foundGeneration.version,
|
|
346
346
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
347
|
-
versionToCompareTo:
|
|
347
|
+
versionToCompareTo: AUTHORIZATION_TOGGLE_MIN_VERSION,
|
|
348
348
|
trueForSnapshot: true,
|
|
349
349
|
});
|
|
350
350
|
}
|
|
@@ -364,14 +364,14 @@ export const C4CreateCluster = ({ loading, cta, formElements, autoUpdate, taskli
|
|
|
364
364
|
return (checkVersion({
|
|
365
365
|
possiblyVersionOrDockerPath: foundGeneration.version,
|
|
366
366
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
367
|
-
versionToCompareTo:
|
|
367
|
+
versionToCompareTo: TASKLIST_MODE_TOGGLE_MIN_VERSION,
|
|
368
368
|
trueForSnapshot: 'compare',
|
|
369
369
|
trueOnInvalidVersion: false,
|
|
370
370
|
}) &&
|
|
371
371
|
checkVersion({
|
|
372
372
|
possiblyVersionOrDockerPath: foundGeneration.version,
|
|
373
373
|
operator: VersionCheckOperator.LessThan,
|
|
374
|
-
versionToCompareTo:
|
|
374
|
+
versionToCompareTo: LINE_8_10_MIN_VERSION,
|
|
375
375
|
trueForSnapshot: 'compare',
|
|
376
376
|
trueOnInvalidVersion: false,
|
|
377
377
|
}));
|
package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js
CHANGED
|
@@ -4,9 +4,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { Form } from '@carbon/react';
|
|
8
7
|
import { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from 'react';
|
|
9
|
-
import { Checkbox, Link, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
8
|
+
import { Checkbox, Form, Link, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
10
9
|
import { C4ClusterClientCredentialsModal } from '../c4-cluster-client-credentials/c4-cluster-client-credentials.js';
|
|
11
10
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
12
11
|
function safeTranslate(t, key, defaultValue, options) {
|
package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js
CHANGED
|
@@ -5,9 +5,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { SECRETS_MAX_LENGTH } from '@camunda/ccma-shared-types';
|
|
8
|
-
import {
|
|
8
|
+
import { PasswordInput } from '@carbon/react';
|
|
9
9
|
import { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from 'react';
|
|
10
|
-
import { Modal, Stack, TextInput } from '../../ui/index.js';
|
|
10
|
+
import { Form, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
11
11
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
12
12
|
function safeTranslate(t, key, defaultValue, options) {
|
|
13
13
|
if (!t)
|
package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js
CHANGED
|
@@ -4,9 +4,8 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { Form, FormGroup } from '@carbon/react';
|
|
8
7
|
import { forwardRef, useCallback, useImperativeHandle, useMemo, useState, } from 'react';
|
|
9
|
-
import { Checkbox, Link, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
8
|
+
import { Checkbox, Form, FormGroup, Link, Modal, Stack, TextInput, } from '../../ui/index.js';
|
|
10
9
|
import { C4ClusterClientCredentialsModal } from '../c4-cluster-client-credentials/c4-cluster-client-credentials.js';
|
|
11
10
|
function isApiClientNameValid(name) {
|
|
12
11
|
if (!name.trim()) {
|
|
@@ -5,9 +5,8 @@ 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 { normalizeCIDRList } from '@camunda/ccma-shared-types';
|
|
8
|
-
import { Form } from '@carbon/react';
|
|
9
8
|
import { forwardRef, useCallback, useImperativeHandle, useState, } from 'react';
|
|
10
|
-
import { Modal, Stack, TextInput } from '../../ui/index.js';
|
|
9
|
+
import { Form, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
11
10
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
12
11
|
// Helper function to ensure translations work
|
|
13
12
|
function safeTranslate(t, key, fallback) {
|
package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js
CHANGED
|
@@ -4,9 +4,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { Form } from '@carbon/react';
|
|
8
7
|
import { useCallback, useRef } from 'react';
|
|
9
|
-
import { Stack, TextInput } from '../../ui/index.js';
|
|
8
|
+
import { Form, Stack, TextInput } from '../../ui/index.js';
|
|
10
9
|
import { C4AsyncModal } from '../c4-async-modal/c4-async-modal.js';
|
|
11
10
|
function safeTranslate(t, key, defaultValue, options) {
|
|
12
11
|
if (!t)
|
|
@@ -34,6 +34,8 @@ export function C4HelpCenter({ open, onOpenChange, data, isLoading, helpLinks, o
|
|
|
34
34
|
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsx(DialogContent, { className: 'c4-ui flex flex-col gap-0 overflow-hidden overflow-y-hidden p-0', style: { maxWidth: 'min(900px, calc(100% - 2rem))', height: '80vh' }, children: showFullUI ? (_jsxs(_Fragment, { children: [_jsx(DialogHeader, { className: 'flex-shrink-0 border-b px-6 py-4', children: _jsx(DialogTitle, { children: "Help Center" }) }), _jsxs(Tabs, { orientation: 'vertical', value: effectiveActiveTabId, onValueChange: (id) => setActiveTabId(id), className: 'flex min-h-0 flex-1 flex-row overflow-hidden', children: [_jsxs("div", { className: 'flex w-52 flex-shrink-0 flex-col overflow-hidden border-r', children: [_jsx("p", { className: 'px-5 pb-2 pt-4 text-xs font-semibold uppercase text-neutral-foreground-subtle', children: "Topics" }), isLoading ? (_jsx("div", { className: 'flex flex-col gap-2 px-3', children: [1, 2, 3].map((i) => (_jsx("div", { className: 'h-8 animate-pulse rounded bg-neutral-background-strong' }, i))) })) : (_jsxs(TabsList, { variant: 'line', className: 'h-auto w-full flex-col items-start gap-1 rounded-none bg-transparent px-3', children: [tabs.map((tab) => (_jsx(TabsTrigger, { value: tab.id, className: 'w-full justify-start text-sm font-normal', children: tab.label }, tab.id))), hasFeedbackTab && tabs.length > 0 && (_jsx("div", { role: 'none', className: 'my-1 w-full px-2', children: _jsx("div", { className: 'h-px bg-border' }) })), hasFeedbackTab && (_jsxs(TabsTrigger, { value: FEEDBACK_TAB_ID, className: 'w-full justify-start gap-2 text-sm font-normal', children: [_jsx(MessageSquare, { className: 'size-4', "aria-hidden": true }), "Share your feedback"] }))] })), !isLoading && data?.links && data.links.length > 0 && (_jsx("div", { className: 'border-t px-3 py-2', children: data.links.map((link) => (_jsxs("a", { href: link.link, target: '_blank', rel: 'noopener noreferrer', className: 'flex items-center gap-1 px-2 py-1 text-xs text-neutral-foreground-subtle hover:underline', children: [link.label, _jsx(ExternalLink, { className: 'size-3', "aria-hidden": true })] }, link.id))) }))] }), isLoading ? (_jsx("div", { className: 'flex-1 p-6', children: _jsx("div", { className: 'grid grid-cols-2 gap-4', children: [1, 2, 3, 4].map((i) => (_jsx("div", { className: 'h-64 animate-pulse rounded-xl bg-neutral-background-strong' }, i))) }) })) : (_jsxs(ScrollArea, { className: 'flex-1', children: [tabs.map((tab) => (_jsx(TabsContent, { value: tab.id, className: 'mt-0 p-6', children: tab.tiles.length === 0 ? (_jsx("p", { className: 'text-sm text-neutral-foreground-subtle', children: "No content available." })) : (_jsx("div", { className: 'grid grid-cols-2 gap-4', children: tab.tiles.map((tile) => (_jsxs(Card, { className: 'flex flex-col', children: [tile.image && (_jsx("img", { src: tile.image, alt: '', className: 'h-32 w-full object-cover' })), _jsxs(CardHeader, { children: [_jsx(CardTitle, { className: 'text-sm', children: tile.title }), tile.timeToComplete && (_jsx(Badge, { variant: 'neutral', className: 'self-start text-xs', children: tile.timeToComplete }))] }), _jsx(CardContent, { className: 'flex-1', children: _jsx(CardDescription, { children: _jsx(ReactMarkdown, { components: {
|
|
35
35
|
p: ({ children }) => _jsx(_Fragment, { children: children }),
|
|
36
36
|
a: ({ children, href }) => (_jsx("a", { href: href, target: '_blank', rel: 'noopener noreferrer', children: children })),
|
|
37
|
-
}, children: tile.description }) }) }), tile.link && tile.cta && (_jsx(CardFooter, { children: _jsx(Button, { variant: 'secondary', size: 'sm', asChild: true, children: _jsxs("a", { href: tile.link, target: '_blank', rel: 'noopener noreferrer', children: [tile.cta, _jsx(ArrowRight, { className: 'ml-1 size-3', "aria-hidden": true })] }) }) }))] }, tile.card_id))) })) }, tab.id))), hasFeedbackTab && onSubmitFeedback && (_jsx(TabsContent, { value: FEEDBACK_TAB_ID, className: 'mt-0 p-6', children: _jsxs("div", { className: 'max-w-xl', children: [_jsx("p", { className: 'mb-4 text-sm text-neutral-foreground-subtle', children: "We actively use this information to fix problems and improve your experience with our products." }), _jsx(C4FeedbackForm, { onSubmit: onSubmitFeedback, isEnterprise: feedbackEnterprise, resetKey: open })] }) }))] }))] })] })) : (
|
|
37
|
+
}, children: tile.description }) }) }), tile.link && tile.cta && (_jsx(CardFooter, { children: _jsx(Button, { variant: 'secondary', size: 'sm', asChild: true, children: _jsxs("a", { href: tile.link, target: '_blank', rel: 'noopener noreferrer', children: [tile.cta, _jsx(ArrowRight, { className: 'ml-1 size-3', "aria-hidden": true })] }) }) }))] }, tile.card_id))) })) }, tab.id))), hasFeedbackTab && onSubmitFeedback && (_jsx(TabsContent, { value: FEEDBACK_TAB_ID, className: 'mt-0 p-6', children: _jsxs("div", { className: 'max-w-xl', children: [_jsx("p", { className: 'mb-4 text-sm text-neutral-foreground-subtle', children: "We actively use this information to fix problems and improve your experience with our products." }), _jsx(C4FeedbackForm, { onSubmit: onSubmitFeedback, isEnterprise: feedbackEnterprise, resetKey: open })] }) }))] }))] })] })) : (
|
|
38
|
+
/* Fallback: simple link list when no CMS data and no feedback tab */
|
|
39
|
+
_jsxs(_Fragment, { children: [_jsx(DialogHeader, { className: 'p-6', children: _jsx(DialogTitle, { children: "Help & support" }) }), _jsx("div", { className: 'flex flex-col gap-1 px-4', children: helpLinks &&
|
|
38
40
|
helpLinks.map((link) => (_jsx(Button, { variant: 'ghost', className: 'w-full justify-between', asChild: true, children: _jsxs("a", { href: link.href, target: '_blank', rel: 'noopener noreferrer', children: [link.label, _jsx(ExternalLink, { className: 'size-3.5 text-neutral-foreground-subtle', "aria-hidden": true })] }) }, link.key))) })] })) }) }));
|
|
39
41
|
}
|
|
@@ -4,8 +4,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { IconButton } from '@carbon/react';
|
|
8
7
|
import { Information } from '@carbon/react/icons/index.esm.js';
|
|
8
|
+
import { IconButton } from '../../ui/index.js';
|
|
9
9
|
export const C4InfoTooltip = ({ label, align, kind, renderIcon, }) => {
|
|
10
10
|
const config = {
|
|
11
11
|
label,
|
|
@@ -6,4 +6,4 @@ export interface ColorScale {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const CHART_HEIGHT = "20vh";
|
|
8
8
|
export declare const PIE_CHART_MAX_WIDTH_PX = 400;
|
|
9
|
-
export declare const C4JobDashboardDetailsPage: ({ jobType, config, isLoadingConfig, lastUpdatedAt, errorData, timeSeries, workerData, jobData, onTimeRangeChange, breadcrumb, translations, trackErrorClick, }: C4JobDashboardDetailsPageProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const C4JobDashboardDetailsPage: ({ jobType, config, isLoadingConfig, lastUpdatedAt, errorData, timeSeries, workerData, jobData, onTimeRangeChange, breadcrumb, translations, trackErrorClick, padding, }: C4JobDashboardDetailsPageProps) => import("react").JSX.Element;
|
|
@@ -44,7 +44,7 @@ const PieChartWrapper = styled(TileWithShadow) `
|
|
|
44
44
|
`;
|
|
45
45
|
export const CHART_HEIGHT = '20vh';
|
|
46
46
|
export const PIE_CHART_MAX_WIDTH_PX = 400;
|
|
47
|
-
export const C4JobDashboardDetailsPage = ({ jobType, config, isLoadingConfig, lastUpdatedAt, errorData, timeSeries, workerData, jobData, onTimeRangeChange, breadcrumb, translations, trackErrorClick, }) => {
|
|
47
|
+
export const C4JobDashboardDetailsPage = ({ jobType, config, isLoadingConfig, lastUpdatedAt, errorData, timeSeries, workerData, jobData, onTimeRangeChange, breadcrumb, translations, trackErrorClick, padding = 'default', }) => {
|
|
48
48
|
const colorScale = {
|
|
49
49
|
Created: '#002D9C',
|
|
50
50
|
Completed: '#009D9A',
|
|
@@ -55,5 +55,5 @@ export const C4JobDashboardDetailsPage = ({ jobType, config, isLoadingConfig, la
|
|
|
55
55
|
const error = { status: 403, details: 'Feature is disabled', message: '' };
|
|
56
56
|
return (_jsx(C4JobDashboardErrorHandler, { itemsLength: 0, showIcons: true, translations: translations.errorHandler, error: error }));
|
|
57
57
|
}
|
|
58
|
-
return (_jsx(C4PageLayout, { children: _jsxs(Stack, { gap: 4, children: [_jsx(C4Breadcrumb, { title: translations.title, elements: breadcrumb.elements }), _jsxs("p", { children: [translations.jobTypeLabel, " ", _jsx("strong", { children: jobType })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), jobData.isIncomplete && (_jsx(C4InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(ChartContainer, { children: _jsxs(ChartGrid, { children: [_jsx(TimeChartWrapper, { children: _jsx(C4JobDashboardTimeChart, { timeSeries: timeSeries.items, colorScale: colorScale, isLoading: timeSeries.isLoading, translations: translations, error: timeSeries.error }) }), _jsx(PieChartWrapper, { children: _jsx(C4JobDashboardPieChart, { jobData: jobData.data, colorScale: colorScale, isLoading: jobData.isLoading, translations: translations, error: jobData.error }) })] }) }), _jsx(TileWithShadow, { children: _jsx(C4JobDashboardWorkerTable, { workerData: workerData.items, isLoading: workerData.isLoading, translations: translations, error: workerData.error }) }), _jsx(TileWithShadow, { children: _jsx(C4JobDashboardErrorTable, { errors: errorData.items, operateBaseUrl: errorData.operateBaseUrl, isLoading: errorData.isLoading, translations: translations, error: errorData.error, trackErrorClick: trackErrorClick }) })] }) }));
|
|
58
|
+
return (_jsx(C4PageLayout, { padding: padding, children: _jsxs(Stack, { gap: 4, children: [_jsx(C4Breadcrumb, { title: translations.title, elements: breadcrumb.elements }), _jsxs("p", { children: [translations.jobTypeLabel, " ", _jsx("strong", { children: jobType })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), jobData.isIncomplete && (_jsx(C4InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(ChartContainer, { children: _jsxs(ChartGrid, { children: [_jsx(TimeChartWrapper, { children: _jsx(C4JobDashboardTimeChart, { timeSeries: timeSeries.items, colorScale: colorScale, isLoading: timeSeries.isLoading, translations: translations, error: timeSeries.error }) }), _jsx(PieChartWrapper, { children: _jsx(C4JobDashboardPieChart, { jobData: jobData.data, colorScale: colorScale, isLoading: jobData.isLoading, translations: translations, error: jobData.error }) })] }) }), _jsx(TileWithShadow, { children: _jsx(C4JobDashboardWorkerTable, { workerData: workerData.items, isLoading: workerData.isLoading, translations: translations, error: workerData.error }) }), _jsx(TileWithShadow, { children: _jsx(C4JobDashboardErrorTable, { errors: errorData.items, operateBaseUrl: errorData.operateBaseUrl, isLoading: errorData.isLoading, translations: translations, error: errorData.error, trackErrorClick: trackErrorClick }) })] }) }));
|
|
59
59
|
};
|
package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts
CHANGED
|
@@ -100,4 +100,14 @@ export interface C4JobDashboardDetailsPageProps {
|
|
|
100
100
|
onTimeRangeChange: (value: number) => void;
|
|
101
101
|
breadcrumb: C4BreadcrumbProps;
|
|
102
102
|
translations: JobDashboardDetailsTranslations;
|
|
103
|
+
/**
|
|
104
|
+
* Side/top/bottom padding around the page content. Defaults to `'default'`.
|
|
105
|
+
*
|
|
106
|
+
* `'none'` drops it — for a widget embedded inside a host page's own tab (see
|
|
107
|
+
* `C4JobWorkerDetailsPage`'s `scope: 'environment'`), where the host already
|
|
108
|
+
* provides its own spacing and this padding would double up.
|
|
109
|
+
*
|
|
110
|
+
* ds-mode only.
|
|
111
|
+
*/
|
|
112
|
+
padding?: 'default' | 'none';
|
|
103
113
|
}
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js
CHANGED
|
@@ -7,12 +7,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import { Information } from '@carbon/react/icons/index.esm.js';
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import { Tooltip } from '../../../ui/index.js';
|
|
10
|
+
import { SECTION_HEADING_STYLE } from '../../../utils/section-heading-style.js';
|
|
10
11
|
const Wrapper = styled.div `
|
|
11
12
|
display: flex;
|
|
12
13
|
align-items: center;
|
|
13
14
|
gap: 0.5rem;
|
|
14
15
|
`;
|
|
15
16
|
const C4JobDashboardChartHeading = ({ title, tooltipLabel, }) => {
|
|
16
|
-
return (_jsxs(Wrapper, { children: [_jsx("h4", { children: title }), _jsx(Tooltip, { align: 'bottom', label: tooltipLabel, children: _jsx(Information, { size: 18 }) })] }));
|
|
17
|
+
return (_jsxs(Wrapper, { children: [_jsx("h4", { style: SECTION_HEADING_STYLE, children: title }), _jsx(Tooltip, { align: 'bottom', label: tooltipLabel, children: _jsx(Information, { size: 18 }) })] }));
|
|
17
18
|
};
|
|
18
19
|
export default C4JobDashboardChartHeading;
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Stack } from '../../../ui/index.js';
|
|
3
|
+
import { SECTION_HEADING_STYLE } from '../../../utils/section-heading-style.js';
|
|
3
4
|
import { C4DataTable } from '../../c4-data-table/c4-data-table.js';
|
|
4
5
|
import { C4BackgroundFetchingIndicator } from '../../c4-job-dashboard-shared/c4-background-fetching-indicator.js';
|
|
5
6
|
import { C4JobDashboardErrorHandler } from '../../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
|
|
@@ -13,7 +14,7 @@ function C4JobDashboardErrorTable({ errors, operateBaseUrl, isLoading, translati
|
|
|
13
14
|
originalIndex: index,
|
|
14
15
|
}));
|
|
15
16
|
if (error || (!isLoading && errors.length === 0)) {
|
|
16
|
-
return (_jsxs(Stack, { gap: 4, children: [_jsx("h2", { children: translations.errorTable.title }), _jsx(C4JobDashboardErrorHandler, { itemsLength: errors.length, showIcons: false, error: error, translations: translations.errorHandler })] }));
|
|
17
|
+
return (_jsxs(Stack, { gap: 4, children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: translations.errorTable.title }), _jsx(C4JobDashboardErrorHandler, { itemsLength: errors.length, showIcons: false, error: error, translations: translations.errorHandler })] }));
|
|
17
18
|
}
|
|
18
19
|
const toolbar = [
|
|
19
20
|
{
|
|
@@ -42,7 +43,7 @@ function C4JobDashboardErrorTable({ errors, operateBaseUrl, isLoading, translati
|
|
|
42
43
|
},
|
|
43
44
|
]
|
|
44
45
|
: [];
|
|
45
|
-
return (_jsxs(_Fragment, { children: [_jsx("h2", { children: translations.errorTable.title }), _jsx(C4DataTable, { id: 'errors-data-table', data: rows, headers: [
|
|
46
|
+
return (_jsxs(_Fragment, { children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: translations.errorTable.title }), _jsx(C4DataTable, { id: 'errors-data-table', data: rows, headers: [
|
|
46
47
|
{
|
|
47
48
|
key: 'errorCode',
|
|
48
49
|
label: noWrapLabel(translations.errorTable.headers.errorType),
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js
CHANGED
|
@@ -5,6 +5,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
7
|
import { Stack } from '../../../ui/index.js';
|
|
8
|
+
import { SECTION_HEADING_STYLE } from '../../../utils/section-heading-style.js';
|
|
8
9
|
import { C4DataTable } from '../../c4-data-table/c4-data-table.js';
|
|
9
10
|
import { C4BackgroundFetchingIndicator } from '../../c4-job-dashboard-shared/c4-background-fetching-indicator.js';
|
|
10
11
|
import { C4JobDashboardErrorHandler } from '../../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
|
|
@@ -19,9 +20,9 @@ function C4JobDashboardWorkerTable({ workerData, error, isLoading, translations,
|
|
|
19
20
|
originalIndex: index,
|
|
20
21
|
}));
|
|
21
22
|
if (error || (!isLoading && workerData.length === 0)) {
|
|
22
|
-
return (_jsxs(_Fragment, { children: [_jsx("h2", { children: translations.workerTable.title }), _jsx(C4JobDashboardErrorHandler, { itemsLength: workerData.length, showIcons: false, error: error, translations: translations.errorHandler })] }));
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: translations.workerTable.title }), _jsx(C4JobDashboardErrorHandler, { itemsLength: workerData.length, showIcons: false, error: error, translations: translations.errorHandler })] }));
|
|
23
24
|
}
|
|
24
|
-
return (_jsxs(Stack, { gap: 4, children: [_jsx("h2", { children: translations.workerTable.title }), _jsx(C4DataTable, { id: 'worker-data-table', data: tableData, headers: [
|
|
25
|
+
return (_jsxs(Stack, { gap: 4, children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: translations.workerTable.title }), _jsx(C4DataTable, { id: 'worker-data-table', data: tableData, headers: [
|
|
25
26
|
{ key: 'worker', label: translations.workerTable.headers.workerName },
|
|
26
27
|
{
|
|
27
28
|
key: 'completed',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { C4JobDashboardEntryPointProps } from './c4-job-dashboard-entry-point.types.js';
|
|
3
|
-
declare function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translations, }: C4JobDashboardEntryPointProps): JSX.Element;
|
|
3
|
+
declare function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translations, variant, }: C4JobDashboardEntryPointProps): JSX.Element;
|
|
4
4
|
export default C4JobDashboardEntryPoint;
|
|
@@ -8,6 +8,7 @@ import { Layer } from '@carbon/react';
|
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import { JobsCompletedIcon, JobsCreatedIcon, JobsFailedIcon, } from '../../icons/c4-icons.js';
|
|
10
10
|
import { Button, Loading, Stack, Tile, Tooltip } from '../../ui/index.js';
|
|
11
|
+
import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
|
|
11
12
|
import { C4JobDashboardErrorHandler } from '../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
|
|
12
13
|
import C4TimestampInformation from '../c4-job-dashboard-shared/c4-timestamp-information.js';
|
|
13
14
|
const containerHeight = '30vh';
|
|
@@ -40,7 +41,7 @@ const JobTilesGrid = styled.div `
|
|
|
40
41
|
}
|
|
41
42
|
`;
|
|
42
43
|
const JobTile = ({ title, description, icon, tooltip, }) => (_jsx(Tooltip, { align: 'top', label: tooltip, children: _jsx("div", { children: _jsx(Layer, { children: _jsxs(Tile, { children: [_jsxs(TileHeader, { children: [_jsx("h6", { children: title }), icon] }), _jsx(TileDescription, { children: description })] }) }) }) }));
|
|
43
|
-
function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translations, }) {
|
|
44
|
+
function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translations, variant = 'tile', }) {
|
|
44
45
|
const hasError = !!error;
|
|
45
46
|
const shouldShowEmpty = !hasError &&
|
|
46
47
|
(!data ||
|
|
@@ -48,6 +49,10 @@ function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translation
|
|
|
48
49
|
data.failed.count === 0 &&
|
|
49
50
|
data.completed.count === 0));
|
|
50
51
|
const getTileDescription = (count) => `${count ?? 0} ${count === 1 ? translations.jobTileSingular.toLowerCase() : translations.jobTilePlural.toLowerCase()}`;
|
|
51
|
-
|
|
52
|
+
const content = (_jsxs(Stack, { gap: 4, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: translations.title }), _jsx("p", { children: translations.description }), isLoading ? (_jsx(LoadingContainer, { children: _jsx(Loading, { withOverlay: false }) })) : hasError || shouldShowEmpty ? (_jsx(Container, { children: _jsxs(Stack, { gap: 4, children: [_jsx(C4JobDashboardErrorHandler, { itemsLength: shouldShowEmpty ? 0 : 1, error: hasError ? error : null, showIcons: true, translations: translations.errorHandler }), shouldShowEmpty && (_jsx(Button, { onClick: onClick, children: translations.viewAllJobTypes }))] }) })) : (_jsx(Container, { children: _jsxs(Stack, { gap: 4, children: [_jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: data?.lastUpdatedAt ?? '' }), _jsx(JobTilesContainer, { children: _jsxs(JobTilesGrid, { children: [_jsx(JobTile, { title: translations.jobTileCompleted, description: getTileDescription(data?.completed.count), icon: _jsx(JobsCompletedIcon, {}), tooltip: translations.jobTileCompletedTooltip }), _jsx(JobTile, { title: translations.jobTileFailed, description: getTileDescription(data?.failed.count), icon: _jsx(JobsFailedIcon, {}), tooltip: translations.jobTileFailedTooltip }), _jsx(JobTile, { title: translations.jobTileCreated, description: getTileDescription(data?.created.count), icon: _jsx(JobsCreatedIcon, {}), tooltip: translations.jobTileCreatedTooltip })] }) }), _jsx(Button, { onClick: onClick, children: translations.viewAllJobTypes })] }) }))] }));
|
|
53
|
+
// The empty/error state's own Tile (inside C4JobDashboardErrorHandler) and the populated state's
|
|
54
|
+
// job-count tiles are content under the heading, not this section's own chrome — both stay boxed
|
|
55
|
+
// in either variant. Only this outer card goes away in 'plain'.
|
|
56
|
+
return variant === 'plain' ? content : _jsx(Tile, { children: content });
|
|
52
57
|
}
|
|
53
58
|
export default C4JobDashboardEntryPoint;
|
package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts
CHANGED
|
@@ -21,4 +21,12 @@ export interface C4JobDashboardEntryPointProps {
|
|
|
21
21
|
onClick: () => void;
|
|
22
22
|
translations: JobDashboardTranslations;
|
|
23
23
|
isLoading?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* `'tile'` (default) renders this section inside its own bordered card — Console's own look.
|
|
26
|
+
* `'plain'` drops that card in favor of a bare heading, for a host that renders this section inline
|
|
27
|
+
* alongside its own similarly bare sections. The empty/error states' own `Tile` (from
|
|
28
|
+
* `C4JobDashboardErrorHandler`) is unaffected either way — it's content under the heading, not the
|
|
29
|
+
* section's own chrome.
|
|
30
|
+
*/
|
|
31
|
+
variant?: 'tile' | 'plain';
|
|
24
32
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import type { C4JobDashboardOverviewPageProps } from './c4-job-dashboard-overview.types.js';
|
|
3
|
-
export declare const C4JobDashboardOverviewPage: ({ error, items, isIncomplete, config, onTimeRangeChange, breadcrumb, isLoadingConfig, isLoadingTable, translations, lastUpdatedAt, }: C4JobDashboardOverviewPageProps) => JSX.Element;
|
|
3
|
+
export declare const C4JobDashboardOverviewPage: ({ error, items, isIncomplete, config, onTimeRangeChange, breadcrumb, isLoadingConfig, isLoadingTable, translations, lastUpdatedAt, padding, }: C4JobDashboardOverviewPageProps) => JSX.Element;
|
|
@@ -13,7 +13,7 @@ import C4JobDashboardTimeRangeDropdown from '../c4-job-dashboard-shared/c4-job-d
|
|
|
13
13
|
import C4TimestampInformation from '../c4-job-dashboard-shared/c4-timestamp-information.js';
|
|
14
14
|
import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
|
|
15
15
|
import { C4PageLayout } from '../c4-page-layout/c4-page-layout.js';
|
|
16
|
-
export const C4JobDashboardOverviewPage = ({ error, items, isIncomplete, config, onTimeRangeChange, breadcrumb, isLoadingConfig, isLoadingTable, translations, lastUpdatedAt, }) => {
|
|
16
|
+
export const C4JobDashboardOverviewPage = ({ error, items, isIncomplete, config, onTimeRangeChange, breadcrumb, isLoadingConfig, isLoadingTable, translations, lastUpdatedAt, padding = 'default', }) => {
|
|
17
17
|
const [rows, setRows] = useState([]);
|
|
18
18
|
useEffect(() => {
|
|
19
19
|
const originalRows = items.map((row, index) => ({
|
|
@@ -51,7 +51,7 @@ export const C4JobDashboardOverviewPage = ({ error, items, isIncomplete, config,
|
|
|
51
51
|
};
|
|
52
52
|
return (_jsx(C4JobDashboardErrorHandler, { itemsLength: 0, showIcons: true, translations: translations.errorHandler, error: error }));
|
|
53
53
|
}
|
|
54
|
-
return (_jsx(C4PageLayout, { children: _jsxs(Stack, { gap: 3, children: [_jsx(C4Breadcrumb, { loading: false, elements: breadcrumb.elements, title: translations.title }), _jsxs("p", { children: [translations.description, ' ', _jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.jobWorker, '_blank', 'noopener,noreferrer'), label: translations.learnMoreLabel, icon: _jsx(Launch, {}) })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), shouldShowErrorHandler ? (_jsx(C4JobDashboardErrorHandler, { error: error, itemsLength: items.length, showIcons: true, translations: translations.errorHandler })) : (_jsxs(_Fragment, { children: [isIncomplete && (_jsx(C4InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(C4DataTable, { id: 'usage-history-table', data: rows, toolbar: toolbar, headers: [
|
|
54
|
+
return (_jsx(C4PageLayout, { padding: padding, children: _jsxs(Stack, { gap: 3, children: [_jsx(C4Breadcrumb, { loading: false, elements: breadcrumb.elements, title: translations.title }), _jsxs("p", { children: [translations.description, ' ', _jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.jobWorker, '_blank', 'noopener,noreferrer'), label: translations.learnMoreLabel, icon: _jsx(Launch, {}) })] }), _jsx(C4TimestampInformation, { description: translations.lastUpdated, lastUpdatedAt: lastUpdatedAt }), _jsx(C4JobDashboardTimeRangeDropdown, { onChange: onTimeRangeChange, exportInterval: config?.exportInterval, disabled: isLoadingConfig, translations: translations.dropdown }), shouldShowErrorHandler ? (_jsx(C4JobDashboardErrorHandler, { error: error, itemsLength: items.length, showIcons: true, translations: translations.errorHandler })) : (_jsxs(_Fragment, { children: [isIncomplete && (_jsx(C4InlineNotification, { style: { maxWidth: '100%' }, lowContrast: true, kind: 'warning', title: translations.dataLimitWarning.title, subtitle: translations.dataLimitWarning.description })), _jsx(C4DataTable, { id: 'usage-history-table', data: rows, toolbar: toolbar, headers: [
|
|
55
55
|
{
|
|
56
56
|
key: 'jobType',
|
|
57
57
|
label: translations.tableHeaders.jobType,
|
package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts
CHANGED
|
@@ -43,4 +43,14 @@ export interface C4JobDashboardOverviewPageProps {
|
|
|
43
43
|
isLoadingConfig: boolean;
|
|
44
44
|
isLoadingTable: boolean;
|
|
45
45
|
translations: JobDashboardOverviewTranslations;
|
|
46
|
+
/**
|
|
47
|
+
* Side/top/bottom padding around the page content. Defaults to `'default'`.
|
|
48
|
+
*
|
|
49
|
+
* `'none'` drops it — for a widget embedded inside a host page's own tab (see
|
|
50
|
+
* `C4JobWorkerOverviewPage`'s `scope: 'environment'`), where the host already
|
|
51
|
+
* provides its own spacing and this padding would double up.
|
|
52
|
+
*
|
|
53
|
+
* ds-mode only.
|
|
54
|
+
*/
|
|
55
|
+
padding?: 'default' | 'none';
|
|
46
56
|
}
|
|
@@ -9,6 +9,7 @@ import styled from 'styled-components';
|
|
|
9
9
|
import { C4_EXTERNAL_URLS } from '../../externalUrls.const.js';
|
|
10
10
|
import { AccessRestrictedIcon, EmptyJobsIcon, ErrorIcon, } from '../../icons/c4-icons.js';
|
|
11
11
|
import { Tile } from '../../ui/index.js';
|
|
12
|
+
import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
|
|
12
13
|
import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
|
|
13
14
|
const Row = styled.div `
|
|
14
15
|
display: flex;
|
|
@@ -43,10 +44,10 @@ export const C4JobDashboardErrorHandler = ({ error, showIcons, itemsLength, tran
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
return (_jsx("div", { style: { width: '100%', margin: '1rem 0' }, children: _jsx(Tile, { children: _jsxs(Row, { children: [showIcons &&
|
|
46
|
-
(isAccessRestricted ? (_jsx(AccessRestrictedIcon, { size: 70 })) : (_jsx(ErrorIcon, { size: 80 }))), _jsxs("div", { children: [_jsx("h3", { children: title }), _jsx(Description, { children: description }), isAccessRestricted && (_jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.roles, '_blank', 'noopener,noreferrer'), label: translations.forbidden.learnMoreLabel, icon: _jsx(Launch, {}) }))] })] }) }) }));
|
|
47
|
+
(isAccessRestricted ? (_jsx(AccessRestrictedIcon, { size: 70 })) : (_jsx(ErrorIcon, { size: 80 }))), _jsxs("div", { children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: title }), _jsx(Description, { children: description }), isAccessRestricted && (_jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.roles, '_blank', 'noopener,noreferrer'), label: translations.forbidden.learnMoreLabel, icon: _jsx(Launch, {}) }))] })] }) }) }));
|
|
47
48
|
}
|
|
48
49
|
if (itemsLength === 0) {
|
|
49
|
-
return (_jsx(Tile, { children: _jsxs(Row, { children: [showIcons && _jsx(EmptyJobsIcon, { size: 84 }), _jsxs("div", { children: [_jsx("h2", { children: translations.empty.title }), _jsx(Description, { children: translations.empty.description }), _jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.jobWorker, '_blank', 'noopener,noreferrer'), label: translations.empty.learnMoreLabel, icon: _jsx(Launch, { color: 'currentColor', size: 16 }) })] })] }) }));
|
|
50
|
+
return (_jsx(Tile, { children: _jsxs(Row, { children: [showIcons && _jsx(EmptyJobsIcon, { size: 84 }), _jsxs("div", { children: [_jsx("h2", { style: SECTION_HEADING_STYLE, children: translations.empty.title }), _jsx(Description, { children: translations.empty.description }), _jsx(C4LinkButton, { onClick: () => window.open(C4_EXTERNAL_URLS.docs.jobDashboard.jobWorker, '_blank', 'noopener,noreferrer'), label: translations.empty.learnMoreLabel, icon: _jsx(Launch, { color: 'currentColor', size: 16 }) })] })] }) }));
|
|
50
51
|
}
|
|
51
52
|
return _jsx(_Fragment, {});
|
|
52
53
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { C4LinkButtonProps } from './c4-link-button.types.js';
|
|
3
|
-
export declare const C4LinkButton: ({ label, onClick, style, inline, icon, disabled, }: C4LinkButtonProps) => JSX.Element;
|
|
3
|
+
export declare const C4LinkButton: ({ label, onClick, style, inline, icon, disabled, ariaLabel, }: C4LinkButtonProps) => JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Link } from '../../ui/index.js';
|
|
3
|
-
export const C4LinkButton = ({ label, onClick, style, inline, icon, disabled, }) => {
|
|
3
|
+
export const C4LinkButton = ({ label, onClick, style, inline, icon, disabled, ariaLabel, }) => {
|
|
4
4
|
if (disabled === undefined) {
|
|
5
5
|
disabled = false;
|
|
6
6
|
}
|
|
7
7
|
const customStyle = style ? style : {};
|
|
8
|
-
const component = (_jsxs(Link, { onClick: () => !disabled && onClick(), inline: inline, style: { cursor: 'pointer', ...customStyle }, disabled: disabled, children: [label, icon && (_jsx("span", { style: {
|
|
8
|
+
const component = (_jsxs(Link, { onClick: () => !disabled && onClick(), inline: inline, style: { cursor: 'pointer', ...customStyle }, disabled: disabled, "aria-label": ariaLabel ?? (label || undefined), children: [label, icon && (_jsx("span", { style: {
|
|
9
9
|
marginLeft: '0.5rem',
|
|
10
10
|
verticalAlign: 'sub',
|
|
11
11
|
}, children: icon }))] }));
|
|
@@ -5,4 +5,10 @@ export interface C4LinkButtonProps {
|
|
|
5
5
|
inline?: boolean;
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Accessible name for icon-only buttons (empty `label`). A screen reader
|
|
10
|
+
* has nothing else to announce when `label` is `''`, so an icon-only
|
|
11
|
+
* `C4LinkButton` must pass this.
|
|
12
|
+
*/
|
|
13
|
+
ariaLabel?: string;
|
|
8
14
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ListItem, UnorderedList } from '@carbon/react';
|
|
3
2
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
4
|
-
import { CodeSnippet, Stack } from '../../ui/index.js';
|
|
3
|
+
import { CodeSnippet, ListItem, Stack, UnorderedList } from '../../ui/index.js';
|
|
5
4
|
import { C4DataTable } from '../c4-data-table/c4-data-table.js';
|
|
6
5
|
import { C4DataTableSkeleton } from '../c4-data-table/c4-data-table-skeleton.js';
|
|
7
6
|
import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
|
|
@@ -192,7 +191,13 @@ export const C4ManagementApi = ({ clients, loading, showIpWhitelistColumn, showH
|
|
|
192
191
|
});
|
|
193
192
|
}
|
|
194
193
|
const expandedRow = () => {
|
|
195
|
-
return (
|
|
194
|
+
return (
|
|
195
|
+
// Force the primary text token: the ds DataTable's expansion region is
|
|
196
|
+
// styled by the design system, and the Carbon list text would otherwise
|
|
197
|
+
// inherit a colour that is too dark in ds dark mode. `--cds-text-primary`
|
|
198
|
+
// is the normal primary text in carbon and is remapped to the DS
|
|
199
|
+
// foreground (light in dark) under html.c4-ds.
|
|
200
|
+
_jsxs(UnorderedList, { style: { color: 'var(--cds-text-primary)' }, children: [_jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedClientSecret, ": ", text.expandedClientSecretNotVisible] }), _jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedApiUrl, ":", ' ', _jsx(CodeSnippet, { type: 'inline', feedback: text.urlCopiedFeedback, children: urls.apiUrl })] }), _jsxs(ListItem, { style: { minHeight: '30px' }, children: [text.expandedOauthUrl, ":", ' ', _jsx(CodeSnippet, { type: 'inline', feedback: text.urlCopiedFeedback, children: urls.oauthUrl })] })] }));
|
|
196
201
|
};
|
|
197
202
|
const component = (_jsxs(Stack, { gap: 3, children: [_jsx("div", { style: { display: 'flex', flexDirection: 'column', overflowX: 'auto' }, children: _jsx(C4DataTable, { headers: headerData, data: clients.map((item) => {
|
|
198
203
|
return { ...item, expansion: expandedRow() };
|
|
@@ -2,10 +2,22 @@ import type { C4BreadcrumbProps } from '../c4-breadcrumb/c4-breadcrumb.types.js'
|
|
|
2
2
|
import type { C4TabsProps } from '../c4-tabs/c4-tabs.types.js';
|
|
3
3
|
type C4PageProps = {
|
|
4
4
|
loading?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Side/top/bottom padding around the page content. Defaults to `'default'`.
|
|
7
|
+
*
|
|
8
|
+
* `'none'` drops it — for a widget embedded inside a host page's own tab (see
|
|
9
|
+
* each widget's `scope: 'environment'`), where the host already provides its
|
|
10
|
+
* own spacing and the widget's padding would double up.
|
|
11
|
+
*
|
|
12
|
+
* ds-mode only: the Carbon branch is a `Grid` that already has no side
|
|
13
|
+
* padding, so this has no Carbon equivalent and is not forwarded there.
|
|
14
|
+
*/
|
|
15
|
+
padding?: 'default' | 'none';
|
|
5
16
|
header?: {
|
|
6
17
|
title?: string;
|
|
7
18
|
tag?: string;
|
|
8
19
|
indicator?: React.ReactNode;
|
|
20
|
+
subtitleBadges?: C4BreadcrumbProps['subtitleBadges'];
|
|
9
21
|
menuItems?: C4BreadcrumbProps['menu'];
|
|
10
22
|
codeSnippet?: C4BreadcrumbProps['codeSnippet'];
|
|
11
23
|
};
|
|
@@ -31,5 +43,5 @@ type C4PageProps = {
|
|
|
31
43
|
});
|
|
32
44
|
children?: React.ReactNode;
|
|
33
45
|
};
|
|
34
|
-
declare const C4PageTemplate: ({ header, tabs, banner, children, loading, breadcrumbs, }: C4PageProps) => import("react").JSX.Element;
|
|
46
|
+
declare const C4PageTemplate: ({ header, tabs, banner, children, loading, breadcrumbs, padding, }: C4PageProps) => import("react").JSX.Element;
|
|
35
47
|
export { C4PageTemplate };
|
|
@@ -14,14 +14,14 @@ import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notifi
|
|
|
14
14
|
import { C4Tabs } from '../c4-tabs/c4-tabs.js';
|
|
15
15
|
const gridStyles = { paddingRight: 0, paddingLeft: 0 };
|
|
16
16
|
const gridColumnStyles = { marginInline: 0 };
|
|
17
|
-
const C4PageTemplate = ({ header, tabs, banner, children, loading = false, breadcrumbs = { elements: [] }, }) => {
|
|
17
|
+
const C4PageTemplate = ({ header, tabs, banner, children, loading = false, breadcrumbs = { elements: [] }, padding = 'default', }) => {
|
|
18
18
|
const designSystem = useC4DesignSystem();
|
|
19
|
-
const inner = (_jsxs("div", { style: { display: 'flex', gap: '2rem', flexDirection: 'column' }, children: [(breadcrumbs.elements?.length || header) && (_jsx(C4Breadcrumb, { ...breadcrumbs, title: header?.title, menu: header?.menuItems, tag: header?.tag, indicator: header?.indicator, loading: loading, codeSnippet: header?.codeSnippet })), banner &&
|
|
19
|
+
const inner = (_jsxs("div", { style: { display: 'flex', gap: '2rem', flexDirection: 'column' }, children: [(breadcrumbs.elements?.length || header) && (_jsx(C4Breadcrumb, { ...breadcrumbs, title: header?.title, menu: header?.menuItems, tag: header?.tag, indicator: header?.indicator, subtitleBadges: header?.subtitleBadges, loading: loading, codeSnippet: header?.codeSnippet })), banner &&
|
|
20
20
|
(banner.action ? (_jsx(C4ActionableNotification, { appearance: 'banner', kind: banner.kind, title: banner.title, subtitle: banner.subtitle, actionButtonLabel: banner.action.label, onActionButtonClick: banner.action.onClick, lowContrast: true })) : (_jsx(C4InlineNotification, { kind: banner.kind, hideCloseButton: !banner.onDismiss, onCloseButtonClick: banner.onDismiss, title: banner.title, subtitle: banner.subtitle, lowContrast: true }))), tabs && (_jsx(Stack, { orientation: 'vertical', gap: 5, children: _jsx(C4Tabs, { tabs: tabs.list, desiredTabId: tabs?.desiredTabId, onTabChange: tabs?.onChange, loading: loading }) })), children] }));
|
|
21
21
|
// ds: the DS page container (padding + max width). carbon: the original
|
|
22
22
|
// Carbon grid. The inner header/tabs already switch via their own families.
|
|
23
23
|
if (designSystem === 'ds') {
|
|
24
|
-
return _jsx(PageLayout, { children: inner });
|
|
24
|
+
return _jsx(PageLayout, { padding: padding, children: inner });
|
|
25
25
|
}
|
|
26
26
|
return (_jsx(Grid, { style: gridStyles, children: _jsx(Column, { span: '100%', style: gridColumnStyles, children: inner }) }));
|
|
27
27
|
};
|
|
@@ -4,8 +4,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import { DefinitionTooltip } from '@carbon/react';
|
|
8
7
|
import { CheckmarkFilled, WarningFilled } from '@carbon/react/icons/index.esm.js';
|
|
8
|
+
import { DefinitionTooltip } from '../../ui/index.js';
|
|
9
9
|
import { StatusColor, } from '../c4-cluster-overview/applications.js';
|
|
10
10
|
import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
|
|
11
11
|
export const HealthStatus = (props) => {
|
|
@@ -38,4 +38,4 @@ export interface UsageHistoryChartsProps {
|
|
|
38
38
|
tenants?: LineChartConfig;
|
|
39
39
|
}
|
|
40
40
|
export declare const UsageHistoryCharts: ({ pi, di, tu, tenants, }: UsageHistoryChartsProps) => JSX.Element;
|
|
41
|
-
export declare const ValueMetricsLineChart: import("react").
|
|
41
|
+
export declare const ValueMetricsLineChart: import("react").NamedExoticComponent<LineChartConfig>;
|