@camunda/ccma-saas-frontend 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/c4-billing-page/elements/value-metric.js +2 -4
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +24 -10
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +6 -2
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +4 -2
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.js +1 -1
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +17 -7
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +12 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +9 -3
- package/lib/esm/components/c4-cluster-settings/elements/session-settings.d.ts +13 -0
- package/lib/esm/components/c4-cluster-settings/elements/session-settings.js +69 -0
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +21 -3
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.js +2 -1
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.d.ts +1 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +4 -4
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +1 -2
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +2 -2
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +13 -2
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +8 -4
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +1 -2
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.d.ts +1 -1
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +3 -3
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.types.d.ts +7 -0
- package/lib/esm/components/c4-help-center/c4-help-center.js +3 -1
- package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.js +1 -1
- package/lib/esm/components/c4-management-api/c4-management-api.js +8 -3
- package/lib/esm/components/c4-navigation/c4-navigation.js +17 -9
- package/lib/esm/components/c4-sm-dashboard/health-status.js +1 -1
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +8 -2
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +2 -2
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +3 -1
- package/lib/esm/components/shared-charts/ds-line-chart.js +25 -11
- package/lib/esm/components/shared-charts/recharts-tokens.d.ts +16 -0
- package/lib/esm/components/shared-charts/recharts-tokens.js +31 -0
- package/lib/esm/i18n/en/entities/orgroles.json +2 -2
- package/lib/esm/i18n/en/modals/apiclients.json +4 -1
- package/lib/esm/i18n/en/pages/clusterdetails.json +2 -2
- package/lib/esm/i18n/en/pages/orgmanagement.json +9 -1
- package/lib/esm/runtime/build-cluster-swagger-url.js +2 -2
- package/lib/esm/runtime/nav/camunda-apps.js +2 -2
- package/lib/esm/ui/c4-definition-tooltip.d.ts +15 -0
- package/lib/esm/ui/c4-definition-tooltip.js +43 -0
- package/lib/esm/ui/index.d.ts +6 -0
- package/lib/esm/ui/index.js +20 -3
- package/lib/esm/utils/http-error-message.d.ts +14 -0
- package/lib/esm/utils/http-error-message.js +35 -0
- package/lib/esm/utils/role-labels.js +5 -4
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +5 -5
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +3 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +153 -37
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +3 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +51 -16
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +5 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +3 -4
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +16 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +16 -16
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +115 -28
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +2 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +2 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +2 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +2 -1
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +177 -17
- package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +15 -2
- package/lib/esm/widgets/group-details/c4-group-details-page.js +2 -2
- package/lib/esm/widgets/management/c4-management-app.js +369 -45
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +22 -7
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -2
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +30 -1
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +41 -15
- package/lib/esm/widgets/user-details/c4-user-details-page.js +3 -3
- package/package.json +4 -4
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
+
* You may not use this file except in compliance with the commercial license.
|
|
5
|
+
*/
|
|
6
|
+
import { HttpError } from '@camunda/ccma-api';
|
|
7
|
+
/**
|
|
8
|
+
* The user-facing reason a request was rejected, or `undefined` when there
|
|
9
|
+
* isn't one worth showing.
|
|
10
|
+
*
|
|
11
|
+
* Backends send their reason as the plain-text response body (see
|
|
12
|
+
* `errorMiddleware`), and `packages/api` puts that body on `HttpError.message`
|
|
13
|
+
* (its constructor forwards its `statusText` argument to `super()`, so
|
|
14
|
+
* `.message` — not `.statusText` — is the body).
|
|
15
|
+
*
|
|
16
|
+
* Only 4xx reasons are surfaced: they indicate a client-side rejection (for
|
|
17
|
+
* example unmet preconditions like "you are not in more than one org"). 5xx
|
|
18
|
+
* bodies are our own failure text and tell the user nothing they can use.
|
|
19
|
+
*/
|
|
20
|
+
export function clientErrorMessage(error) {
|
|
21
|
+
if (!(error instanceof HttpError)) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
if (error.status < 400 || error.status > 499) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
const message = error.message.trim();
|
|
28
|
+
// A proxy/gateway 4xx can answer with an HTML page instead of our own plain
|
|
29
|
+
// text; rendering its markup as a notification title is worse than the
|
|
30
|
+
// caller's generic copy.
|
|
31
|
+
if (message === '' || message.startsWith('<')) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
return message;
|
|
35
|
+
}
|
|
@@ -112,15 +112,16 @@ const ROLE_LABEL_DEFAULTS = {
|
|
|
112
112
|
* aligned model gives it new copy; anything absent keeps its pre-alignment label
|
|
113
113
|
* and description. Display projection only; raw role ids are unchanged.
|
|
114
114
|
*
|
|
115
|
-
* Org Owner
|
|
116
|
-
*
|
|
115
|
+
* Org Owner and Org Admin show the full "Organization" word, not the short
|
|
116
|
+
* form. The short form saved little space. It also forced screen readers to
|
|
117
|
+
* expand an abbreviation on every announcement. `member` is renamed
|
|
117
118
|
* because `modeler` takes over the "Member" name; it is a rename, not a
|
|
118
119
|
* promotion, so it stays legacy-marked. `analyst` is here only for its
|
|
119
120
|
* description, which now refers to Member rather than Modeler.
|
|
120
121
|
*/
|
|
121
122
|
const ALIGNED_ROLE_LABEL_DEFAULTS = {
|
|
122
|
-
[OrganizationRole.OWNER]: '
|
|
123
|
-
[OrganizationRole.ADMIN]: '
|
|
123
|
+
[OrganizationRole.OWNER]: 'Organization Owner',
|
|
124
|
+
[OrganizationRole.ADMIN]: 'Organization Admin',
|
|
124
125
|
[OrganizationRole.MODELER]: 'Member',
|
|
125
126
|
[OrganizationRole.OPERATIONS_ENGINEER]: 'DevOps',
|
|
126
127
|
[OrganizationRole.MEMBER]: 'Console Member',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ConsoleClusterClientsService, ConsoleClusterService, } from '@camunda/ccma-api';
|
|
3
|
-
import { checkVersion, VersionCheckOperator } from '@camunda/ccma-shared-types';
|
|
3
|
+
import { checkVersion, IDENTITY_MANAGEMENT_MIN_VERSION, REST_API_URL_TRANSFORM_MIN_VERSION, REST_API_V2_MIN_VERSION, VersionCheckOperator, ZEEBE_REST_URL_MIN_VERSION, } from '@camunda/ccma-shared-types';
|
|
4
4
|
import { observer } from 'mobx-react-lite';
|
|
5
5
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
import { C4InlineNotification } from '../../components/c4-inline-notification/c4-inline-notification.js';
|
|
@@ -147,7 +147,7 @@ export const C4ClusterClientDetailsApp = observer((props) => {
|
|
|
147
147
|
possiblyVersionOrDockerPath: zeebe,
|
|
148
148
|
trueForSnapshot: true,
|
|
149
149
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
150
|
-
versionToCompareTo:
|
|
150
|
+
versionToCompareTo: IDENTITY_MANAGEMENT_MIN_VERSION,
|
|
151
151
|
trueOnInvalidVersion: false,
|
|
152
152
|
});
|
|
153
153
|
}, [cluster?.generation?.versions?.zeebe]);
|
|
@@ -257,7 +257,7 @@ export const C4ClusterClientDetailsApp = observer((props) => {
|
|
|
257
257
|
possiblyVersionOrDockerPath: cluster?.generation?.versions?.zeebe,
|
|
258
258
|
trueForSnapshot: true,
|
|
259
259
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
260
|
-
versionToCompareTo:
|
|
260
|
+
versionToCompareTo: ZEEBE_REST_URL_MIN_VERSION,
|
|
261
261
|
})
|
|
262
262
|
? cluster.status?.zeebeRestUrl
|
|
263
263
|
: cluster.status?.zeebeUrl) ?? '';
|
|
@@ -307,7 +307,7 @@ export const C4ClusterClientDetailsApp = observer((props) => {
|
|
|
307
307
|
possiblyVersionOrDockerPath: cluster.generation?.versions?.zeebe,
|
|
308
308
|
trueForSnapshot: true,
|
|
309
309
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
310
|
-
versionToCompareTo:
|
|
310
|
+
versionToCompareTo: REST_API_V2_MIN_VERSION,
|
|
311
311
|
});
|
|
312
312
|
if (supportsRestApiV2) {
|
|
313
313
|
// From 8.10 onwards (including alphas) the operator publishes
|
|
@@ -324,7 +324,7 @@ export const C4ClusterClientDetailsApp = observer((props) => {
|
|
|
324
324
|
possiblyVersionOrDockerPath: cluster.generation?.versions?.zeebe,
|
|
325
325
|
trueForSnapshot: true,
|
|
326
326
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
327
|
-
versionToCompareTo:
|
|
327
|
+
versionToCompareTo: REST_API_URL_TRANSFORM_MIN_VERSION,
|
|
328
328
|
trueOnInvalidVersion: true,
|
|
329
329
|
})) {
|
|
330
330
|
// 8.6 – 8.9 fallback: derive the REST URL by string-transforming the
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { type HdpPrometheusDataCapacityDataPoint } from '@camunda/ccma-shared-types';
|
|
1
2
|
import { type JSX } from 'react';
|
|
2
3
|
import type { C4ClusterDetailsAppProps } from './c4-cluster-details-app.types.js';
|
|
3
4
|
export declare function mergeNestedSnapshot<T>(previous: T | undefined, next: T): T;
|
|
5
|
+
export declare function ensureClusterLoadPerDay(perDay: HdpPrometheusDataCapacityDataPoint[]): HdpPrometheusDataCapacityDataPoint[];
|
|
6
|
+
export declare function ensureClusterLoad24h(last24h: HdpPrometheusDataCapacityDataPoint[]): HdpPrometheusDataCapacityDataPoint[];
|
|
4
7
|
export declare const C4ClusterDetailsApp: ((props: C4ClusterDetailsAppProps) => JSX.Element) & {
|
|
5
8
|
displayName: string;
|
|
6
9
|
};
|
|
@@ -4,8 +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 { AuditLoggerService, ConsoleAlertsService, ConsoleByomMonitoringService, ConsoleClusterClientsService, ConsoleClusterParametersService, ConsoleClusterService, HdpService, SaaSJobsService, } from '@camunda/ccma-api';
|
|
8
|
-
import { checkVersion, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
7
|
+
import { AuditLoggerService, ConsoleAlertsService, ConsoleByomMonitoringService, ConsoleClusterClientsService, ConsoleClusterParametersService, ConsoleClusterService, HdpService, HttpError, SaaSJobsService, } from '@camunda/ccma-api';
|
|
8
|
+
import { AUDIT_LOG_TAB_MIN_VERSION, CLUSTER_SECRETS_LABEL_MIN_VERSION, CLUSTER_STATISTICS_CONFIG_MIN_VERSION, checkVersion, IDENTITY_MANAGEMENT_MIN_VERSION, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
9
9
|
import { observer } from 'mobx-react-lite';
|
|
10
10
|
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
11
11
|
import { getC4ClusterDetailsUrls } from '../../externalUrls.const.js';
|
|
@@ -154,7 +154,31 @@ function persistDismissedFailedRestores(ids) {
|
|
|
154
154
|
// localStorage unavailable (private mode / SSR) — dismissal is best-effort.
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
|
|
157
|
+
// Client-side dismissal of the "update your BYOM/BYOIDP endpoint after
|
|
158
|
+
// failover" notice (#9679) — same reasoning as above: whether the customer
|
|
159
|
+
// has actually gone and repointed their external monitoring/identity
|
|
160
|
+
// provider at this cluster isn't something Console can observe, so there's
|
|
161
|
+
// no server-computed "done" state to gate on. Keyed by cluster uuid so a
|
|
162
|
+
// different cluster's notice isn't accidentally suppressed.
|
|
163
|
+
const DISMISSED_FAILOVER_URI_NOTICES_KEY = 'c4:dismissedFailoverUriNotices';
|
|
164
|
+
function loadDismissedFailoverUriNotices() {
|
|
165
|
+
try {
|
|
166
|
+
const raw = window.localStorage.getItem(DISMISSED_FAILOVER_URI_NOTICES_KEY);
|
|
167
|
+
return new Set(raw ? JSON.parse(raw) : []);
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return new Set();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function persistDismissedFailoverUriNotices(ids) {
|
|
174
|
+
try {
|
|
175
|
+
window.localStorage.setItem(DISMISSED_FAILOVER_URI_NOTICES_KEY, JSON.stringify([...ids]));
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
// localStorage unavailable (private mode / SSR) — dismissal is best-effort.
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
export function ensureClusterLoadPerDay(perDay) {
|
|
158
182
|
const DAY = 24 * 60 * 60 * 1000;
|
|
159
183
|
const now = Date.now();
|
|
160
184
|
const updatedPerDay = perDay.filter((point) => Number.isFinite(point.ts) &&
|
|
@@ -189,7 +213,12 @@ function ensureClusterLoadPerDay(perDay) {
|
|
|
189
213
|
updatedPerDay.sort((a, b) => b.ts - a.ts);
|
|
190
214
|
return updatedPerDay;
|
|
191
215
|
}
|
|
192
|
-
|
|
216
|
+
// Sorts ascending by timestamp (oldest first, "now" last) — the chart plots
|
|
217
|
+
// its array in order left-to-right, matching the 7d/30d convention.
|
|
218
|
+
function sortAscendingByTs(points) {
|
|
219
|
+
return points.sort((a, b) => a.ts - b.ts);
|
|
220
|
+
}
|
|
221
|
+
export function ensureClusterLoad24h(last24h) {
|
|
193
222
|
const HOUR = 60 * 60 * 1000;
|
|
194
223
|
const DAY = 24 * HOUR;
|
|
195
224
|
const now = Date.now();
|
|
@@ -197,36 +226,55 @@ function ensureClusterLoad24h(last24h) {
|
|
|
197
226
|
Number.isFinite(point.min) &&
|
|
198
227
|
Number.isFinite(point.max) &&
|
|
199
228
|
Number.isFinite(point.avg));
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
max: 0,
|
|
211
|
-
avg: 0,
|
|
212
|
-
});
|
|
213
|
-
}
|
|
229
|
+
// No real data at all — fill a full 24h window with zeros so the chart
|
|
230
|
+
// still renders instead of being empty.
|
|
231
|
+
if (updated24h.length === 0) {
|
|
232
|
+
for (let i = 0; i < 24; i += 1) {
|
|
233
|
+
updated24h.push({
|
|
234
|
+
ts: now - i * HOUR,
|
|
235
|
+
min: 0,
|
|
236
|
+
max: 0,
|
|
237
|
+
avg: 0,
|
|
238
|
+
});
|
|
214
239
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
240
|
+
return sortAscendingByTs(updated24h);
|
|
241
|
+
}
|
|
242
|
+
// We have real data (e.g. a cluster younger than 24h only has a handful of
|
|
243
|
+
// hourly buckets) — never discard it. Only backfill the gap between the
|
|
244
|
+
// most recent real point and "now" when that point is stale, so a
|
|
245
|
+
// still-fresh but incomplete window keeps its real values (including any
|
|
246
|
+
// spikes) instead of being wiped and replaced with zeros.
|
|
247
|
+
const max24h = Math.max(...updated24h.map((item) => item.ts));
|
|
248
|
+
// The most recent real point is itself very stale (e.g. the cluster was
|
|
249
|
+
// paused and its newest hourly bucket is many hours/days old). Padding
|
|
250
|
+
// forward from that point — even capped — could still land far in the
|
|
251
|
+
// past and never reach "now". Fall back to the same full zero-refill
|
|
252
|
+
// anchored at "now" used when there is no real data at all, mirroring how
|
|
253
|
+
// `ensureClusterLoadPerDay` treats a stale latest point.
|
|
254
|
+
if (max24h < now - DAY) {
|
|
255
|
+
updated24h.length = 0;
|
|
256
|
+
for (let i = 0; i < 24; i += 1) {
|
|
257
|
+
updated24h.push({
|
|
258
|
+
ts: now - i * HOUR,
|
|
259
|
+
min: 0,
|
|
260
|
+
max: 0,
|
|
261
|
+
avg: 0,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
return sortAscendingByTs(updated24h);
|
|
265
|
+
}
|
|
266
|
+
if (max24h < now - HOUR) {
|
|
267
|
+
const missingHours = Math.floor((now - max24h) / HOUR);
|
|
268
|
+
for (let i = 1; i < missingHours + 1; i += 1) {
|
|
269
|
+
updated24h.push({
|
|
270
|
+
ts: max24h + i * HOUR,
|
|
271
|
+
min: 0,
|
|
272
|
+
max: 0,
|
|
273
|
+
avg: 0,
|
|
274
|
+
});
|
|
226
275
|
}
|
|
227
276
|
}
|
|
228
|
-
updated24h
|
|
229
|
-
return updated24h;
|
|
277
|
+
return sortAscendingByTs(updated24h);
|
|
230
278
|
}
|
|
231
279
|
function isUnsupportedGenerationStarted(isUnsupportedStarting) {
|
|
232
280
|
if (!isUnsupportedStarting) {
|
|
@@ -315,13 +363,25 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
315
363
|
data.upsertCluster(props.orgId, loaded);
|
|
316
364
|
}
|
|
317
365
|
catch (error) {
|
|
366
|
+
// A cluster that no longer exists (e.g. a stale/typo'd URL) is not an
|
|
367
|
+
// error state worth rendering inline — send the user back to the
|
|
368
|
+
// dashboard instead of showing an empty tab shell with the backend's
|
|
369
|
+
// generic 404 body text. Only short-circuit when a navigation handler
|
|
370
|
+
// is actually available; otherwise fall back to the inline error so
|
|
371
|
+
// the widget never ends up in a blank state.
|
|
372
|
+
if (error instanceof HttpError &&
|
|
373
|
+
error.status === 404 &&
|
|
374
|
+
props.onNavigate) {
|
|
375
|
+
props.onNavigate({ kind: 'dashboard', orgId: props.orgId });
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
318
378
|
setCluster(undefined);
|
|
319
379
|
setClusterError(error instanceof Error ? error.message : 'Failed to load');
|
|
320
380
|
}
|
|
321
381
|
finally {
|
|
322
382
|
setIsClusterLoading(false);
|
|
323
383
|
}
|
|
324
|
-
}, [apiConfig, data, props.clusterId, props.orgId]);
|
|
384
|
+
}, [apiConfig, data, props.clusterId, props.onNavigate, props.orgId]);
|
|
325
385
|
const reloadCreationParameters = useCallback(async () => {
|
|
326
386
|
setIsCreationParametersLoading(true);
|
|
327
387
|
try {
|
|
@@ -413,7 +473,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
413
473
|
possiblyVersionOrDockerPath: zeebe,
|
|
414
474
|
trueForSnapshot: true,
|
|
415
475
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
416
|
-
versionToCompareTo:
|
|
476
|
+
versionToCompareTo: CLUSTER_STATISTICS_CONFIG_MIN_VERSION,
|
|
417
477
|
trueOnInvalidVersion: false,
|
|
418
478
|
})) {
|
|
419
479
|
return;
|
|
@@ -460,7 +520,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
460
520
|
possiblyVersionOrDockerPath: zeebe,
|
|
461
521
|
trueForSnapshot: true,
|
|
462
522
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
463
|
-
versionToCompareTo:
|
|
523
|
+
versionToCompareTo: IDENTITY_MANAGEMENT_MIN_VERSION,
|
|
464
524
|
trueOnInvalidVersion: false,
|
|
465
525
|
});
|
|
466
526
|
}, [cluster?.generation?.versions?.zeebe]);
|
|
@@ -472,7 +532,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
472
532
|
possiblyVersionOrDockerPath: zeebe,
|
|
473
533
|
trueForSnapshot: 'compare',
|
|
474
534
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
475
|
-
versionToCompareTo:
|
|
535
|
+
versionToCompareTo: CLUSTER_SECRETS_LABEL_MIN_VERSION,
|
|
476
536
|
});
|
|
477
537
|
}, [cluster?.generation?.versions?.zeebe]);
|
|
478
538
|
const [dismissedFailedRestores, setDismissedFailedRestores] = useState(loadDismissedFailedRestores);
|
|
@@ -483,7 +543,15 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
483
543
|
return next;
|
|
484
544
|
});
|
|
485
545
|
}, []);
|
|
486
|
-
const
|
|
546
|
+
const [dismissedFailoverUriNotices, setDismissedFailoverUriNotices] = useState(loadDismissedFailoverUriNotices);
|
|
547
|
+
const dismissFailoverUriNotice = useCallback((clusterUuid) => {
|
|
548
|
+
setDismissedFailoverUriNotices((prev) => {
|
|
549
|
+
const next = new Set(prev).add(clusterUuid);
|
|
550
|
+
persistDismissedFailoverUriNotices(next);
|
|
551
|
+
return next;
|
|
552
|
+
});
|
|
553
|
+
}, []);
|
|
554
|
+
const primaryBanner = useMemo(() => {
|
|
487
555
|
if (!cluster)
|
|
488
556
|
return undefined;
|
|
489
557
|
if (cluster.restoreInProgress) {
|
|
@@ -825,6 +893,49 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
825
893
|
const [byomError, setByomError] = useState(false);
|
|
826
894
|
const byomLoadedRef = useRef(false);
|
|
827
895
|
const [byomStatus, setByomStatus] = useState({});
|
|
896
|
+
// #9679: a failover cluster carries over the source's BYOM/BYOIDP config
|
|
897
|
+
// as-is, but the customer's external monitoring tool / identity provider
|
|
898
|
+
// still points at the OLD cluster's endpoint — Console can't fix that
|
|
899
|
+
// externally, so this nudges the customer to update it themselves.
|
|
900
|
+
// Combined with primaryBanner further down (this can't be computed
|
|
901
|
+
// there — byomClients isn't declared yet at that point in the component).
|
|
902
|
+
//
|
|
903
|
+
// ponytail: known false positive, accepted rather than engineered around
|
|
904
|
+
// — this fires whenever a failover-destination cluster currently HAS
|
|
905
|
+
// BYOM/BYOIDP config, not specifically when that config was carried over
|
|
906
|
+
// from the source. A customer who sets up monitoring fresh on this
|
|
907
|
+
// cluster (with a correct endpoint from the start) still sees the
|
|
908
|
+
// notice. ByomClient rows do carry a `created` timestamp that could be
|
|
909
|
+
// compared against the cluster's own `created` to guess "looks carried-
|
|
910
|
+
// over", but externalIdpEnabled/externalIdpConfig have no timestamp at
|
|
911
|
+
// all — a heuristic that covers BYOM but silently can't cover BYOIDP
|
|
912
|
+
// would produce harder-to-explain asymmetric behaviour than just always
|
|
913
|
+
// showing it. Cost of the false positive is one extra dismiss click, not
|
|
914
|
+
// incorrect action — revisit if that stops being true (e.g. by tracking
|
|
915
|
+
// "carried over" explicitly at write time).
|
|
916
|
+
const failoverUriBanner = useMemo(() => {
|
|
917
|
+
if (!cluster?.failoverSourceClusterId)
|
|
918
|
+
return undefined;
|
|
919
|
+
if (dismissedFailoverUriNotices.has(cluster.uuid))
|
|
920
|
+
return undefined;
|
|
921
|
+
const hasByom = byomClients.length > 0;
|
|
922
|
+
const hasByoidp = !!cluster.externalIdpEnabled;
|
|
923
|
+
if (!hasByom && !hasByoidp)
|
|
924
|
+
return undefined;
|
|
925
|
+
return {
|
|
926
|
+
kind: 'failoverUriUpdateNeeded',
|
|
927
|
+
hasByom,
|
|
928
|
+
hasByoidp,
|
|
929
|
+
onDismiss: () => dismissFailoverUriNotice(cluster.uuid),
|
|
930
|
+
};
|
|
931
|
+
}, [
|
|
932
|
+
cluster?.failoverSourceClusterId,
|
|
933
|
+
cluster?.uuid,
|
|
934
|
+
cluster?.externalIdpEnabled,
|
|
935
|
+
byomClients.length,
|
|
936
|
+
dismissedFailoverUriNotices,
|
|
937
|
+
dismissFailoverUriNotice,
|
|
938
|
+
]);
|
|
828
939
|
const reloadByom = useCallback(async () => {
|
|
829
940
|
if (!canViewMonitoringTab) {
|
|
830
941
|
setByomClients([]);
|
|
@@ -1035,6 +1146,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1035
1146
|
},
|
|
1036
1147
|
}
|
|
1037
1148
|
: undefined,
|
|
1149
|
+
ignoreHead: params.ignoreHead,
|
|
1038
1150
|
},
|
|
1039
1151
|
});
|
|
1040
1152
|
await reloadAlerts();
|
|
@@ -1304,7 +1416,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1304
1416
|
possiblyVersionOrDockerPath: cluster.generation.versions.zeebe,
|
|
1305
1417
|
trueForSnapshot: true,
|
|
1306
1418
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
1307
|
-
versionToCompareTo:
|
|
1419
|
+
versionToCompareTo: AUDIT_LOG_TAB_MIN_VERSION,
|
|
1308
1420
|
trueOnInvalidVersion: false,
|
|
1309
1421
|
})),
|
|
1310
1422
|
init: () => { },
|
|
@@ -1387,6 +1499,10 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1387
1499
|
isCreationParametersLoading,
|
|
1388
1500
|
isSecureConnectivityTabVisible,
|
|
1389
1501
|
]);
|
|
1502
|
+
// primaryBanner takes priority — an active restore, an unmaintained
|
|
1503
|
+
// generation, or disabled authorizations all matter more than a
|
|
1504
|
+
// one-time "update your endpoint" nudge.
|
|
1505
|
+
const banner = primaryBanner ?? failoverUriBanner;
|
|
1390
1506
|
return (_jsxs(_Fragment, { children: [_jsx(C4ClusterDetailsPage, { loading: isClusterLoading || authz.isLoading, clusterName: cluster?.name, isDevelopmentPlan: cluster?.planType?.development, urls: { clusters: urls.clusters }, onNavigateToClusters: () => props.onNavigate?.({ kind: 'clusters', orgId: props.orgId }), menu: {
|
|
1391
1507
|
canRename,
|
|
1392
1508
|
canDelete,
|
|
@@ -4,9 +4,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
+
import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, } from '@camunda/design-system';
|
|
7
8
|
import { WarningAltFilled } from '@carbon/react/icons/index.esm.js';
|
|
9
|
+
import { TriangleAlert } from 'lucide-react';
|
|
8
10
|
import { C4PageTemplate } from '../../components/c4-page-template/c4-page-template.js';
|
|
9
|
-
import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
|
|
11
|
+
import { useC4ConsoleRuntime, useC4DesignSystem, } from '../../runtime/c4-console-runtime-context.js';
|
|
10
12
|
import { BreadcrumbSkeleton, Link, SkeletonText, Stack, TabsSkeleton, Tooltip, } from '../../ui/index.js';
|
|
11
13
|
const breadCrumbWrapperStyles = {
|
|
12
14
|
minHeight: '40px',
|
|
@@ -66,6 +68,24 @@ function buildBanner(opts) {
|
|
|
66
68
|
onDismiss: banner.onDismiss,
|
|
67
69
|
};
|
|
68
70
|
}
|
|
71
|
+
if (banner.kind === 'failoverUriUpdateNeeded') {
|
|
72
|
+
const title = banner.hasByom && banner.hasByoidp
|
|
73
|
+
? safeTranslate(t, 'c4console:clusterDetails.banner.failoverUriUpdateNeeded.titleBoth', 'Update your monitoring and identity provider settings')
|
|
74
|
+
: banner.hasByoidp
|
|
75
|
+
? safeTranslate(t, 'c4console:clusterDetails.banner.failoverUriUpdateNeeded.titleByoidp', 'Update your identity provider settings')
|
|
76
|
+
: safeTranslate(t, 'c4console:clusterDetails.banner.failoverUriUpdateNeeded.titleByom', 'Update your monitoring settings');
|
|
77
|
+
const subtitle = banner.hasByom && banner.hasByoidp
|
|
78
|
+
? safeTranslate(t, 'c4console:clusterDetails.banner.failoverUriUpdateNeeded.subtitleBoth', 'This cluster replaced another cluster after a failover. Point your external monitoring tool and identity provider at this cluster.')
|
|
79
|
+
: banner.hasByoidp
|
|
80
|
+
? safeTranslate(t, 'c4console:clusterDetails.banner.failoverUriUpdateNeeded.subtitleByoidp', 'This cluster replaced another cluster after a failover. Update your identity provider’s redirect URI to point at this cluster.')
|
|
81
|
+
: safeTranslate(t, 'c4console:clusterDetails.banner.failoverUriUpdateNeeded.subtitleByom', 'This cluster replaced another cluster after a failover. Point your external monitoring tool’s scrape endpoint at this cluster.');
|
|
82
|
+
return {
|
|
83
|
+
kind: 'info',
|
|
84
|
+
title,
|
|
85
|
+
subtitle,
|
|
86
|
+
onDismiss: banner.onDismiss,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
69
89
|
if (banner.kind === 'unsupportedGeneration') {
|
|
70
90
|
const subtitle = banner.isAlphaGeneration
|
|
71
91
|
? safeTranslate(t, 'c4console:clusterDetails.banner.unsupportedGeneration.subtitleAlpha', 'Alpha-generations can’t be updated. Create a new cluster to access the latest features.')
|
|
@@ -82,14 +102,37 @@ function buildBanner(opts) {
|
|
|
82
102
|
}
|
|
83
103
|
return undefined;
|
|
84
104
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Cluster-header indicator for "authorizations disabled".
|
|
107
|
+
*
|
|
108
|
+
* Transformation component (cf. `docs/c4-carbon-compat.md`): the carbon branch
|
|
109
|
+
* reproduces the deployed Carbon render exactly — a `Tooltip` recoloured to a
|
|
110
|
+
* light surface through `--cds-*-inverse` overrides, with the docs link inlined
|
|
111
|
+
* in the tooltip description.
|
|
112
|
+
*
|
|
113
|
+
* The ds branch does not carry that hack over: the `--cds-*-inverse` overrides
|
|
114
|
+
* are no-ops outside Carbon, and Carbon's tooltip type scale doesn't match the
|
|
115
|
+
* `Link` nested inside it (feedback: "odd padding around text, learn more has
|
|
116
|
+
* different font-size"). It renders the DS `Popover` instead, which owns its
|
|
117
|
+
* padding and type scale. A tooltip is also the wrong component for actionable
|
|
118
|
+
* content — its description isn't hoverable or focusable, so the "Learn more"
|
|
119
|
+
* link can't actually be reached.
|
|
120
|
+
*/
|
|
121
|
+
function AuthorizationsDisabledIndicator(props) {
|
|
122
|
+
const { banner, t } = props;
|
|
123
|
+
const designSystem = useC4DesignSystem();
|
|
90
124
|
const title = safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.title', 'Authorizations disabled');
|
|
91
125
|
const subtitle = safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.subtitle', 'All authenticated users & clients have full access to this cluster’s resources. To restrict access, enable authorizations in the settings.');
|
|
92
126
|
const actionLabel = safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.actionLabel', 'Learn more about managing authorizations');
|
|
127
|
+
const onLearnMoreClick = (event) => {
|
|
128
|
+
if (banner.onLearnMore) {
|
|
129
|
+
event.preventDefault();
|
|
130
|
+
banner.onLearnMore();
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
if (designSystem === 'ds') {
|
|
134
|
+
return (_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: 'button', "aria-label": title, className: 'inline-flex items-center gap-1 text-sm text-neutral-foreground-subtle', children: [_jsx(TriangleAlert, { size: 16, className: 'text-warning-action-default', "aria-hidden": true }), title] }) }), _jsxs(PopoverContent, { align: 'end', className: 'w-80', children: [_jsxs(PopoverHeader, { children: [_jsx(PopoverTitle, { children: title }), _jsx(PopoverDescription, { children: subtitle })] }), _jsx(Link, { href: banner.docsUrl, target: '_blank', rel: 'noopener noreferrer', onClick: onLearnMoreClick, children: actionLabel })] })] }));
|
|
135
|
+
}
|
|
93
136
|
return (_jsx("div", { style: {
|
|
94
137
|
'--cds-background-inverse': 'var(--cds-layer)',
|
|
95
138
|
'--cds-text-inverse': 'var(--cds-text-primary)',
|
|
@@ -98,12 +141,7 @@ function buildAuthorizationsDisabledIndicator(opts) {
|
|
|
98
141
|
display: 'block',
|
|
99
142
|
whiteSpace: 'normal',
|
|
100
143
|
maxWidth: '20rem',
|
|
101
|
-
}, children: [subtitle, ' ', _jsx(Link, { href: banner.docsUrl, target: '_blank', rel: 'noopener noreferrer', inline: true, onClick:
|
|
102
|
-
if (banner.onLearnMore) {
|
|
103
|
-
event.preventDefault();
|
|
104
|
-
banner.onLearnMore();
|
|
105
|
-
}
|
|
106
|
-
}, children: actionLabel })] }), children: _jsxs("button", { type: 'button', "aria-label": title, style: {
|
|
144
|
+
}, children: [subtitle, ' ', _jsx(Link, { href: banner.docsUrl, target: '_blank', rel: 'noopener noreferrer', inline: true, onClick: onLearnMoreClick, children: actionLabel })] }), children: _jsxs("button", { type: 'button', "aria-label": title, style: {
|
|
107
145
|
display: 'inline-flex',
|
|
108
146
|
alignItems: 'center',
|
|
109
147
|
gap: '0.25rem',
|
|
@@ -125,10 +163,7 @@ export const C4ClusterDetailsPage = ({ loading, clusterName, isDevelopmentPlan,
|
|
|
125
163
|
? safeTranslate(t, 'c4console:clusterDetails.tag.development', 'Development')
|
|
126
164
|
: '';
|
|
127
165
|
const bannerProps = buildBanner({ banner, t });
|
|
128
|
-
const authorizationsIndicator =
|
|
129
|
-
banner,
|
|
130
|
-
t,
|
|
131
|
-
});
|
|
166
|
+
const authorizationsIndicator = banner?.kind === 'authorizationsDisabled' ? (_jsx(AuthorizationsDisabledIndicator, { banner: banner, t: t })) : undefined;
|
|
132
167
|
return (_jsx(C4PageTemplate, { loading: loading, banner: bannerProps, header: {
|
|
133
168
|
title: clusterName ?? '',
|
|
134
169
|
tag,
|
|
@@ -12,6 +12,11 @@ export type C4ClusterDetailsPageBanner = {
|
|
|
12
12
|
} | {
|
|
13
13
|
kind: 'restoreFailed';
|
|
14
14
|
onDismiss: () => void;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'failoverUriUpdateNeeded';
|
|
17
|
+
hasByom: boolean;
|
|
18
|
+
hasByoidp: boolean;
|
|
19
|
+
onDismiss: () => void;
|
|
15
20
|
};
|
|
16
21
|
export type C4ClusterDetailsTab = C4TabProps;
|
|
17
22
|
export interface C4ClusterDetailsPageProps {
|
|
@@ -4,14 +4,14 @@ 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 { Fragment, useCallback, useRef, useState } from 'react';
|
|
9
9
|
import { C4ActionableNotification } from '../../../components/c4-actionable-notification/c4-actionable-notification.js';
|
|
10
10
|
import { C4ClusterDetailsAlerts } from '../../../components/c4-cluster-details-alerts/c4-cluster-details-alerts.js';
|
|
11
11
|
import { C4CreateAlertModal } from '../../../components/c4-create-alert-modal/c4-create-alert-modal.js';
|
|
12
12
|
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
13
13
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
14
|
-
import { Checkbox, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
14
|
+
import { Checkbox, Form, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
15
15
|
import { useRadioFamily } from '../../../ui/families.js';
|
|
16
16
|
// Helper to translate with fallback
|
|
17
17
|
function safeTranslate(translateFn, key, fallback, options) {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ConsoleClusterClientsService, ConsoleConnectorSecretsService, } from '@camunda/ccma-api';
|
|
3
|
-
import { checkVersion, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
4
|
-
import { Form } from '@carbon/react';
|
|
3
|
+
import { checkVersion, MCP_MIN_VERSION, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
5
4
|
import { useCallback, useMemo, useState } from 'react';
|
|
6
5
|
import { C4ClusterClientCredentialsModal } from '../../../components/c4-cluster-client-credentials/c4-cluster-client-credentials.js';
|
|
7
6
|
import { C4ClusterClientCredentialsIdentityModal } from '../../../components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js';
|
|
8
7
|
import { C4ClusterDetailsClients } from '../../../components/c4-cluster-details-clients/c4-cluster-details-clients.js';
|
|
9
8
|
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
10
9
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
11
|
-
import { Checkbox, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
10
|
+
import { Checkbox, Form, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
12
11
|
import { toHostWithoutProtocol } from './url-utils.js';
|
|
13
12
|
// Helper function to ensure translations work
|
|
14
13
|
function safeTranslate(t, key, fallback) {
|
|
@@ -435,7 +434,7 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
435
434
|
possiblyVersionOrDockerPath: cluster?.generation?.versions?.zeebe,
|
|
436
435
|
trueForSnapshot: true,
|
|
437
436
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
438
|
-
versionToCompareTo:
|
|
437
|
+
versionToCompareTo: MCP_MIN_VERSION,
|
|
439
438
|
trueOnInvalidVersion: false,
|
|
440
439
|
});
|
|
441
440
|
const mcpSetupDocsUrl = mcpSetupDocsUrlFromProps;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { ConsoleConnectorSecretsService } from '@camunda/ccma-api';
|
|
3
3
|
import { SECRETS_MAX_LENGTH, SseEntity } from '@camunda/ccma-shared-types';
|
|
4
|
-
import { FileUploader,
|
|
4
|
+
import { FileUploader, InlineLoading, PasswordInput } from '@carbon/react';
|
|
5
5
|
import { observer } from 'mobx-react-lite';
|
|
6
6
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { C4ClusterDetailsConnectorSecrets } from '../../../components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js';
|
|
8
8
|
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
9
9
|
import { useC4ConsoleData } from '../../../runtime/c4-console-data-context.js';
|
|
10
10
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
11
|
-
import { CodeSnippet, Link, Modal, Stack, TextArea, TextInput, } from '../../../ui/index.js';
|
|
11
|
+
import { CodeSnippet, Form, Link, Modal, Stack, TextArea, TextInput, } from '../../../ui/index.js';
|
|
12
12
|
import { useSelectFamily } from '../../../ui/families.js';
|
|
13
13
|
function safeTranslate(t, key, fallback) {
|
|
14
14
|
if (!t)
|
|
@@ -236,7 +236,7 @@ export const C4ClusterDetailsEncryptionTab = (props) => {
|
|
|
236
236
|
downloadKeyPolicy: 'Download key policy',
|
|
237
237
|
failoverKeyPolicyTitle: 'Action required',
|
|
238
238
|
failoverKeyPolicyText: 'Update your encryption key policy so this cluster can read its restored data.',
|
|
239
|
-
failoverKeyPolicyInstruction: 'This cluster uses the encryption keys from the cluster it was failed over from, so no new key is needed. Grant the three roles below the same key permissions as your original cluster, on both the primary and secondary key. Until then, the restore cannot decrypt your backup data.',
|
|
239
|
+
failoverKeyPolicyInstruction: 'This cluster uses the encryption keys from the cluster it was failed over from, so no new key is needed. Grant the three roles below the same key permissions as your original cluster, on both the primary and secondary key. Until then, the restore cannot decrypt your backup data. Policy changes can take about 10 minutes to propagate, so allow some time after saving before the restore proceeds.',
|
|
240
240
|
failoverKeyPolicyCloneRole: 'Clone role — copies backup data into this cluster',
|
|
241
241
|
failoverKeyPolicyClusterRole: "This cluster's role",
|
|
242
242
|
failoverKeyPolicyReplicationRole: 'Replication role — replicates to the secondary region',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { ConsoleBackupScheduleService, ConsoleHotBackupsService, } from '@camunda/ccma-api';
|
|
3
|
-
import { BackupStatus, checkVersion, HOTBACKUP_MIN_CREATE_PERIOD, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
3
|
+
import { BackupStatus, checkVersion, HOT_BACKUP_MIN_VERSION, HOTBACKUP_MIN_CREATE_PERIOD, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
4
4
|
import { CronExpression, CronExpressionParser, CronFieldCollection, } from 'cron-parser';
|
|
5
5
|
import { observer } from 'mobx-react-lite';
|
|
6
6
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
@@ -310,7 +310,7 @@ const C4ClusterDetailsHotBackupsTabImpl = (props) => {
|
|
|
310
310
|
possiblyVersionOrDockerPath: zeebe,
|
|
311
311
|
trueForSnapshot: true,
|
|
312
312
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
313
|
-
versionToCompareTo:
|
|
313
|
+
versionToCompareTo: HOT_BACKUP_MIN_VERSION,
|
|
314
314
|
})
|
|
315
315
|
: false;
|
|
316
316
|
// Same-cluster restore is currently dev-only. Until the operator side ships
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RequestBaseParamsConfig } from '@camunda/ccma-api';
|
|
2
|
-
import type
|
|
2
|
+
import { type ConsoleClusterDto } from '@camunda/ccma-shared-types';
|
|
3
3
|
type TranslateFn = (key: string, options?: Record<string, unknown>) => string;
|
|
4
4
|
interface C4ClusterDetailsIpWhitelistTabProps {
|
|
5
5
|
cluster: ConsoleClusterDto | undefined;
|