@camunda/ccma-saas-frontend 0.16.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/c4-audit-log/c4-audit-log.js +53 -42
- package/lib/esm/components/c4-billing-page/c4-billing-page.js +5 -1
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +8 -3
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.d.ts +10 -0
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +9 -1
- package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +13 -5
- package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.d.ts +14 -0
- package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.js +18 -0
- package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +18 -7
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +2 -2
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +16 -0
- package/lib/esm/components/c4-cluster-overview/applications.js +39 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +5 -2
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +8 -5
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +10 -2
- package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +4 -3
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +16 -13
- package/lib/esm/components/c4-cluster-overview/ds-section.d.ts +23 -0
- package/lib/esm/components/c4-cluster-overview/ds-section.js +19 -0
- package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.js +1 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +7 -1
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.d.ts +6 -1
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +5 -2
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +3 -5
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.types.d.ts +3 -2
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +40 -15
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +24 -4
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +12 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +2 -1
- package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.d.ts +11 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.js +16 -0
- package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +4 -1
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +6 -2
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.types.d.ts +6 -0
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +1 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +13 -6
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +24 -5
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +4 -4
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +1 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +3 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.d.ts +7 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +8 -4
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +6 -1
- package/lib/esm/components/c4-management-settings/c4-management-settings.js +58 -42
- package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -0
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +11 -10
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +4 -0
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +9 -1
- package/lib/esm/components/c4-tabs/c4-tabs.js +6 -1
- package/lib/esm/externalUrls.const.d.ts +1 -1
- package/lib/esm/externalUrls.const.js +1 -2
- package/lib/esm/i18n/en/modals/billing.json +2 -2
- package/lib/esm/i18n/en/modals/clusterclients.json +6 -6
- package/lib/esm/i18n/en/modals/invitations.json +1 -0
- package/lib/esm/i18n/en/modals/users.json +1 -0
- package/lib/esm/i18n/en/pages/clusterdetails.json +4 -1
- package/lib/esm/i18n/en/pages/createcluster.json +5 -0
- package/lib/esm/i18n/en/pages/dashboard.json +7 -5
- package/lib/esm/i18n/en/pages/orgmanagement.json +4 -0
- package/lib/esm/ui/ds-compact-code-block.d.ts +15 -0
- package/lib/esm/ui/ds-compact-code-block.js +33 -0
- package/lib/esm/ui/index.d.ts +13 -3
- package/lib/esm/ui/index.js +6 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +21 -3
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +4 -2
- 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 +29 -9
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +5 -0
- package/lib/esm/widgets/cluster-details/cluster-region-code.d.ts +8 -0
- package/lib/esm/widgets/cluster-details/cluster-region-code.js +17 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +44 -6
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +6 -4
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +7 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +20 -8
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +11 -10
- package/lib/esm/widgets/cluster-details/upgrade-gate.d.ts +23 -0
- package/lib/esm/widgets/cluster-details/upgrade-gate.js +36 -0
- package/lib/esm/widgets/cluster-details/use-upgrade-gate.d.ts +24 -0
- package/lib/esm/widgets/cluster-details/use-upgrade-gate.js +73 -0
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +3 -0
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +38 -1
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +7 -5
- package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +3 -3
- package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
- package/lib/esm/widgets/group-details/c4-group-details-page.js +10 -3
- package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +5 -0
- package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
- package/lib/esm/widgets/management/c4-management-app.js +16 -4
- package/lib/esm/widgets/management/c4-management-app.types.d.ts +6 -0
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.d.ts +3 -1
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +2 -2
- package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -2
- package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +5 -0
- package/package.json +9 -9
- package/lib/esm/widgets/management/tabs/c4-management-groups-tab.d.ts +0 -13
- package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +0 -26
package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js
CHANGED
|
@@ -51,7 +51,7 @@ export const defaultDetailsProps = {
|
|
|
51
51
|
onTimeRangeChange: () => { },
|
|
52
52
|
translations: {
|
|
53
53
|
title: 'Job type details',
|
|
54
|
-
lastUpdated: 'Last updated
|
|
54
|
+
lastUpdated: 'Last updated',
|
|
55
55
|
jobTypeLabel: 'Job type:',
|
|
56
56
|
backgroundFetching: 'Loading more data...',
|
|
57
57
|
dataLimitWarning: {
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js
CHANGED
|
@@ -60,6 +60,7 @@ function C4JobDashboardErrorTable({ errors, operateBaseUrl, isLoading, translati
|
|
|
60
60
|
pageSize: 10,
|
|
61
61
|
tableSize: 'lg',
|
|
62
62
|
useZebraStyles: false,
|
|
63
|
+
actionsUseOverflowMenuMinItems: 2,
|
|
63
64
|
}, isLoading: isLoading && errors.length === 0, queryPrefix: 'job-dashboard-error-table' }), _jsx(C4BackgroundFetchingIndicator, { isLoading: isLoading, itemsLength: errors.length, loadingMoreDataText: translations.backgroundFetching })] }));
|
|
64
65
|
}
|
|
65
66
|
export default C4JobDashboardErrorTable;
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js
CHANGED
|
@@ -95,7 +95,7 @@ function C4JobDashboardPieChart({ jobData, error, colorScale, isLoading, transla
|
|
|
95
95
|
const noData = (jobData?.created.count === jobData?.failed.count &&
|
|
96
96
|
jobData?.completed.count === 0) ||
|
|
97
97
|
!jobData;
|
|
98
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { style: { marginBottom: 25 }, children: _jsx(C4JobDashboardChartHeading, { title: translations.charts.createdVsCompleted.title, tooltipLabel: translations.charts.createdVsCompleted.tooltip }) }), (!jobData || noData || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: noData ? 0 : 1, showIcons: false, translations: translations.errorHandler, error: error })) : designSystem === 'ds' ? (_jsxs("div", { style: { maxWidth: PIE_CHART_MAX_WIDTH_PX, margin: '0 auto' }, children: [_jsxs("div", { style: { position: 'relative', height: CHART_HEIGHT }, children: [_jsx(ResponsiveContainer, { width: '100%', height: '100%', children: _jsxs(PieChart, { children: [_jsx(Pie, { data: dsPieData, dataKey: 'value', nameKey: 'label', innerRadius: '62%', outerRadius: '88%', paddingAngle: 2, stroke: 'none', children: dsPieData.map((entry) => (_jsx(Cell, { fill: entry.color }, entry.key))) }), _jsx(Tooltip, { ...DS_CHART_TOOLTIP_PROPS })] }) }), _jsx("div", { style: {
|
|
98
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { style: { marginBottom: 25 }, children: _jsx(C4JobDashboardChartHeading, { title: translations.charts.createdVsCompleted.title, tooltipLabel: translations.charts.createdVsCompleted.tooltip }) }), (!jobData || noData || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: noData ? 0 : 1, showIcons: false, translations: translations.errorHandler, error: error })) : designSystem === 'ds' ? (_jsxs("div", { style: { maxWidth: PIE_CHART_MAX_WIDTH_PX, margin: '0 auto' }, children: [_jsxs("div", { style: { position: 'relative', height: CHART_HEIGHT }, children: [_jsx(ResponsiveContainer, { width: '100%', height: '100%', children: _jsxs(PieChart, { children: [_jsx(Pie, { data: dsPieData, dataKey: 'value', nameKey: 'label', innerRadius: '62%', outerRadius: '88%', paddingAngle: 2, stroke: 'none', isAnimationActive: false, children: dsPieData.map((entry) => (_jsx(Cell, { fill: entry.color }, entry.key))) }), _jsx(Tooltip, { ...DS_CHART_TOOLTIP_PROPS })] }) }), _jsx("div", { style: {
|
|
99
99
|
position: 'absolute',
|
|
100
100
|
top: '50%',
|
|
101
101
|
left: '50%',
|
package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js
CHANGED
|
@@ -55,9 +55,7 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, colorScale, translatio
|
|
|
55
55
|
[translations.charts.legend.completed]: item.completed.count,
|
|
56
56
|
[translations.charts.legend.failed]: item.failed.count,
|
|
57
57
|
}));
|
|
58
|
-
const
|
|
59
|
-
if (index % 2 !== 0)
|
|
60
|
-
return '';
|
|
58
|
+
const formatDsLabel = (tick) => {
|
|
61
59
|
const date = new Date(tick);
|
|
62
60
|
return coversMultipleDays
|
|
63
61
|
? Intl.DateTimeFormat('en-US', { month: 'short', day: '2-digit' }).format(date)
|
|
@@ -67,6 +65,15 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, colorScale, translatio
|
|
|
67
65
|
minute: '2-digit',
|
|
68
66
|
}).format(date);
|
|
69
67
|
};
|
|
68
|
+
// At most ~8 labels: the first row of each day for a multi-day range,
|
|
69
|
+
// otherwise every k-th row. Recharts does not thin an explicit list.
|
|
70
|
+
const MAX_TICKS = 8;
|
|
71
|
+
const everyKth = (rows) => rows.filter((_, i) => i % Math.ceil(rows.length / MAX_TICKS) === 0);
|
|
72
|
+
const dsTicks = everyKth(coversMultipleDays
|
|
73
|
+
? dsRows.filter((row, i) => i === 0 ||
|
|
74
|
+
new Date(row.time).toDateString() !==
|
|
75
|
+
new Date(dsRows[i - 1].time).toDateString())
|
|
76
|
+
: dsRows).map((row) => row.time);
|
|
70
77
|
const formattedColorScale = {
|
|
71
78
|
[translations.charts.legend.completed]: colorScale.Completed,
|
|
72
79
|
[translations.charts.legend.failed]: colorScale.Failed,
|
|
@@ -120,10 +127,10 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, colorScale, translatio
|
|
|
120
127
|
scale: formattedColorScale,
|
|
121
128
|
},
|
|
122
129
|
};
|
|
123
|
-
return (_jsxs(Stack, { gap: 6, children: [_jsx(C4JobDashboardChartHeading, { title: translations.charts.jobWorkload.title, tooltipLabel: translations.charts.jobWorkload.tooltip }), _jsxs("strong", { children: [translations.charts.jobWorkload.subtitle, " "] }), (!timeSeries || timeSeries.length === 0 || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: timeSeries.length, showIcons: false, translations: translations.errorHandler, error: error })) : designSystem === 'ds' ? (_jsx("div", { style: { height: CHART_HEIGHT }, children: _jsx(ResponsiveContainer, { width: '100%', height: '100%', children: _jsxs(AreaChart, { data: dsRows, margin: { top: 8, right: 16, left: 8, bottom:
|
|
130
|
+
return (_jsxs(Stack, { gap: 6, children: [_jsx(C4JobDashboardChartHeading, { title: translations.charts.jobWorkload.title, tooltipLabel: translations.charts.jobWorkload.tooltip }), _jsxs("strong", { children: [translations.charts.jobWorkload.subtitle, " "] }), (!timeSeries || timeSeries.length === 0 || error) && !isLoading ? (_jsx(C4JobDashboardErrorHandler, { itemsLength: timeSeries.length, showIcons: false, translations: translations.errorHandler, error: error })) : designSystem === 'ds' ? (_jsx("div", { style: { height: CHART_HEIGHT }, children: _jsx(ResponsiveContainer, { width: '100%', height: '100%', children: _jsxs(AreaChart, { data: dsRows, margin: { top: 8, right: 16, left: 8, bottom: 24 }, children: [_jsx(CartesianGrid, { stroke: DS_CHART_GRID_COLOR, vertical: false }), _jsx(XAxis, { dataKey: 'time', ticks: dsTicks, tickFormatter: formatDsLabel, stroke: DS_CHART_AXIS_COLOR, tick: { fill: DS_CHART_AXIS_COLOR, fontSize: 12 }, label: {
|
|
124
131
|
value: translations.charts.axes.time,
|
|
125
132
|
position: 'insideBottom',
|
|
126
|
-
offset: -
|
|
133
|
+
offset: -4,
|
|
127
134
|
fill: DS_CHART_AXIS_COLOR,
|
|
128
135
|
fontSize: 12,
|
|
129
136
|
} }), _jsx(YAxis, { domain: [0, maxStackedValue], stroke: DS_CHART_AXIS_COLOR, tick: { fill: DS_CHART_AXIS_COLOR, fontSize: 12 }, label: {
|
|
@@ -132,6 +139,6 @@ function C4JobDashboardTimeChart({ timeSeries, isLoading, colorScale, translatio
|
|
|
132
139
|
position: 'insideLeft',
|
|
133
140
|
fill: DS_CHART_AXIS_COLOR,
|
|
134
141
|
fontSize: 12,
|
|
135
|
-
} }), _jsx(Tooltip, { ...DS_CHART_TOOLTIP_PROPS, labelFormatter: (label) => formatTooltipTimestamp(String(label)) }), _jsx(Legend, { wrapperStyle: { color: DS_CHART_AXIS_COLOR, fontSize: 12 } }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.created, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.created, fill: JOB_STATUS_DS_COLORS.created, fillOpacity: 0.6 }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.completed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.completed, fill: JOB_STATUS_DS_COLORS.completed, fillOpacity: 0.6 }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.failed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.failed, fill: JOB_STATUS_DS_COLORS.failed, fillOpacity: 0.6 })] }) }) })) : (_jsx("div", { style: { height: CHART_HEIGHT }, children: _jsx(StackedAreaChart, { data: chartData, options: areaOptions }) }))] }));
|
|
142
|
+
} }), _jsx(Tooltip, { ...DS_CHART_TOOLTIP_PROPS, labelFormatter: (label) => formatTooltipTimestamp(String(label)) }), _jsx(Legend, { verticalAlign: 'top', wrapperStyle: { color: DS_CHART_AXIS_COLOR, fontSize: 12 } }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.created, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.created, fill: JOB_STATUS_DS_COLORS.created, fillOpacity: 0.6 }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.completed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.completed, fill: JOB_STATUS_DS_COLORS.completed, fillOpacity: 0.6 }), _jsx(Area, { type: 'monotone', dataKey: translations.charts.legend.failed, stackId: 'status', stroke: JOB_STATUS_DS_COLORS.failed, fill: JOB_STATUS_DS_COLORS.failed, fillOpacity: 0.6 })] }) }) })) : (_jsx("div", { style: { height: CHART_HEIGHT }, children: _jsx(StackedAreaChart, { data: chartData, options: areaOptions }) }))] }));
|
|
136
143
|
}
|
|
137
144
|
export default C4JobDashboardTimeChart;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
/*
|
|
3
3
|
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
@@ -7,8 +7,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
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
|
+
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
10
11
|
import { Button, Loading, Stack, Tile, Tooltip } from '../../ui/index.js';
|
|
11
12
|
import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
|
|
13
|
+
import { DsSection } from '../c4-cluster-overview/ds-section.js';
|
|
12
14
|
import { C4JobDashboardErrorHandler } from '../c4-job-dashboard-shared/c4-job-dashboard-error-handler.js';
|
|
13
15
|
import C4TimestampInformation from '../c4-job-dashboard-shared/c4-timestamp-information.js';
|
|
14
16
|
const containerHeight = '30vh';
|
|
@@ -42,6 +44,19 @@ const JobTilesGrid = styled.div `
|
|
|
42
44
|
`;
|
|
43
45
|
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 })] }) }) }) }));
|
|
44
46
|
function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translations, variant = 'tile', }) {
|
|
47
|
+
const designSystem = useC4DesignSystem();
|
|
48
|
+
const isDs = designSystem === 'ds';
|
|
49
|
+
// Embedded in ds mode: only the heading stays on top. The description and
|
|
50
|
+
// the rest sit in one card, so the empty state drops its own card.
|
|
51
|
+
const isDsPlain = isDs && variant === 'plain';
|
|
52
|
+
// `secondary` is the DS secondary button. Carbon keeps its primary button.
|
|
53
|
+
const viewAllKind = isDs ? 'secondary' : undefined;
|
|
54
|
+
// The 30vh minimum height reserves room in the carbon tile. In the ds card
|
|
55
|
+
// it only leaves empty space under the content.
|
|
56
|
+
const dsPlainContainerStyle = isDsPlain ? { minHeight: 0 } : undefined;
|
|
57
|
+
// The loading state reserves about the height of the empty state, so the
|
|
58
|
+
// card does not collapse from 30vh when the data arrives.
|
|
59
|
+
const dsPlainLoadingStyle = isDsPlain ? { minHeight: '10rem' } : undefined;
|
|
45
60
|
const hasError = !!error;
|
|
46
61
|
const shouldShowEmpty = !hasError &&
|
|
47
62
|
(!data ||
|
|
@@ -49,10 +64,14 @@ function C4JobDashboardEntryPoint({ data, error, onClick, isLoading, translation
|
|
|
49
64
|
data.failed.count === 0 &&
|
|
50
65
|
data.completed.count === 0));
|
|
51
66
|
const getTileDescription = (count) => `${count ?? 0} ${count === 1 ? translations.jobTileSingular.toLowerCase() : translations.jobTilePlural.toLowerCase()}`;
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
67
|
+
const body = (_jsxs(_Fragment, { children: [_jsx("p", { className: isDsPlain ? 'm-0' : undefined, children: translations.description }), isLoading ? (_jsx(LoadingContainer, { style: dsPlainLoadingStyle, children: _jsx(Loading, { withOverlay: false }) })) : hasError || shouldShowEmpty ? (_jsx(Container, { style: dsPlainContainerStyle, children: _jsxs(Stack, { gap: 4, children: [_jsx(C4JobDashboardErrorHandler, { itemsLength: shouldShowEmpty ? 0 : 1, error: hasError ? error : null, showIcons: true, translations: translations.errorHandler, unboxed: isDsPlain }), shouldShowEmpty && (_jsx(Button, { kind: viewAllKind, onClick: onClick, children: translations.viewAllJobTypes }))] }) })) : (_jsx(Container, { style: dsPlainContainerStyle, 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, { kind: viewAllKind, onClick: onClick, children: translations.viewAllJobTypes })] }) }))] }));
|
|
68
|
+
if (isDsPlain) {
|
|
69
|
+
return (_jsx(DsSection, { title: translations.title, card: true, children: body }));
|
|
70
|
+
}
|
|
71
|
+
const content = (_jsxs(Stack, { gap: 4, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: translations.title }), body] }));
|
|
72
|
+
// Carbon mode: the empty/error state's own Tile (inside C4JobDashboardErrorHandler) and the
|
|
73
|
+
// populated state's job-count tiles stay boxed in either variant. Only this outer card goes away
|
|
74
|
+
// in 'plain'. (ds 'plain' returned above, with one card around the whole body.)
|
|
56
75
|
return variant === 'plain' ? content : _jsx(Tile, { children: content });
|
|
57
76
|
}
|
|
58
77
|
export default C4JobDashboardEntryPoint;
|
package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts
CHANGED
|
@@ -23,10 +23,10 @@ export interface C4JobDashboardEntryPointProps {
|
|
|
23
23
|
isLoading?: boolean;
|
|
24
24
|
/**
|
|
25
25
|
* `'tile'` (default) renders this section inside its own bordered card — Console's own look.
|
|
26
|
-
* `'plain'`
|
|
27
|
-
*
|
|
28
|
-
* `C4JobDashboardErrorHandler`)
|
|
29
|
-
*
|
|
26
|
+
* `'plain'` is for a host that renders this section inline with its own sections. In carbon mode
|
|
27
|
+
* it is a bare heading, and the empty/error state keeps its own `Tile` (from
|
|
28
|
+
* `C4JobDashboardErrorHandler`). In ds mode only the heading is outside: the description and the
|
|
29
|
+
* content sit in one DS card, so the empty/error state renders without its own card.
|
|
30
30
|
*/
|
|
31
31
|
variant?: 'tile' | 'plain';
|
|
32
32
|
}
|
|
@@ -12,5 +12,7 @@ import { DS_STATUS_COLORS } from '../shared-charts/recharts-tokens.js';
|
|
|
12
12
|
export const JOB_STATUS_DS_COLORS = {
|
|
13
13
|
created: DS_STATUS_COLORS.info,
|
|
14
14
|
completed: DS_STATUS_COLORS.success,
|
|
15
|
-
|
|
15
|
+
// `danger-action-default` is red-100 in light mode (a button fill), too
|
|
16
|
+
// pale for a chart series. The strong border token stays red in both themes.
|
|
17
|
+
failed: 'var(--danger-border-strong)',
|
|
16
18
|
};
|
|
@@ -21,5 +21,11 @@ export interface C4JobDashboardErrorHandlerProps {
|
|
|
21
21
|
itemsLength: number;
|
|
22
22
|
showIcons: boolean;
|
|
23
23
|
translations: JobDashboardErrorHandlerTranslations;
|
|
24
|
+
/**
|
|
25
|
+
* When true, this component renders the message without its card. Use it
|
|
26
|
+
* when the host already renders the message inside a card. Defaults to
|
|
27
|
+
* false.
|
|
28
|
+
*/
|
|
29
|
+
unboxed?: boolean;
|
|
24
30
|
}
|
|
25
|
-
export declare const C4JobDashboardErrorHandler: ({ error, showIcons, itemsLength, translations, }: C4JobDashboardErrorHandlerProps) => JSX.Element;
|
|
31
|
+
export declare const C4JobDashboardErrorHandler: ({ error, showIcons, itemsLength, translations, unboxed, }: C4JobDashboardErrorHandlerProps) => JSX.Element;
|
|
@@ -23,7 +23,11 @@ const Description = styled.p `
|
|
|
23
23
|
color: var(--cds-text-secondary, #525252);
|
|
24
24
|
padding: 0.5rem 0;
|
|
25
25
|
`;
|
|
26
|
-
export const C4JobDashboardErrorHandler = ({ error, showIcons, itemsLength, translations, }) => {
|
|
26
|
+
export const C4JobDashboardErrorHandler = ({ error, showIcons, itemsLength, translations, unboxed = false, }) => {
|
|
27
|
+
const box = (children) => unboxed ? children : _jsx(Tile, { children: children });
|
|
28
|
+
// Unboxed, the message sits in the host's section, under the host's `h2`,
|
|
29
|
+
// so the empty title steps down to `h3`. Boxed, it keeps its `h2`.
|
|
30
|
+
const EmptyTitle = unboxed ? 'h3' : 'h2';
|
|
27
31
|
if (error) {
|
|
28
32
|
const isAccessRestricted = error.status === 401 || error.status === 403;
|
|
29
33
|
let title;
|
|
@@ -43,11 +47,11 @@ export const C4JobDashboardErrorHandler = ({ error, showIcons, itemsLength, tran
|
|
|
43
47
|
title = translations.generalError.description;
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
|
-
return (_jsx("div", { style: { width: '100%', margin: '1rem 0' }, children:
|
|
47
|
-
|
|
50
|
+
return (_jsx("div", { style: { width: '100%', margin: unboxed ? 0 : '1rem 0' }, children: box(_jsxs(Row, { children: [showIcons &&
|
|
51
|
+
(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, {}) }))] })] })) }));
|
|
48
52
|
}
|
|
49
53
|
if (itemsLength === 0) {
|
|
50
|
-
return (
|
|
54
|
+
return box(_jsxs(Row, { children: [showIcons && _jsx(EmptyJobsIcon, { size: 84 }), _jsxs("div", { children: [_jsx(EmptyTitle, { 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 }) })] })] }));
|
|
51
55
|
}
|
|
52
56
|
return _jsx(_Fragment, {});
|
|
53
57
|
};
|
|
@@ -4,6 +4,7 @@ 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 { useState } from 'react';
|
|
7
8
|
import { Dropdown } from '../../ui/index.js';
|
|
8
9
|
const FALLBACK_RESOLUTION = 30;
|
|
9
10
|
const ONE_DAY_IN_MINUTES = 24 * 60;
|
|
@@ -22,6 +23,7 @@ function parseExportIntervalToMinutes(exportInterval) {
|
|
|
22
23
|
return hours * 60 + minutes || undefined;
|
|
23
24
|
}
|
|
24
25
|
function C4JobDashboardTimeRangeDropdown({ onChange, exportInterval, disabled, translations, }) {
|
|
26
|
+
const [selected, setSelected] = useState();
|
|
25
27
|
const resolution = parseExportIntervalToMinutes(exportInterval) ?? FALLBACK_RESOLUTION;
|
|
26
28
|
const allItemsInMinutes = [
|
|
27
29
|
1,
|
|
@@ -53,8 +55,11 @@ function C4JobDashboardTimeRangeDropdown({ onChange, exportInterval, disabled, t
|
|
|
53
55
|
const defaultItem = filteredItems.includes(ONE_DAY_IN_MINUTES)
|
|
54
56
|
? ONE_DAY_IN_MINUTES
|
|
55
57
|
: filteredItems[0];
|
|
56
|
-
return (_jsx("div", { style: { maxWidth: '300px', paddingBottom: '1rem' }, children: _jsx(Dropdown, { id: 'time-range-dropdown', titleText: translations.label, label: translations.label, items: filteredItems,
|
|
58
|
+
return (_jsx("div", { style: { maxWidth: '300px', paddingBottom: '1rem' }, children: _jsx(Dropdown, { id: 'time-range-dropdown', titleText: translations.label, label: translations.label, items: filteredItems,
|
|
59
|
+
// Controlled: the ds Dropdown drops `initialSelectedItem`.
|
|
60
|
+
selectedItem: selected ?? defaultItem, disabled: !!disabled, onChange: (e) => {
|
|
57
61
|
if (e.selectedItem) {
|
|
62
|
+
setSelected(e.selectedItem);
|
|
58
63
|
onChange?.(e.selectedItem);
|
|
59
64
|
}
|
|
60
65
|
}, itemToString: (item) => (item ? labels[item] : '') }) }));
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ConnectionSend, Renew, TrashCan } from '@carbon/react/icons/index.esm.js';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { C4_ASSET_URLS } from '../../assetUrls.js';
|
|
5
|
-
import {
|
|
5
|
+
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
6
|
+
import { Button, DsCard, Link, Stack } from '../../ui/index.js';
|
|
7
|
+
import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
|
|
6
8
|
import { C4ActionableNotification } from '../c4-actionable-notification/c4-actionable-notification.js';
|
|
7
9
|
import { C4DataTable } from '../c4-data-table/c4-data-table.js';
|
|
8
10
|
import { C4EmptyState } from '../c4-empty-state/c4-empty-state.js';
|
|
@@ -10,6 +12,7 @@ import { C4ExternalLink } from '../c4-external-link/c4-external-link.js';
|
|
|
10
12
|
import { C4StructuredListSkeleton } from '../c4-structured-list/c4-structured-list.js';
|
|
11
13
|
import { C4Toggle } from '../c4-toggle/c4-toggle.js';
|
|
12
14
|
export const C4ManagementSettings = ({ orgId: _orgId, organizationName: _organizationName, hasAcceptedBetaTerms, suppressDropDisks, earlyAccessFeatures, recentlyAcceptedBeta, loading, error, permissions, onLeaveOrganization, onDeleteOrganization, onToggleSuppressDropDisks, onToggleEarlyAccessFeature, onOptInToBeta, onOpenFeatureOptIn, onShareFeedback, onRetry, text, earlyAccessDocsUrl, }) => {
|
|
15
|
+
const isDs = useC4DesignSystem() === 'ds';
|
|
13
16
|
const canBeToggled = (feature) => {
|
|
14
17
|
return !feature.requiresClickwrap || feature.hasAcceptedFeatureTerms;
|
|
15
18
|
};
|
|
@@ -89,46 +92,59 @@ export const C4ManagementSettings = ({ orgId: _orgId, organizationName: _organiz
|
|
|
89
92
|
if (loading) {
|
|
90
93
|
return _jsx(C4StructuredListSkeleton, { rowCount: 6 });
|
|
91
94
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
95
|
+
// ds mode resets bare heading tags to the body text size, so the section
|
|
96
|
+
// title gets the shared section heading style. Carbon keeps its `h4`.
|
|
97
|
+
const sectionHeading = (children) => isDs ? (_jsx("h4", { style: SECTION_HEADING_STYLE, children: children })) : (_jsx("h4", { children: children }));
|
|
98
|
+
const leaveOrganizationBody = (_jsxs(_Fragment, { children: [sectionHeading(text.leaveOrganization.title), _jsx("p", { style: { marginTop: '8px', color: 'var(--cds-text-helper)' }, children: text.leaveOrganization.consequence }), _jsx("p", { style: { color: 'var(--cds-text-helper)' }, children: text.leaveOrganization.regainAccess }), _jsx(Button, { style: { marginTop: '24px' }, onClick: onLeaveOrganization, size: 'md', kind: 'danger--tertiary', renderIcon: ConnectionSend, children: text.leaveOrganization.buttonLabel })] }));
|
|
99
|
+
const suppressDropDisksBody = (_jsxs(_Fragment, { children: [sectionHeading(text.suppressDropDisks.title), _jsx("p", { style: { marginTop: '8px', color: 'var(--cds-text-helper)' }, children: text.suppressDropDisks.description }), _jsx(C4Toggle, { id: 'suppress-drop-disks-toggle', supported: true, enabled: suppressDropDisks, title: '', notices: [], onClick: onToggleSuppressDropDisks, permissions: {
|
|
100
|
+
mayToggle: true,
|
|
101
|
+
} })] }));
|
|
102
|
+
const deleteOrganizationBody = (_jsxs(_Fragment, { children: [sectionHeading(text.deleteOrganization.title), _jsx("p", { style: { marginTop: '8px', color: 'var(--cds-text-helper)' }, children: text.deleteOrganization.consequence }), _jsx(Button, { style: { marginTop: '24px' }, renderIcon: TrashCan, kind: 'danger', size: 'md', iconDescription: text.deleteOrganization.buttonLabel, onClick: onDeleteOrganization, children: text.deleteOrganization.buttonLabel })] }));
|
|
103
|
+
const earlyAccessBody = (_jsxs(_Fragment, { children: [sectionHeading(text.earlyAccess.title), _jsx("p", { style: { marginTop: '12px', color: 'var(--cds-text-helper)' }, children: text.earlyAccess.description0 }), _jsxs("p", { style: {
|
|
104
|
+
marginBottom: '18px',
|
|
105
|
+
color: 'var(--cds-text-helper)',
|
|
106
|
+
}, children: [text.earlyAccess.description1, ' ', _jsx(C4ExternalLink, { id: 'docs-link', label: text.earlyAccess.learnMoreLabel, href: earlyAccessDocsUrl, target: '_blank' })] }), _jsxs(Stack, { children: [recentlyAcceptedBeta && (_jsx(C4ActionableNotification, { appearance: 'static', lowContrast: true, titleId: 'optInNotification-feedback', "aria-describedby": 'optInNotification-feedback', title: text.earlyAccess.optInNotificationTitle, subtitle: text.earlyAccess.optInNotificationText, actionButtonLabel: text.earlyAccess.optInNotificationFeedback, onActionButtonClick: onShareFeedback, kind: 'success', style: {
|
|
107
|
+
maxWidth: '100%',
|
|
108
|
+
marginBottom: '12px',
|
|
109
|
+
} }, 'optin-notification')), error ? (_jsx(C4EmptyState, { icon: {
|
|
110
|
+
path: C4_ASSET_URLS.fatalErrorIcon,
|
|
111
|
+
altText: 'errorIcon',
|
|
112
|
+
}, heading: text.earlyAccess.errorTitle, description: text.earlyAccess.errorMessage, button: {
|
|
113
|
+
onClick: onRetry,
|
|
114
|
+
disabled: false,
|
|
115
|
+
label: text.earlyAccess.errorButton,
|
|
116
|
+
icon: Renew,
|
|
117
|
+
}, link: {
|
|
118
|
+
href: '',
|
|
119
|
+
label: '',
|
|
120
|
+
} })) : earlyAccessFeatures.length === 0 ? (_jsx("div", { style: {
|
|
121
|
+
borderTop: '1px solid var(--cds-border-subtle)',
|
|
122
|
+
}, children: _jsx("p", { style: {
|
|
123
|
+
marginTop: '12px',
|
|
108
124
|
color: 'var(--cds-text-helper)',
|
|
109
|
-
}, children:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
}, children: text.earlyAccess.emptyState }) })) : (_jsx("div", { style: {
|
|
126
|
+
display: 'flex',
|
|
127
|
+
flexDirection: 'column',
|
|
128
|
+
overflowX: 'auto',
|
|
129
|
+
}, children: _jsx(C4DataTable, { headers: headers, data: tableData, isLoading: false, queryPrefix: 'management-settings' }) })), !hasAcceptedBetaTerms && permissions.mayOptInToBeta && (_jsx(Button
|
|
130
|
+
// ds mode: the Stack stretches its children, so the button keeps
|
|
131
|
+
// its own width, like the Leave and Delete buttons.
|
|
132
|
+
, {
|
|
133
|
+
// ds mode: the Stack stretches its children, so the button keeps
|
|
134
|
+
// its own width, like the Leave and Delete buttons.
|
|
135
|
+
className: isDs ? 'self-start' : undefined, style: { marginTop: '16px' }, onClick: onOptInToBeta, size: 'md', children: text.earlyAccess.optInButton }))] })] }));
|
|
136
|
+
const showEarlyAccess = Boolean(permissions.mayToggleEarlyAccessFeatures && earlyAccessFeatures);
|
|
137
|
+
if (isDs) {
|
|
138
|
+
// ds mode: every section is a DS card, as on the other settings pages.
|
|
139
|
+
// Leave organization and then Delete organization come last. The card is a
|
|
140
|
+
// flex column that stretches its children, so the cards with a button
|
|
141
|
+
// align them to the start; Alpha features keeps its full-width table.
|
|
142
|
+
return (_jsxs(Stack, { gap: 6, children: [permissions.maySuppressDropDisks && (_jsx(DsCard, { className: 'items-start gap-0 p-5', children: suppressDropDisksBody })), showEarlyAccess && (_jsx(DsCard, { className: 'gap-0 p-5', children: earlyAccessBody })), permissions.mayLeaveOrganization && (_jsx(DsCard, { className: 'items-start gap-0 p-5', children: leaveOrganizationBody })), permissions.mayDeleteOrganization && (_jsx(DsCard, { className: 'items-start gap-0 p-5', children: deleteOrganizationBody }))] }));
|
|
143
|
+
}
|
|
144
|
+
const carbonBoxStyle = {
|
|
145
|
+
backgroundColor: 'var(--cds-layer)',
|
|
146
|
+
padding: '20px',
|
|
147
|
+
};
|
|
148
|
+
const component = (_jsxs(Stack, { gap: 6, children: [permissions.mayLeaveOrganization && (_jsx("div", { style: { marginTop: '10px' }, children: _jsx("div", { style: carbonBoxStyle, children: leaveOrganizationBody }) })), permissions.maySuppressDropDisks && (_jsx("div", { children: _jsx("div", { style: carbonBoxStyle, children: suppressDropDisksBody }) })), permissions.mayDeleteOrganization && (_jsx("div", { children: _jsx("div", { style: carbonBoxStyle, children: deleteOrganizationBody }) })), showEarlyAccess && (_jsx("div", { children: _jsx("div", { style: carbonBoxStyle, children: earlyAccessBody }) }))] }));
|
|
133
149
|
return component;
|
|
134
150
|
};
|
|
@@ -39,6 +39,10 @@ export const C4MultiStepModal = ({ title, subtitle, steps, isOpen, onClose, prev
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
catch (error) {
|
|
42
|
+
// Enable the buttons again, so the user can fix the input and retry.
|
|
43
|
+
if (primary.isAsync) {
|
|
44
|
+
setAsyncWork(false);
|
|
45
|
+
}
|
|
42
46
|
setError(String(error));
|
|
43
47
|
}
|
|
44
48
|
}
|
|
@@ -6,9 +6,18 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
6
6
|
*/
|
|
7
7
|
import { C3ResponsiveStack } from '@camunda/camunda-composite-components';
|
|
8
8
|
import { ListItem, OrderedList } from '@carbon/react';
|
|
9
|
+
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
9
10
|
import { Button, Link, Stack, Tile } from '../../ui/index.js';
|
|
10
11
|
export const C4OldDashboard = ({ usersAmount, invitationsAmount, clustersAmount, healthyClustersAmount, updateAvailable, permissions, actions, urls, texts, displayFirstCTA = true, }) => {
|
|
11
|
-
const
|
|
12
|
+
const designSystem = useC4DesignSystem();
|
|
13
|
+
const welcomeItems = [
|
|
14
|
+
texts.welcome.item1,
|
|
15
|
+
texts.welcome.item2,
|
|
16
|
+
texts.welcome.item3,
|
|
17
|
+
texts.welcome.item4,
|
|
18
|
+
// An empty step would show as a bare number.
|
|
19
|
+
].filter(Boolean);
|
|
20
|
+
const welcomeTile = (_jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsxs("h3", { children: [texts.welcome.title, _jsx("span", { id: 'welcomeHeader' })] }), _jsx("div", { dangerouslySetInnerHTML: { __html: texts.welcome.text } }), _jsx(OrderedList, { style: { marginLeft: '3rem' }, children: welcomeItems.map((item) => (_jsx(ListItem, { children: _jsx("div", { dangerouslySetInnerHTML: { __html: item } }) }, item))) }), _jsx("div", { children: _jsxs(C3ResponsiveStack, { orientation: 'horizontal', gap: designSystem === 'ds' ? 0.5 : 6, children: [displayFirstCTA && (_jsx(Button, { onClick: actions.onModelProcess, id: 'modelAProcess', children: texts.welcome.cta })), _jsx(Button, { onClick: actions.onGettingStartedGuide, id: 'gettingStartedGuide', kind: 'tertiary', children: texts.welcome.gsg }), _jsx(Button, { onClick: actions.onWatchDemo, id: 'gettingStartedAcademy', kind: 'tertiary', children: texts.welcome.watchADemo })] }) })] }) }));
|
|
12
21
|
const usersTile = permissions.showUsers && (_jsx(Tile, { style: {
|
|
13
22
|
height: '100%',
|
|
14
23
|
}, children: _jsxs(Stack, { gap: 6, children: [_jsxs("div", { style: {
|
|
@@ -19,15 +28,7 @@ export const C4OldDashboard = ({ usersAmount, invitationsAmount, clustersAmount,
|
|
|
19
28
|
}, children: [_jsx("h3", { children: texts.users.title }), permissions.showMembersLink && (_jsx(Link, { href: urls.users, onClick: (e) => {
|
|
20
29
|
e.preventDefault();
|
|
21
30
|
actions.onNavigateToUsers();
|
|
22
|
-
}, title: texts.users.viewAll, children: texts.users.viewAll }))] }), _jsx("div", { children: usersAmount <= 1 ? (_jsx("div", { children: _jsx("div", {
|
|
23
|
-
__html: texts.users.alone
|
|
24
|
-
.replace('<1>', '<button type="button" class="cds--btn cds--btn--tertiary cds--btn--md">')
|
|
25
|
-
.replace('</1>', '</button>'),
|
|
26
|
-
}, onClick: (e) => {
|
|
27
|
-
if (e.target.tagName === 'BUTTON') {
|
|
28
|
-
actions.onInviteUser();
|
|
29
|
-
}
|
|
30
|
-
} }) })) : (_jsx("div", { children: texts.users.text
|
|
31
|
+
}, title: texts.users.viewAll, children: texts.users.viewAll }))] }), _jsx("div", { children: usersAmount <= 1 ? (_jsxs(Stack, { gap: 6, children: [_jsx("p", { children: texts.users.alone }), _jsx("div", { children: _jsx(Button, { kind: 'tertiary', size: 'md', onClick: actions.onInviteUser, id: 'inviteUser', children: texts.users.inviteUser ?? 'Invite a user' }) })] })) : (_jsx("div", { children: texts.users.text
|
|
31
32
|
.replace('{{usersAmount}}', usersAmount.toString())
|
|
32
33
|
.replace('{{pluralize}}', usersAmount === 1 ? texts.users.user : texts.users.users) })) }), _jsx("p", { children: usersAmount > 1 ? (invitationsAmount === 0 ? (texts.users.noInvitations) : invitationsAmount === 1 ? (texts.users.oneInvitation) : (texts.users.multipleInvitations.replace('{{amount}}', invitationsAmount.toString()))) : (_jsx(_Fragment, {})) })] }) }));
|
|
33
34
|
const clustersTile = (_jsx(Tile, { children: _jsxs(Stack, { gap: 6, children: [_jsxs("div", { style: {
|
|
@@ -26,9 +26,11 @@ export interface C4OldDashboardProps {
|
|
|
26
26
|
welcome: {
|
|
27
27
|
title: string;
|
|
28
28
|
text: string;
|
|
29
|
+
/** The four welcome steps, in order. They hold HTML. */
|
|
29
30
|
item1: string;
|
|
30
31
|
item2: string;
|
|
31
32
|
item3: string;
|
|
33
|
+
item4: string;
|
|
32
34
|
cta: string;
|
|
33
35
|
gsg: string;
|
|
34
36
|
watchADemo: string;
|
|
@@ -37,6 +39,8 @@ export interface C4OldDashboardProps {
|
|
|
37
39
|
title: string;
|
|
38
40
|
viewAll: string;
|
|
39
41
|
alone: string;
|
|
42
|
+
/** The label of the button under `alone`. Defaults to "Invite a user". */
|
|
43
|
+
inviteUser?: string;
|
|
40
44
|
text: string;
|
|
41
45
|
user: string;
|
|
42
46
|
users: string;
|
|
@@ -5,8 +5,10 @@ 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 { Checkmark, Close, Information } from '@carbon/react/icons/index.esm.js';
|
|
8
|
+
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
8
9
|
import { Button, Stack, Tile, Tooltip } from '../../ui/index.js';
|
|
9
10
|
export const C4PricingCard = ({ grid, sections, }) => {
|
|
11
|
+
const designSystem = useC4DesignSystem();
|
|
10
12
|
// CONFIG
|
|
11
13
|
const gap = 5;
|
|
12
14
|
// COMPOENNT
|
|
@@ -41,7 +43,13 @@ export const C4PricingCard = ({ grid, sections, }) => {
|
|
|
41
43
|
display: 'flex',
|
|
42
44
|
alignItems: 'center',
|
|
43
45
|
flexWrap: 'wrap',
|
|
44
|
-
}, children: [_jsx("span", { children: sections.additionalFeatures.title }), sections.additionalFeatures.infoTooltip && (_jsx(Tooltip, { label: sections.additionalFeatures.infoTooltip, align: 'bottom', children: _jsx(Button, { kind: 'ghost', children: _jsx(Information, {}) }) }))] }), _jsx("span", { style: { marginTop: '3px' }, children: _jsx(Stack, { gap: 6, children: sections.additionalFeatures.items.map((feature) => (_jsxs("
|
|
46
|
+
}, children: [_jsx("span", { children: sections.additionalFeatures.title }), sections.additionalFeatures.infoTooltip && (_jsx(Tooltip, { label: sections.additionalFeatures.infoTooltip, align: 'bottom', children: _jsx(Button, { kind: 'ghost', children: _jsx(Information, {}) }) }))] }), _jsx("span", { style: { marginTop: '3px' }, children: _jsx(Stack, { gap: designSystem === 'ds' ? 3 : 6, children: sections.additionalFeatures.items.map((feature) => designSystem === 'ds' ? (_jsxs("div", { style: { display: 'flex' }, children: [_jsx("span", { style: { width: '16px' }, children: _jsx(Checkmark, { color: '#42be65', "aria-label": `check-${feature.id}` }) }), _jsx("span", { style: {
|
|
47
|
+
position: 'relative',
|
|
48
|
+
top: '-4px',
|
|
49
|
+
marginLeft: '8px',
|
|
50
|
+
}, children: feature.labelWithTooltips
|
|
51
|
+
? feature.labelWithTooltips
|
|
52
|
+
: feature.label })] }, `${feature.id}-${Math.floor(Math.random() * 1000)}`)) : (_jsxs("span", { style: { marginTop: '-15px' }, children: [_jsx(Checkmark, { color: '#42be65', "aria-label": `check-${feature.id}` }), _jsx("span", { style: {
|
|
45
53
|
position: 'relative',
|
|
46
54
|
top: '-4px',
|
|
47
55
|
marginLeft: '8px',
|
|
@@ -5,10 +5,15 @@ 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 { useEffect, useMemo, useRef, useState } from 'react';
|
|
8
|
+
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
8
9
|
import { useTabsFamily } from '../../ui/tabs.js';
|
|
9
10
|
const TabPanelStyles = { paddingLeft: 0, paddingRight: 0 };
|
|
11
|
+
// ds mode: the DS tabs keep only 8px between the tab list and the content.
|
|
12
|
+
// The detail pages of Hub add 16px on top of that (24px), so this does too.
|
|
13
|
+
const DsTabPanelStyles = { ...TabPanelStyles, paddingTop: '1rem' };
|
|
10
14
|
export const C4Tabs = ({ tabs, desiredTabId, onTabChange, loading = false, }) => {
|
|
11
15
|
const { Tabs, Tab, TabList, TabPanel, TabPanels, TabsSkeleton } = useTabsFamily();
|
|
16
|
+
const isDs = useC4DesignSystem() === 'ds';
|
|
12
17
|
const initializedTabs = useRef(new Set());
|
|
13
18
|
const visibleTabs = useMemo(() => tabs.filter((tab) => tab.visible === undefined || tab.visible), [tabs]);
|
|
14
19
|
useEffect(() => {
|
|
@@ -46,5 +51,5 @@ export const C4Tabs = ({ tabs, desiredTabId, onTabChange, loading = false, }) =>
|
|
|
46
51
|
if (event.selectedIndex !== activeTabIndex && onTabChange) {
|
|
47
52
|
onTabChange(newDesiredTab);
|
|
48
53
|
}
|
|
49
|
-
}, children: [_jsx(TabList, { "aria-label": 'tabs', children: visibleTabs.map((tab) => (_jsx(Tab, { children: tab.label }, `${tab.id}-label`))) }), _jsx(TabPanels, { children: visibleTabs.map((tab) => (_jsx(TabPanel, { style: TabPanelStyles, children: tab.component }, tab.id))) })] }));
|
|
54
|
+
}, children: [_jsx(TabList, { "aria-label": 'tabs', children: visibleTabs.map((tab) => (_jsx(Tab, { children: tab.label }, `${tab.id}-label`))) }), _jsx(TabPanels, { children: visibleTabs.map((tab) => (_jsx(TabPanel, { style: isDs ? DsTabPanelStyles : TabPanelStyles, children: tab.component }, tab.id))) })] }));
|
|
50
55
|
};
|
|
@@ -24,7 +24,7 @@ export declare const C4_EXTERNAL_URLS: {
|
|
|
24
24
|
readonly clusterLoad: "https://docs.camunda.io/docs/next/components/console/manage-clusters/cluster-capacity/";
|
|
25
25
|
readonly identityAuthorizations: "https://docs.camunda.io/docs/next/components/concepts/access-control/authorizations/";
|
|
26
26
|
readonly multiTenancy: "https://docs.camunda.io/docs/components/admin/tenant/";
|
|
27
|
-
readonly byoidp: "https://docs.camunda.io/docs/components/
|
|
27
|
+
readonly byoidp: "https://docs.camunda.io/docs/next/components/saas/clusters/connect-external-identity-provider/";
|
|
28
28
|
readonly tasklistApiVersions: "https://docs.camunda.io/docs/next/components/tasklist/api-versions/";
|
|
29
29
|
readonly whatsNewIn88: "https://docs.camunda.io/docs/reference/announcements-release-notes/880/whats-new-in-88/";
|
|
30
30
|
readonly announcementsApiTools: "https://docs.camunda.io/docs/reference/announcements-release-notes/880/880-announcements/#apis--tools";
|
|
@@ -23,8 +23,7 @@ export const C4_EXTERNAL_URLS = {
|
|
|
23
23
|
clusterLoad: 'https://docs.camunda.io/docs/next/components/console/manage-clusters/cluster-capacity/',
|
|
24
24
|
identityAuthorizations: 'https://docs.camunda.io/docs/next/components/concepts/access-control/authorizations/',
|
|
25
25
|
multiTenancy: 'https://docs.camunda.io/docs/components/admin/tenant/',
|
|
26
|
-
|
|
27
|
-
byoidp: 'https://docs.camunda.io/docs/components/concepts/access-control/authentication/',
|
|
26
|
+
byoidp: 'https://docs.camunda.io/docs/next/components/saas/clusters/connect-external-identity-provider/',
|
|
28
27
|
tasklistApiVersions: 'https://docs.camunda.io/docs/next/components/tasklist/api-versions/',
|
|
29
28
|
whatsNewIn88: 'https://docs.camunda.io/docs/reference/announcements-release-notes/880/whats-new-in-88/',
|
|
30
29
|
announcementsApiTools: 'https://docs.camunda.io/docs/reference/announcements-release-notes/880/880-announcements/#apis--tools',
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"featureListHeading": "Included in the annual usage",
|
|
160
160
|
"additionalFeatureListHeading": "Extra features & support",
|
|
161
161
|
"price": "Custom pricing",
|
|
162
|
-
"priceAdditional": "Paid
|
|
162
|
+
"priceAdditional": "Paid annually via invoice",
|
|
163
163
|
"button": "Request quote",
|
|
164
164
|
"readMore": "Read more"
|
|
165
165
|
},
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
},
|
|
171
171
|
"security": {
|
|
172
172
|
"heading": "Security & compliance",
|
|
173
|
-
"content": "At Camunda, we are
|
|
173
|
+
"content": "At Camunda, we are committed to Information Security, Privacy and Compliance in all our custom tiers. <br/><br/><0>Visit the Camunda Trust Center</0> to learn more"
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
},
|