@camunda/ccma-saas-frontend 0.0.45 → 0.1.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-actionable-notification/c4-actionable-notification.d.ts +20 -3
- package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.js +50 -17
- package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +2 -1
- package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +1 -6
- package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +4 -1
- package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +1 -6
- package/lib/esm/components/c4-advanced-search-filters/OrSection.js +3 -1
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +3 -1
- package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +2 -7
- package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js +7 -7
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.js +1 -6
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.d.ts +1 -0
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.js +43 -0
- package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.js +1 -1
- package/lib/esm/components/c4-async-modal/c4-async-modal.js +3 -2
- package/lib/esm/components/c4-audit-log/c4-audit-log.js +4 -3
- package/lib/esm/components/c4-billing-page/c4-billing-page.js +8 -6
- package/lib/esm/components/c4-billing-page/elements/cluster-reservations.js +9 -14
- package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +2 -1
- package/lib/esm/components/c4-billing-page/elements/usage-alerts.js +3 -8
- package/lib/esm/components/c4-billing-page/elements/value-metric.js +2 -1
- package/lib/esm/components/c4-bottom-links/c4-bottom-links.js +1 -6
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +3 -6
- package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.js +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +1 -1
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +6 -10
- package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +8 -3
- package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +8 -3
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +6 -5
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +12 -14
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +6 -10
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +8 -11
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +9 -4
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +12 -8
- package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.js +3 -2
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +7 -10
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +15 -21
- 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 +19 -5
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +4 -0
- package/lib/esm/components/c4-cluster-overview/applications.js +2 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +4 -3
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +12 -10
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +1 -1
- 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 +6 -8
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +1 -6
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.d.ts +17 -0
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +75 -0
- package/lib/esm/components/c4-cluster-settings/elements/resource-based-authorizations.js +2 -7
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +1 -6
- package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-toggle.js +1 -1
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +4 -2
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +18 -14
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.d.ts +1 -0
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.js +40 -0
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.types.d.ts +2 -0
- package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.js +4 -9
- package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.types.d.ts +2 -0
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +11 -7
- package/lib/esm/components/c4-console-dashboard/elements/empty-state.js +2 -2
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +44 -15
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +4 -2
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +4 -2
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +2 -1
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +2 -1
- package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.js +1 -6
- package/lib/esm/components/c4-data-table/c4-data-table-skeleton.d.ts +15 -0
- package/lib/esm/components/c4-data-table/c4-data-table-skeleton.js +26 -0
- package/lib/esm/components/c4-data-table/c4-data-table.d.ts +3 -0
- package/lib/esm/components/c4-data-table/c4-data-table.js +194 -0
- package/lib/esm/components/c4-data-table/c4-data-table.spec.d.ts +1 -0
- package/lib/esm/components/c4-data-table/c4-data-table.spec.js +71 -0
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +3 -2
- package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +47 -0
- package/lib/esm/components/c4-empty-state/c4-empty-state.js +33 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.d.ts +3 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.js +51 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.d.ts +1 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.js +33 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.d.ts +8 -0
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.js +1 -0
- package/lib/esm/components/c4-external-link/c4-external-link.js +1 -6
- package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.d.ts +40 -0
- package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.js +109 -0
- package/lib/esm/components/c4-help-center/c4-help-center.d.ts +50 -0
- package/lib/esm/components/c4-help-center/c4-help-center.js +39 -0
- package/lib/esm/components/c4-inline-notification/c4-inline-notification.d.ts +15 -0
- package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +37 -0
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +4 -3
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +4 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -8
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -3
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +2 -1
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +43 -46
- package/lib/esm/components/c4-job-dashboard-shared/c4-background-fetching-indicator.js +1 -6
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +1 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.js +1 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +1 -1
- package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +1 -6
- package/lib/esm/components/c4-link-button/c4-link-button.js +1 -6
- package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.js +1 -1
- package/lib/esm/components/c4-management-activity/c4-management-activity.js +7 -9
- package/lib/esm/components/c4-management-api/c4-management-api.js +9 -11
- package/lib/esm/components/c4-management-overview/c4-management-overview.js +8 -12
- package/lib/esm/components/c4-management-settings/c4-management-settings.js +9 -11
- package/lib/esm/components/c4-management-users/c4-management-users.js +4 -9
- package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -2
- package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js +4 -2
- package/lib/esm/components/c4-navigation/c4-navigation.d.ts +55 -0
- package/lib/esm/components/c4-navigation/c4-navigation.js +175 -0
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +2 -1
- package/lib/esm/components/c4-page-layout/c4-page-layout.d.ts +13 -0
- package/lib/esm/components/c4-page-layout/c4-page-layout.js +23 -0
- package/lib/esm/components/c4-page-template/c4-page-template.js +14 -3
- package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.js +1 -1
- package/lib/esm/components/c4-pricing/c4-pricing.js +3 -7
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +1 -1
- package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +1 -1
- package/lib/esm/components/c4-search/c4-search-results.js +2 -1
- package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.d.ts +20 -0
- package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +41 -0
- package/lib/esm/components/c4-sm-cluster-details/automation-components.js +2 -1
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.js +1 -6
- package/lib/esm/components/c4-sm-cluster-details/custom-properties.js +4 -8
- package/lib/esm/components/c4-sm-cluster-details/details.js +5 -4
- package/lib/esm/components/c4-sm-cluster-details/zeebe-components.js +2 -1
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.js +1 -1
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +1 -1
- package/lib/esm/components/c4-sm-dashboard/cluster-tile.js +2 -1
- package/lib/esm/components/c4-sm-dashboard/component-tile.js +2 -1
- package/lib/esm/components/c4-sm-dashboard/explore.js +1 -6
- package/lib/esm/components/c4-sm-dashboard/overview.js +1 -1
- package/lib/esm/components/c4-sm-dashboard/usage-tile.js +2 -1
- package/lib/esm/components/c4-stat/c4-stat.js +1 -6
- package/lib/esm/components/c4-stateful-button/c4-stateful-button.js +2 -1
- package/lib/esm/components/c4-structured-list/c4-structured-list.d.ts +21 -0
- package/lib/esm/components/c4-structured-list/c4-structured-list.js +75 -0
- package/lib/esm/components/c4-tabs/c4-tabs.js +2 -1
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.js +6 -2
- package/lib/esm/components/c4-telemetry-page/component-metrics.js +1 -6
- package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +2 -1
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.js +1 -1
- package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.js +1 -1
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
- package/lib/esm/components/c4-toast-notification/c4-toast-notification.d.ts +14 -0
- package/lib/esm/components/c4-toast-notification/c4-toast-notification.js +27 -0
- package/lib/esm/components/c4-toggle/c4-toggle.js +6 -8
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.js +1 -1
- package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js +4 -2
- package/lib/esm/components/c4-usage-history/c4-usage-history.js +5 -3
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +1 -1
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +8 -7
- package/lib/esm/components/c4-user-details/c4-user-details.js +2 -2
- package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +1 -1
- package/lib/esm/components/c4-user-details/tabs/details.js +6 -10
- package/lib/esm/components/c4-user-details/tabs/roles.js +3 -8
- package/lib/esm/i18n/c4-console-i18n.js +12 -0
- package/lib/esm/i18n/en/modals/clusters.json +0 -8
- package/lib/esm/i18n/en/pages/clusterdetails.json +5 -1
- package/lib/esm/i18n/en/pages/clusters.json +5 -1
- package/lib/esm/i18n/en/pages/orgmanagement.json +3 -1
- package/lib/esm/index.d.ts +17 -0
- package/lib/esm/index.js +13 -0
- package/lib/esm/runtime/c4-console-authz.d.ts +1 -0
- package/lib/esm/runtime/c4-console-authz.js +2 -1
- package/lib/esm/runtime/c4-console-authz.spec.js +3 -3
- package/lib/esm/runtime/c4-console-runtime-context.d.ts +8 -1
- package/lib/esm/runtime/c4-console-runtime-context.js +50 -1
- package/lib/esm/runtime/c4-console-runtime.types.d.ts +8 -0
- package/lib/esm/ui/c4-modal-dialog.d.ts +14 -0
- package/lib/esm/ui/c4-modal-dialog.js +35 -0
- package/lib/esm/ui/families.d.ts +42 -0
- package/lib/esm/ui/families.js +46 -0
- package/lib/esm/ui/index.d.ts +31 -0
- package/lib/esm/ui/index.js +94 -0
- package/lib/esm/ui/switchable.d.ts +14 -0
- package/lib/esm/ui/switchable.js +27 -0
- package/lib/esm/ui/tabs.d.ts +21 -0
- package/lib/esm/ui/tabs.js +27 -0
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +7 -5
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +18 -3
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +2 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +10 -6
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +5 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +7 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +10 -6
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.d.ts +7 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +8 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.spec.js +49 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +7 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +54 -21
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +96 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +12 -9
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +58 -4
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +276 -40
- package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +220 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +3 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +3 -2
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +4 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +59 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +18 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.js +6 -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 +38 -5
- package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +54 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +11 -0
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.d.ts +1 -0
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +10 -2
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.js +14 -2
- package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
- package/lib/esm/widgets/management/c4-management-app.js +57 -4
- package/lib/esm/widgets/management/c4-management-app.spec.js +141 -1
- package/lib/esm/widgets/management/c4-management-app.types.d.ts +5 -0
- package/lib/esm/widgets/management/c4-management-page.js +1 -6
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +4 -2
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.d.ts +2 -1
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +10 -3
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +2 -1
- package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +13 -11
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +47 -5
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.js +98 -0
- package/lib/esm/widgets/use-extend-trial.d.ts +8 -0
- package/lib/esm/widgets/use-extend-trial.js +36 -0
- package/lib/esm/widgets/use-extend-trial.spec.d.ts +1 -0
- package/lib/esm/widgets/use-extend-trial.spec.js +79 -0
- package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -4
- package/package.json +21 -14
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ConsoleIpWhitelistService, ConsoleSecureConnectivityService, } from '@camunda/ccma-api';
|
|
3
|
-
import { Form
|
|
3
|
+
import { Form } from '@carbon/react';
|
|
4
4
|
import { useCallback, useEffect, useState } from 'react';
|
|
5
5
|
import { C4ClusterDetailsIpWhitelist } from '../../../components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js';
|
|
6
|
+
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
6
7
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
8
|
+
import { Modal, Stack, TextInput } from '../../../ui/index.js';
|
|
7
9
|
// Helper function to ensure translations work
|
|
8
10
|
function safeTranslate(t, key, fallback) {
|
|
9
11
|
if (!t)
|
|
@@ -152,7 +154,7 @@ export const C4ClusterDetailsIpWhitelistTab = (props) => {
|
|
|
152
154
|
...meta,
|
|
153
155
|
});
|
|
154
156
|
}, [clusterId, orgId, runtime.telemetry]);
|
|
155
|
-
return (_jsxs(_Fragment, { children: [showPrivateLinkConflictWarning && (_jsx(
|
|
157
|
+
return (_jsxs(_Fragment, { children: [showPrivateLinkConflictWarning && (_jsx(C4InlineNotification, { kind: 'warning', lowContrast: true, hideCloseButton: true, title: privateLinkConflictTitle, subtitle: privateLinkConflictSubtitle, style: {
|
|
156
158
|
maxWidth: '100%',
|
|
157
159
|
width: '100%',
|
|
158
160
|
marginBottom: 'var(--cds-spacing-05)',
|
|
@@ -234,7 +236,7 @@ export const C4ClusterDetailsIpWhitelistTab = (props) => {
|
|
|
234
236
|
})();
|
|
235
237
|
}, children: _jsx(Form, { onSubmit: (e) => {
|
|
236
238
|
e.preventDefault();
|
|
237
|
-
}, children: _jsxs(Stack, { gap: 6, children: [ipMutationError && (_jsx(
|
|
239
|
+
}, children: _jsxs(Stack, { gap: 6, children: [ipMutationError && (_jsx(C4InlineNotification, { kind: 'error', title: safeTranslate(t, 'ipwhitelist:create.error.generic', "We're having trouble adding the IP(s)"), subtitle: ipMutationError, lowContrast: true, hideCloseButton: true })), _jsx(TextInput, { id: 'ip-input-whitelist-create', labelText: safeTranslate(t, 'ipwhitelist:create.fields.ips', 'IP(s)'), helperText: safeTranslate(t, 'ipwhitelist:create.fields.ipsHelper', 'Comma separated list of CIDRs, e.g. 10.0.0.0/24,172.10.0.1'), value: ipValue, maxLength: 50, onChange: (event) => setIpValue(event.target.value) }), _jsx(TextInput, { id: 'name-input-whitelist-create', labelText: safeTranslate(t, 'ipwhitelist:create.fields.description', 'Description (optional)'), value: ipDescription, maxLength: 1024, onChange: (event) => setIpDescription(event.target.value) })] }) }) }), _jsx(Modal, { open: updateIpOpen, modalHeading: `${safeTranslate(t, 'ipwhitelist:update.heading', 'Update IP(s)')}: ${ipWhitelistItems[selectedIpIndex]?.ip ?? ''}`, primaryButtonText: safeTranslate(t, 'ipwhitelist:update.buttons.primary', 'Update'), secondaryButtonText: safeTranslate(t, 'ipwhitelist:update.buttons.secondary', 'Cancel'), primaryButtonDisabled: ipMutationBusy || ipValue.length === 0, onRequestClose: () => {
|
|
238
240
|
trackEvent('clusterOverviewIpWhitelists:updateModal:cancel', 'Close Update IP Whitelist Modal', { ipIndex: selectedIpIndex });
|
|
239
241
|
setUpdateIpOpen(false);
|
|
240
242
|
}, onRequestSubmit: () => {
|
|
@@ -259,7 +261,7 @@ export const C4ClusterDetailsIpWhitelistTab = (props) => {
|
|
|
259
261
|
})();
|
|
260
262
|
}, children: _jsx(Form, { onSubmit: (e) => {
|
|
261
263
|
e.preventDefault();
|
|
262
|
-
}, children: _jsxs(Stack, { gap: 6, children: [ipMutationError && (_jsx(
|
|
264
|
+
}, children: _jsxs(Stack, { gap: 6, children: [ipMutationError && (_jsx(C4InlineNotification, { kind: 'error', title: safeTranslate(t, 'ipwhitelist:update.error.generic', "We're having trouble updating the IP(s)"), subtitle: ipMutationError, lowContrast: true, hideCloseButton: true })), _jsx(TextInput, { id: 'ip-input-whitelist-update', labelText: safeTranslate(t, 'ipwhitelist:create.fields.ips', 'IP(s)'), helperText: safeTranslate(t, 'ipwhitelist:create.fields.ipsHelper', 'Comma separated list of CIDRs, e.g. 10.0.0.0/24,172.10.0.1'), value: ipValue, maxLength: 50, onChange: (event) => setIpValue(event.target.value) }), _jsx(TextInput, { id: 'name-input-whitelist-update', labelText: safeTranslate(t, 'ipwhitelist:create.fields.description', 'Description (optional)'), value: ipDescription, maxLength: 1024, onChange: (event) => setIpDescription(event.target.value) })] }) }) }), _jsx(Modal, { open: deleteIpOpen, danger: true, modalHeading: `${safeTranslate(t, 'ipwhitelist:delete.heading', 'Delete IP(s)')}: ${ipWhitelistItems[selectedIpIndex]?.ip ?? ''}`, primaryButtonText: safeTranslate(t, 'ipwhitelist:delete.buttons.primary', 'Delete'), secondaryButtonText: safeTranslate(t, 'ipwhitelist:delete.buttons.secondary', 'Cancel'), primaryButtonDisabled: ipMutationBusy, onRequestClose: () => {
|
|
263
265
|
trackEvent('clusterOverviewIpWhitelists:deleteModal:cancel', 'Close Delete IP Whitelist Modal', { ipIndex: selectedIpIndex });
|
|
264
266
|
setDeleteIpOpen(false);
|
|
265
267
|
}, onRequestSubmit: () => {
|
|
@@ -280,5 +282,5 @@ export const C4ClusterDetailsIpWhitelistTab = (props) => {
|
|
|
280
282
|
setIpMutationBusy(false);
|
|
281
283
|
}
|
|
282
284
|
})();
|
|
283
|
-
}, children: _jsxs(Stack, { gap: 6, children: [ipMutationError && (_jsx(
|
|
285
|
+
}, children: _jsxs(Stack, { gap: 6, children: [ipMutationError && (_jsx(C4InlineNotification, { kind: 'error', title: safeTranslate(t, 'ipwhitelist:delete.error.generic', "We're having trouble deleting the IP(s)"), subtitle: ipMutationError, lowContrast: true, hideCloseButton: true })), _jsx("p", { children: safeTranslate(t, 'ipwhitelist:delete.description', 'Are you sure you want to the delete these allowlisted IP(s)?') })] }) })] }));
|
|
284
286
|
};
|
|
@@ -7,17 +7,20 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
7
7
|
import { C3ClusterTag, useC3Profile, } from '@camunda/camunda-composite-components';
|
|
8
8
|
import { SaaSJobsService, } from '@camunda/ccma-api';
|
|
9
9
|
import { ClusterPlanTypeAvailabilityClass, ClusterPlanTypeCategory, checkVersion, MAX_HARDWARE_PACKAGE_COUNT, sortGenerationBySemverOfZeebe, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
10
|
-
import { Checkbox, InlineNotification, Link, Modal, RadioButton, RadioButtonGroup, Stack, Tag, } from '@carbon/react';
|
|
11
10
|
import { Api_1, ApiKey, CheckmarkFilled, Renew, Security, UserAccessLocked, } from '@carbon/react/icons/index.esm.js';
|
|
12
|
-
import { Fragment, useCallback, useEffect, useMemo, useState, } from 'react';
|
|
11
|
+
import { Fragment, useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
13
12
|
import { normalizeClusterStatus } from '../../../components/c4-cluster-overview/applications.js';
|
|
14
13
|
import { C4ClusterOverview } from '../../../components/c4-cluster-overview/c4-cluster-overview.js';
|
|
15
14
|
import { C4Divider } from '../../../components/c4-divider/c4-divider.js';
|
|
15
|
+
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
16
16
|
import { C4MultiStepUglyModal } from '../../../components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js';
|
|
17
17
|
import { C4OptimizeActivationModal } from '../../../components/c4-optimize-activation-modal/c4-optimize-activation-modal.js';
|
|
18
|
+
import { addC4ConsoleNotification } from '../../../notifications/c4-console-notifications-handle.js';
|
|
18
19
|
import { buildClusterSwaggerUrl } from '../../../runtime/build-cluster-swagger-url.js';
|
|
19
20
|
import { useC4ConsoleData } from '../../../runtime/c4-console-data-context.js';
|
|
20
21
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
22
|
+
import { Checkbox, Link, Modal, Stack, Tag } from '../../../ui/index.js';
|
|
23
|
+
import { useRadioFamily } from '../../../ui/families.js';
|
|
21
24
|
import { isClusterReconciliationPaused } from '../../is-cluster-reconciliation-paused.js';
|
|
22
25
|
// Helper function to ensure translations work
|
|
23
26
|
function safeTranslate(t, key, fallback, options) {
|
|
@@ -46,8 +49,10 @@ function isUuidLike(value) {
|
|
|
46
49
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
47
50
|
}
|
|
48
51
|
export const C4ClusterDetailsOverviewTab = (props) => {
|
|
52
|
+
const { RadioButton, RadioButtonGroup } = useRadioFamily();
|
|
49
53
|
const c3Profile = useC3Profile();
|
|
50
54
|
const runtime = useC4ConsoleRuntime();
|
|
55
|
+
const wakeInFlight = useRef(false);
|
|
51
56
|
const { cluster, clusterError, creationParameters, clustersOfOrg, clusterPlanTypeReservations, clusterLoadLatest, clusterLoadPerDay, clusterLoad24h, clusterLoadLoading, canSeeClusterLoad, canEditCluster, canWakeCluster, canSleepCluster, canManageUsers, canViewConnectorsLink, hasIdentityIntegration, orgId, clusterId, jobDashboardEnabled, upgradeDocsUrls, statisticsConfig, apiConfig, t, onReloadCluster, onReloadClusterLoad, onNavigate, ignoreGracePeriod, clusterLoadDocsUrl, restoreInProgress, } = props;
|
|
52
57
|
const data = useC4ConsoleData();
|
|
53
58
|
const [tagModalOpen, setTagModalOpen] = useState(false);
|
|
@@ -367,7 +372,7 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
367
372
|
steps.push({
|
|
368
373
|
title: `Update available for Cluster ${cluster?.name ?? ''}.`,
|
|
369
374
|
label,
|
|
370
|
-
content: (_jsxs(Stack, { gap: 6, children: [_jsx(
|
|
375
|
+
content: (_jsxs(Stack, { gap: 6, children: [_jsx(C4InlineNotification, { lowContrast: true, kind: 'info', title: safeTranslate(t, 'clustermodals:upgrade.banner.tasklistV2Title', 'Tasklist v2 Upgrade'), hideCloseButton: true, children: _jsxs(Stack, { gap: 5, children: [_jsx("div", { style: { paddingTop: '4px' }, children: renderStrongTextTranslation(t, 'clustermodals:upgrade.banner.tasklistV2Line0', 'The Tasklist component currently uses the <0>deprecated</0> v1 API. We recommend upgrading to Tasklist v2, which integrates with the Orchestration Cluster API, uses the recommended Camunda user task implementation type, and offers improved performance.', { state: 'deprecated' }) }), _jsx("div", { children: renderStrongTextTranslation(t, 'clustermodals:upgrade.banner.tasklistV2Line1', "Before migrating to Tasklist v2, ensure that you're <0>not relying on</0> job worker-based user tasks, draft variables, or public start forms, as these features are only available in v1.", { support: 'not relying on' }) }), _jsx("div", { children: safeTranslate(t, 'clustermodals:upgrade.banner.tasklistV2Line2', 'After upgrading to v2, downgrading back to v1 will not be possible.') }), _jsx("div", { children: _jsx(Link, { rel: 'ignore', style: { cursor: 'pointer' }, onClick: () => {
|
|
371
376
|
window.open(upgradeDocsUrls?.tasklistApiVersions, '_blank', 'noopener,noreferrer');
|
|
372
377
|
}, children: safeTranslate(t, 'clustermodals:upgrade.banner.tasklistV2LearnMore', 'Learn more about upgrading from Tasklist v1 to v2') }) })] }) }), _jsxs(RadioButtonGroup, { name: 'upgrade-tasklist-mode', legendText: safeTranslate(t, 'clustermodals:upgrade.tasklistV2.legend', 'Select Tasklist version'), valueSelected: tasklistMode, orientation: 'vertical', onChange: (value) => {
|
|
373
378
|
setTasklistMode(value === 'v1' ? 'v1' : 'v2');
|
|
@@ -467,9 +472,9 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
467
472
|
? identityWizardTitle
|
|
468
473
|
: safeTranslate(t, 'clustermodals:upgrade.title', 'Update available'),
|
|
469
474
|
label,
|
|
470
|
-
content: (_jsxs(Stack, { gap: 6, children: [_jsxs("p", { style: { margin: 0 }, children: ["Update cluster generation from", ' ', _jsx("strong", { children: cluster?.generation?.name ?? '-' }), " to", ' ', _jsx("strong", { children: selectedUpgradeGeneration?.name ?? '-' })] }), showTasklistV1RemovalWarning ? (_jsxs(
|
|
475
|
+
content: (_jsxs(Stack, { gap: 6, children: [_jsxs("p", { style: { margin: 0 }, children: ["Update cluster generation from", ' ', _jsx("strong", { children: cluster?.generation?.name ?? '-' }), " to", ' ', _jsx("strong", { children: selectedUpgradeGeneration?.name ?? '-' })] }), showTasklistV1RemovalWarning ? (_jsxs(C4InlineNotification, { kind: 'warning', lowContrast: true, hideCloseButton: true, title: safeTranslate(t, 'clustermodals:upgrade.banner.tasklistV1RemovalTitle', 'Update removes Tasklist V1'), children: [_jsx("p", { style: { margin: '0.5rem 0 0 0' }, children: safeTranslate(t, 'clustermodals:upgrade.banner.tasklistV1RemovalBody', 'The 8.10 update removes the Tasklist V1 API. Applications on this cluster still using Tasklist V1 will break. Migrate to Tasklist V2 / Orchestration Cluster API before continuing.') }), upgradeDocsUrls?.tasklistApiVersions ? (_jsx("div", { style: { marginTop: '0.5rem' }, children: _jsx(Link, { rel: 'ignore', style: { cursor: 'pointer' }, onClick: () => {
|
|
471
476
|
window.open(upgradeDocsUrls.tasklistApiVersions, '_blank', 'noopener,noreferrer');
|
|
472
|
-
}, children: safeTranslate(t, 'clustermodals:upgrade.banner.tasklistV1RemovalLearnMore', 'Migration guide') }) })) : null] })) : null, _jsx(
|
|
477
|
+
}, children: safeTranslate(t, 'clustermodals:upgrade.banner.tasklistV1RemovalLearnMore', 'Migration guide') }) })) : null] })) : null, _jsx(C4InlineNotification, { kind: 'warning', lowContrast: true, title: safeTranslate(t, 'clustermodals:upgrade.banner.title', 'Camunda components will be temporarily unavailable'), hideCloseButton: true, subtitle: safeTranslate(t, 'clustermodals:upgrade.banner.line0', 'We recommend to backup the cluster before every update to ensure safe recovery if needed.'), children: _jsx("p", { style: { margin: '0.5rem 0 0 0' }, children: safeTranslate(t, 'clustermodals:upgrade.banner.line1', 'During the update, Camunda components will restart. The update duration depends mainly on the amount of processes and data stored in the cluster.') }) }), deltas.length > 0 ? (_jsxs("div", { children: [_jsx("p", { style: { margin: 0 }, children: safeTranslate(t, 'clustermodals:upgrade.details', 'This update includes:') }), _jsx("ul", { children: deltas.map((item) => (_jsx("li", { children: item }, item))) })] })) : null, canEditCluster ? (_jsx(Checkbox, { id: 'upgrade-cluster-enable-auto-update', labelText: safeTranslate(t, 'clustermodals:upgrade.autoUpdate', 'Automatically keep my cluster up to date'), checked: autoUpdateState, onChange: () => {
|
|
473
478
|
setAutoUpdateState((prev) => !prev);
|
|
474
479
|
} })) : null] })),
|
|
475
480
|
buttons: baseButtons({
|
|
@@ -1128,6 +1133,14 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
1128
1133
|
const launchLabel = safeTranslate(t, 'clusterdetails:overview.applications.launchLink', 'Launch');
|
|
1129
1134
|
const manageLabel = safeTranslate(t, 'clusterdetails:overview.applications.manageLink', 'Manage');
|
|
1130
1135
|
const connectorsManagementUrl = `/org/${orgId}/cluster/${clusterId}/connectors/management`;
|
|
1136
|
+
// Internal connectors-management page is only available for Zeebe 8.7+.
|
|
1137
|
+
const supportsConnectorsManagementLink = checkVersion({
|
|
1138
|
+
possiblyVersionOrDockerPath: cluster.generation?.versions?.zeebe,
|
|
1139
|
+
trueForSnapshot: true,
|
|
1140
|
+
trueOnInvalidVersion: false,
|
|
1141
|
+
versionToCompareTo: '8.7.0-alpha1',
|
|
1142
|
+
operator: VersionCheckOperator.GreaterThanOrEqual,
|
|
1143
|
+
});
|
|
1131
1144
|
const supportsInternalConnectorsManagement = checkVersion({
|
|
1132
1145
|
// Legacy (console-frontend) shows "Manage" for Connectors on Zeebe 8.8+.
|
|
1133
1146
|
possiblyVersionOrDockerPath: cluster.generation?.versions?.zeebe,
|
|
@@ -1204,16 +1217,13 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
1204
1217
|
? toAppTileProps({
|
|
1205
1218
|
name: 'Connectors',
|
|
1206
1219
|
status: cluster.status?.connectorsStatus,
|
|
1207
|
-
url:
|
|
1208
|
-
? connectorsManagementUrl
|
|
1209
|
-
: cluster.status?.connectorsUrl,
|
|
1220
|
+
url: connectorsManagementUrl,
|
|
1210
1221
|
version: toDisplayVersion(cluster.generation?.versions?.connectorBridge ??
|
|
1211
1222
|
cluster.generation?.versions?.zeebe),
|
|
1212
1223
|
description: appDescription.connectors,
|
|
1213
|
-
linkLabel:
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
linkVisible: canViewConnectorsLink,
|
|
1224
|
+
linkLabel: manageLabel,
|
|
1225
|
+
linkVisible: supportsConnectorsManagementLink &&
|
|
1226
|
+
(supportsInternalConnectorsManagement || canViewConnectorsLink),
|
|
1217
1227
|
})
|
|
1218
1228
|
: undefined,
|
|
1219
1229
|
identity: toAppTileProps({
|
|
@@ -1413,12 +1423,35 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
1413
1423
|
}
|
|
1414
1424
|
: undefined,
|
|
1415
1425
|
wakeAction: async () => {
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1426
|
+
if (wakeInFlight.current)
|
|
1427
|
+
return;
|
|
1428
|
+
wakeInFlight.current = true;
|
|
1429
|
+
try {
|
|
1430
|
+
const { ConsoleClusterService } = await import('@camunda/ccma-api');
|
|
1431
|
+
await ConsoleClusterService.wakeCluster({
|
|
1432
|
+
config: apiConfig,
|
|
1433
|
+
params: { orgId, clusterId },
|
|
1434
|
+
});
|
|
1435
|
+
await onReloadCluster();
|
|
1436
|
+
}
|
|
1437
|
+
catch (error) {
|
|
1438
|
+
runtime.telemetry?.captureException?.(error, {
|
|
1439
|
+
widget: 'C4ClusterDetailsOverviewTab',
|
|
1440
|
+
action: 'wake',
|
|
1441
|
+
orgId,
|
|
1442
|
+
clusterId,
|
|
1443
|
+
});
|
|
1444
|
+
addC4ConsoleNotification({
|
|
1445
|
+
kind: 'error',
|
|
1446
|
+
title: safeTranslate(t, 'clusterdetails:overview.clusterDetails.status.wakeError.title', 'Failed to resume cluster'),
|
|
1447
|
+
subtitle: error instanceof Error
|
|
1448
|
+
? error.message
|
|
1449
|
+
: safeTranslate(t, 'clusterdetails:overview.clusterDetails.status.wakeError.unknownError', 'Unknown error'),
|
|
1450
|
+
});
|
|
1451
|
+
}
|
|
1452
|
+
finally {
|
|
1453
|
+
wakeInFlight.current = false;
|
|
1454
|
+
}
|
|
1422
1455
|
},
|
|
1423
1456
|
wakeLabel: safeTranslate(t, 'clusterdetails:overview.clusterDetails.status.wakeLabel', 'Resume cluster'),
|
|
1424
1457
|
wakeVisibility: canWakeCluster && !isClusterPausedReconciliation && !restoreInProgress,
|
|
@@ -1475,20 +1508,20 @@ export const C4ClusterDetailsOverviewTab = (props) => {
|
|
|
1475
1508
|
if (hardwareBusy)
|
|
1476
1509
|
return;
|
|
1477
1510
|
setHardwareModalOpen(false);
|
|
1478
|
-
}, onRequestSubmit: submitHardwarePackageChange, size: 'sm', children: _jsxs(Stack, { gap: 5, children: [hardwareError ? (_jsx(
|
|
1511
|
+
}, onRequestSubmit: submitHardwarePackageChange, size: 'sm', children: _jsxs(Stack, { gap: 5, children: [hardwareError ? (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate(t, 'clusterdetails:overview.hardwarePackageModal.error.title', 'Error updating cluster size'), subtitle: hardwareError, hideCloseButton: true })) : null, _jsx("p", { children: safeTranslate(t, 'clusterdetails:overview.hardwarePackageModal.description', 'Increase the cluster size to enhance performance and capacity. Each size increase uses an additional reservation slot.') }), _jsxs("div", { children: [_jsx("p", { className: 'cds--label', style: { marginBottom: '0.75rem' }, children: safeTranslate(t, 'clusterdetails:overview.clusterDetails.hardwarePackages', 'Number of allocated Hardware Packages') }), _jsx("div", { style: { display: 'flex', gap: '0.75rem', flexWrap: 'wrap' }, children: Array.from({ length: MAX_HARDWARE_PACKAGE_COUNT }, (_unused, index) => index + 1).map((value) => (_jsxs(Tag, { id: `allocatedHardwarePackages-${value}`, onClick: () => {
|
|
1479
1512
|
setSelectedHardwarePackages(value);
|
|
1480
1513
|
}, type: selectedHardwarePackages === value
|
|
1481
1514
|
? 'high-contrast'
|
|
1482
1515
|
: 'outline', style: { borderWidth: '0px' }, disabled: hardwareBusy ||
|
|
1483
1516
|
value > availableHardwarePackages ||
|
|
1484
|
-
!!restoreInProgress, children: [value, "x"] }, `allocatedHardwarePackages-${value}`))) })] }), !hardwareReservationsAvailable ? (_jsx(
|
|
1517
|
+
!!restoreInProgress, children: [value, "x"] }, `allocatedHardwarePackages-${value}`))) })] }), !hardwareReservationsAvailable ? (_jsx(C4InlineNotification, { kind: 'info', lowContrast: true, title: safeTranslate(t, 'clusterdetails:overview.hardwarePackageModal.unavailable.title', 'Reservation data unavailable'), subtitle: safeTranslate(t, 'clusterdetails:overview.hardwarePackageModal.unavailable.subtitle', 'Larger sizes will be available once reservation data has loaded. You can keep the current size or choose a smaller size for now.'), hideCloseButton: true })) : availableHardwarePackages < MAX_HARDWARE_PACKAGE_COUNT ? (_jsx(C4InlineNotification, { kind: 'info', lowContrast: true, title: safeTranslate(t, 'clusterdetails:overview.hardwarePackageModal.info.title', 'Limited reservations'), subtitle: safeTranslate(t, 'clusterdetails:overview.hardwarePackageModal.info.subtitle', 'Increase your reservations to unlock more sizes.'), hideCloseButton: true })) : null] }) }), _jsx(Modal, { open: tagModalOpen, modalHeading: safeTranslate(t, 'clusterdetails:tags.modal.heading', 'Assign a cluster tag'), primaryButtonText: safeTranslate(t, 'clusterdetails:tags.modal.primary', 'Confirm'), secondaryButtonText: safeTranslate(t, 'clusterdetails:tags.modal.secondary', 'Cancel'), primaryButtonDisabled: tagBusy ||
|
|
1485
1518
|
selectedTag === '' ||
|
|
1486
1519
|
!canEditCluster ||
|
|
1487
1520
|
!!restoreInProgress, onRequestClose: () => {
|
|
1488
1521
|
if (tagBusy)
|
|
1489
1522
|
return;
|
|
1490
1523
|
setTagModalOpen(false);
|
|
1491
|
-
}, onRequestSubmit: submitTagChange, children: _jsxs(Stack, { gap: 5, children: [tagError ? (_jsx(
|
|
1524
|
+
}, onRequestSubmit: submitTagChange, children: _jsxs(Stack, { gap: 5, children: [tagError ? (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate(t, 'clusterdetails:tags.modal.error', 'Error updating tag'), subtitle: tagError, hideCloseButton: true })) : null, _jsx("p", { children: safeTranslate(t, 'clusterdetails:tags.modal.description', 'Assign a tag to make it easier for team members to clearly distinguish between different stages of the software development lifecycle. Tags have no impact on performance and can be changed later.') }), _jsx("div", { style: {
|
|
1492
1525
|
display: 'grid',
|
|
1493
1526
|
gridTemplateColumns: 'repeat(2, minmax(0, 1fr))',
|
|
1494
1527
|
gap: '1rem',
|
|
@@ -41,12 +41,16 @@ vi.mock('@camunda/ccma-api', async () => {
|
|
|
41
41
|
...actual,
|
|
42
42
|
ConsoleClusterService: {
|
|
43
43
|
updateCluster: vi.fn(),
|
|
44
|
+
wakeCluster: vi.fn(),
|
|
44
45
|
},
|
|
45
46
|
SaaSJobsService: {
|
|
46
47
|
getJobStatisticsGlobal: vi.fn(),
|
|
47
48
|
},
|
|
48
49
|
};
|
|
49
50
|
});
|
|
51
|
+
vi.mock('../../../notifications/c4-console-notifications-handle', () => ({
|
|
52
|
+
addC4ConsoleNotification: vi.fn(),
|
|
53
|
+
}));
|
|
50
54
|
vi.mock('@camunda/camunda-composite-components', async () => {
|
|
51
55
|
const actual = await vi.importActual('@camunda/camunda-composite-components');
|
|
52
56
|
return {
|
|
@@ -257,7 +261,21 @@ describe('C4ClusterDetailsOverviewTab job statistics fetching', () => {
|
|
|
257
261
|
linkVisible: true,
|
|
258
262
|
}));
|
|
259
263
|
});
|
|
260
|
-
it('hides the connectors link when
|
|
264
|
+
it('hides the connectors link for pre-8.8 clusters when canViewConnectorsLink is false', async () => {
|
|
265
|
+
renderTab({
|
|
266
|
+
canViewConnectorsLink: false,
|
|
267
|
+
cluster: buildCluster('Healthy', {
|
|
268
|
+
zeebeVersion: 'zeebe:8.6.12',
|
|
269
|
+
connectorBridgeVersion: 'connector-bridge:8.6.12',
|
|
270
|
+
}),
|
|
271
|
+
});
|
|
272
|
+
await screen.findByTestId('cluster-overview');
|
|
273
|
+
expect(lastOverviewProps?.applications?.applications?.connectors).toEqual(expect.objectContaining({
|
|
274
|
+
linkLabel: 'Manage',
|
|
275
|
+
linkVisible: false,
|
|
276
|
+
}));
|
|
277
|
+
});
|
|
278
|
+
it('shows the connectors link for 8.8+ clusters even when canViewConnectorsLink is false', async () => {
|
|
261
279
|
renderTab({
|
|
262
280
|
canViewConnectorsLink: false,
|
|
263
281
|
cluster: buildCluster('Healthy', {
|
|
@@ -267,11 +285,12 @@ describe('C4ClusterDetailsOverviewTab job statistics fetching', () => {
|
|
|
267
285
|
});
|
|
268
286
|
await screen.findByTestId('cluster-overview');
|
|
269
287
|
expect(lastOverviewProps?.applications?.applications?.connectors).toEqual(expect.objectContaining({
|
|
288
|
+
url: '/org/org-1/cluster/cluster-1/connectors/management',
|
|
270
289
|
linkLabel: 'Manage',
|
|
271
|
-
linkVisible:
|
|
290
|
+
linkVisible: true,
|
|
272
291
|
}));
|
|
273
292
|
});
|
|
274
|
-
it('
|
|
293
|
+
it('hides the connectors link for pre-8.7 clusters even when canViewConnectorsLink is true', async () => {
|
|
275
294
|
renderTab({
|
|
276
295
|
cluster: buildCluster('Healthy', {
|
|
277
296
|
zeebeVersion: 'zeebe:8.6.12',
|
|
@@ -280,8 +299,40 @@ describe('C4ClusterDetailsOverviewTab job statistics fetching', () => {
|
|
|
280
299
|
});
|
|
281
300
|
await screen.findByTestId('cluster-overview');
|
|
282
301
|
expect(lastOverviewProps?.applications?.applications?.connectors).toEqual(expect.objectContaining({
|
|
283
|
-
|
|
284
|
-
|
|
302
|
+
linkLabel: 'Manage',
|
|
303
|
+
linkVisible: false,
|
|
304
|
+
}));
|
|
305
|
+
});
|
|
306
|
+
it('hides the connectors link for pre-8.7 clusters without a connectors url even when canViewConnectorsLink is true', async () => {
|
|
307
|
+
const cluster = buildCluster('Healthy', {
|
|
308
|
+
zeebeVersion: 'zeebe:8.6.12',
|
|
309
|
+
connectorBridgeVersion: 'connector-bridge:8.6.12',
|
|
310
|
+
});
|
|
311
|
+
const clusterWithoutConnectorsUrl = {
|
|
312
|
+
...cluster,
|
|
313
|
+
status: {
|
|
314
|
+
...cluster.status,
|
|
315
|
+
connectorsUrl: undefined,
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
renderTab({ cluster: clusterWithoutConnectorsUrl });
|
|
319
|
+
await screen.findByTestId('cluster-overview');
|
|
320
|
+
expect(lastOverviewProps?.applications?.applications?.connectors).toEqual(expect.objectContaining({
|
|
321
|
+
linkLabel: 'Manage',
|
|
322
|
+
linkVisible: false,
|
|
323
|
+
}));
|
|
324
|
+
});
|
|
325
|
+
it('shows the internal connectors link for 8.7 clusters when canViewConnectorsLink is true', async () => {
|
|
326
|
+
renderTab({
|
|
327
|
+
cluster: buildCluster('Healthy', {
|
|
328
|
+
zeebeVersion: 'zeebe:8.7.3',
|
|
329
|
+
connectorBridgeVersion: 'connector-bridge:8.7.3',
|
|
330
|
+
}),
|
|
331
|
+
});
|
|
332
|
+
await screen.findByTestId('cluster-overview');
|
|
333
|
+
expect(lastOverviewProps?.applications?.applications?.connectors).toEqual(expect.objectContaining({
|
|
334
|
+
url: '/org/org-1/cluster/cluster-1/connectors/management',
|
|
335
|
+
linkLabel: 'Manage',
|
|
285
336
|
linkVisible: true,
|
|
286
337
|
}));
|
|
287
338
|
});
|
|
@@ -1138,3 +1189,43 @@ describe('C4ClusterDetailsOverviewTab disabled Optimize tile', () => {
|
|
|
1138
1189
|
});
|
|
1139
1190
|
});
|
|
1140
1191
|
});
|
|
1192
|
+
describe('C4ClusterDetailsOverviewTab Resume cluster', () => {
|
|
1193
|
+
beforeEach(() => {
|
|
1194
|
+
lastOverviewProps = undefined;
|
|
1195
|
+
vi.mocked(ConsoleClusterService.wakeCluster).mockReset();
|
|
1196
|
+
vi.mocked(SaaSJobsService.getJobStatisticsGlobal).mockResolvedValue(undefined);
|
|
1197
|
+
});
|
|
1198
|
+
afterEach(() => {
|
|
1199
|
+
cleanup();
|
|
1200
|
+
});
|
|
1201
|
+
it('calls wakeCluster API when wakeAction is invoked', async () => {
|
|
1202
|
+
vi.mocked(ConsoleClusterService.wakeCluster).mockResolvedValue(undefined);
|
|
1203
|
+
const onReloadCluster = vi.fn().mockResolvedValue(undefined);
|
|
1204
|
+
renderTab({
|
|
1205
|
+
cluster: buildCluster('Suspended'),
|
|
1206
|
+
canWakeCluster: true,
|
|
1207
|
+
onReloadCluster,
|
|
1208
|
+
});
|
|
1209
|
+
await screen.findByTestId('cluster-overview');
|
|
1210
|
+
await act(async () => {
|
|
1211
|
+
await lastOverviewProps?.details?.status?.wakeAction?.();
|
|
1212
|
+
});
|
|
1213
|
+
expect(ConsoleClusterService.wakeCluster).toHaveBeenCalledWith(expect.objectContaining({
|
|
1214
|
+
params: { orgId: 'org-1', clusterId: 'cluster-1' },
|
|
1215
|
+
}));
|
|
1216
|
+
expect(onReloadCluster).toHaveBeenCalled();
|
|
1217
|
+
});
|
|
1218
|
+
it('shows error notification when wakeCluster fails', async () => {
|
|
1219
|
+
vi.mocked(ConsoleClusterService.wakeCluster).mockRejectedValue(new Error('wake failed'));
|
|
1220
|
+
const { addC4ConsoleNotification } = await import('../../../notifications/c4-console-notifications-handle');
|
|
1221
|
+
renderTab({ cluster: buildCluster('Suspended'), canWakeCluster: true });
|
|
1222
|
+
await screen.findByTestId('cluster-overview');
|
|
1223
|
+
await act(async () => {
|
|
1224
|
+
await lastOverviewProps?.details?.status?.wakeAction?.();
|
|
1225
|
+
});
|
|
1226
|
+
expect(addC4ConsoleNotification).toHaveBeenCalledWith(expect.objectContaining({
|
|
1227
|
+
kind: 'error',
|
|
1228
|
+
title: 'Failed to resume cluster',
|
|
1229
|
+
}));
|
|
1230
|
+
});
|
|
1231
|
+
});
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { ConsoleSecureConnectivityService } from '@camunda/ccma-api';
|
|
3
3
|
import { isValidAwsArn, isValidPrivateLinkRegion, PRIVATE_LINK_REGIONS, SECURE_CONNECTIVITY_ALLOWED_ENTRIES_LIMIT, SseEntity, } from '@camunda/ccma-shared-types';
|
|
4
|
-
import {
|
|
4
|
+
import { ButtonSet, InlineLoading, ProgressIndicator, ProgressStep, } from '@carbon/react';
|
|
5
5
|
import { Checkmark, Close } from '@carbon/react/icons/index.esm.js';
|
|
6
6
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { C4ClusterDetailsSecureConnectivity } from '../../../components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js';
|
|
8
|
+
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
9
|
+
import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../../../components/c4-structured-list/c4-structured-list.js';
|
|
8
10
|
import { useC4ConsoleData } from '../../../runtime/c4-console-data-context.js';
|
|
9
11
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
12
|
+
import { Button, ComposedModal, FilterableMultiSelect, Modal, ModalBody, ModalFooter, ModalHeader, Stack, TextInput, Tile, } from '../../../ui/index.js';
|
|
10
13
|
function safeTranslate(t, key, fallback) {
|
|
11
14
|
if (!t)
|
|
12
15
|
return fallback;
|
|
@@ -139,7 +142,7 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
139
142
|
fontSize: '0.875rem',
|
|
140
143
|
fontWeight: 600,
|
|
141
144
|
color: 'var(--cds-text-secondary)',
|
|
142
|
-
}, children: "Principals" }), _jsx(
|
|
145
|
+
}, children: "Principals" }), _jsx(C4StructuredListWrapper, { isCondensed: true, isFlush: true, children: _jsx(C4StructuredListBody, { children: allowedPrincipals.length > 0 ? (allowedPrincipals.map((principal) => (_jsx(C4StructuredListRow, { children: _jsx(C4StructuredListCell, { children: _jsxs("div", { style: {
|
|
143
146
|
display: 'flex',
|
|
144
147
|
alignItems: 'center',
|
|
145
148
|
justifyContent: 'space-between',
|
|
@@ -147,7 +150,7 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
147
150
|
}, children: [_jsx("span", { style: { flexGrow: 1 }, children: principal }), _jsx(Button, { kind: 'ghost', size: 'sm', hasIconOnly: true, renderIcon: Close, iconDescription: 'Remove principal', onClick: () => {
|
|
148
151
|
setSecureConnectivityMutationError('');
|
|
149
152
|
setAllowedPrincipals(allowedPrincipals.filter((item) => item !== principal));
|
|
150
|
-
} })] }) }) }, principal)))) : (_jsx(
|
|
153
|
+
} })] }) }) }, principal)))) : (_jsx(C4StructuredListRow, { children: _jsx(C4StructuredListCell, { children: _jsx("div", { style: {
|
|
151
154
|
display: 'flex',
|
|
152
155
|
alignItems: 'center',
|
|
153
156
|
justifyContent: 'space-between',
|
|
@@ -179,7 +182,7 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
179
182
|
fontSize: '0.875rem',
|
|
180
183
|
fontWeight: 600,
|
|
181
184
|
color: 'var(--cds-text-secondary)',
|
|
182
|
-
}, children: "Selected regions" }), _jsx(
|
|
185
|
+
}, children: "Selected regions" }), _jsx(C4StructuredListWrapper, { isCondensed: true, isFlush: true, children: _jsx(C4StructuredListBody, { children: allowedRegions.length > 0 ? (allowedRegions.map((region) => (_jsx(C4StructuredListRow, { children: _jsx(C4StructuredListCell, { children: _jsxs("div", { style: {
|
|
183
186
|
display: 'flex',
|
|
184
187
|
alignItems: 'center',
|
|
185
188
|
justifyContent: 'space-between',
|
|
@@ -188,7 +191,7 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
188
191
|
setShowAllowedRegionsLimitReached(false);
|
|
189
192
|
setSecureConnectivityMutationError('');
|
|
190
193
|
setAllowedRegions(allowedRegions.filter((item) => item !== region));
|
|
191
|
-
} })] }) }) }, region)))) : (_jsx(
|
|
194
|
+
} })] }) }) }, region)))) : (_jsx(C4StructuredListRow, { children: _jsx(C4StructuredListCell, { children: _jsx("div", { style: {
|
|
192
195
|
display: 'flex',
|
|
193
196
|
alignItems: 'center',
|
|
194
197
|
justifyContent: 'space-between',
|
|
@@ -353,7 +356,7 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
353
356
|
hasTooManyAllowedPrincipals) ||
|
|
354
357
|
(secureConnectivityEditMode === 'regions' && hasTooManyAllowedRegions);
|
|
355
358
|
const emptyDescription = (_jsxs(Stack, { gap: 6, children: [_jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.description0', 'Private networking allows you to connect privately to the cluster using inbound AWS PrivateLink.') }), _jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.description1', 'With inbound PrivateLink, traffic from your AWS VPC to Camunda cluster is routed privately and never traverses the public internet. This enables job workers and inbound connectors to run inside your own network while securely accessing Camunda.') }), showActivatingTile ? (_jsx(Tile, { light: true, children: _jsxs(Stack, { gap: 2, children: [_jsx(InlineLoading, { description: safeTranslate(t, 'clusterdetails:secureConnectivity.activatingTitle', 'Activating PrivateLink endpoint service…') }), _jsxs(Stack, { gap: 1, children: [_jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.activatingText0', 'This may take a few minutes.') }), _jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.activatingText1', 'You can leave this page. We will notify you when the endpoint service is ready.') })] })] }) })) : undefined] }));
|
|
356
|
-
return (_jsxs(_Fragment, { children: [showActivePrivateLinkIpAllowlistConflict && (_jsx(
|
|
359
|
+
return (_jsxs(_Fragment, { children: [showActivePrivateLinkIpAllowlistConflict && (_jsx(C4InlineNotification, { kind: 'warning', lowContrast: true, hideCloseButton: true, title: ipAllowlistConflictTitle, subtitle: ipAllowlistConflictSubtitle, style: {
|
|
357
360
|
maxWidth: '100%',
|
|
358
361
|
width: '100%',
|
|
359
362
|
marginBottom: 'var(--cds-spacing-05)',
|
|
@@ -432,7 +435,7 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
432
435
|
}
|
|
433
436
|
closeActivateModal();
|
|
434
437
|
return true;
|
|
435
|
-
}, children: [_jsx(ModalHeader, { title: safeTranslate(t, 'clusterdetails:secureConnectivity.enableButton', 'Activate PrivateLink endpoint service') }), _jsx(ModalBody, { hasForm: true, children: _jsxs(Stack, { gap: 6, children: [hasIpAllowlist && (_jsx(
|
|
438
|
+
}, children: [_jsx(ModalHeader, { title: safeTranslate(t, 'clusterdetails:secureConnectivity.enableButton', 'Activate PrivateLink endpoint service') }), _jsx(ModalBody, { hasForm: true, children: _jsxs(Stack, { gap: 6, children: [hasIpAllowlist && (_jsx(C4InlineNotification, { kind: 'warning', lowContrast: true, hideCloseButton: true, title: ipAllowlistConflictTitle, subtitle: ipAllowlistConflictSubtitle })), secureConnectivityMutationError && (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: 'Activation failed', subtitle: secureConnectivityMutationError, onCloseButtonClick: () => setSecureConnectivityMutationError('') })), _jsxs(ProgressIndicator, { currentIndex: secureConnectivityModalStep, spaceEqually: true, onChange: setSecureConnectivityModalStep, children: [_jsx(ProgressStep, { label: 'Allowed principals' }, 'private-link-step-0'), _jsx(ProgressStep, { label: 'Supported regions' }, 'private-link-step-1')] }), (() => {
|
|
436
439
|
switch (secureConnectivityModalStep) {
|
|
437
440
|
case 0:
|
|
438
441
|
return renderAllowedPrincipalsEditor('activateModal');
|
|
@@ -522,7 +525,7 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
522
525
|
}
|
|
523
526
|
closeUpdateModal();
|
|
524
527
|
return true;
|
|
525
|
-
}, children: [_jsx(ModalHeader, { title: updateModalTitle }), _jsx(ModalBody, { hasForm: true, children: _jsxs(Stack, { gap: 6, children: [secureConnectivityMutationError && (_jsx(
|
|
528
|
+
}, children: [_jsx(ModalHeader, { title: updateModalTitle }), _jsx(ModalBody, { hasForm: true, children: _jsxs(Stack, { gap: 6, children: [secureConnectivityMutationError && (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: updateModalErrorTitle, subtitle: secureConnectivityMutationError, onCloseButtonClick: () => setSecureConnectivityMutationError('') })), secureConnectivityEditMode === 'regions'
|
|
526
529
|
? renderAllowedRegionsEditor()
|
|
527
530
|
: renderAllowedPrincipalsEditor('updateModal')] }) }), _jsx(ModalFooter, { children: _jsxs(ButtonSet, { style: { width: '100%' }, children: [_jsx(Button, { kind: 'secondary', disabled: secureConnectivityMutationBusy, onClick: closeUpdateModal, size: 'xl', style: { flex: 1, maxInlineSize: '100%' }, children: "Cancel" }), _jsx(Button, { kind: 'primary', disabled: isUpdateModalSaveDisabled, onClick: () => {
|
|
528
531
|
if (secureConnectivityEditMode === 'principals') {
|
|
@@ -574,5 +577,5 @@ export const C4ClusterDetailsSecureConnectivityTab = (props) => {
|
|
|
574
577
|
setSecureConnectivityDeactivating(false);
|
|
575
578
|
}
|
|
576
579
|
})();
|
|
577
|
-
}, children: _jsxs(Stack, { gap: 4, children: [_jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.deactivateModalBody0', 'Are you sure you want to deactivate the PrivateLink endpoint service?') }), _jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.deactivateModalBody1', 'The private connectivity will be disabled for the Camunda cluster and all endpoint connections will be removed.') }), secureConnectivityMutationError ? (_jsx(
|
|
580
|
+
}, children: _jsxs(Stack, { gap: 4, children: [_jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.deactivateModalBody0', 'Are you sure you want to deactivate the PrivateLink endpoint service?') }), _jsx("p", { children: safeTranslate(t, 'clusterdetails:secureConnectivity.deactivateModalBody1', 'The private connectivity will be disabled for the Camunda cluster and all endpoint connections will be removed.') }), secureConnectivityMutationError ? (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate(t, 'clusterdetails:secureConnectivity.deactivateModalErrorTitle', 'Deactivation failed'), subtitle: secureConnectivityMutationError, onCloseButtonClick: () => setSecureConnectivityMutationError('') })) : undefined] }) })] }));
|
|
578
581
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
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
3
|
import { checkVersion, VersionCheckOperator, } from '@camunda/ccma-shared-types';
|
|
4
|
-
import { InlineNotification, Link, Modal } from '@carbon/react';
|
|
5
4
|
import { Fragment, useCallback, useMemo, useState, } from 'react';
|
|
6
5
|
import { C4ClusterSettings } from '../../../components/c4-cluster-settings/c4-cluster-settings.js';
|
|
6
|
+
import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
|
|
7
7
|
import { buildClusterSwaggerUrl } from '../../../runtime/build-cluster-swagger-url.js';
|
|
8
8
|
import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
|
|
9
|
+
import { Link, Modal } from '../../../ui/index.js';
|
|
9
10
|
import { isClusterReconciliationPaused } from '../../is-cluster-reconciliation-paused.js';
|
|
10
11
|
// Helper to translate with fallback
|
|
11
12
|
function safeTranslate(translateFn, key, fallback, options) {
|
|
@@ -440,6 +441,49 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
440
441
|
const shouldShowMultiTenancy = useMemo(() => {
|
|
441
442
|
return checkClusterVersion('8.8.0-alpha7') && isMultiTenancyFeatureEnabled;
|
|
442
443
|
}, [checkClusterVersion, isMultiTenancyFeatureEnabled]);
|
|
444
|
+
const isOptimizeFilteringFeatureEnabled = runtime.featureFlags?.isEnabled?.('console.optimizeFiltering') ?? false;
|
|
445
|
+
const shouldShowOptimizeFiltering = useMemo(() => {
|
|
446
|
+
return (checkClusterVersion('8.10.0-alpha1') && isOptimizeFilteringFeatureEnabled);
|
|
447
|
+
}, [checkClusterVersion, isOptimizeFilteringFeatureEnabled]);
|
|
448
|
+
const handleOptimizeFilteringToggle = useCallback(async (enabled) => {
|
|
449
|
+
try {
|
|
450
|
+
await ConsoleClusterService.updateCluster({
|
|
451
|
+
config: props.apiConfig,
|
|
452
|
+
params: { orgId: props.orgId, clusterId: props.clusterId },
|
|
453
|
+
body: { optimizeFiltering: enabled ? {} : null },
|
|
454
|
+
});
|
|
455
|
+
await props.onReloadCluster();
|
|
456
|
+
}
|
|
457
|
+
catch (error) {
|
|
458
|
+
setOperationError(settingUpdateFailedFallback);
|
|
459
|
+
throw error;
|
|
460
|
+
}
|
|
461
|
+
}, [
|
|
462
|
+
props.apiConfig,
|
|
463
|
+
props.orgId,
|
|
464
|
+
props.clusterId,
|
|
465
|
+
props.onReloadCluster,
|
|
466
|
+
settingUpdateFailedFallback,
|
|
467
|
+
]);
|
|
468
|
+
const handleOptimizeFilteringSave = useCallback(async (config) => {
|
|
469
|
+
try {
|
|
470
|
+
await ConsoleClusterService.updateCluster({
|
|
471
|
+
config: props.apiConfig,
|
|
472
|
+
params: { orgId: props.orgId, clusterId: props.clusterId },
|
|
473
|
+
body: { optimizeFiltering: config },
|
|
474
|
+
});
|
|
475
|
+
await props.onReloadCluster();
|
|
476
|
+
}
|
|
477
|
+
catch (error) {
|
|
478
|
+
setOperationError(settingUpdateFailedFallback);
|
|
479
|
+
}
|
|
480
|
+
}, [
|
|
481
|
+
props.apiConfig,
|
|
482
|
+
props.orgId,
|
|
483
|
+
props.clusterId,
|
|
484
|
+
props.onReloadCluster,
|
|
485
|
+
settingUpdateFailedFallback,
|
|
486
|
+
]);
|
|
443
487
|
if (!props.cluster)
|
|
444
488
|
return _jsx(_Fragment, {});
|
|
445
489
|
const isSubjectToIdentityAuthorization = checkClusterVersion('8.8.0-alpha5');
|
|
@@ -508,7 +552,7 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
508
552
|
updateIdentityBasedAuthorizations,
|
|
509
553
|
updateResourceBasedAuthorizations,
|
|
510
554
|
]);
|
|
511
|
-
return (_jsxs(_Fragment, { children: [operationError && (_jsx(
|
|
555
|
+
return (_jsxs(_Fragment, { children: [operationError && (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate(props.t, 'clusterdetails:settings.operationError.title', 'Setting update failed'), subtitle: operationError, onCloseButtonClick: () => setOperationError(undefined) })), _jsx(C4ClusterSettings, { settings: {
|
|
512
556
|
title: safeTranslate(props.t, 'clusterdetails:settings.clusterSettings.title', 'Cluster settings'),
|
|
513
557
|
...(shouldShowResourceBasedAuthorizations && {
|
|
514
558
|
resourceBasedAuthorizations: {
|
|
@@ -688,6 +732,16 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
688
732
|
false),
|
|
689
733
|
},
|
|
690
734
|
},
|
|
735
|
+
}), ...(shouldShowOptimizeFiltering && {
|
|
736
|
+
optimizeFilteringSettings: {
|
|
737
|
+
title: 'Data filters',
|
|
738
|
+
filtering: props.cluster.externalMetadata?.optimizeFiltering ?? undefined,
|
|
739
|
+
permissions: {
|
|
740
|
+
mayChange: effectiveCanEdit,
|
|
741
|
+
},
|
|
742
|
+
onToggle: handleOptimizeFilteringToggle,
|
|
743
|
+
onSave: handleOptimizeFilteringSave,
|
|
744
|
+
},
|
|
691
745
|
}), dangerZone: {
|
|
692
746
|
title: safeTranslate(props.t, 'clusterdetails:settings.dangerZone.title', 'Danger zone'),
|
|
693
747
|
deleteCluster: {
|
|
@@ -710,7 +764,7 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
710
764
|
setTasklistV2UpgradeError(undefined);
|
|
711
765
|
}, onRequestSubmit: () => {
|
|
712
766
|
void submitTasklistV2Upgrade();
|
|
713
|
-
}, size: 'sm', children: [_jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.tasklistMode.modal.description', 'This action cannot be undone. Once upgraded to Tasklist v2, downgrading back to v1 will not be possible.') }), tasklistV2UpgradeError && (_jsx(
|
|
767
|
+
}, size: 'sm', children: [_jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.tasklistMode.modal.description', 'This action cannot be undone. Once upgraded to Tasklist v2, downgrading back to v1 will not be possible.') }), tasklistV2UpgradeError && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', hideCloseButton: true, title: '', subtitle: tasklistV2UpgradeError }))] })), authorizationsConfirm && (_jsxs(Modal, { open: true, modalHeading: authorizationsConfirmTitle, primaryButtonText: authorizationsConfirmPrimaryText, secondaryButtonText: safeTranslate(props.t, 'clusterdetails:settings.authorizations.modal.buttons.cancel', 'Cancel'), primaryButtonDisabled: isUpdatingRba || isUpdatingIdentityAuthorizations, onRequestClose: () => {
|
|
714
768
|
if (isUpdatingRba || isUpdatingIdentityAuthorizations) {
|
|
715
769
|
return;
|
|
716
770
|
}
|
|
@@ -718,5 +772,5 @@ export const C4ClusterDetailsSettingsTab = (props) => {
|
|
|
718
772
|
setAuthorizationsConfirmError(undefined);
|
|
719
773
|
}, onRequestSubmit: () => {
|
|
720
774
|
void submitAuthorizationsConfirmation();
|
|
721
|
-
}, size: 'sm', children: [authorizationsConfirmDescription, authorizationsConfirmError && (_jsx(
|
|
775
|
+
}, size: 'sm', children: [authorizationsConfirmDescription, authorizationsConfirmError && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', hideCloseButton: true, title: '', subtitle: authorizationsConfirmError }))] }))] }));
|
|
722
776
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { C4ClustersPageProps } from './c4-clusters-page.types';
|
|
2
|
-
export declare const C4ClustersPage: (({ orgId, gettingStartedHref, onNavigate, translations, permissionsOverride, clusterCapMessage, isClusterPaused: isClusterPausedOverride, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride, onRequestAssignTag, onRequestDeleteCluster, onRequestWakeCluster, }: C4ClustersPageProps) => import("react").JSX.Element) & {
|
|
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) & {
|
|
3
3
|
displayName: string;
|
|
4
4
|
};
|