@camunda/ccma-saas-frontend 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/c4-billing-page/elements/value-metric.js +2 -4
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +1 -1
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +4 -4
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.d.ts +6 -0
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +24 -10
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +10 -5
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +4 -3
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +8 -3
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +6 -4
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +8 -0
- package/lib/esm/components/c4-cluster-overview/applications.js +28 -23
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +1 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +5 -5
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.types.d.ts +10 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +5 -2
- package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +9 -5
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +2 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +2 -2
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +2 -1
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +2 -2
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +4 -4
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +1 -2
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +2 -2
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +1 -2
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +1 -2
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +1 -2
- package/lib/esm/components/c4-help-center/c4-help-center.js +3 -1
- package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.js +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +2 -2
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +10 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +2 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -2
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +7 -2
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +8 -0
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +2 -2
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +10 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +3 -2
- package/lib/esm/components/c4-link-button/c4-link-button.d.ts +1 -1
- package/lib/esm/components/c4-link-button/c4-link-button.js +2 -2
- package/lib/esm/components/c4-link-button/c4-link-button.types.d.ts +6 -0
- package/lib/esm/components/c4-management-api/c4-management-api.js +8 -3
- package/lib/esm/components/c4-page-template/c4-page-template.d.ts +13 -1
- package/lib/esm/components/c4-page-template/c4-page-template.js +3 -3
- package/lib/esm/components/c4-sm-dashboard/health-status.js +1 -1
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +1 -1
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +3 -1
- package/lib/esm/components/shared-charts/ds-line-chart.js +25 -11
- package/lib/esm/components/shared-charts/recharts-tokens.d.ts +16 -0
- package/lib/esm/components/shared-charts/recharts-tokens.js +31 -0
- package/lib/esm/i18n/en/entities/orgroles.json +2 -2
- package/lib/esm/i18n/en/pages/clusterdetails.json +3 -0
- package/lib/esm/i18n/en/pages/job-dashboard.json +2 -0
- package/lib/esm/index.d.ts +13 -1
- package/lib/esm/index.js +7 -1
- package/lib/esm/runtime/build-cluster-swagger-url.js +2 -2
- package/lib/esm/runtime/index.d.ts +1 -0
- package/lib/esm/runtime/index.js +1 -0
- package/lib/esm/runtime/nav/camunda-apps.js +2 -2
- package/lib/esm/ui/c4-definition-tooltip.d.ts +15 -0
- package/lib/esm/ui/c4-definition-tooltip.js +43 -0
- package/lib/esm/ui/index.d.ts +6 -0
- package/lib/esm/ui/index.js +20 -3
- package/lib/esm/utils/role-labels.js +5 -4
- package/lib/esm/utils/safe-translate.d.ts +27 -0
- package/lib/esm/utils/safe-translate.js +56 -0
- package/lib/esm/utils/section-heading-style.d.ts +13 -0
- package/lib/esm/utils/section-heading-style.js +25 -0
- package/lib/esm/widgets/c4-widget-scope.types.d.ts +20 -0
- package/lib/esm/widgets/c4-widget-scope.types.js +6 -0
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +5 -5
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +26 -57
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +27 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +63 -19
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +14 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +3 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +9 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +8 -17
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +31 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +34 -24
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +2 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +1 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +16 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +23 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +13 -15
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +2 -2
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +7 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +12 -6
- package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +10 -0
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +177 -17
- package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +15 -2
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.d.ts +5 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.js +61 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.d.ts +21 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.js +6 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.d.ts +5 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +58 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.d.ts +22 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.js +6 -0
- package/lib/esm/widgets/environment/use-cluster-api-clients.d.ts +26 -0
- package/lib/esm/widgets/environment/use-cluster-api-clients.js +48 -0
- package/lib/esm/widgets/environment/use-cluster-swagger-url.d.ts +19 -0
- package/lib/esm/widgets/environment/use-cluster-swagger-url.js +44 -0
- package/lib/esm/widgets/environment/use-cluster-version-flags.d.ts +16 -0
- package/lib/esm/widgets/environment/use-cluster-version-flags.js +40 -0
- package/lib/esm/widgets/group-details/c4-group-details-page.js +2 -2
- package/lib/esm/widgets/job-worker/c4-job-worker-details-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker-details-page.js +34 -25
- package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.js +26 -21
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +12 -0
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +6 -0
- package/lib/esm/widgets/job-worker/c4-job-worker.types.d.ts +19 -0
- package/lib/esm/widgets/management/c4-management-app.js +3 -3
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +1 -7
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -2
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +7 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.js +3 -3
- package/package.json +7 -7
|
@@ -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
|
|
@@ -4,16 +4,19 @@ 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,
|
|
8
|
-
import { checkVersion, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
7
|
+
import { AuditLoggerService, ConsoleAlertsService, ConsoleByomMonitoringService, ConsoleClusterParametersService, ConsoleClusterService, HdpService, HttpError, SaaSJobsService, } from '@camunda/ccma-api';
|
|
8
|
+
import { AUDIT_LOG_TAB_MIN_VERSION, CLUSTER_STATISTICS_CONFIG_MIN_VERSION, checkVersion, 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
|
+
import { normalizeClusterStatus } from '../../components/c4-cluster-overview/applications.js';
|
|
11
12
|
import { getC4ClusterDetailsUrls } from '../../externalUrls.const.js';
|
|
12
13
|
import { useC4ConsoleAuthz } from '../../runtime/c4-console-authz.js';
|
|
13
14
|
import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
|
|
14
15
|
import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
|
|
15
16
|
import { toApiConfig } from '../../runtime/to-api-config.js';
|
|
16
17
|
import { Modal, Stack, TextInput } from '../../ui/index.js';
|
|
18
|
+
import { useClusterApiClients } from '../environment/use-cluster-api-clients.js';
|
|
19
|
+
import { useClusterVersionFlags } from '../environment/use-cluster-version-flags.js';
|
|
17
20
|
import { C4ClusterDetailsPage } from './c4-cluster-details-page.js';
|
|
18
21
|
import { clusterDetailsTab } from './cluster-details-tabs.js';
|
|
19
22
|
import { C4ClusterDetailsActivityTab } from './tabs/c4-cluster-details-activity-tab.js';
|
|
@@ -473,7 +476,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
473
476
|
possiblyVersionOrDockerPath: zeebe,
|
|
474
477
|
trueForSnapshot: true,
|
|
475
478
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
476
|
-
versionToCompareTo:
|
|
479
|
+
versionToCompareTo: CLUSTER_STATISTICS_CONFIG_MIN_VERSION,
|
|
477
480
|
trueOnInvalidVersion: false,
|
|
478
481
|
})) {
|
|
479
482
|
return;
|
|
@@ -512,29 +515,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
512
515
|
]);
|
|
513
516
|
const canRename = Boolean(authz.visibilities.clusters?.canEdit);
|
|
514
517
|
const canDelete = Boolean(authz.visibilities.clusters?.canDelete);
|
|
515
|
-
const hasIdentityIntegration =
|
|
516
|
-
const zeebe = cluster?.generation?.versions?.zeebe;
|
|
517
|
-
if (!zeebe)
|
|
518
|
-
return false;
|
|
519
|
-
return checkVersion({
|
|
520
|
-
possiblyVersionOrDockerPath: zeebe,
|
|
521
|
-
trueForSnapshot: true,
|
|
522
|
-
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
523
|
-
versionToCompareTo: '8.8.0-alpha5',
|
|
524
|
-
trueOnInvalidVersion: false,
|
|
525
|
-
});
|
|
526
|
-
}, [cluster?.generation?.versions?.zeebe]);
|
|
527
|
-
const useClusterSecretsLabel = useMemo(() => {
|
|
528
|
-
const zeebe = cluster?.generation?.versions?.zeebe;
|
|
529
|
-
if (!zeebe)
|
|
530
|
-
return false;
|
|
531
|
-
return checkVersion({
|
|
532
|
-
possiblyVersionOrDockerPath: zeebe,
|
|
533
|
-
trueForSnapshot: 'compare',
|
|
534
|
-
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
535
|
-
versionToCompareTo: '8.10.0',
|
|
536
|
-
});
|
|
537
|
-
}, [cluster?.generation?.versions?.zeebe]);
|
|
518
|
+
const { hasIdentityIntegration, useClusterSecretsLabel } = useClusterVersionFlags(cluster);
|
|
538
519
|
const [dismissedFailedRestores, setDismissedFailedRestores] = useState(loadDismissedFailedRestores);
|
|
539
520
|
const dismissFailedRestore = useCallback((restoreId) => {
|
|
540
521
|
setDismissedFailedRestores((prev) => {
|
|
@@ -660,35 +641,13 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
660
641
|
// -----------------------------
|
|
661
642
|
// Clients tab state
|
|
662
643
|
// -----------------------------
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
644
|
+
const { clients, loading: clientsLoading, error: clientsError, reload: reloadClients, } = useClusterApiClients({
|
|
645
|
+
orgId: props.orgId,
|
|
646
|
+
clusterId: props.clusterId,
|
|
647
|
+
apiConfig,
|
|
648
|
+
enabled: canViewApiClientsTab,
|
|
649
|
+
});
|
|
667
650
|
const clientsDocsUrl = urls.docs.clients;
|
|
668
|
-
const reloadClients = useCallback(async () => {
|
|
669
|
-
if (!canViewApiClientsTab) {
|
|
670
|
-
setClients([]);
|
|
671
|
-
setClientsError(false);
|
|
672
|
-
clientsLoadedRef.current = true;
|
|
673
|
-
return;
|
|
674
|
-
}
|
|
675
|
-
setClientsLoading(true);
|
|
676
|
-
setClientsError(false);
|
|
677
|
-
try {
|
|
678
|
-
const loaded = await ConsoleClusterClientsService.getAll({
|
|
679
|
-
config: apiConfig,
|
|
680
|
-
params: { orgId: props.orgId, clusterId: props.clusterId },
|
|
681
|
-
});
|
|
682
|
-
setClients(loaded);
|
|
683
|
-
}
|
|
684
|
-
catch {
|
|
685
|
-
setClientsError(true);
|
|
686
|
-
}
|
|
687
|
-
finally {
|
|
688
|
-
clientsLoadedRef.current = true;
|
|
689
|
-
setClientsLoading(false);
|
|
690
|
-
}
|
|
691
|
-
}, [apiConfig, canViewApiClientsTab, props.clusterId, props.orgId]);
|
|
692
651
|
// -----------------------------
|
|
693
652
|
// Alerts tab state
|
|
694
653
|
// -----------------------------
|
|
@@ -1069,7 +1028,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1069
1028
|
}
|
|
1070
1029
|
return _jsx(_Fragment, {});
|
|
1071
1030
|
}
|
|
1072
|
-
return (_jsx(C4ClusterDetailsOverviewTab, { cluster: cluster, clusterError: clusterError, creationParameters: creationParameters, clustersOfOrg: clustersOfOrg, clusterPlanTypeReservations: clusterPlanTypeReservations, clusterLoadLatest: clusterLoadLatest, clusterLoadPerDay: clusterLoadPerDay, clusterLoad24h: clusterLoad24h, clusterLoadLoading: clusterLoadLoading, canSeeClusterLoad: canSeeClusterLoad, canEditCluster: Boolean(authz.visibilities.clusters?.canEdit), canWakeCluster: Boolean(authz.visibilities.clusters?.canWake), canSleepCluster: Boolean(authz.visibilities.clusters?.canSleep), canManageUsers: canManageUsers, canViewConnectorsLink: Boolean(orgPermissions?.cluster.connectors.read), hasIdentityIntegration: hasIdentityIntegration, orgId: props.orgId, clusterId: props.clusterId, jobDashboardEnabled: true, upgradeDocsUrls: urls.docs.upgrade, statisticsConfig: statisticsConfig, apiConfig: apiConfig, t: t ?? ((key) => key), onReloadCluster: reloadCluster, onReloadClusterLoad: reloadClusterLoad, onNavigate: props.onNavigate, ignoreGracePeriod: ignoreGracePeriod, clusterLoadDocsUrl: urls.docs.clusterLoad, restoreInProgress: cluster?.restoreInProgress }));
|
|
1031
|
+
return (_jsx(C4ClusterDetailsOverviewTab, { cluster: cluster, clusterError: clusterError, creationParameters: creationParameters, clustersOfOrg: clustersOfOrg, clusterPlanTypeReservations: clusterPlanTypeReservations, clusterLoadLatest: clusterLoadLatest, clusterLoadPerDay: clusterLoadPerDay, clusterLoad24h: clusterLoad24h, clusterLoadLoading: clusterLoadLoading, canSeeClusterLoad: canSeeClusterLoad, canEditCluster: Boolean(authz.visibilities.clusters?.canEdit), canWakeCluster: Boolean(authz.visibilities.clusters?.canWake), canSleepCluster: Boolean(authz.visibilities.clusters?.canSleep), canManageUsers: canManageUsers, canViewConnectorsLink: Boolean(orgPermissions?.cluster.connectors.read), hasIdentityIntegration: hasIdentityIntegration, orgId: props.orgId, clusterId: props.clusterId, jobDashboardEnabled: true, upgradeDocsUrls: urls.docs.upgrade, statisticsConfig: statisticsConfig, apiConfig: apiConfig, t: t ?? ((key) => key), onReloadCluster: reloadCluster, onReloadClusterLoad: reloadClusterLoad, onNavigate: props.onNavigate, ignoreGracePeriod: ignoreGracePeriod, clusterLoadDocsUrl: urls.docs.clusterLoad, restoreInProgress: cluster?.restoreInProgress, overviewSection: props.overviewSection, sectionVariant: props.sectionVariant }));
|
|
1073
1032
|
}, [
|
|
1074
1033
|
apiConfig,
|
|
1075
1034
|
authz.visibilities.clusters?.canEdit,
|
|
@@ -1093,6 +1052,8 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1093
1052
|
props.clusterId,
|
|
1094
1053
|
props.orgId,
|
|
1095
1054
|
props.onNavigate,
|
|
1055
|
+
props.overviewSection,
|
|
1056
|
+
props.sectionVariant,
|
|
1096
1057
|
urls,
|
|
1097
1058
|
reloadCluster,
|
|
1098
1059
|
reloadClusterLoad,
|
|
@@ -1416,7 +1377,7 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1416
1377
|
possiblyVersionOrDockerPath: cluster.generation.versions.zeebe,
|
|
1417
1378
|
trueForSnapshot: true,
|
|
1418
1379
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
1419
|
-
versionToCompareTo:
|
|
1380
|
+
versionToCompareTo: AUDIT_LOG_TAB_MIN_VERSION,
|
|
1420
1381
|
trueOnInvalidVersion: false,
|
|
1421
1382
|
})),
|
|
1422
1383
|
init: () => { },
|
|
@@ -1499,11 +1460,19 @@ export const C4ClusterDetailsApp = observer((props) => {
|
|
|
1499
1460
|
isCreationParametersLoading,
|
|
1500
1461
|
isSecureConnectivityTabVisible,
|
|
1501
1462
|
]);
|
|
1463
|
+
// Same three facts the org's Clusters list already shows per cluster (phase, health, generation) —
|
|
1464
|
+
// repeated here, next to the cluster name, so they read at a glance without scrolling to the
|
|
1465
|
+
// Cluster Details table below.
|
|
1466
|
+
const headerPhaseTag = cluster?.labels?.camunda?.[0];
|
|
1467
|
+
const headerHealthStatus = normalizeClusterStatus(cluster?.status?.ready);
|
|
1468
|
+
// `generation.name` already reads "Camunda 8.10.0-alpha4" — the org's Clusters list renders it
|
|
1469
|
+
// verbatim as the Generation column, so this does too rather than prefixing "Camunda" again.
|
|
1470
|
+
const headerVersionLabel = cluster?.generation?.name;
|
|
1502
1471
|
// primaryBanner takes priority — an active restore, an unmaintained
|
|
1503
1472
|
// generation, or disabled authorizations all matter more than a
|
|
1504
1473
|
// one-time "update your endpoint" nudge.
|
|
1505
1474
|
const banner = primaryBanner ?? failoverUriBanner;
|
|
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: {
|
|
1475
|
+
return (_jsxs(_Fragment, { children: [_jsx(C4ClusterDetailsPage, { loading: isClusterLoading || authz.isLoading, padding: props.padding, clusterName: cluster?.name, phaseTag: headerPhaseTag, healthStatus: headerHealthStatus, versionLabel: headerVersionLabel, isDevelopmentPlan: cluster?.planType?.development, urls: { clusters: urls.clusters }, onNavigateToClusters: () => props.onNavigate?.({ kind: 'clusters', orgId: props.orgId }), menu: {
|
|
1507
1476
|
canRename,
|
|
1508
1477
|
canDelete,
|
|
1509
1478
|
onRename: canRename ? () => setRenameOpen(true) : undefined,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
1
2
|
export type C4ClusterDetailsTabId = 'overview' | 'api' | 'monitoring' | 'alerts' | 'activity' | 'privateNetworking' | 'backups' | 'auditLog' | 'settings' | 'secrets' | 'encryption' | 'ipWhitelist';
|
|
2
3
|
export type C4ClusterDetailsNavigateEvent = {
|
|
3
4
|
kind: 'tabChange';
|
|
@@ -39,6 +40,32 @@ export interface C4ClusterDetailsAppProps {
|
|
|
39
40
|
desiredTabId?: C4ClusterDetailsTabId;
|
|
40
41
|
onNavigate?: (event: C4ClusterDetailsNavigateEvent) => void;
|
|
41
42
|
urls: C4ClusterDetailsUrls;
|
|
43
|
+
/**
|
|
44
|
+
* Side/top/bottom padding around the page. Defaults to `'default'`.
|
|
45
|
+
* `'none'` drops it for a host that already provides its own page padding
|
|
46
|
+
* — forwarded verbatim to `C4ClusterDetailsPage`/`C4PageTemplate`.
|
|
47
|
+
*/
|
|
48
|
+
padding?: 'default' | 'none';
|
|
49
|
+
/**
|
|
50
|
+
* `'tile'` (default) renders the Components, Cluster Details, Cluster
|
|
51
|
+
* Load, and Jobs sections each inside their own bordered card — Console's
|
|
52
|
+
* own look. `'plain'` drops those cards in favor of bare headings, for a
|
|
53
|
+
* host whose `overviewSection` already renders a bare heading of its own.
|
|
54
|
+
*/
|
|
55
|
+
sectionVariant?: 'tile' | 'plain';
|
|
56
|
+
/**
|
|
57
|
+
* A host-rendered section placed on the overview tab, directly above the
|
|
58
|
+
* Components section.
|
|
59
|
+
*
|
|
60
|
+
* Deliberately an untyped slot: the host renders whatever belongs there and
|
|
61
|
+
* passes the finished element in, so this package models none of its content
|
|
62
|
+
* and fetches nothing for it. Camunda Hub uses it for an environments list,
|
|
63
|
+
* but nothing here is specific to environments — the host's content and its
|
|
64
|
+
* presentation stay free to change without a release of this package.
|
|
65
|
+
*
|
|
66
|
+
* Omitted → nothing is rendered there, which is what Console itself does.
|
|
67
|
+
*/
|
|
68
|
+
overviewSection?: ReactNode;
|
|
42
69
|
}
|
|
43
70
|
export interface C4ClusterDetailsUpgradeDocsUrls {
|
|
44
71
|
whatsNewIn88: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JSX } from 'react';
|
|
2
2
|
import type { C4ClusterDetailsPageProps } from './c4-cluster-details-page.types.js';
|
|
3
|
-
export declare const C4ClusterDetailsPage: ({ loading, clusterName, isDevelopmentPlan, urls, onNavigateToClusters, menu, banner, tabs, }: C4ClusterDetailsPageProps) => JSX.Element;
|
|
3
|
+
export declare const C4ClusterDetailsPage: ({ loading, clusterName, isDevelopmentPlan, phaseTag, healthStatus, versionLabel, urls, onNavigateToClusters, menu, banner, tabs, padding, }: C4ClusterDetailsPageProps) => JSX.Element;
|
|
@@ -4,9 +4,13 @@ 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 { C3ClusterTag } from '@camunda/camunda-composite-components';
|
|
8
|
+
import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, } from '@camunda/design-system';
|
|
7
9
|
import { WarningAltFilled } from '@carbon/react/icons/index.esm.js';
|
|
10
|
+
import { TriangleAlert } from 'lucide-react';
|
|
11
|
+
import { ClusterStatusElement } from '../../components/c4-cluster-overview/applications.js';
|
|
8
12
|
import { C4PageTemplate } from '../../components/c4-page-template/c4-page-template.js';
|
|
9
|
-
import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
|
|
13
|
+
import { useC4ConsoleRuntime, useC4DesignSystem, } from '../../runtime/c4-console-runtime-context.js';
|
|
10
14
|
import { BreadcrumbSkeleton, Link, SkeletonText, Stack, TabsSkeleton, Tooltip, } from '../../ui/index.js';
|
|
11
15
|
const breadCrumbWrapperStyles = {
|
|
12
16
|
minHeight: '40px',
|
|
@@ -15,6 +19,28 @@ const breadCrumbWrapperStyles = {
|
|
|
15
19
|
gridAutoColumns: 'max-content',
|
|
16
20
|
alignItems: 'center',
|
|
17
21
|
};
|
|
22
|
+
// `ClusterStatusElement` and a plain version string carry no chrome of their own — unlike
|
|
23
|
+
// `C3ClusterTag`'s phase badge, which is already a filled pill. Wrapping them in an explicit
|
|
24
|
+
// bordered/filled pill (rather than the design system's own "subtle" badge tokens, too close to the
|
|
25
|
+
// page background to read as a pill here) keeps all three header facts visually consistent.
|
|
26
|
+
//
|
|
27
|
+
// `var(--border)` rather than `var(--cds-border-subtle)`: the latter is Carbon's own token, only
|
|
28
|
+
// remapped to the DS-equivalent (lighter) neutral gray under `html.c4-ds .c4-ui` — a class this page
|
|
29
|
+
// doesn't control and isn't guaranteed when hosted (e.g. inside Camunda Hub, where it isn't set). Its
|
|
30
|
+
// unremapped Carbon fallback is visibly darker/stronger than every other bordered surface on this same
|
|
31
|
+
// page (the Cluster Details table, the Components tiles). `--border` is the DS token those other
|
|
32
|
+
// surfaces already resolve to, so referencing it directly matches them regardless of hosting context.
|
|
33
|
+
const headerBadgeStyle = {
|
|
34
|
+
display: 'inline-flex',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
gap: '0.25rem',
|
|
37
|
+
padding: '0.125rem 0.625rem',
|
|
38
|
+
borderRadius: '9999px',
|
|
39
|
+
border: '1px solid var(--border)',
|
|
40
|
+
backgroundColor: 'var(--cds-layer)',
|
|
41
|
+
fontSize: 'var(--cds-label-01-font-size, 0.75rem)',
|
|
42
|
+
whiteSpace: 'nowrap',
|
|
43
|
+
};
|
|
18
44
|
function safeTranslate(t, key, fallback) {
|
|
19
45
|
try {
|
|
20
46
|
const translated = t?.(key);
|
|
@@ -100,14 +126,37 @@ function buildBanner(opts) {
|
|
|
100
126
|
}
|
|
101
127
|
return undefined;
|
|
102
128
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
129
|
+
/**
|
|
130
|
+
* Cluster-header indicator for "authorizations disabled".
|
|
131
|
+
*
|
|
132
|
+
* Transformation component (cf. `docs/c4-carbon-compat.md`): the carbon branch
|
|
133
|
+
* reproduces the deployed Carbon render exactly — a `Tooltip` recoloured to a
|
|
134
|
+
* light surface through `--cds-*-inverse` overrides, with the docs link inlined
|
|
135
|
+
* in the tooltip description.
|
|
136
|
+
*
|
|
137
|
+
* The ds branch does not carry that hack over: the `--cds-*-inverse` overrides
|
|
138
|
+
* are no-ops outside Carbon, and Carbon's tooltip type scale doesn't match the
|
|
139
|
+
* `Link` nested inside it (feedback: "odd padding around text, learn more has
|
|
140
|
+
* different font-size"). It renders the DS `Popover` instead, which owns its
|
|
141
|
+
* padding and type scale. A tooltip is also the wrong component for actionable
|
|
142
|
+
* content — its description isn't hoverable or focusable, so the "Learn more"
|
|
143
|
+
* link can't actually be reached.
|
|
144
|
+
*/
|
|
145
|
+
function AuthorizationsDisabledIndicator(props) {
|
|
146
|
+
const { banner, t } = props;
|
|
147
|
+
const designSystem = useC4DesignSystem();
|
|
108
148
|
const title = safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.title', 'Authorizations disabled');
|
|
109
149
|
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.');
|
|
110
150
|
const actionLabel = safeTranslate(t, 'c4console:clusterDetails.banner.authorizationsDisabled.actionLabel', 'Learn more about managing authorizations');
|
|
151
|
+
const onLearnMoreClick = (event) => {
|
|
152
|
+
if (banner.onLearnMore) {
|
|
153
|
+
event.preventDefault();
|
|
154
|
+
banner.onLearnMore();
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
if (designSystem === 'ds') {
|
|
158
|
+
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 })] })] }));
|
|
159
|
+
}
|
|
111
160
|
return (_jsx("div", { style: {
|
|
112
161
|
'--cds-background-inverse': 'var(--cds-layer)',
|
|
113
162
|
'--cds-text-inverse': 'var(--cds-text-primary)',
|
|
@@ -116,12 +165,7 @@ function buildAuthorizationsDisabledIndicator(opts) {
|
|
|
116
165
|
display: 'block',
|
|
117
166
|
whiteSpace: 'normal',
|
|
118
167
|
maxWidth: '20rem',
|
|
119
|
-
}, children: [subtitle, ' ', _jsx(Link, { href: banner.docsUrl, target: '_blank', rel: 'noopener noreferrer', inline: true, onClick:
|
|
120
|
-
if (banner.onLearnMore) {
|
|
121
|
-
event.preventDefault();
|
|
122
|
-
banner.onLearnMore();
|
|
123
|
-
}
|
|
124
|
-
}, children: actionLabel })] }), children: _jsxs("button", { type: 'button', "aria-label": title, style: {
|
|
168
|
+
}, 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: {
|
|
125
169
|
display: 'inline-flex',
|
|
126
170
|
alignItems: 'center',
|
|
127
171
|
gap: '0.25rem',
|
|
@@ -133,7 +177,7 @@ function buildAuthorizationsDisabledIndicator(opts) {
|
|
|
133
177
|
fontSize: 'var(--cds-body-compact-01-font-size)',
|
|
134
178
|
}, children: [_jsx(WarningAltFilled, { size: 16, style: { fill: 'var(--cds-support-caution-major)' } }), title] }) }) }));
|
|
135
179
|
}
|
|
136
|
-
export const C4ClusterDetailsPage = ({ loading, clusterName, isDevelopmentPlan, urls, onNavigateToClusters, menu, banner, tabs, }) => {
|
|
180
|
+
export const C4ClusterDetailsPage = ({ loading, clusterName, isDevelopmentPlan, phaseTag, healthStatus, versionLabel, urls, onNavigateToClusters, menu, banner, tabs, padding = 'default', }) => {
|
|
137
181
|
const runtime = useC4ConsoleRuntime();
|
|
138
182
|
const t = runtime.i18n?.t;
|
|
139
183
|
if (loading) {
|
|
@@ -143,14 +187,14 @@ export const C4ClusterDetailsPage = ({ loading, clusterName, isDevelopmentPlan,
|
|
|
143
187
|
? safeTranslate(t, 'c4console:clusterDetails.tag.development', 'Development')
|
|
144
188
|
: '';
|
|
145
189
|
const bannerProps = buildBanner({ banner, t });
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
});
|
|
190
|
+
const indicator = banner?.kind === 'authorizationsDisabled' ? (_jsx(AuthorizationsDisabledIndicator, { banner: banner, t: t })) : undefined;
|
|
191
|
+
const hasHeaderBadges = Boolean(phaseTag || healthStatus || versionLabel);
|
|
192
|
+
const subtitleBadges = hasHeaderBadges ? (_jsxs(Stack, { orientation: 'horizontal', gap: 3, children: [phaseTag && _jsx(C3ClusterTag, { stage: phaseTag }), healthStatus && (_jsx("span", { style: headerBadgeStyle, children: _jsx(ClusterStatusElement, { status: healthStatus }) })), versionLabel && _jsx("span", { style: headerBadgeStyle, children: versionLabel })] })) : undefined;
|
|
150
193
|
return (_jsx(C4PageTemplate, { loading: loading, banner: bannerProps, header: {
|
|
151
194
|
title: clusterName ?? '',
|
|
152
195
|
tag,
|
|
153
|
-
indicator
|
|
196
|
+
indicator,
|
|
197
|
+
subtitleBadges,
|
|
154
198
|
menuItems: buildMenuItems({ menu, t }),
|
|
155
199
|
}, breadcrumbs: {
|
|
156
200
|
elements: [
|
|
@@ -165,5 +209,5 @@ export const C4ClusterDetailsPage = ({ loading, clusterName, isDevelopmentPlan,
|
|
|
165
209
|
list: tabs.list,
|
|
166
210
|
desiredTabId: tabs.desiredTabId,
|
|
167
211
|
onChange: tabs.onChange,
|
|
168
|
-
} }));
|
|
212
|
+
}, padding: padding }));
|
|
169
213
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { CamundaClusterStage } from '@camunda/ccma-shared-types';
|
|
2
|
+
import type { ClusterStatus } from '../../components/c4-cluster-overview/applications.js';
|
|
1
3
|
import type { C4TabProps } from '../../components/c4-tabs/c4-tabs.types.js';
|
|
2
4
|
export type C4ClusterDetailsPageBanner = {
|
|
3
5
|
kind: 'unsupportedGeneration';
|
|
@@ -21,8 +23,20 @@ export type C4ClusterDetailsPageBanner = {
|
|
|
21
23
|
export type C4ClusterDetailsTab = C4TabProps;
|
|
22
24
|
export interface C4ClusterDetailsPageProps {
|
|
23
25
|
loading: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Side/top/bottom padding around the page (breadcrumb, tabs, and tab
|
|
28
|
+
* content). Defaults to `'default'`. `'none'` drops it for a host that
|
|
29
|
+
* already provides its own page padding (e.g. Camunda Hub hosts this page
|
|
30
|
+
* inside its own scrolling, padded shell) — see `C4PageTemplate`'s own
|
|
31
|
+
* `padding` prop, which this forwards to verbatim.
|
|
32
|
+
*/
|
|
33
|
+
padding?: 'default' | 'none';
|
|
24
34
|
clusterName?: string;
|
|
25
35
|
isDevelopmentPlan?: boolean;
|
|
36
|
+
/** The cluster's own lifecycle tag, health, and generation — shown as badges beside the name. */
|
|
37
|
+
phaseTag?: CamundaClusterStage;
|
|
38
|
+
healthStatus?: ClusterStatus;
|
|
39
|
+
versionLabel?: string;
|
|
26
40
|
urls: {
|
|
27
41
|
clusters: string;
|
|
28
42
|
};
|
|
@@ -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) {
|
|
@@ -7,6 +7,7 @@ import { C4ClusterByomClients } from '../../../components/c4-cluster-byom-client
|
|
|
7
7
|
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
8
8
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
9
9
|
import { Button, CodeSnippet, Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
10
|
+
import { SECTION_HEADING_STYLE } from '../../../utils/section-heading-style.js';
|
|
10
11
|
// Helper function to ensure translations work
|
|
11
12
|
function safeTranslate(t, key, fallback) {
|
|
12
13
|
if (!t)
|
|
@@ -214,11 +215,11 @@ export const C4ClusterDetailsByomClientsTab = (props) => {
|
|
|
214
215
|
const monitoringEndpointLabel = safeTranslate(t, 'clusterdetails:byomClients.monitoringEndpoint', 'Monitoring endpoint');
|
|
215
216
|
return (_jsxs(_Fragment, { children: [_jsx(C4ClusterByomClients, { clients: byomClients, isLoading: byomLoading, hasError: byomError, text: {
|
|
216
217
|
title: safeTranslate(t, 'clusterdetails:byomClients.dataTableTitle', 'Cluster Monitoring endpoint activated'),
|
|
217
|
-
subtitle: (_jsxs(Stack, { children: [_jsx("p", { children: monitoringDescription }), endpointForDisplay ? (_jsxs(_Fragment, { children: [_jsxs(Stack, { orientation: 'horizontal', style: { width: '40%' }, children: [_jsx("h3", { children: monitoringEndpointLabel }), statusComponent] }), _jsxs(Stack, { orientation: 'horizontal', children: [_jsx(Layer, { children: _jsx(CodeSnippet, { type: 'single', children: endpointForDisplay }) }), _jsx(Button, { kind: 'ghost', disabled: !canMutateCluster, onClick: () => {
|
|
218
|
+
subtitle: (_jsxs(Stack, { children: [_jsx("p", { children: monitoringDescription }), endpointForDisplay ? (_jsxs(_Fragment, { children: [_jsxs(Stack, { orientation: 'horizontal', style: { width: '40%' }, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: monitoringEndpointLabel }), statusComponent] }), _jsxs(Stack, { orientation: 'horizontal', children: [_jsx(Layer, { children: _jsx(CodeSnippet, { type: 'single', children: endpointForDisplay }) }), _jsx(Button, { kind: 'ghost', disabled: !canMutateCluster, onClick: () => {
|
|
218
219
|
trackEvent('byomClients:deactivate:open', 'Open Deactivate BYOM Modal');
|
|
219
220
|
setByomDeactivateError({ title: '', description: '' });
|
|
220
221
|
setByomDeactivateOpen(true);
|
|
221
|
-
}, children: safeTranslate(t, 'clusterdetails:byomClients.deactivate', 'Deactivate') })] }), _jsx("h3", { children: "Credentials for authentication" })] })) : null] })),
|
|
222
|
+
}, children: safeTranslate(t, 'clusterdetails:byomClients.deactivate', 'Deactivate') })] }), _jsx("h3", { style: SECTION_HEADING_STYLE, children: "Credentials for authentication" })] })) : null] })),
|
|
222
223
|
createButton: safeTranslate(t, 'clusterdetails:byomClients.createButton', 'Create new credentials'),
|
|
223
224
|
createFirstClient: safeTranslate(t, 'clusterdetails:byomClients.createFirstClient', 'Activate monitoring endpoint'),
|
|
224
225
|
searchLabel: 'Search',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ConsoleClusterClientDto, RequestBaseParamsConfig } from '@camunda/ccma-api';
|
|
2
2
|
import { type ConsoleClusterDto } from '@camunda/ccma-shared-types';
|
|
3
|
-
type TranslateFn
|
|
3
|
+
import type { TranslateFn } from '../../../utils/safe-translate.js';
|
|
4
|
+
import type { C4WidgetScope } from '../../c4-widget-scope.types.js';
|
|
4
5
|
interface C4ClusterDetailsClientsTabProps {
|
|
5
6
|
cluster: ConsoleClusterDto | undefined;
|
|
6
7
|
clients: ConsoleClusterClientDto[];
|
|
@@ -22,6 +23,13 @@ interface C4ClusterDetailsClientsTabProps {
|
|
|
22
23
|
canDelete: boolean;
|
|
23
24
|
};
|
|
24
25
|
useClusterSecretsLabel?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Surface this tab is rendered on. Defaults to `'cluster'`.
|
|
28
|
+
*
|
|
29
|
+
* Only the identity-setup sentence names the surface; everything else in this
|
|
30
|
+
* panel ("Client credentials", the column headers) reads correctly on either.
|
|
31
|
+
*/
|
|
32
|
+
scope?: C4WidgetScope;
|
|
25
33
|
t: TranslateFn | undefined;
|
|
26
34
|
onNavigate?: (event: unknown) => void;
|
|
27
35
|
onReloadClients: () => Promise<void>;
|
|
@@ -1,25 +1,16 @@
|
|
|
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';
|
|
11
|
+
import { safeTranslate, scopedTranslate } from '../../../utils/safe-translate.js';
|
|
12
|
+
import { SECTION_HEADING_STYLE } from '../../../utils/section-heading-style.js';
|
|
12
13
|
import { toHostWithoutProtocol } from './url-utils.js';
|
|
13
|
-
// Helper function to ensure translations work
|
|
14
|
-
function safeTranslate(t, key, fallback) {
|
|
15
|
-
if (!t)
|
|
16
|
-
return fallback;
|
|
17
|
-
const result = t(key);
|
|
18
|
-
// i18next can return the key without the namespace when the namespace is missing.
|
|
19
|
-
// Example: `clusterclients:create.generated.envVars.title` -> `create.generated.envVars.title`
|
|
20
|
-
const keyWithoutNamespace = key.includes(':') ? key.split(':')[1] : key;
|
|
21
|
-
return result === key || result === keyWithoutNamespace ? fallback : result;
|
|
22
|
-
}
|
|
23
14
|
function downloadTextFile(params) {
|
|
24
15
|
const blob = new Blob([params.content], { type: params.mimeType });
|
|
25
16
|
const url = URL.createObjectURL(blob);
|
|
@@ -73,7 +64,7 @@ function renderInlineLink(value, opts) {
|
|
|
73
64
|
}
|
|
74
65
|
export const C4ClusterDetailsClientsTab = (props) => {
|
|
75
66
|
const runtime = useC4ConsoleRuntime();
|
|
76
|
-
const { cluster, clients, clientsLoading, clientsError, hasIdentityIntegration, orgId, clusterId, clientsDocsUrl, mcpSetupDocsUrl: mcpSetupDocsUrlFromProps, identityAuthorizationDocsUrl, springZeebeGettingStartedDocsUrl, springZeebeConfigDocsUrl, apiConfig, canMutateCluster, clientsPermissions, useClusterSecretsLabel, t, onNavigate, onReloadClients, } = props;
|
|
67
|
+
const { cluster, clients, clientsLoading, clientsError, hasIdentityIntegration, orgId, clusterId, clientsDocsUrl, mcpSetupDocsUrl: mcpSetupDocsUrlFromProps, identityAuthorizationDocsUrl, springZeebeGettingStartedDocsUrl, springZeebeConfigDocsUrl, apiConfig, canMutateCluster, clientsPermissions, useClusterSecretsLabel, scope = 'cluster', t, onNavigate, onReloadClients, } = props;
|
|
77
68
|
const oauthTokenUrl = useMemo(() => {
|
|
78
69
|
const base = runtime.publicUrls?.loginBaseUrl || runtime.backendUrls.identityApiBaseUrl;
|
|
79
70
|
return base ? joinUrl(base, '/oauth/token') : '';
|
|
@@ -149,7 +140,7 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
149
140
|
return (_jsxs(_Fragment, { children: [_jsx(C4ClusterDetailsClients, { clients: clientRows, isLoading: clientsLoading, hasError: clientsError, hasIdentityIntegration: hasIdentityIntegration, hasIdentityAuthorization: Boolean(cluster?.identityBackendChecksEnabled), hasZeebeUrl: Boolean(cluster?.status?.zeebeUrl), text: {
|
|
150
141
|
title: safeTranslate(t, 'clusterdetails:clients.dataTableTitle', 'Client credentials'),
|
|
151
142
|
subtitle: safeTranslate(t, 'clusterdetails:clients.dataTableSubTitle', 'Open a set of credentials to see the base URLs, connection information, and more.'),
|
|
152
|
-
subtitleIdentityPrefix: "To set up permissions, copy the client ID over to the cluster's Admin and configure the required access and roles. Learn more about",
|
|
143
|
+
subtitleIdentityPrefix: scopedTranslate(t, scope, 'clusterdetails:clients.subtitleIdentityPrefix', "To set up permissions, copy the client ID over to the cluster's Admin and configure the required access and roles. Learn more about", "To set up permissions, copy the client ID over to the environment's Admin and configure the required access and roles. Learn more about"),
|
|
153
144
|
subtitleIdentityLinkLabel: 'client credentials',
|
|
154
145
|
subtitleIdentitySuffix: '.',
|
|
155
146
|
identityButton: 'Configure authorizations',
|
|
@@ -291,7 +282,7 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
291
282
|
});
|
|
292
283
|
}, children: "Learn more about authorizations" }) })] })), clientMutationError && (_jsx(C4InlineNotification, { kind: 'error', title: safeTranslate(t, 'clusterclients:create.error.title', 'Error'), subtitle: clientMutationError, hideCloseButton: true, lowContrast: true })), _jsx(TextInput, { id: 'clusterClientName-create', name: 'name', "data-modal-primary-focus": true, labelText: safeTranslate(t, 'clusterclients:create.fields.name.label', 'Client Name'), maxLength: 50, value: clientName, placeholder: safeTranslate(t, 'clusterclients:create.fields.name.label', 'Client Name'), helperText: safeTranslate(t, 'clusterclients:create.fields.name.helperText', 'can contain letters, dashes, underscores, and digits'), invalid: Boolean(clientNameTouched && validateClientName(clientName)), invalidText: (clientNameTouched && validateClientName(clientName)) ?? '', onChange: (event) => {
|
|
293
284
|
setClientName(event.target.value);
|
|
294
|
-
}, onBlur: () => setClientNameTouched(true) }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.label', 'Scopes') }), _jsx("p", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.helperText', 'Scopes define the access for client credentials.') }), hasIdentityIntegration && (_jsx("p", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.helperText8_8', 'Granular authorizations for the Orchestration Cluster API can be managed via Orchestration Cluster Identity.') })), _jsx("div", { style: { marginBottom: '8px' }, children: renderInlineLink(safeTranslate(t, 'clusterclients:create.fields.scopes.learnMoreHelperText', 'Read more about <0>Scopes for Client Credentials</0>.'), {
|
|
285
|
+
}, onBlur: () => setClientNameTouched(true) }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { style: SECTION_HEADING_STYLE, children: safeTranslate(t, 'clusterclients:create.fields.scopes.label', 'Scopes') }), _jsx("p", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.helperText', 'Scopes define the access for client credentials.') }), hasIdentityIntegration && (_jsx("p", { children: safeTranslate(t, 'clusterclients:create.fields.scopes.helperText8_8', 'Granular authorizations for the Orchestration Cluster API can be managed via Orchestration Cluster Identity.') })), _jsx("div", { style: { marginBottom: '8px' }, children: renderInlineLink(safeTranslate(t, 'clusterclients:create.fields.scopes.learnMoreHelperText', 'Read more about <0>Scopes for Client Credentials</0>.'), {
|
|
295
286
|
href: clientsDocsUrl,
|
|
296
287
|
onNavigate,
|
|
297
288
|
labelFallback: 'Scopes for Client Credentials',
|
|
@@ -435,7 +426,7 @@ export const C4ClusterDetailsClientsTab = (props) => {
|
|
|
435
426
|
possiblyVersionOrDockerPath: cluster?.generation?.versions?.zeebe,
|
|
436
427
|
trueForSnapshot: true,
|
|
437
428
|
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
438
|
-
versionToCompareTo:
|
|
429
|
+
versionToCompareTo: MCP_MIN_VERSION,
|
|
439
430
|
trueOnInvalidVersion: false,
|
|
440
431
|
});
|
|
441
432
|
const mcpSetupDocsUrl = mcpSetupDocsUrlFromProps;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { RequestBaseParamsConfig } from '@camunda/ccma-api';
|
|
2
2
|
import type { JSX } from 'react';
|
|
3
|
-
type
|
|
3
|
+
import type { C4WidgetScope } from '../../c4-widget-scope.types.js';
|
|
4
|
+
type SecretsTranslateFn = (key: string, options?: Record<string, unknown>) => string;
|
|
4
5
|
interface C4ClusterDetailsConnectorSecretsTabProps {
|
|
5
6
|
orgId: string;
|
|
6
7
|
clusterId: string;
|
|
@@ -13,12 +14,40 @@ interface C4ClusterDetailsConnectorSecretsTabProps {
|
|
|
13
14
|
canDelete: boolean;
|
|
14
15
|
};
|
|
15
16
|
docsUrl?: string;
|
|
16
|
-
t?:
|
|
17
|
+
t?: SecretsTranslateFn;
|
|
17
18
|
onNavigate?: (event: {
|
|
18
19
|
kind: string;
|
|
19
20
|
url?: string;
|
|
20
21
|
}) => void;
|
|
21
22
|
useClusterSecretsLabel?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Surface this tab is rendered on. Defaults to `'cluster'`.
|
|
25
|
+
*
|
|
26
|
+
* Only the cluster-secrets info text is scoped — it is the one string here
|
|
27
|
+
* that names the surface ("…credentials in your cluster"). The feature name
|
|
28
|
+
* ("Connector secrets" / "Cluster secrets", chosen by `useClusterSecretsLabel`
|
|
29
|
+
* from the cluster's version) is product naming, not a surface descriptor, and
|
|
30
|
+
* does not change with scope; nor do the empty-state descriptions, which
|
|
31
|
+
* describe the secrets vault without naming a surface.
|
|
32
|
+
*/
|
|
33
|
+
scope?: C4WidgetScope;
|
|
34
|
+
/**
|
|
35
|
+
* Reports the resolved panel title and whether the panel is currently
|
|
36
|
+
* showing its empty state (loaded, no error, zero secrets).
|
|
37
|
+
*
|
|
38
|
+
* Embedded in Console's cluster-details tab strip, the feature name is
|
|
39
|
+
* carried by the surrounding tab label, and the panel itself only shows
|
|
40
|
+
* `title` when it has secrets to list (via the data table's own heading) —
|
|
41
|
+
* its empty state shows a generic "No secrets" heading instead. A
|
|
42
|
+
* standalone host with no tab strip has nowhere else to show the feature
|
|
43
|
+
* name when the list is empty, so it needs to know both pieces of state to
|
|
44
|
+
* render its own heading exactly once, reusing this tab's own key/fallback
|
|
45
|
+
* resolution rather than re-deriving the title independently.
|
|
46
|
+
*/
|
|
47
|
+
onPanelState?: (state: {
|
|
48
|
+
isEmpty: boolean;
|
|
49
|
+
title: string;
|
|
50
|
+
}) => void;
|
|
22
51
|
}
|
|
23
52
|
export declare const C4ClusterDetailsConnectorSecretsTab: ((props: C4ClusterDetailsConnectorSecretsTabProps) => JSX.Element) & {
|
|
24
53
|
displayName: string;
|