@camunda/ccma-saas-frontend 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +1 -1
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +9 -5
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.d.ts +6 -0
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +9 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +6 -3
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.types.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +9 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +2 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.types.d.ts +2 -0
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +19 -21
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts +19 -2
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +4 -3
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +2 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +6 -4
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +20 -0
- package/lib/esm/components/c4-cluster-overview/applications.js +37 -24
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +1 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +5 -5
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +6 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +15 -2
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.types.d.ts +10 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +7 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +5 -2
- package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +8 -0
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +20 -8
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +4 -2
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +3 -1
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +7 -3
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +2 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +9 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +69 -12
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +10 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +16 -2
- package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.d.ts +14 -0
- package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.d.ts +15 -0
- package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.js +10 -0
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +2 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +4 -2
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +24 -3
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +1 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +1 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +2 -0
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +2 -2
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +10 -5
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +10 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +2 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -2
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +7 -2
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +8 -0
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +2 -2
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +10 -5
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +10 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +3 -2
- package/lib/esm/components/c4-link-button/c4-link-button.d.ts +1 -1
- package/lib/esm/components/c4-link-button/c4-link-button.js +2 -2
- package/lib/esm/components/c4-link-button/c4-link-button.types.d.ts +6 -0
- package/lib/esm/components/c4-page-template/c4-page-template.d.ts +13 -1
- package/lib/esm/components/c4-page-template/c4-page-template.js +3 -3
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.types.d.ts +5 -0
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +2 -1
- package/lib/esm/externalUrls.const.d.ts +1 -1
- package/lib/esm/externalUrls.const.js +1 -1
- package/lib/esm/i18n/c4-console-i18n.js +6 -0
- package/lib/esm/i18n/en/pages/clusterdetails.json +28 -3
- package/lib/esm/i18n/en/pages/job-dashboard.json +2 -0
- package/lib/esm/index.d.ts +13 -3
- package/lib/esm/index.js +7 -3
- package/lib/esm/runtime/build-cluster-sso-callback-url.d.ts +34 -0
- package/lib/esm/runtime/build-cluster-sso-callback-url.js +49 -0
- package/lib/esm/runtime/build-cluster-swagger-url.d.ts +7 -2
- package/lib/esm/runtime/build-cluster-swagger-url.js +20 -5
- package/lib/esm/runtime/index.d.ts +2 -0
- package/lib/esm/runtime/index.js +2 -0
- package/lib/esm/ui/families.d.ts +4 -0
- package/lib/esm/ui/families.js +22 -2
- package/lib/esm/utils/safe-translate.d.ts +27 -0
- package/lib/esm/utils/safe-translate.js +56 -0
- package/lib/esm/utils/section-heading-style.d.ts +13 -0
- package/lib/esm/utils/section-heading-style.js +25 -0
- package/lib/esm/widgets/c4-widget-scope.types.d.ts +20 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +16 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +92 -74
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +27 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +81 -13
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +24 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +3 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +10 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +8 -13
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +42 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +38 -23
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.d.ts +7 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +26 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +16 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +50 -18
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +174 -3
- package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.d.ts +13 -0
- package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.js +29 -0
- package/lib/esm/widgets/cluster-health-override.d.ts +16 -0
- package/lib/esm/widgets/cluster-health-override.js +33 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +10 -10
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +7 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +10 -5
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +10 -5
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +10 -5
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +9 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +10 -5
- package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +10 -0
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.d.ts +5 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.js +66 -0
- package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.types.d.ts +21 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.d.ts +5 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +59 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.d.ts +22 -0
- package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.types.js +6 -0
- package/lib/esm/widgets/environment/use-cluster-api-clients.d.ts +26 -0
- package/lib/esm/widgets/environment/use-cluster-api-clients.js +48 -0
- package/lib/esm/widgets/environment/use-cluster-swagger-url.d.ts +22 -0
- package/lib/esm/widgets/environment/use-cluster-swagger-url.js +47 -0
- package/lib/esm/widgets/environment/use-cluster-version-flags.d.ts +16 -0
- package/lib/esm/widgets/environment/use-cluster-version-flags.js +40 -0
- package/lib/esm/widgets/job-worker/c4-job-worker-details-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker-details-page.js +34 -25
- package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.js +26 -21
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +12 -0
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +6 -0
- package/lib/esm/widgets/job-worker/c4-job-worker.types.d.ts +19 -0
- package/package.json +25 -25
- package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.d.ts +0 -16
- package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +0 -40
- package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.d.ts +0 -16
- package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +0 -142
- package/lib/esm/components/c4-advanced-search-filters/FieldRow.d.ts +0 -14
- package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +0 -136
- package/lib/esm/components/c4-advanced-search-filters/FiltersSection.d.ts +0 -13
- package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +0 -58
- package/lib/esm/components/c4-advanced-search-filters/OrSection.d.ts +0 -16
- package/lib/esm/components/c4-advanced-search-filters/OrSection.js +0 -118
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.d.ts +0 -3
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +0 -408
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.types.d.ts +0 -32
- package/lib/esm/components/c4-advanced-search-filters/state.types.d.ts +0 -14
- package/lib/esm/components/c4-advanced-search-filters/utils.d.ts +0 -5
- package/lib/esm/components/c4-advanced-search-filters/utils.js +0 -58
- /package/lib/esm/{components/c4-advanced-search-filters/c4-advanced-search-filters.types.js → widgets/c4-widget-scope.types.js} +0 -0
- /package/lib/esm/{components/c4-advanced-search-filters/state.types.js → widgets/environment/c4-cluster-api-clients-widget.types.js} +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ConsoleClusterService } from '@camunda/ccma-api';
|
|
3
|
-
import { BUSINESS_ID_UNIQUENESS_MIN_VERSION, BYOIDP_MIN_VERSION, checkVersion, ENFORCE_GROUPS_TASKLIST_V2_HIDDEN_MIN_VERSION, ENFORCE_GROUPS_TOGGLE_MIN_VERSION, IDENTITY_MANAGEMENT_MIN_VERSION, isAppIntegrationsVersionSupported, LINE_8_10_MIN_VERSION, MCP_MIN_VERSION, MULTI_TENANCY_TOGGLE_MIN_VERSION, OPTIMIZE_FILTERING_MIN_VERSION, RESOURCE_BASED_AUTHORIZATIONS_MIN_VERSION, SESSION_CONFIG_MIN_VERSION, SWAGGER_MIN_VERSION, TASKLIST_UPGRADE_BANNER_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
3
|
+
import { BUSINESS_ID_UNIQUENESS_MIN_VERSION, BYOIDP_MIN_VERSION, checkVersion, ENFORCE_GROUPS_TASKLIST_V2_HIDDEN_MIN_VERSION, ENFORCE_GROUPS_TOGGLE_MIN_VERSION, IDENTITY_MANAGEMENT_MIN_VERSION, isAppIntegrationsVersionSupported, isSecretsFilterModeConfigurable, LINE_8_10_MIN_VERSION, MCP_MIN_VERSION, MULTI_TENANCY_TOGGLE_MIN_VERSION, OPTIMIZE_FILTERING_MIN_VERSION, OPTIONAL_TELEMETRY_MIN_VERSION, RESOURCE_BASED_AUTHORIZATIONS_MIN_VERSION, SESSION_CONFIG_MIN_VERSION, SWAGGER_MIN_VERSION, TASKLIST_UPGRADE_BANNER_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
4
4
|
import { Fragment, useCallback, useMemo, useState, } from 'react';
|
|
5
5
|
import { C4ClusterSettings } from '../../../components/c4-cluster-settings/c4-cluster-settings.js';
|
|
6
6
|
import { ExternalIdentityProviderModal, } from '../../../components/c4-cluster-settings/elements/external-identity-provider-modal.js';
|
|
7
7
|
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
8
|
+
import { buildClusterSsoCallbackUrl } from '../../../runtime/build-cluster-sso-callback-url.js';
|
|
8
9
|
import { buildClusterSwaggerUrl } from '../../../runtime/build-cluster-swagger-url.js';
|
|
9
10
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
10
11
|
import { Link, Modal } from '../../../ui/index.js';
|
|
@@ -49,8 +50,10 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
49
50
|
const [isUpdatingLowLatency, setIsUpdatingLowLatency] = useState(false);
|
|
50
51
|
const [isUpdatingSwagger, setIsUpdatingSwagger] = useState(false);
|
|
51
52
|
const [isUpdatingMcp, setIsUpdatingMcp] = useState(false);
|
|
53
|
+
const [isUpdatingSecretsFilterMode, setIsUpdatingSecretsFilterMode] = useState(false);
|
|
52
54
|
const [isUpdatingBusinessIdUniqueness, setIsUpdatingBusinessIdUniqueness] = useState(false);
|
|
53
55
|
const [isUpdatingAppIntegrations, setIsUpdatingAppIntegrations] = useState(false);
|
|
56
|
+
const [isUpdatingOptionalTelemetry, setIsUpdatingOptionalTelemetry] = useState(false);
|
|
54
57
|
const [isUpdatingTasklistV2, setIsUpdatingTasklistV2] = useState(false);
|
|
55
58
|
const [showTasklistV2ConfirmModal, setShowTasklistV2ConfirmModal] = useState(false);
|
|
56
59
|
const [tasklistV2UpgradeError, setTasklistV2UpgradeError] = useState(undefined);
|
|
@@ -78,6 +81,17 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
78
81
|
body: (_jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.restartConfirm.body', 'Changing this setting restarts your cluster. Your cluster is briefly unavailable while it restarts.') })),
|
|
79
82
|
errorFallback: settingUpdateFailedFallback,
|
|
80
83
|
});
|
|
84
|
+
// BYOIDP (#9864): the delete is irreversible and takes the client secret with
|
|
85
|
+
// it, so it gets its own confirmation rather than the restart wording — a
|
|
86
|
+
// "Restart required" heading over a "Continue" button undersells what the
|
|
87
|
+
// action does.
|
|
88
|
+
const deleteExternalIdpConfirm = useRestartConfirm({
|
|
89
|
+
heading: safeTranslate(props.t, 'clusterdetails:settings.externalIdp.deleteConfirm.heading', 'Delete configuration'),
|
|
90
|
+
primaryButtonText: safeTranslate(props.t, 'clusterdetails:settings.externalIdp.deleteConfirm.confirm', 'Delete'),
|
|
91
|
+
secondaryButtonText: safeTranslate(props.t, 'clusterdetails:settings.externalIdp.deleteConfirm.cancel', 'Cancel'),
|
|
92
|
+
body: (_jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.externalIdp.deleteConfirm.body', 'This deletes the configuration and the client secret for this provider. To set it up again, you enter the configuration and a new client secret. Your cluster restarts.') })),
|
|
93
|
+
errorFallback: settingUpdateFailedFallback,
|
|
94
|
+
});
|
|
81
95
|
// Fire-and-forget wrapper for atomic toggles: asks for restart confirmation
|
|
82
96
|
// before applying.
|
|
83
97
|
const applyWithRestartConfirm = useCallback((apply) => () => {
|
|
@@ -133,6 +147,11 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
133
147
|
const isSwaggerToggleVisible = useMemo(() => {
|
|
134
148
|
return checkClusterVersion(SWAGGER_MIN_VERSION);
|
|
135
149
|
}, [checkClusterVersion]);
|
|
150
|
+
// isSecretsFilterModeConfigurable has its own floor per zeebe minor line, so
|
|
151
|
+
// it cannot use checkClusterVersion (a single floor).
|
|
152
|
+
const isSecretsFilterModeToggleVisible = useMemo(() => {
|
|
153
|
+
return isSecretsFilterModeConfigurable(props.cluster?.generation?.versions?.zeebe);
|
|
154
|
+
}, [props.cluster?.generation?.versions?.zeebe]);
|
|
136
155
|
const isMcpToggleVisible = useMemo(() => {
|
|
137
156
|
return checkClusterVersion(MCP_MIN_VERSION);
|
|
138
157
|
}, [checkClusterVersion]);
|
|
@@ -270,6 +289,32 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
270
289
|
setIsUpdatingSwagger(false);
|
|
271
290
|
}
|
|
272
291
|
}, [props, runtime.telemetry]);
|
|
292
|
+
const updateSecretsFilterMode = useCallback(async (mode) => {
|
|
293
|
+
if (!props.cluster)
|
|
294
|
+
return;
|
|
295
|
+
setIsUpdatingSecretsFilterMode(true);
|
|
296
|
+
try {
|
|
297
|
+
await ConsoleClusterService.updateCluster({
|
|
298
|
+
config: props.apiConfig,
|
|
299
|
+
params: { orgId: props.orgId, clusterId: props.clusterId },
|
|
300
|
+
body: { secretsFilterMode: mode },
|
|
301
|
+
});
|
|
302
|
+
await props.onReloadCluster();
|
|
303
|
+
}
|
|
304
|
+
catch (error) {
|
|
305
|
+
runtime.telemetry?.captureException?.(error, {
|
|
306
|
+
eventName: `secretsFilterMode:${mode}:confirm`,
|
|
307
|
+
message: `Error while setting secretsFilterMode to ${mode}`,
|
|
308
|
+
orgId: props.orgId,
|
|
309
|
+
clusterId: props.clusterId,
|
|
310
|
+
state: mode,
|
|
311
|
+
});
|
|
312
|
+
setOperationError(error instanceof Error ? error.message : settingUpdateFailedFallback);
|
|
313
|
+
}
|
|
314
|
+
finally {
|
|
315
|
+
setIsUpdatingSecretsFilterMode(false);
|
|
316
|
+
}
|
|
317
|
+
}, [props, runtime.telemetry]);
|
|
273
318
|
const toggleMcp = useCallback(async () => {
|
|
274
319
|
if (!props.cluster)
|
|
275
320
|
return;
|
|
@@ -354,6 +399,33 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
354
399
|
setIsUpdatingAppIntegrations(false);
|
|
355
400
|
}
|
|
356
401
|
}, [props, runtime.telemetry]);
|
|
402
|
+
const toggleOptionalTelemetry = useCallback(async () => {
|
|
403
|
+
if (!props.cluster)
|
|
404
|
+
return;
|
|
405
|
+
const nextState = !(props.cluster.optionalTelemetryEnabled ?? true);
|
|
406
|
+
setIsUpdatingOptionalTelemetry(true);
|
|
407
|
+
try {
|
|
408
|
+
await ConsoleClusterService.updateCluster({
|
|
409
|
+
config: props.apiConfig,
|
|
410
|
+
params: { orgId: props.orgId, clusterId: props.clusterId },
|
|
411
|
+
body: { optionalTelemetryEnabled: nextState },
|
|
412
|
+
});
|
|
413
|
+
await props.onReloadCluster();
|
|
414
|
+
}
|
|
415
|
+
catch (error) {
|
|
416
|
+
runtime.telemetry?.captureException?.(error, {
|
|
417
|
+
eventName: `optionalTelemetry:${nextState}:confirm`,
|
|
418
|
+
message: `Error while ${nextState ? 'enabling' : 'disabling'} optional telemetry`,
|
|
419
|
+
orgId: props.orgId,
|
|
420
|
+
clusterId: props.clusterId,
|
|
421
|
+
state: nextState,
|
|
422
|
+
});
|
|
423
|
+
setOperationError(error instanceof Error ? error.message : settingUpdateFailedFallback);
|
|
424
|
+
}
|
|
425
|
+
finally {
|
|
426
|
+
setIsUpdatingOptionalTelemetry(false);
|
|
427
|
+
}
|
|
428
|
+
}, [props, runtime.telemetry]);
|
|
357
429
|
const toggleTasklistV2 = useCallback(async () => {
|
|
358
430
|
if (!props.cluster)
|
|
359
431
|
return;
|
|
@@ -641,6 +713,35 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
641
713
|
setIsUpdatingExternalIdp(false);
|
|
642
714
|
}
|
|
643
715
|
}, [props, runtime.telemetry, settingUpdateFailedFallback]);
|
|
716
|
+
// BYOIDP (#9864): remove config, CR entry, and secret in one call. The toggle
|
|
717
|
+
// keeps the config on purpose (D4), so this is the only way back to a cluster
|
|
718
|
+
// that has never been configured.
|
|
719
|
+
const deleteExternalIdp = useCallback(async () => {
|
|
720
|
+
runtime.telemetry?.track?.('byoidp:delete', {
|
|
721
|
+
orgId: props.orgId,
|
|
722
|
+
clusterId: props.clusterId,
|
|
723
|
+
});
|
|
724
|
+
setIsUpdatingExternalIdp(true);
|
|
725
|
+
try {
|
|
726
|
+
await ConsoleClusterService.deleteExternalIdp({
|
|
727
|
+
config: props.apiConfig,
|
|
728
|
+
params: { orgId: props.orgId, clusterId: props.clusterId },
|
|
729
|
+
});
|
|
730
|
+
await props.onReloadCluster();
|
|
731
|
+
}
|
|
732
|
+
catch (error) {
|
|
733
|
+
runtime.telemetry?.captureException?.(error, {
|
|
734
|
+
eventName: 'byoidp:delete',
|
|
735
|
+
message: 'Error while deleting external identity provider',
|
|
736
|
+
orgId: props.orgId,
|
|
737
|
+
clusterId: props.clusterId,
|
|
738
|
+
});
|
|
739
|
+
setOperationError(error instanceof Error ? error.message : settingUpdateFailedFallback);
|
|
740
|
+
}
|
|
741
|
+
finally {
|
|
742
|
+
setIsUpdatingExternalIdp(false);
|
|
743
|
+
}
|
|
744
|
+
}, [props, runtime.telemetry, settingUpdateFailedFallback]);
|
|
644
745
|
const openIdentityBasedAuthorizationsConfirmation = useCallback(() => {
|
|
645
746
|
if (!props.cluster)
|
|
646
747
|
return;
|
|
@@ -685,6 +786,30 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
685
786
|
props.cluster?.generation?.versions?.connectorBridge,
|
|
686
787
|
isAppIntegrationsFeatureEnabled,
|
|
687
788
|
]);
|
|
789
|
+
const isOptionalTelemetryFeatureEnabled = runtime.featureFlags?.isEnabled?.('console.optionalTelemetry') ?? false;
|
|
790
|
+
const shouldShowOptionalTelemetry = useMemo(() => {
|
|
791
|
+
if (!isOptionalTelemetryFeatureEnabled) {
|
|
792
|
+
return false;
|
|
793
|
+
}
|
|
794
|
+
// The broker's analytics-exporter exists from 8.10.0-alpha1 onward
|
|
795
|
+
// (camunda-operator's AnalyticsExporterSupported feature gate). The floor
|
|
796
|
+
// here is higher because the toggle stays untested on real clusters
|
|
797
|
+
// below alpha5.
|
|
798
|
+
return checkClusterVersion(OPTIONAL_TELEMETRY_MIN_VERSION);
|
|
799
|
+
}, [checkClusterVersion, isOptionalTelemetryFeatureEnabled]);
|
|
800
|
+
// Both directions feed getZeebeSpec's analyticsExporter and restart the
|
|
801
|
+
// cluster, so both go through the shared restart confirmation. Only the disable
|
|
802
|
+
// direction gets the data-collection wording, since that's the direction
|
|
803
|
+
// that changes what leaves the cluster.
|
|
804
|
+
const handleOptionalTelemetryClick = useCallback(() => {
|
|
805
|
+
const currentlyEnabled = props.cluster?.optionalTelemetryEnabled ?? true;
|
|
806
|
+
restartConfirm.request({
|
|
807
|
+
onConfirm: toggleOptionalTelemetry,
|
|
808
|
+
...(currentlyEnabled && {
|
|
809
|
+
body: (_jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.optionalTelemetry.confirmBody', "Turning off optional telemetry restarts your cluster. Your cluster is briefly unavailable while it restarts. Camunda still collects contractual telemetry, which is required and can't be turned off.") })),
|
|
810
|
+
}),
|
|
811
|
+
});
|
|
812
|
+
}, [props.cluster, props.t, restartConfirm, toggleOptionalTelemetry]);
|
|
688
813
|
// Optimize data filters feed the generated spec, so a change restarts the
|
|
689
814
|
// cluster. The toggle/save actions are awaited by the child panel, so route
|
|
690
815
|
// them through the promise-based restart-confirm wrapper.
|
|
@@ -909,6 +1034,18 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
909
1034
|
setShowExternalIdpModal(true);
|
|
910
1035
|
},
|
|
911
1036
|
},
|
|
1037
|
+
// Only offered once something is configured — there is nothing to
|
|
1038
|
+
// delete before that, and the row already offers "Configure".
|
|
1039
|
+
deleteAction: props.cluster.externalIdpConfig
|
|
1040
|
+
? {
|
|
1041
|
+
label: 'Delete configuration',
|
|
1042
|
+
onClick: () => {
|
|
1043
|
+
deleteExternalIdpConfirm.request({
|
|
1044
|
+
onConfirm: deleteExternalIdp,
|
|
1045
|
+
});
|
|
1046
|
+
},
|
|
1047
|
+
}
|
|
1048
|
+
: undefined,
|
|
912
1049
|
onToggle: () => {
|
|
913
1050
|
// Can only enable once configured; opening the modal handles first setup.
|
|
914
1051
|
if (!props.cluster?.externalIdpConfig) {
|
|
@@ -1030,7 +1167,37 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
1030
1167
|
},
|
|
1031
1168
|
},
|
|
1032
1169
|
}),
|
|
1033
|
-
|
|
1170
|
+
...(isSecretsFilterModeToggleVisible && {
|
|
1171
|
+
secretsFilterModeToggle: {
|
|
1172
|
+
mode: props.cluster.externalMetadata?.secretsFilterMode ?? 'STRICT',
|
|
1173
|
+
description: safeTranslate(props.t, 'clusterdetails:settings.secretsFilterMode.description', 'Controls how Connectors filters secrets read from process variables. Strict blocks reads outside the allowed scope, Lax allows them with a warning, and Disabled turns the filter off.'),
|
|
1174
|
+
permissions: {
|
|
1175
|
+
mayChange: effectiveCanEdit,
|
|
1176
|
+
},
|
|
1177
|
+
action: {
|
|
1178
|
+
label: safeTranslate(props.t, 'clusterdetails:settings.secretsFilterMode.title', 'Secrets filter mode'),
|
|
1179
|
+
onChange: (mode) => applyWithRestartConfirm(() => updateSecretsFilterMode(mode))(),
|
|
1180
|
+
disabled: isUpdatingSecretsFilterMode,
|
|
1181
|
+
},
|
|
1182
|
+
},
|
|
1183
|
+
}),
|
|
1184
|
+
}, ...(shouldShowOptionalTelemetry && {
|
|
1185
|
+
// Its own peer tile, not a row inside `settings` — CONTRACTUAL
|
|
1186
|
+
// telemetry has no toggle anywhere, per issue #9725.
|
|
1187
|
+
optionalTelemetrySettings: {
|
|
1188
|
+
title: safeTranslate(props.t, 'clusterdetails:settings.optionalTelemetry.tileTitle', 'Optional telemetry'),
|
|
1189
|
+
enabled: props.cluster.optionalTelemetryEnabled ?? true,
|
|
1190
|
+
description: safeTranslate(props.t, 'clusterdetails:settings.optionalTelemetry.description', "Camunda collects optional usage data from this cluster to improve our products. When disabled, Camunda still collects contractual telemetry, which is required and can't be turned off."),
|
|
1191
|
+
permissions: {
|
|
1192
|
+
mayChange: effectiveCanEdit,
|
|
1193
|
+
},
|
|
1194
|
+
action: {
|
|
1195
|
+
label: safeTranslate(props.t, 'clusterdetails:settings.optionalTelemetry.title', 'Enable optional telemetry'),
|
|
1196
|
+
onClick: handleOptionalTelemetryClick,
|
|
1197
|
+
disabled: isUpdatingOptionalTelemetry,
|
|
1198
|
+
},
|
|
1199
|
+
},
|
|
1200
|
+
}), ...(canUpgradeTasklist &&
|
|
1034
1201
|
!props.cluster.externalMetadata?.tasklistV2Enabled && {
|
|
1035
1202
|
tasklistSettings: {
|
|
1036
1203
|
title: safeTranslate(props.t, 'clusterdetails:settings.tasklistMode.title', 'Upgrade to Tasklist v2'),
|
|
@@ -1104,7 +1271,11 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
1104
1271
|
setAuthorizationsConfirmError(undefined);
|
|
1105
1272
|
}, onRequestSubmit: () => {
|
|
1106
1273
|
void submitAuthorizationsConfirmation();
|
|
1107
|
-
}, size: 'sm', children: [authorizationsConfirmDescription, _jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.restartConfirm.note', 'Changing this setting also restarts your cluster. Your cluster is briefly unavailable while it restarts.') }), authorizationsConfirmError && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', hideCloseButton: true, title: '', subtitle: authorizationsConfirmError }))] })), restartConfirm.modal, shouldShowExternalIdp && (_jsx(ExternalIdentityProviderModal, { open: showExternalIdpModal, initialConfig: props.cluster.externalIdpConfig, saving: isUpdatingExternalIdp, error: externalIdpError,
|
|
1274
|
+
}, size: 'sm', children: [authorizationsConfirmDescription, _jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.restartConfirm.note', 'Changing this setting also restarts your cluster. Your cluster is briefly unavailable while it restarts.') }), authorizationsConfirmError && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', hideCloseButton: true, title: '', subtitle: authorizationsConfirmError }))] })), restartConfirm.modal, deleteExternalIdpConfirm.modal, shouldShowExternalIdp && (_jsx(ExternalIdentityProviderModal, { open: showExternalIdpModal, initialConfig: props.cluster.externalIdpConfig, saving: isUpdatingExternalIdp, error: externalIdpError, callbackUrl: buildClusterSsoCallbackUrl({
|
|
1275
|
+
cluster: props.cluster,
|
|
1276
|
+
clusterId: props.clusterId,
|
|
1277
|
+
stage: runtime.stage,
|
|
1278
|
+
}), onClose: () => {
|
|
1108
1279
|
if (isUpdatingExternalIdp)
|
|
1109
1280
|
return;
|
|
1110
1281
|
setShowExternalIdpModal(false);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ClusterLoadProps } from '../../../components/c4-cluster-overview/cluster-load.js';
|
|
2
|
+
import { type TranslateFn } from '../../../utils/safe-translate.js';
|
|
3
|
+
/**
|
|
4
|
+
* Copy for the cluster load card, from the i18n bundle.
|
|
5
|
+
*
|
|
6
|
+
* This function depends only on `t`.
|
|
7
|
+
* Use it when you cannot render the Overview tab widget (for example, in Storybook).
|
|
8
|
+
* Before this file, the screenshots used mock strings.
|
|
9
|
+
* As a result, an i18n-only change did not update the screenshots.
|
|
10
|
+
*
|
|
11
|
+
* `cluster-details-tabs.ts` stores tab titles for the same reason.
|
|
12
|
+
*/
|
|
13
|
+
export declare function buildClusterLoadTexts(t: TranslateFn | undefined): ClusterLoadProps['texts'];
|
|
@@ -0,0 +1,29 @@
|
|
|
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 { safeTranslate } from '../../../utils/safe-translate.js';
|
|
7
|
+
/**
|
|
8
|
+
* Copy for the cluster load card, from the i18n bundle.
|
|
9
|
+
*
|
|
10
|
+
* This function depends only on `t`.
|
|
11
|
+
* Use it when you cannot render the Overview tab widget (for example, in Storybook).
|
|
12
|
+
* Before this file, the screenshots used mock strings.
|
|
13
|
+
* As a result, an i18n-only change did not update the screenshots.
|
|
14
|
+
*
|
|
15
|
+
* `cluster-details-tabs.ts` stores tab titles for the same reason.
|
|
16
|
+
*/
|
|
17
|
+
export function buildClusterLoadTexts(t) {
|
|
18
|
+
return {
|
|
19
|
+
title: safeTranslate(t, 'clusterdetails:overview.clusterLoad.title', 'Cluster Load'),
|
|
20
|
+
last: safeTranslate(t, 'clusterdetails:overview.clusterLoad.last', 'Last'),
|
|
21
|
+
day30: safeTranslate(t, 'clusterdetails:overview.clusterLoad.options.30days', '30 days'),
|
|
22
|
+
day7: safeTranslate(t, 'clusterdetails:overview.clusterLoad.options.7days', '7 days'),
|
|
23
|
+
last24h: safeTranslate(t, 'clusterdetails:overview.clusterLoad.options.24hours', '24 hours'),
|
|
24
|
+
current: safeTranslate(t, 'clusterdetails:overview.clusterLoad.current', 'Current'),
|
|
25
|
+
clusterLoadTooltip: safeTranslate(t, 'clusterdetails:overview.clusterLoad.tooltip', "Cluster load: Indicates how much of the cluster's resources are in use."),
|
|
26
|
+
docs: safeTranslate(t, 'clusterdetails:overview.clusterLoad.docs', 'Learn more about cluster load'),
|
|
27
|
+
reload: safeTranslate(t, 'clusterdetails:overview.clusterLoad.reload', 'Reload'),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The health state that replaces the raw `status.ready` of a cluster.
|
|
3
|
+
* Returns `undefined` when the raw status is correct.
|
|
4
|
+
*
|
|
5
|
+
* A restoring or reconciliation-paused cluster reports `Suspended` or
|
|
6
|
+
* `Unhealthy`. That status is true but useless, because the operator stopped
|
|
7
|
+
* reconciliation on purpose. Both states have their own label instead.
|
|
8
|
+
*
|
|
9
|
+
* `restoring` wins over `maintenance`. A restore also pauses reconciliation,
|
|
10
|
+
* and the restore is the more specific fact.
|
|
11
|
+
*
|
|
12
|
+
* Three surfaces read this: the Clusters list, the header badge of the cluster
|
|
13
|
+
* page, and the Cluster Details table on the overview tab. Each kept its own
|
|
14
|
+
* copy, and they showed three different labels for one cluster.
|
|
15
|
+
*/
|
|
16
|
+
export declare function clusterHealthOverride(cluster: unknown): 'restoring' | 'maintenance' | undefined;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { isClusterReconciliationPaused } from './is-cluster-reconciliation-paused.js';
|
|
7
|
+
/**
|
|
8
|
+
* The health state that replaces the raw `status.ready` of a cluster.
|
|
9
|
+
* Returns `undefined` when the raw status is correct.
|
|
10
|
+
*
|
|
11
|
+
* A restoring or reconciliation-paused cluster reports `Suspended` or
|
|
12
|
+
* `Unhealthy`. That status is true but useless, because the operator stopped
|
|
13
|
+
* reconciliation on purpose. Both states have their own label instead.
|
|
14
|
+
*
|
|
15
|
+
* `restoring` wins over `maintenance`. A restore also pauses reconciliation,
|
|
16
|
+
* and the restore is the more specific fact.
|
|
17
|
+
*
|
|
18
|
+
* Three surfaces read this: the Clusters list, the header badge of the cluster
|
|
19
|
+
* page, and the Cluster Details table on the overview tab. Each kept its own
|
|
20
|
+
* copy, and they showed three different labels for one cluster.
|
|
21
|
+
*/
|
|
22
|
+
export function clusterHealthOverride(cluster) {
|
|
23
|
+
if (!cluster || typeof cluster !== 'object') {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
if (cluster.restoreInProgress === true) {
|
|
27
|
+
return 'restoring';
|
|
28
|
+
}
|
|
29
|
+
if (isClusterReconciliationPaused(cluster)) {
|
|
30
|
+
return 'maintenance';
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { C4ClustersPageProps } from './c4-clusters-page.types.js';
|
|
2
|
-
export declare const C4ClustersPage: (({ orgId, gettingStartedHref, onNavigate, translations, permissionsOverride, clusterCapMessage, isClusterPaused: isClusterPausedOverride, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride, onRequestAssignTag, onRequestDeleteCluster, onRequestWakeCluster, onRequestFailoverCluster, onNeedsReload, }: C4ClustersPageProps) => import("react").JSX.Element) & {
|
|
2
|
+
export declare const C4ClustersPage: (({ orgId, scope, gettingStartedHref, onNavigate, translations, permissionsOverride, clusterCapMessage, isClusterPaused: isClusterPausedOverride, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride, onRequestAssignTag, onRequestDeleteCluster, onRequestWakeCluster, onRequestFailoverCluster, onNeedsReload, }: C4ClustersPageProps) => import("react").JSX.Element) & {
|
|
3
3
|
displayName: string;
|
|
4
4
|
};
|
|
@@ -15,6 +15,7 @@ import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js
|
|
|
15
15
|
import { toApiConfig } from '../../runtime/to-api-config.js';
|
|
16
16
|
import { Checkbox, Modal, Stack, TextInput } from '../../ui/index.js';
|
|
17
17
|
import { useSelectFamily } from '../../ui/families.js';
|
|
18
|
+
import { clusterHealthOverride } from '../cluster-health-override.js';
|
|
18
19
|
import { isClusterReconciliationPaused } from '../is-cluster-reconciliation-paused.js';
|
|
19
20
|
import { useExtendTrial } from '../use-extend-trial.js';
|
|
20
21
|
function getString(record, key) {
|
|
@@ -233,7 +234,7 @@ function mergePermissions(base, override) {
|
|
|
233
234
|
}
|
|
234
235
|
return { ...base, ...override };
|
|
235
236
|
}
|
|
236
|
-
export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate, translations, permissionsOverride, clusterCapMessage, isClusterPaused: isClusterPausedOverride, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride, onRequestAssignTag, onRequestDeleteCluster, onRequestWakeCluster, onRequestFailoverCluster, onNeedsReload, }) => {
|
|
237
|
+
export const C4ClustersPage = observer(({ orgId, scope = 'cluster', gettingStartedHref, onNavigate, translations, permissionsOverride, clusterCapMessage, isClusterPaused: isClusterPausedOverride, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride, onRequestAssignTag, onRequestDeleteCluster, onRequestWakeCluster, onRequestFailoverCluster, onNeedsReload, }) => {
|
|
237
238
|
const { Select, SelectItem } = useSelectFamily();
|
|
238
239
|
const resolvedGettingStartedHref = useMemo(() => getC4ClustersGettingStartedHref(gettingStartedHref), [gettingStartedHref]);
|
|
239
240
|
const runtime = useC4ConsoleRuntime();
|
|
@@ -372,14 +373,13 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
|
|
|
372
373
|
const item = mapClusterToListItem(rawCluster, index);
|
|
373
374
|
if (!item)
|
|
374
375
|
return undefined;
|
|
375
|
-
// A restoring
|
|
376
|
-
//
|
|
377
|
-
//
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
return { ...item, status: 'maintenance' };
|
|
376
|
+
// A restoring or reconciliation-paused cluster reports a raw status
|
|
377
|
+
// that says nothing useful. `clusterHealthOverride` owns the label
|
|
378
|
+
// that replaces it. This list, the header badge of the cluster page,
|
|
379
|
+
// and the Cluster Details table read the one function.
|
|
380
|
+
const healthOverride = clusterHealthOverride(rawCluster);
|
|
381
|
+
if (healthOverride) {
|
|
382
|
+
return { ...item, status: healthOverride };
|
|
383
383
|
}
|
|
384
384
|
const generationUuid = getClusterGenerationUuid(rawCluster);
|
|
385
385
|
const representativeClusterId = generationUuid
|
|
@@ -884,7 +884,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
|
|
|
884
884
|
orgId,
|
|
885
885
|
});
|
|
886
886
|
}, [error, orgId, runtime.telemetry]);
|
|
887
|
-
return (_jsxs(_Fragment, { children: [_jsx(C4ClusterList, { orgId: orgId, clusters: clusters, loading: isPageLoading, urls: urls, permissions: derivedPermissions, onNavigate: handleNavigate, onDeleteCluster: handleDeleteCluster, onAssignTag: handleAssignTag, onWakeCluster: handleWakeCluster, onFailoverCluster: handleFailoverCluster, trialNotification: derivedTrialNotification, encryptionNotification: encryptionNotification, clusterCapMessage: clusterCapMessage, emptyStateContent: derivedEmptyStateContent, translations: resolvedTranslations, isClusterPaused: isClusterPausedOverride ?? isClusterPausedFallback, isMultiRegionCluster: isMultiRegionClusterFallback, isFailoverSyncPending: isFailoverSyncPending, isFailoverSource: isFailoverSource, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride ??
|
|
887
|
+
return (_jsxs(_Fragment, { children: [_jsx(C4ClusterList, { orgId: orgId, scope: scope, clusters: clusters, loading: isPageLoading, urls: urls, permissions: derivedPermissions, onNavigate: handleNavigate, onDeleteCluster: handleDeleteCluster, onAssignTag: handleAssignTag, onWakeCluster: handleWakeCluster, onFailoverCluster: handleFailoverCluster, trialNotification: derivedTrialNotification, encryptionNotification: encryptionNotification, clusterCapMessage: clusterCapMessage, emptyStateContent: derivedEmptyStateContent, translations: resolvedTranslations, isClusterPaused: isClusterPausedOverride ?? isClusterPausedFallback, isMultiRegionCluster: isMultiRegionClusterFallback, isFailoverSyncPending: isFailoverSyncPending, isFailoverSource: isFailoverSource, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride ??
|
|
888
888
|
isRunningOnUnsupportedGenerationFallback }), deleteTarget ? (_jsx(Modal, { open: deleteModalOpen, danger: true, modalHeading: safeTranslate('clustermodals:delete.heading', 'Delete cluster'), primaryButtonText: safeTranslate('clustermodals:delete.buttons.primary', 'Delete'), secondaryButtonText: safeTranslate('clustermodals:delete.buttons.secondary', 'Cancel'), primaryButtonDisabled: deleteBusy || deleteConfirmation.trim() !== 'DELETE', onRequestClose: () => {
|
|
889
889
|
if (deleteBusy)
|
|
890
890
|
return;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ClusterListPermissions } from '../../components/c4-cluster-list/c4-cluster-list.types.js';
|
|
2
|
+
import type { C4WidgetScope } from '../c4-widget-scope.types.js';
|
|
2
3
|
export type C4ClustersNavigateEvent = {
|
|
3
4
|
kind: 'clusterDetails';
|
|
4
5
|
orgId: string;
|
|
@@ -43,6 +44,12 @@ export interface C4ClustersPageTranslations {
|
|
|
43
44
|
}
|
|
44
45
|
export interface C4ClustersPageProps {
|
|
45
46
|
orgId: string;
|
|
47
|
+
/**
|
|
48
|
+
* `'environment'` embeds this page in a host's own environment page (see
|
|
49
|
+
* `C4WidgetScope`) — suppresses the "Clusters" title and page padding.
|
|
50
|
+
* Defaults to `'cluster'`.
|
|
51
|
+
*/
|
|
52
|
+
scope?: C4WidgetScope;
|
|
46
53
|
gettingStartedHref?: string;
|
|
47
54
|
onNavigate?: (event: C4ClustersNavigateEvent) => void;
|
|
48
55
|
translations?: C4ClustersPageTranslations;
|
package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { C4ConnectorManagementExecutableDetailsPageProps } from './c4-connector-management-executable-details-page.types.js';
|
|
2
|
-
export declare const C4ConnectorManagementExecutableDetailsPage: (({ orgId, clusterId, connectorId, connectorInstanceId, onNavigate, }: C4ConnectorManagementExecutableDetailsPageProps) => import("react").JSX.Element) & {
|
|
2
|
+
export declare const C4ConnectorManagementExecutableDetailsPage: (({ orgId, clusterId, connectorId, connectorInstanceId, onNavigate, scope, }: C4ConnectorManagementExecutableDetailsPageProps) => import("react").JSX.Element) & {
|
|
3
3
|
displayName: string;
|
|
4
4
|
};
|
package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js
CHANGED
|
@@ -14,7 +14,7 @@ import { C4ConnectorManagementErrorBoundaryFallback, useConnectorManagementRunti
|
|
|
14
14
|
function sendNavigate(onNavigate, event) {
|
|
15
15
|
onNavigate?.(event);
|
|
16
16
|
}
|
|
17
|
-
export const C4ConnectorManagementExecutableDetailsPage = observer(({ orgId, clusterId, connectorId, connectorInstanceId, onNavigate, }) => {
|
|
17
|
+
export const C4ConnectorManagementExecutableDetailsPage = observer(({ orgId, clusterId, connectorId, connectorInstanceId, onNavigate, scope = 'cluster', }) => {
|
|
18
18
|
const { isLoading, clusterName, connectorsUrl, isProviderReady, Provider, checkClusterVersion, } = useConnectorManagementRuntime({ orgId, clusterId });
|
|
19
19
|
const content = useMemo(() => {
|
|
20
20
|
if (isLoading) {
|
|
@@ -36,9 +36,11 @@ export const C4ConnectorManagementExecutableDetailsPage = observer(({ orgId, clu
|
|
|
36
36
|
isLoading,
|
|
37
37
|
isProviderReady,
|
|
38
38
|
]);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
// In environment scope the host page owns the breadcrumb, so this widget
|
|
40
|
+
// contributes no trail of its own.
|
|
41
|
+
const breadcrumbs = useMemo(() => scope === 'environment'
|
|
42
|
+
? { elements: [] }
|
|
43
|
+
: {
|
|
42
44
|
elements: [
|
|
43
45
|
{
|
|
44
46
|
key: '1',
|
|
@@ -74,5 +76,8 @@ export const C4ConnectorManagementExecutableDetailsPage = observer(({ orgId, clu
|
|
|
74
76
|
}),
|
|
75
77
|
},
|
|
76
78
|
],
|
|
77
|
-
},
|
|
79
|
+
}, [clusterId, clusterName, connectorId, onNavigate, orgId, scope]);
|
|
80
|
+
return (_jsx(C4PageTemplate, { header: {
|
|
81
|
+
title: connectorInstanceId,
|
|
82
|
+
}, loading: isLoading, breadcrumbs: breadcrumbs, padding: scope === 'environment' ? 'none' : 'default', children: _jsx(ErrorBoundary, { fallback: _jsx(C4ConnectorManagementErrorBoundaryFallback, {}), children: content }) }));
|
|
78
83
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { C4WidgetScope } from '../c4-widget-scope.types.js';
|
|
1
2
|
export type C4ConnectorManagementExecutableDetailsNavigateEvent = {
|
|
2
3
|
kind: 'clusters';
|
|
3
4
|
orgId: string;
|
|
@@ -21,4 +22,12 @@ export interface C4ConnectorManagementExecutableDetailsPageProps {
|
|
|
21
22
|
connectorId: string;
|
|
22
23
|
connectorInstanceId: string;
|
|
23
24
|
onNavigate?: (event: C4ConnectorManagementExecutableDetailsNavigateEvent) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Surface this page is rendered on. Defaults to `'cluster'`.
|
|
27
|
+
*
|
|
28
|
+
* `'environment'` **suppresses the page's own breadcrumb and its page
|
|
29
|
+
* padding** — on an environment page the host owns navigation and spacing.
|
|
30
|
+
* This page's copy is scope-neutral, so nothing else changes.
|
|
31
|
+
*/
|
|
32
|
+
scope?: C4WidgetScope;
|
|
24
33
|
}
|
package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { C4ConnectorManagementExecutablesTablePageProps } from './c4-connector-management-executables-table-page.types.js';
|
|
2
|
-
export declare const C4ConnectorManagementExecutablesTablePage: (({ orgId, clusterId, connectorId, onNavigate, }: C4ConnectorManagementExecutablesTablePageProps) => import("react").JSX.Element) & {
|
|
2
|
+
export declare const C4ConnectorManagementExecutablesTablePage: (({ orgId, clusterId, connectorId, onNavigate, scope, }: C4ConnectorManagementExecutablesTablePageProps) => import("react").JSX.Element) & {
|
|
3
3
|
displayName: string;
|
|
4
4
|
};
|
package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js
CHANGED
|
@@ -14,7 +14,7 @@ import { C4ConnectorManagementErrorBoundaryFallback, useConnectorManagementRunti
|
|
|
14
14
|
function sendNavigate(onNavigate, event) {
|
|
15
15
|
onNavigate?.(event);
|
|
16
16
|
}
|
|
17
|
-
export const C4ConnectorManagementExecutablesTablePage = observer(({ orgId, clusterId, connectorId, onNavigate, }) => {
|
|
17
|
+
export const C4ConnectorManagementExecutablesTablePage = observer(({ orgId, clusterId, connectorId, onNavigate, scope = 'cluster', }) => {
|
|
18
18
|
const { isLoading, clusterName, connectorsUrl, operateBaseUrl, isProviderReady, Provider, checkClusterVersion, } = useConnectorManagementRuntime({ orgId, clusterId });
|
|
19
19
|
const content = useMemo(() => {
|
|
20
20
|
if (isLoading) {
|
|
@@ -48,9 +48,11 @@ export const C4ConnectorManagementExecutablesTablePage = observer(({ orgId, clus
|
|
|
48
48
|
operateBaseUrl,
|
|
49
49
|
orgId,
|
|
50
50
|
]);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
// In environment scope the host page owns the breadcrumb, so this widget
|
|
52
|
+
// contributes no trail of its own.
|
|
53
|
+
const breadcrumbs = useMemo(() => scope === 'environment'
|
|
54
|
+
? { elements: [] }
|
|
55
|
+
: {
|
|
54
56
|
elements: [
|
|
55
57
|
{
|
|
56
58
|
key: '1',
|
|
@@ -76,5 +78,8 @@ export const C4ConnectorManagementExecutablesTablePage = observer(({ orgId, clus
|
|
|
76
78
|
}),
|
|
77
79
|
},
|
|
78
80
|
],
|
|
79
|
-
},
|
|
81
|
+
}, [clusterId, clusterName, onNavigate, orgId, scope]);
|
|
82
|
+
return (_jsx(C4PageTemplate, { header: {
|
|
83
|
+
title: connectorId,
|
|
84
|
+
}, loading: isLoading, breadcrumbs: breadcrumbs, padding: scope === 'environment' ? 'none' : 'default', children: _jsx(ErrorBoundary, { fallback: _jsx(C4ConnectorManagementErrorBoundaryFallback, {}), children: content }) }));
|
|
80
85
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { C4WidgetScope } from '../c4-widget-scope.types.js';
|
|
1
2
|
export type C4ConnectorManagementExecutablesTableNavigateEvent = {
|
|
2
3
|
kind: 'clusters';
|
|
3
4
|
orgId: string;
|
|
@@ -21,4 +22,12 @@ export interface C4ConnectorManagementExecutablesTablePageProps {
|
|
|
21
22
|
clusterId: string;
|
|
22
23
|
connectorId: string;
|
|
23
24
|
onNavigate?: (event: C4ConnectorManagementExecutablesTableNavigateEvent) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Surface this page is rendered on. Defaults to `'cluster'`.
|
|
27
|
+
*
|
|
28
|
+
* `'environment'` **suppresses the page's own breadcrumb and its page
|
|
29
|
+
* padding** — on an environment page the host owns navigation and spacing.
|
|
30
|
+
* This page's copy is scope-neutral, so nothing else changes.
|
|
31
|
+
*/
|
|
32
|
+
scope?: C4WidgetScope;
|
|
24
33
|
}
|
package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { C4ConnectorManagementOutboundDetailsPageProps } from './c4-connector-management-outbound-details-page.types.js';
|
|
2
|
-
export declare const C4ConnectorManagementOutboundDetailsPage: (({ orgId, clusterId, connectorType, onNavigate, }: C4ConnectorManagementOutboundDetailsPageProps) => import("react").JSX.Element) & {
|
|
2
|
+
export declare const C4ConnectorManagementOutboundDetailsPage: (({ orgId, clusterId, connectorType, onNavigate, scope, }: C4ConnectorManagementOutboundDetailsPageProps) => import("react").JSX.Element) & {
|
|
3
3
|
displayName: string;
|
|
4
4
|
};
|
package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js
CHANGED
|
@@ -14,7 +14,7 @@ import { C4ConnectorManagementErrorBoundaryFallback, useConnectorManagementRunti
|
|
|
14
14
|
function sendNavigate(onNavigate, event) {
|
|
15
15
|
onNavigate?.(event);
|
|
16
16
|
}
|
|
17
|
-
export const C4ConnectorManagementOutboundDetailsPage = observer(({ orgId, clusterId, connectorType, onNavigate, }) => {
|
|
17
|
+
export const C4ConnectorManagementOutboundDetailsPage = observer(({ orgId, clusterId, connectorType, onNavigate, scope = 'cluster', }) => {
|
|
18
18
|
const { isLoading, clusterName, connectorsUrl, isProviderReady, Provider, checkClusterVersion, } = useConnectorManagementRuntime({ orgId, clusterId });
|
|
19
19
|
const content = useMemo(() => {
|
|
20
20
|
if (isLoading) {
|
|
@@ -35,9 +35,11 @@ export const C4ConnectorManagementOutboundDetailsPage = observer(({ orgId, clust
|
|
|
35
35
|
isLoading,
|
|
36
36
|
isProviderReady,
|
|
37
37
|
]);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
// In environment scope the host page owns the breadcrumb, so this widget
|
|
39
|
+
// contributes no trail of its own.
|
|
40
|
+
const breadcrumbs = useMemo(() => scope === 'environment'
|
|
41
|
+
? { elements: [] }
|
|
42
|
+
: {
|
|
41
43
|
elements: [
|
|
42
44
|
{
|
|
43
45
|
key: '1',
|
|
@@ -63,5 +65,8 @@ export const C4ConnectorManagementOutboundDetailsPage = observer(({ orgId, clust
|
|
|
63
65
|
}),
|
|
64
66
|
},
|
|
65
67
|
],
|
|
66
|
-
},
|
|
68
|
+
}, [clusterId, clusterName, onNavigate, orgId, scope]);
|
|
69
|
+
return (_jsx(C4PageTemplate, { header: {
|
|
70
|
+
title: connectorType,
|
|
71
|
+
}, loading: isLoading, breadcrumbs: breadcrumbs, padding: scope === 'environment' ? 'none' : 'default', children: _jsx(ErrorBoundary, { fallback: _jsx(C4ConnectorManagementErrorBoundaryFallback, {}), children: content }) }));
|
|
67
72
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { C4WidgetScope } from '../c4-widget-scope.types.js';
|
|
1
2
|
export type C4ConnectorManagementOutboundDetailsNavigateEvent = {
|
|
2
3
|
kind: 'clusters';
|
|
3
4
|
orgId: string;
|
|
@@ -15,4 +16,12 @@ export interface C4ConnectorManagementOutboundDetailsPageProps {
|
|
|
15
16
|
clusterId: string;
|
|
16
17
|
connectorType: string;
|
|
17
18
|
onNavigate?: (event: C4ConnectorManagementOutboundDetailsNavigateEvent) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Surface this page is rendered on. Defaults to `'cluster'`.
|
|
21
|
+
*
|
|
22
|
+
* `'environment'` **suppresses the page's own breadcrumb and its page
|
|
23
|
+
* padding** — on an environment page the host owns navigation and spacing.
|
|
24
|
+
* This page's copy is scope-neutral, so nothing else changes.
|
|
25
|
+
*/
|
|
26
|
+
scope?: C4WidgetScope;
|
|
18
27
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { C4ConnectorManagementPageProps } from './c4-connector-management-page.types.js';
|
|
2
|
-
export declare const C4ConnectorManagementPage: (({ orgId, clusterId, activeTab, onNavigate, }: C4ConnectorManagementPageProps) => import("react").JSX.Element) & {
|
|
2
|
+
export declare const C4ConnectorManagementPage: (({ orgId, clusterId, activeTab, onNavigate, scope, }: C4ConnectorManagementPageProps) => import("react").JSX.Element) & {
|
|
3
3
|
displayName: string;
|
|
4
4
|
};
|