@camunda/ccma-saas-frontend 0.18.10 → 0.19.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 +4 -17
- package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.js +5 -47
- package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.types.d.ts +14 -6
- package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js +1 -2
- package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.js +4 -8
- package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.js +3 -2
- package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.types.d.ts +3 -0
- package/lib/esm/components/c4-async-modal/c4-async-modal.js +1 -1
- package/lib/esm/components/c4-audit-log/c4-audit-log.js +16 -32
- package/lib/esm/components/c4-billing-page/c4-billing-page.js +7 -15
- package/lib/esm/components/c4-billing-page/custom-styles.js +9 -9
- package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +9 -3
- package/lib/esm/components/c4-billing-page/elements/plan-details.js +3 -3
- package/lib/esm/components/c4-billing-page/elements/value-metric.d.ts +1 -1
- package/lib/esm/components/c4-billing-page/elements/value-metric.js +18 -46
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +4 -10
- package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.d.ts +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +4 -15
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.d.ts +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +14 -41
- package/lib/esm/components/c4-charts-dashboard/elements/line-chart.d.ts +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +1 -38
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +5 -5
- package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +8 -22
- package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.d.ts +1 -1
- package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.js +1 -1
- package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +10 -28
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -2
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +2 -2
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +4 -4
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +2 -2
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +20 -44
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +8 -16
- package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.js +1 -1
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +2 -2
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +35 -33
- package/lib/esm/components/c4-cluster-list/c4-cluster-expiry-tag.js +3 -7
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +38 -157
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +1 -1
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +7 -8
- package/lib/esm/components/c4-cluster-overview/applications.js +71 -157
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +4 -18
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +11 -50
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +19 -36
- package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +2 -4
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +16 -199
- package/lib/esm/components/c4-cluster-overview/ds-section.d.ts +2 -2
- package/lib/esm/components/c4-cluster-overview/ds-section.js +2 -2
- package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.d.ts +3 -3
- package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.js +2 -2
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +2 -5
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +1 -1
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +5 -5
- package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.js +1 -2
- package/lib/esm/components/c4-cluster-settings/elements/session-settings.js +2 -2
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.d.ts +2 -2
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +1 -3
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.d.ts +1 -1
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +12 -77
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.types.d.ts +0 -1
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +47 -52
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.types.d.ts +1 -1
- package/lib/esm/components/c4-console-dashboard/elements/empty-state.d.ts +11 -2
- package/lib/esm/components/c4-console-dashboard/elements/empty-state.js +16 -4
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +3 -4
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +2 -4
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +20 -58
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +157 -189
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +1 -1
- package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.d.ts +2 -3
- package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.js +3 -10
- package/lib/esm/components/c4-data-table/c4-data-table-skeleton.d.ts +9 -10
- package/lib/esm/components/c4-data-table/c4-data-table-skeleton.js +3 -18
- package/lib/esm/components/c4-data-table/c4-data-table.d.ts +2 -2
- package/lib/esm/components/c4-data-table/c4-data-table.js +3 -17
- package/lib/esm/components/c4-delete-account-modal/c4-delete-account-modal.js +1 -2
- package/lib/esm/components/c4-divider/c4-divider.js +5 -13
- package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +6 -12
- package/lib/esm/components/c4-empty-state/c4-empty-state.js +1 -9
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.js +1 -2
- package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.d.ts +2 -2
- package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.js +2 -2
- package/lib/esm/components/c4-file-uploader/c4-file-uploader.d.ts +4 -18
- package/lib/esm/components/c4-file-uploader/c4-file-uploader.js +7 -33
- package/lib/esm/components/c4-help-center/help-center-placeholders.d.ts +1 -1
- package/lib/esm/components/c4-hub-upgrade-banner/c4-hub-upgrade-banner.js +2 -2
- package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.js +2 -2
- package/lib/esm/components/c4-inline-notification/c4-inline-notification.d.ts +15 -9
- package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +7 -17
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +6 -6
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +0 -5
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +1 -6
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +0 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +2 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.d.ts +1 -3
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +4 -56
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.d.ts +1 -3
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +9 -88
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +12 -26
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +3 -4
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +2 -2
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +0 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-background-fetching-indicator.js +1 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +2 -3
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +2 -3
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +4 -4
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.js +3 -3
- package/lib/esm/components/c4-job-dashboard-shared/c4-timestamp-information.js +3 -3
- package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.js +25 -25
- package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +5 -1
- package/lib/esm/components/c4-management-activity/c4-management-activity.js +6 -39
- package/lib/esm/components/c4-management-activity/c4-management-activity.types.d.ts +1 -6
- package/lib/esm/components/c4-management-api/c4-management-api.js +4 -6
- package/lib/esm/components/c4-management-settings/c4-management-settings.js +24 -34
- package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +7 -3
- package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js +3 -3
- package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.types.d.ts +6 -3
- package/lib/esm/components/c4-navigation/c4-navigation.d.ts +17 -33
- package/lib/esm/components/c4-navigation/c4-navigation.js +12 -25
- package/lib/esm/components/c4-number-input/c4-number-input.js +20 -6
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +1 -4
- package/lib/esm/components/c4-org-cluster-defaults/c4-org-cluster-defaults.js +2 -2
- package/lib/esm/components/c4-page-layout/c4-page-layout.d.ts +2 -6
- package/lib/esm/components/c4-page-layout/c4-page-layout.js +3 -12
- package/lib/esm/components/c4-page-template/c4-page-template.d.ts +0 -3
- package/lib/esm/components/c4-page-template/c4-page-template.js +1 -11
- package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.js +14 -14
- package/lib/esm/components/c4-pricing/c4-pricing.js +1 -1
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +5 -13
- package/lib/esm/components/c4-search/c4-search-results.js +44 -36
- package/lib/esm/components/c4-search/c4-search.js +5 -7
- package/lib/esm/components/c4-segmented-control/c4-segmented-control.d.ts +5 -19
- package/lib/esm/components/c4-segmented-control/c4-segmented-control.js +6 -18
- package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.d.ts +5 -8
- package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +5 -19
- package/lib/esm/components/c4-stateful-button/c4-stateful-button.js +12 -2
- package/lib/esm/components/c4-stateful-button/c4-stateful-button.types.d.ts +4 -1
- package/lib/esm/components/c4-structured-list/c4-structured-list.d.ts +33 -18
- package/lib/esm/components/c4-structured-list/c4-structured-list.js +15 -60
- package/lib/esm/components/c4-tabs/c4-tabs.js +4 -8
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +3 -3
- package/lib/esm/components/c4-toast-notification/c4-toast-notification.d.ts +13 -9
- package/lib/esm/components/c4-toast-notification/c4-toast-notification.js +3 -12
- package/lib/esm/components/c4-toggle/c4-toggle.js +1 -3
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.js +2 -2
- package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js +3 -9
- package/lib/esm/components/c4-usage-history/c4-usage-history.js +4 -5
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +3 -40
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +4 -5
- package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +1 -3
- package/lib/esm/components/shared-charts/ds-line-chart.d.ts +4 -6
- package/lib/esm/components/shared-charts/ds-line-chart.js +5 -7
- package/lib/esm/components/shared-charts/ds-meter-chart.d.ts +3 -5
- package/lib/esm/components/shared-charts/ds-meter-chart.js +8 -10
- package/lib/esm/components/shared-charts/recharts-tokens.d.ts +6 -7
- package/lib/esm/components/shared-charts/recharts-tokens.js +6 -7
- package/lib/esm/index.css +107 -74
- package/lib/esm/index.d.ts +1 -9
- package/lib/esm/index.js +1 -5
- package/lib/esm/runtime/c4-console-runtime-context.d.ts +3 -10
- package/lib/esm/runtime/c4-console-runtime-context.js +11 -23
- package/lib/esm/runtime/c4-console-runtime.types.d.ts +0 -8
- package/lib/esm/runtime/c4-user-theme.d.ts +4 -4
- package/lib/esm/runtime/c4-user-theme.js +4 -4
- package/lib/esm/runtime/index.d.ts +1 -1
- package/lib/esm/runtime/index.js +1 -1
- package/lib/esm/runtime/nav/use-webapp-nav-data.d.ts +2 -2
- package/lib/esm/runtime/nav/use-webapp-nav-data.js +2 -2
- package/lib/esm/ui/c4-cluster-tag.d.ts +1 -1
- package/lib/esm/ui/c4-cluster-tag.js +1 -1
- package/lib/esm/ui/c4-modal-dialog.d.ts +7 -11
- package/lib/esm/ui/c4-modal-dialog.js +18 -9
- package/lib/esm/ui/c4-password-input.d.ts +4 -8
- package/lib/esm/ui/c4-password-input.js +4 -8
- package/lib/esm/ui/c4-text-area.d.ts +19 -0
- package/lib/esm/ui/c4-text-area.js +30 -0
- package/lib/esm/ui/ds-compact-code-block.d.ts +1 -1
- package/lib/esm/ui/ds-compact-code-block.js +1 -1
- package/lib/esm/ui/families.d.ts +13 -46
- package/lib/esm/ui/families.js +8 -51
- package/lib/esm/ui/index.d.ts +11 -53
- package/lib/esm/ui/index.js +19 -152
- package/lib/esm/ui/tabs.d.ts +1 -21
- package/lib/esm/ui/tabs.js +1 -22
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +2 -3
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +17 -99
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +2 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +16 -58
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +8 -16
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +4 -5
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +13 -51
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +23 -22
- package/lib/esm/widgets/clusters/c4-clusters-page.js +1 -2
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +1 -1
- 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 +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +3 -4
- package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +1 -1
- package/lib/esm/widgets/group-details/c4-group-details-page.js +2 -3
- package/lib/esm/widgets/management/c4-management-app.js +6 -9
- package/lib/esm/widgets/management/c4-management-app.types.d.ts +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +2 -2
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +2 -2
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +4 -12
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +12 -12
- package/lib/esm/widgets/user-details/c4-user-details-page.js +6 -6
- package/package.json +3 -14
- package/lib/esm/components/c4-sm-cluster-details/automation-components.d.ts +0 -3
- package/lib/esm/components/c4-sm-cluster-details/automation-components.js +0 -21
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.d.ts +0 -3
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.js +0 -22
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.types.d.ts +0 -71
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.types.js +0 -6
- package/lib/esm/components/c4-sm-cluster-details/custom-properties.d.ts +0 -4
- package/lib/esm/components/c4-sm-cluster-details/custom-properties.js +0 -25
- package/lib/esm/components/c4-sm-cluster-details/details.d.ts +0 -7
- package/lib/esm/components/c4-sm-cluster-details/details.js +0 -19
- package/lib/esm/components/c4-sm-cluster-details/zeebe-components.d.ts +0 -3
- package/lib/esm/components/c4-sm-cluster-details/zeebe-components.js +0 -44
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.d.ts +0 -3
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.js +0 -34
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +0 -40
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.js +0 -6
- package/lib/esm/components/c4-sm-dashboard/cluster-tile.d.ts +0 -9
- package/lib/esm/components/c4-sm-dashboard/cluster-tile.js +0 -60
- package/lib/esm/components/c4-sm-dashboard/component-tile.d.ts +0 -14
- package/lib/esm/components/c4-sm-dashboard/component-tile.js +0 -46
- package/lib/esm/components/c4-sm-dashboard/explore.d.ts +0 -20
- package/lib/esm/components/c4-sm-dashboard/explore.js +0 -24
- package/lib/esm/components/c4-sm-dashboard/health-status.d.ts +0 -10
- package/lib/esm/components/c4-sm-dashboard/health-status.js +0 -60
- package/lib/esm/components/c4-sm-dashboard/overview.d.ts +0 -13
- package/lib/esm/components/c4-sm-dashboard/overview.js +0 -148
- package/lib/esm/components/c4-sm-dashboard/usage-tile.d.ts +0 -22
- package/lib/esm/components/c4-sm-dashboard/usage-tile.js +0 -36
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.d.ts +0 -4
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.js +0 -114
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.types.d.ts +0 -45
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.types.js +0 -6
- package/lib/esm/components/c4-telemetry-page/component-metrics.d.ts +0 -26
- package/lib/esm/components/c4-telemetry-page/component-metrics.js +0 -42
- package/lib/esm/components/c4-telemetry-page/metrics-empty-state-image.d.ts +0 -2
- package/lib/esm/components/c4-telemetry-page/metrics-empty-state-image.js +0 -6
- package/lib/esm/components/c4-telemetry-page/telemetry-for-component.d.ts +0 -50
- package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +0 -113
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.d.ts +0 -3
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.js +0 -80
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.types.d.ts +0 -40
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.types.js +0 -6
- package/lib/esm/ui/c4-definition-tooltip.d.ts +0 -15
- package/lib/esm/ui/c4-definition-tooltip.js +0 -43
- package/lib/esm/ui/switchable.d.ts +0 -14
- package/lib/esm/ui/switchable.js +0 -27
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useC4DesignSystem } from '../../runtime/c4-console-runtime-context.js';
|
|
2
|
+
import { Plus, TriangleAlert } from 'lucide-react';
|
|
3
|
+
import { useRef } from 'react';
|
|
5
4
|
import { Button, ClusterTag, Link } from '../../ui/index.js';
|
|
6
5
|
import { ClusterStatusElement, normalizeClusterStatus, } from '../c4-cluster-overview/applications.js';
|
|
7
|
-
import { C4IconAndTextElement,
|
|
6
|
+
import { C4IconAndTextElement, getDsClusterLoadPresentation, } from '../c4-cluster-overview/c4-cluster-overview.js';
|
|
7
|
+
import { DS_STATUS_ICON_COLORS } from '../c4-cluster-overview/ds-status-icon-text.js';
|
|
8
8
|
import { C4DataTable } from '../c4-data-table/c4-data-table.js';
|
|
9
9
|
import { C4InlineNotification } from '../c4-inline-notification/c4-inline-notification.js';
|
|
10
10
|
import { C4LinkButton } from '../c4-link-button/c4-link-button.js';
|
|
11
11
|
import { C4PageTemplate } from '../c4-page-template/c4-page-template.js';
|
|
12
12
|
import { C4ClusterExpiryTag } from './c4-cluster-expiry-tag.js';
|
|
13
13
|
import { buildClusterListFilters } from './cluster-list-filters.js';
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
// long deprecated-version or region strings
|
|
18
|
-
// table. Carbon's DataTable already auto-sizes columns to content and must
|
|
19
|
-
// stay byte-for-byte unchanged, so these are only applied in `ds` mode.
|
|
14
|
+
// Column-width hints so the Status column has room for its icon + label and
|
|
15
|
+
// does not wrap on narrower (~14") viewports, while Generation and Region wrap
|
|
16
|
+
// instead of stretching the table. They are the widest columns and can carry
|
|
17
|
+
// long deprecated-version or region strings.
|
|
20
18
|
const DS_STATUS_COLUMN_MIN_WIDTH = '11rem';
|
|
21
19
|
const DS_GENERATION_COLUMN_MAX_WIDTH = '10rem';
|
|
22
20
|
const DS_REGION_COLUMN_MAX_WIDTH = '9rem';
|
|
23
21
|
const DEFAULT_PAGE_SIZE = 25;
|
|
24
|
-
const PAGE_NUMBER_SELECTOR = '.cds--select__page-number select';
|
|
25
|
-
const PAGE_SIZE_SELECTOR = '.cds--select__item-count select';
|
|
26
|
-
const PAGE_FORWARD_BUTTON_SELECTOR = '.cds--pagination__button--forward';
|
|
27
|
-
const PAGE_BACKWARD_BUTTON_SELECTOR = '.cds--pagination__button--backward';
|
|
28
22
|
function isPlainLeftClick(event) {
|
|
29
23
|
return (event.button === 0 &&
|
|
30
24
|
!event.defaultPrevented &&
|
|
@@ -34,12 +28,7 @@ function isPlainLeftClick(event) {
|
|
|
34
28
|
!event.shiftKey);
|
|
35
29
|
}
|
|
36
30
|
export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate, onDeleteCluster, onAssignTag, onWakeCluster, onFailoverCluster, onDuplicateCluster, trialNotification, encryptionNotification, clusterCapMessage, emptyStateContent, translations, isClusterPaused, isMultiRegionCluster, isFailoverSyncPending, isFailoverSource, isOnRetiredAlphaGeneration, isRunningOnUnsupportedGeneration, scope = 'cluster', }) => {
|
|
37
|
-
const designSystem = useC4DesignSystem();
|
|
38
|
-
const isDsMode = designSystem === 'ds';
|
|
39
|
-
const tableContainerRef = useRef(null);
|
|
40
31
|
const stableClustersRef = useRef(clusters.map((cluster) => ({ ...cluster })));
|
|
41
|
-
const selectedPageRef = useRef(1);
|
|
42
|
-
const syncPageTimeoutRef = useRef(undefined);
|
|
43
32
|
const stableClusters = (() => {
|
|
44
33
|
const previousClusters = stableClustersRef.current;
|
|
45
34
|
const canReusePreviousClusters = previousClusters.length === clusters.length &&
|
|
@@ -69,96 +58,6 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
69
58
|
cluster.tags,
|
|
70
59
|
]))
|
|
71
60
|
.join('\n');
|
|
72
|
-
const readPageSelect = useCallback(() => {
|
|
73
|
-
return (tableContainerRef.current?.querySelector(PAGE_NUMBER_SELECTOR) ?? null);
|
|
74
|
-
}, []);
|
|
75
|
-
const readPageSizeSelect = useCallback(() => {
|
|
76
|
-
return (tableContainerRef.current?.querySelector(PAGE_SIZE_SELECTOR) ?? null);
|
|
77
|
-
}, []);
|
|
78
|
-
const syncSelectedPageFromDom = useCallback(() => {
|
|
79
|
-
const pageSelect = readPageSelect();
|
|
80
|
-
if (!pageSelect) {
|
|
81
|
-
selectedPageRef.current = 1;
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
const page = Number(pageSelect.value);
|
|
85
|
-
if (Number.isFinite(page) && page > 0) {
|
|
86
|
-
selectedPageRef.current = page;
|
|
87
|
-
}
|
|
88
|
-
}, [readPageSelect]);
|
|
89
|
-
const applySelectedPageToDom = useCallback(() => {
|
|
90
|
-
const pageSelect = readPageSelect();
|
|
91
|
-
if (!pageSelect) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
const currentPage = Number(pageSelect.value);
|
|
95
|
-
const currentPageSize = Number(readPageSizeSelect()?.value);
|
|
96
|
-
const pageSize = Number.isFinite(currentPageSize) && currentPageSize > 0
|
|
97
|
-
? currentPageSize
|
|
98
|
-
: DEFAULT_PAGE_SIZE;
|
|
99
|
-
const maxPage = Math.max(1, Math.ceil(stableClusters.length / pageSize));
|
|
100
|
-
const nextPage = Math.min(selectedPageRef.current, maxPage);
|
|
101
|
-
selectedPageRef.current = nextPage;
|
|
102
|
-
if (nextPage <= 1 || currentPage === nextPage) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
pageSelect.value = String(nextPage);
|
|
106
|
-
pageSelect.dispatchEvent(new Event('change', { bubbles: true }));
|
|
107
|
-
syncSelectedPageFromDom();
|
|
108
|
-
}, [
|
|
109
|
-
readPageSelect,
|
|
110
|
-
readPageSizeSelect,
|
|
111
|
-
stableClusters.length,
|
|
112
|
-
syncSelectedPageFromDom,
|
|
113
|
-
]);
|
|
114
|
-
const scheduleSelectedPageSync = useCallback(() => {
|
|
115
|
-
if (typeof window === 'undefined') {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
if (syncPageTimeoutRef.current !== undefined) {
|
|
119
|
-
window.clearTimeout(syncPageTimeoutRef.current);
|
|
120
|
-
}
|
|
121
|
-
syncPageTimeoutRef.current = window.setTimeout(() => {
|
|
122
|
-
syncSelectedPageFromDom();
|
|
123
|
-
syncPageTimeoutRef.current = undefined;
|
|
124
|
-
}, 0);
|
|
125
|
-
}, [syncSelectedPageFromDom]);
|
|
126
|
-
useEffect(() => {
|
|
127
|
-
const tableContainer = tableContainerRef.current;
|
|
128
|
-
if (!tableContainer) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const pageSelect = tableContainer.querySelector(PAGE_NUMBER_SELECTOR);
|
|
132
|
-
const forwardButton = tableContainer.querySelector(PAGE_FORWARD_BUTTON_SELECTOR);
|
|
133
|
-
const backwardButton = tableContainer.querySelector(PAGE_BACKWARD_BUTTON_SELECTOR);
|
|
134
|
-
pageSelect?.addEventListener('change', syncSelectedPageFromDom);
|
|
135
|
-
forwardButton?.addEventListener('click', scheduleSelectedPageSync);
|
|
136
|
-
backwardButton?.addEventListener('click', scheduleSelectedPageSync);
|
|
137
|
-
return () => {
|
|
138
|
-
pageSelect?.removeEventListener('change', syncSelectedPageFromDom);
|
|
139
|
-
forwardButton?.removeEventListener('click', scheduleSelectedPageSync);
|
|
140
|
-
backwardButton?.removeEventListener('click', scheduleSelectedPageSync);
|
|
141
|
-
};
|
|
142
|
-
}, [scheduleSelectedPageSync, syncSelectedPageFromDom, stableClusters.length]);
|
|
143
|
-
useEffect(() => {
|
|
144
|
-
return () => {
|
|
145
|
-
if (typeof window !== 'undefined' &&
|
|
146
|
-
syncPageTimeoutRef.current !== undefined) {
|
|
147
|
-
window.clearTimeout(syncPageTimeoutRef.current);
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
}, []);
|
|
151
|
-
useEffect(() => {
|
|
152
|
-
if (typeof window === 'undefined') {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
const timeoutId = window.setTimeout(() => {
|
|
156
|
-
applySelectedPageToDom();
|
|
157
|
-
}, 0);
|
|
158
|
-
return () => {
|
|
159
|
-
window.clearTimeout(timeoutId);
|
|
160
|
-
};
|
|
161
|
-
}, [applySelectedPageToDom, stableClusters]);
|
|
162
61
|
const headerData = [
|
|
163
62
|
{
|
|
164
63
|
label: translations.headers.name,
|
|
@@ -195,33 +94,25 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
195
94
|
position: 'relative',
|
|
196
95
|
display: 'flex',
|
|
197
96
|
gap: '8px',
|
|
198
|
-
|
|
199
|
-
? { maxWidth: DS_GENERATION_COLUMN_MAX_WIDTH }
|
|
200
|
-
: {}),
|
|
97
|
+
maxWidth: DS_GENERATION_COLUMN_MAX_WIDTH,
|
|
201
98
|
}, children: [isRunningOnUnsupportedGeneration(row.id) && (_jsx("div", { style: {
|
|
202
99
|
position: 'absolute',
|
|
203
100
|
top: '50%',
|
|
204
101
|
transform: 'translateY(-50%)',
|
|
205
102
|
display: 'flex',
|
|
206
|
-
color:
|
|
207
|
-
}, children: _jsx(
|
|
103
|
+
color: DS_STATUS_ICON_COLORS.warning,
|
|
104
|
+
}, children: _jsx(TriangleAlert, { size: 16, "aria-hidden": true }) })), _jsx("span", { style: {
|
|
208
105
|
paddingInlineStart: isRunningOnUnsupportedGeneration(row.id)
|
|
209
106
|
? '1.1rem'
|
|
210
107
|
: '0rem',
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
// points.
|
|
220
|
-
minWidth: 0,
|
|
221
|
-
whiteSpace: 'normal',
|
|
222
|
-
overflowWrap: 'anywhere',
|
|
223
|
-
}
|
|
224
|
-
: {}),
|
|
108
|
+
// Flex items default to `min-width: auto`, which would
|
|
109
|
+
// stop this span from shrinking below its content's
|
|
110
|
+
// intrinsic width and defeat maxWidth above.
|
|
111
|
+
// `whiteSpace` and `overflowWrap` make wrapping happen
|
|
112
|
+
// for long unbroken strings too.
|
|
113
|
+
minWidth: 0,
|
|
114
|
+
whiteSpace: 'normal',
|
|
115
|
+
overflowWrap: 'anywhere',
|
|
225
116
|
}, children: row.generation })] }));
|
|
226
117
|
},
|
|
227
118
|
},
|
|
@@ -246,18 +137,12 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
246
137
|
options: {
|
|
247
138
|
wrapperOptions: {
|
|
248
139
|
wrapper: (row) => {
|
|
249
|
-
// Carbon parity: return the raw value unchanged so this
|
|
250
|
-
// matches the previous untyped (`type: undefined`) rendering
|
|
251
|
-
// exactly. Only cap the width in ds mode.
|
|
252
|
-
if (!isDsMode) {
|
|
253
|
-
return row.region;
|
|
254
|
-
}
|
|
255
140
|
return (_jsx("span", { style: {
|
|
256
141
|
display: 'inline-block',
|
|
257
142
|
maxWidth: DS_REGION_COLUMN_MAX_WIDTH,
|
|
258
|
-
//
|
|
259
|
-
//
|
|
260
|
-
//
|
|
143
|
+
// Make the maxWidth cap force a wrap, so region values with
|
|
144
|
+
// no natural break points (underscore-joined tokens) do not
|
|
145
|
+
// overflow.
|
|
261
146
|
whiteSpace: 'normal',
|
|
262
147
|
overflowWrap: 'anywhere',
|
|
263
148
|
}, children: row.region }));
|
|
@@ -280,9 +165,7 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
280
165
|
const normalizedStatus = normalizeClusterStatus(row.status);
|
|
281
166
|
return normalizedStatus ? (_jsx(ClusterStatusElement, { status: normalizedStatus, infoTooltip: row.statusInfoTooltip, onInfoClick: normalizedStatus === 'waitingForInput'
|
|
282
167
|
? () => onNavigate(`${urls.clusterDetails(row.id)}/encryption`)
|
|
283
|
-
: undefined, style:
|
|
284
|
-
? { minWidth: DS_STATUS_COLUMN_MIN_WIDTH }
|
|
285
|
-
: undefined })) : (row.status);
|
|
168
|
+
: undefined, style: { minWidth: DS_STATUS_COLUMN_MIN_WIDTH } })) : (row.status);
|
|
286
169
|
},
|
|
287
170
|
},
|
|
288
171
|
},
|
|
@@ -299,9 +182,9 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
299
182
|
options: {
|
|
300
183
|
wrapperOptions: {
|
|
301
184
|
wrapper: (row) => {
|
|
302
|
-
const stageTag = row.tags?.length > 0 ? (_jsx(ClusterTag, { stage: row.tags[0] })) : (permissions.canUpdateTag && (_jsx(C4LinkButton, { label: translations.tags.addLabel, onClick: () => onAssignTag(row.id), disabled: !permissions.canUpdateTag, style: { alignSelf: 'center' }, icon: _jsx(
|
|
303
|
-
// A row with no expiry keeps the cell it had before the
|
|
304
|
-
//
|
|
185
|
+
const stageTag = row.tags?.length > 0 ? (_jsx(ClusterTag, { stage: row.tags[0] })) : (permissions.canUpdateTag && (_jsx(C4LinkButton, { label: translations.tags.addLabel, onClick: () => onAssignTag(row.id), disabled: !permissions.canUpdateTag, style: { alignSelf: 'center' }, icon: _jsx(Plus, {}) })));
|
|
186
|
+
// A row with no expiry keeps the cell it had before the expiry
|
|
187
|
+
// existed.
|
|
305
188
|
if (!row.expiry) {
|
|
306
189
|
return stageTag;
|
|
307
190
|
}
|
|
@@ -332,9 +215,8 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
332
215
|
if (row.currentClusterLoad < 0 || !row.currentClusterLoad) {
|
|
333
216
|
return null;
|
|
334
217
|
}
|
|
335
|
-
const currentClusterLoadConfig = getClusterLoadConfig(row.currentClusterLoad);
|
|
336
218
|
return (_jsx(_Fragment, { children: row.currentClusterLoad === undefined ||
|
|
337
|
-
isClusterPaused(row.id) ? (_jsx("span", { children: "-" })) : (_jsx(C4IconAndTextElement, { text: `${row.currentClusterLoad.toFixed(2)}%`,
|
|
219
|
+
isClusterPaused(row.id) ? (_jsx("span", { children: "-" })) : (_jsx(C4IconAndTextElement, { text: `${row.currentClusterLoad.toFixed(2)}%`, dsIcon: getDsClusterLoadPresentation(row.currentClusterLoad), tooltip: {
|
|
338
220
|
label: translations.tooltips.clusterLoad,
|
|
339
221
|
align: row.originalIndex > 1 ? 'top' : 'bottom',
|
|
340
222
|
} })) }));
|
|
@@ -366,12 +248,11 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
366
248
|
return ([name, generation, type, region, status].some((value) => value.includes(filter.searchTerm?.toLowerCase())) || tagsIncludeSearchTerm);
|
|
367
249
|
},
|
|
368
250
|
},
|
|
369
|
-
|
|
370
|
-
...(isDsMode
|
|
371
|
-
? buildClusterListFilters(clusters, translations.filters)
|
|
372
|
-
: []),
|
|
251
|
+
...buildClusterListFilters(clusters, translations.filters),
|
|
373
252
|
];
|
|
374
|
-
|
|
253
|
+
// An empty list while loading means "not known yet". The create button would
|
|
254
|
+
// invite a duplicate (#10004).
|
|
255
|
+
if (permissions.canCreateCluster && !(loading && clusters.length === 0)) {
|
|
375
256
|
toolbar.push({
|
|
376
257
|
id: 'create',
|
|
377
258
|
type: 'button',
|
|
@@ -468,14 +349,14 @@ export const C4ClusterList = ({ clusters, loading, urls, permissions, onNavigate
|
|
|
468
349
|
// state here invites the user to create a cluster that already exists.
|
|
469
350
|
if (clusters.length === 0 && !loading) {
|
|
470
351
|
return (emptyStateContent ?? (_jsxs("div", { style: {
|
|
471
|
-
paddingBlockStart: '
|
|
472
|
-
paddingBlockEnd: '
|
|
473
|
-
}, children: [_jsx("p", { style: { color: 'var(--
|
|
352
|
+
paddingBlockStart: '2rem',
|
|
353
|
+
paddingBlockEnd: '2rem',
|
|
354
|
+
}, children: [_jsx("p", { style: { color: 'var(--neutral-foreground-subtle)' }, children: translations.emptyState.noClusters }), permissions.canCreateCluster && (_jsx("div", { style: { marginTop: '1rem' }, children: _jsx(Button, { kind: 'primary', onClick: () => onNavigate(urls.createCluster), disabled: permissions.createClusterButtonDisabled, children: translations.createButton }) }))] })));
|
|
474
355
|
}
|
|
475
|
-
return (_jsx(
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
356
|
+
return (_jsx(C4DataTable, { headers: headerData, isLoading: loading, toolbar: toolbar, actions: actions, data: stableClusters, rowsSignature: rowsSignature, queryPrefix: 'cluster-list', options: {
|
|
357
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
358
|
+
pageSizes: [10, DEFAULT_PAGE_SIZE, 50, 100],
|
|
359
|
+
} }));
|
|
479
360
|
};
|
|
480
361
|
return (_jsxs(_Fragment, { children: [trialNotification, _jsxs(C4PageTemplate, { loading: loading,
|
|
481
362
|
// In environment scope the host page owns the title and padding —
|
|
@@ -73,7 +73,7 @@ export interface C4ClusterListProps {
|
|
|
73
73
|
createButton: string;
|
|
74
74
|
searchLabel: string;
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* Labels of the status, generation and tag filters. Each has
|
|
77
77
|
* the "all" option label and the accessible name of the select. English
|
|
78
78
|
* defaults apply when not set.
|
|
79
79
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type JSX } from 'react';
|
|
2
2
|
import { type DsStatusIcon } from './ds-status-icon-text.js';
|
|
3
3
|
export declare enum StatusColor {
|
|
4
|
-
HEALTHY = "var(--
|
|
5
|
-
UNHEALTHY = "var(--
|
|
6
|
-
CREATING = "var(--
|
|
7
|
-
UPDATING = "var(--
|
|
8
|
-
WAITING = "var(--
|
|
9
|
-
SUSPENDED = "var(--
|
|
4
|
+
HEALTHY = "var(--success-action-default)",
|
|
5
|
+
UNHEALTHY = "var(--danger-action-default)",
|
|
6
|
+
CREATING = "var(--warning-action-default)",
|
|
7
|
+
UPDATING = "var(--warning-action-default)",
|
|
8
|
+
WAITING = "var(--warning-action-default)",
|
|
9
|
+
SUSPENDED = "var(--neutral-foreground-subtle)"
|
|
10
10
|
}
|
|
11
11
|
export type ClusterStatus = 'healthy' | 'unhealthy' | 'creating' | 'updating' | 'waitingForInput' | 'suspended' | 'resuming' | 'maintenance' | 'restoring';
|
|
12
12
|
export declare const normalizeClusterStatus: (status: string | undefined | null) => ClusterStatus | undefined;
|
|
@@ -16,8 +16,7 @@ export declare const normalizeClusterStatus: (status: string | undefined | null)
|
|
|
16
16
|
*/
|
|
17
17
|
declare const DS_CLUSTER_STATUS_BADGE_VARIANT: Record<ClusterStatus, 'success' | 'danger' | 'info' | 'warning' | 'neutral'>;
|
|
18
18
|
/**
|
|
19
|
-
* The icon, label and badge variant of a status for a DS `Badge`
|
|
20
|
-
* only). It gives `undefined` for a value that `normalizeClusterStatus` does
|
|
19
|
+
* The icon, label and badge variant of a status for a DS `Badge`. It gives `undefined` for a value that `normalizeClusterStatus` does
|
|
21
20
|
* not know.
|
|
22
21
|
*/
|
|
23
22
|
export declare function getDsClusterStatusBadge(status: string | undefined): (DsStatusIcon & {
|
|
@@ -4,26 +4,22 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
5
|
* You may not use this file except in compliance with the commercial license.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import { ArrowRight, CheckmarkFilled, Information, PauseOutlineFilled, PendingFilled, WarningFilled, } from '@carbon/react/icons/index.esm.js';
|
|
9
|
-
import { CircleAlert, CircleCheck, CirclePause, CircleX, Info, RefreshCw, Wrench, } from 'lucide-react';
|
|
7
|
+
import { ArrowRight, CircleAlert, CircleCheck, CirclePause, CircleX, Info, RefreshCw, Wrench, } from 'lucide-react';
|
|
10
8
|
import { useEffect, useState } from 'react';
|
|
11
|
-
import {
|
|
12
|
-
import { Link, Loading, Stack, Tile, Tooltip } from '../../ui/index.js';
|
|
9
|
+
import { Link, Stack, Tile, Tooltip } from '../../ui/index.js';
|
|
13
10
|
import { mediaSizeByWidth } from '../c4-billing-page/elements/current-usage-metrics.js';
|
|
14
11
|
import { C4TileWithTitleAndAction } from '../c4-tile-with-title-and-action/c4-tile-with-title-and-action.js';
|
|
15
12
|
import { DsSection } from './ds-section.js';
|
|
16
13
|
import { DS_STATUS_ICON_COLORS, DsStatusIconText, SpinningLoader, } from './ds-status-icon-text.js';
|
|
17
14
|
const MAINTENANCE_STATUS_TEXT = 'Maintenance';
|
|
18
|
-
const MAINTENANCE_INDICATOR_KIND = 'undefined';
|
|
19
15
|
export var StatusColor;
|
|
20
16
|
(function (StatusColor) {
|
|
21
|
-
StatusColor["HEALTHY"] = "var(--
|
|
22
|
-
StatusColor["UNHEALTHY"] = "var(--
|
|
23
|
-
StatusColor["CREATING"] = "var(--
|
|
24
|
-
StatusColor["UPDATING"] = "var(--
|
|
25
|
-
StatusColor["WAITING"] = "var(--
|
|
26
|
-
StatusColor["SUSPENDED"] = "var(--
|
|
17
|
+
StatusColor["HEALTHY"] = "var(--success-action-default)";
|
|
18
|
+
StatusColor["UNHEALTHY"] = "var(--danger-action-default)";
|
|
19
|
+
StatusColor["CREATING"] = "var(--warning-action-default)";
|
|
20
|
+
StatusColor["UPDATING"] = "var(--warning-action-default)";
|
|
21
|
+
StatusColor["WAITING"] = "var(--warning-action-default)";
|
|
22
|
+
StatusColor["SUSPENDED"] = "var(--neutral-foreground-subtle)";
|
|
27
23
|
})(StatusColor || (StatusColor = {}));
|
|
28
24
|
export const normalizeClusterStatus = (status) => {
|
|
29
25
|
if (!status) {
|
|
@@ -53,7 +49,7 @@ export const normalizeClusterStatus = (status) => {
|
|
|
53
49
|
}
|
|
54
50
|
};
|
|
55
51
|
/**
|
|
56
|
-
* Icon, color and label of each status
|
|
52
|
+
* Icon, color and label of each status. They follow the
|
|
57
53
|
* environment status in Hub. 'restoring', 'waitingForInput' and 'maintenance'
|
|
58
54
|
* have no Hub counterpart and get their own icons.
|
|
59
55
|
*/
|
|
@@ -120,8 +116,7 @@ const DS_CLUSTER_STATUS_BADGE_VARIANT = {
|
|
|
120
116
|
maintenance: 'neutral',
|
|
121
117
|
};
|
|
122
118
|
/**
|
|
123
|
-
* The icon, label and badge variant of a status for a DS `Badge`
|
|
124
|
-
* only). It gives `undefined` for a value that `normalizeClusterStatus` does
|
|
119
|
+
* The icon, label and badge variant of a status for a DS `Badge`. It gives `undefined` for a value that `normalizeClusterStatus` does
|
|
125
120
|
* not know.
|
|
126
121
|
*/
|
|
127
122
|
export function getDsClusterStatusBadge(status) {
|
|
@@ -135,15 +130,6 @@ export function getDsClusterStatusBadge(status) {
|
|
|
135
130
|
};
|
|
136
131
|
}
|
|
137
132
|
export const ClusterStatusElement = (props) => {
|
|
138
|
-
const isMaintenanceStatus = props.status === 'maintenance';
|
|
139
|
-
// Which states get the info affordance next to the status text. A healthy
|
|
140
|
-
// status has nothing to explain. 'waitingForInput' tells the customer that
|
|
141
|
-
// cluster creation needs input; 'updating' and 'unhealthy' let a status
|
|
142
|
-
// name its cause, for example the broken public routes of a cluster.
|
|
143
|
-
const supportsInfoTooltip = props.status === 'waitingForInput' ||
|
|
144
|
-
props.status === 'updating' ||
|
|
145
|
-
props.status === 'unhealthy';
|
|
146
|
-
const designSystem = useC4DesignSystem();
|
|
147
133
|
const renderInfoTooltip = (infoIcon, iconColor) => (_jsx(Tooltip, { align: 'bottom', description: _jsx("span", { style: {
|
|
148
134
|
display: 'block',
|
|
149
135
|
whiteSpace: 'normal',
|
|
@@ -160,96 +146,26 @@ export const ClusterStatusElement = (props) => {
|
|
|
160
146
|
color: iconColor,
|
|
161
147
|
cursor: 'pointer',
|
|
162
148
|
}, children: infoIcon }) }));
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return _jsx("div", { style: props.style });
|
|
170
|
-
}
|
|
171
|
-
const presentation = DS_CLUSTER_STATUS_PRESENTATION[dsStatus];
|
|
172
|
-
const dsSupportsInfoTooltip = dsStatus === 'waitingForInput' ||
|
|
173
|
-
dsStatus === 'updating' ||
|
|
174
|
-
dsStatus === 'unhealthy';
|
|
175
|
-
return (_jsxs(DsStatusIconText, { status: presentation, style: props.style, children: [_jsx("span", { children: presentation.label }), dsSupportsInfoTooltip &&
|
|
176
|
-
props.infoTooltip &&
|
|
177
|
-
renderInfoTooltip(_jsx(Info, { className: 'size-4', "aria-hidden": true }), DS_STATUS_ICON_COLORS.neutral)] }));
|
|
178
|
-
}
|
|
179
|
-
let icon = null;
|
|
180
|
-
let text = '';
|
|
181
|
-
let color;
|
|
182
|
-
switch (props.status) {
|
|
183
|
-
case 'healthy':
|
|
184
|
-
icon = _jsx(CheckmarkFilled, {});
|
|
185
|
-
text = 'Healthy';
|
|
186
|
-
color = StatusColor.HEALTHY;
|
|
187
|
-
break;
|
|
188
|
-
case 'unhealthy':
|
|
189
|
-
icon = _jsx(WarningFilled, {});
|
|
190
|
-
text = 'Unhealthy';
|
|
191
|
-
color = StatusColor.UNHEALTHY;
|
|
192
|
-
break;
|
|
193
|
-
case 'creating':
|
|
194
|
-
icon = _jsx(Loading, { small: true, withOverlay: false });
|
|
195
|
-
text = 'Creating';
|
|
196
|
-
color = StatusColor.CREATING;
|
|
197
|
-
break;
|
|
198
|
-
case 'updating':
|
|
199
|
-
icon = _jsx(PendingFilled, {});
|
|
200
|
-
text = 'Updating';
|
|
201
|
-
color = StatusColor.UPDATING;
|
|
202
|
-
break;
|
|
203
|
-
case 'waitingForInput':
|
|
204
|
-
icon = _jsx(PendingFilled, {});
|
|
205
|
-
text = 'Waiting';
|
|
206
|
-
color = StatusColor.WAITING;
|
|
207
|
-
break;
|
|
208
|
-
case 'suspended':
|
|
209
|
-
icon = _jsx(PauseOutlineFilled, {});
|
|
210
|
-
text = 'Paused';
|
|
211
|
-
color = StatusColor.SUSPENDED;
|
|
212
|
-
break;
|
|
213
|
-
case 'resuming':
|
|
214
|
-
icon = _jsx(Loading, { small: true, withOverlay: false });
|
|
215
|
-
text = 'Resuming cluster...';
|
|
216
|
-
color = StatusColor.SUSPENDED;
|
|
217
|
-
break;
|
|
218
|
-
case 'restoring':
|
|
219
|
-
icon = _jsx(Loading, { small: true, withOverlay: false });
|
|
220
|
-
text = 'Restoring';
|
|
221
|
-
color = StatusColor.CREATING;
|
|
222
|
-
break;
|
|
223
|
-
case 'maintenance':
|
|
224
|
-
text = MAINTENANCE_STATUS_TEXT;
|
|
225
|
-
icon = (_jsx(IconIndicator, { kind: MAINTENANCE_INDICATOR_KIND, label: MAINTENANCE_STATUS_TEXT }));
|
|
226
|
-
break;
|
|
149
|
+
// Some callers pass a raw API value that is only lowercased, for example
|
|
150
|
+
// 'waitingforinput' or 'unknown'. Normalize it first, and show an empty cell
|
|
151
|
+
// for a value we do not know.
|
|
152
|
+
const status = normalizeClusterStatus(props.status);
|
|
153
|
+
if (!status) {
|
|
154
|
+
return _jsx("div", { style: props.style });
|
|
227
155
|
}
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
paddingInlineStart: icon ? '1.2rem' : '0rem',
|
|
239
|
-
display: 'inline-flex',
|
|
240
|
-
alignItems: 'center',
|
|
241
|
-
gap: '0.125rem',
|
|
242
|
-
}, children: [_jsx("span", { children: text }), supportsInfoTooltip &&
|
|
243
|
-
props.infoTooltip &&
|
|
244
|
-
renderInfoTooltip(_jsx(Information, {}), 'var(--cds-icon-primary)')] }))] }) }));
|
|
245
|
-
return component;
|
|
156
|
+
const presentation = DS_CLUSTER_STATUS_PRESENTATION[status];
|
|
157
|
+
// A healthy status has nothing to explain. 'waitingForInput' tells the
|
|
158
|
+
// customer that cluster creation needs input; 'updating' and 'unhealthy' let
|
|
159
|
+
// a status name its cause, for example the broken public routes of a cluster.
|
|
160
|
+
const supportsInfoTooltip = status === 'waitingForInput' ||
|
|
161
|
+
status === 'updating' ||
|
|
162
|
+
status === 'unhealthy';
|
|
163
|
+
return (_jsxs(DsStatusIconText, { status: presentation, style: props.style, children: [_jsx("span", { children: presentation.label }), supportsInfoTooltip &&
|
|
164
|
+
props.infoTooltip &&
|
|
165
|
+
renderInfoTooltip(_jsx(Info, { className: 'size-4', "aria-hidden": true }), DS_STATUS_ICON_COLORS.neutral)] }));
|
|
246
166
|
};
|
|
247
167
|
export const ApplicationTile = (props) => {
|
|
248
168
|
const fontSize = '14px';
|
|
249
|
-
const borderColor = 'var(--cds-border-subtle)';
|
|
250
|
-
const borderWidth = '1px';
|
|
251
|
-
const borderStyle = 'solid';
|
|
252
|
-
const isDs = useC4DesignSystem() === 'ds';
|
|
253
169
|
const normalizedLink = props.link ??
|
|
254
170
|
(props.url && props.linkLabel
|
|
255
171
|
? {
|
|
@@ -258,48 +174,50 @@ export const ApplicationTile = (props) => {
|
|
|
258
174
|
visible: props.linkVisible !== false,
|
|
259
175
|
}
|
|
260
176
|
: undefined);
|
|
261
|
-
const component = (
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
177
|
+
const component = (
|
|
178
|
+
// The DS card already draws a 1px ring. An extra border made the edge look
|
|
179
|
+
// twice as thick, so the tile has only the ring and the 20px padding of
|
|
180
|
+
// the cards in Hub.
|
|
181
|
+
_jsx(Tile, { style: { height: '100%', padding: '1.25rem' }, children: _jsxs(Stack, { gap: 3, children: [_jsxs(Stack, { gap: 1, children: [_jsxs("div", { style: {
|
|
182
|
+
display: 'flex',
|
|
183
|
+
justifyContent: 'space-between',
|
|
184
|
+
alignItems: 'flex-start',
|
|
185
|
+
gap: '0.25rem',
|
|
186
|
+
}, children: [_jsx("h6", { style: { fontSize }, children: props.name }), props.status && (_jsx(ClusterStatusElement, { status: props.status, infoTooltip: props.infoTooltip }))] }), _jsx("div", { style: {
|
|
187
|
+
fontSize: '12px',
|
|
188
|
+
color: 'var(--neutral-foreground-subtle)',
|
|
189
|
+
minHeight: '15px',
|
|
190
|
+
}, children: props.version })] }), _jsxs("div", { style: {
|
|
191
|
+
display: 'grid',
|
|
192
|
+
gridTemplateRows: '1fr auto',
|
|
193
|
+
height: props.description ? '60px' : undefined,
|
|
194
|
+
}, children: [props.description && _jsx("p", { style: { fontSize }, children: props.description }), normalizedLink?.visible &&
|
|
195
|
+
(props.status === 'healthy' ||
|
|
196
|
+
((props.status === 'suspended' || props.status === undefined) &&
|
|
197
|
+
!!normalizedLink?.onClick)) && (_jsxs(Link, { href: normalizedLink.url ?? '', style: {
|
|
198
|
+
justifySelf: 'start',
|
|
199
|
+
alignSelf: 'end',
|
|
200
|
+
cursor: 'pointer',
|
|
201
|
+
}, onClick: (e) => {
|
|
202
|
+
if (!normalizedLink?.onClick) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
// Preserve native open-in-new-tab / new-window behaviour:
|
|
206
|
+
// when there's a real href, let the browser handle modifier
|
|
207
|
+
// and non-left clicks (Ctrl/Cmd/Shift/Alt or middle click)
|
|
208
|
+
// instead of routing in-app. Only plain left-clicks are
|
|
209
|
+
// intercepted for client-side navigation.
|
|
210
|
+
if (normalizedLink.url &&
|
|
211
|
+
(e.metaKey ||
|
|
212
|
+
e.ctrlKey ||
|
|
213
|
+
e.shiftKey ||
|
|
214
|
+
e.altKey ||
|
|
215
|
+
e.button !== 0)) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
e.preventDefault();
|
|
219
|
+
normalizedLink.onClick();
|
|
220
|
+
}, children: [normalizedLink.label, ' ', _jsx(ArrowRight, { style: { marginLeft: '0.5rem', marginBottom: '-0.2rem' } })] }))] })] }) }));
|
|
303
221
|
return component;
|
|
304
222
|
};
|
|
305
223
|
const templateColumnsBySize = {
|
|
@@ -310,7 +228,6 @@ const templateColumnsBySize = {
|
|
|
310
228
|
xxl: '1fr 1fr 1fr',
|
|
311
229
|
};
|
|
312
230
|
export const Applications = (props) => {
|
|
313
|
-
const designSystem = useC4DesignSystem();
|
|
314
231
|
const [mediaSize, setMediaSize] = useState(mediaSizeByWidth(window.innerWidth));
|
|
315
232
|
useEffect(() => {
|
|
316
233
|
let frame = 0;
|
|
@@ -345,11 +262,8 @@ export const Applications = (props) => {
|
|
|
345
262
|
}
|
|
346
263
|
return (_jsx("div", { children: _jsx(ApplicationTile, { ...props }) }, props.name));
|
|
347
264
|
}) }));
|
|
348
|
-
if (props.variant === 'plain' && designSystem === 'ds') {
|
|
349
|
-
return _jsx(DsSection, { title: props.title, children: grid });
|
|
350
|
-
}
|
|
351
265
|
if (props.variant === 'plain') {
|
|
352
|
-
return
|
|
266
|
+
return _jsx(DsSection, { title: props.title, children: grid });
|
|
353
267
|
}
|
|
354
268
|
return (_jsx(C4TileWithTitleAndAction, { title: props.title, children: grid }));
|
|
355
269
|
};
|