@camunda/ccma-saas-frontend 0.3.1 → 0.5.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/README.md +24 -1
- package/lib/esm/components/c4-activity-graph/c4-activity-graph.d.ts +3 -3
- package/lib/esm/components/c4-activity-graph/c4-activity-graph.js +90 -73
- package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.d.ts +2 -2
- package/lib/esm/components/c4-advanced-search-filters/FieldRow.d.ts +2 -2
- package/lib/esm/components/c4-advanced-search-filters/FiltersSection.d.ts +2 -2
- package/lib/esm/components/c4-advanced-search-filters/OrSection.d.ts +2 -2
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.d.ts +1 -1
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +13 -13
- package/lib/esm/components/c4-advanced-search-filters/state.types.d.ts +1 -1
- package/lib/esm/components/c4-advanced-search-filters/utils.d.ts +1 -1
- package/lib/esm/components/c4-ai-usage/c4-ai-usage.d.ts +1 -1
- package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.d.ts +1 -1
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.d.ts +1 -1
- package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.d.ts +1 -1
- package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.types.d.ts +1 -1
- package/lib/esm/components/c4-async-modal/c4-async-modal.d.ts +1 -1
- package/lib/esm/components/c4-audit-log/c4-audit-log.d.ts +1 -1
- package/lib/esm/components/c4-billing-page/c4-billing-page.d.ts +1 -1
- package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.d.ts +1 -1
- package/lib/esm/components/c4-billing-page/c4-billing-page.types.d.ts +4 -4
- package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.d.ts +4 -3
- package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +13 -2
- package/lib/esm/components/c4-bottom-links/c4-bottom-links.d.ts +1 -1
- package/lib/esm/components/c4-bottom-links/c4-bottom-links.types.d.ts +1 -1
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +1 -1
- package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.d.ts +2 -2
- package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.js +31 -25
- package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.d.ts +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.d.ts +1 -1
- package/lib/esm/components/c4-charts-dashboard/elements/line-chart.d.ts +1 -1
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.d.ts +1 -1
- package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.d.ts +1 -1
- package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +11 -8
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.d.ts +2 -2
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +21 -20
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +22 -2
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.d.ts +2 -2
- package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.js +4 -2
- package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.types.d.ts +2 -0
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.d.ts +1 -1
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +10 -2
- 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 +5 -2
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.d.ts +1 -1
- package/lib/esm/components/c4-cluster-overview/applications.js +7 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +1 -1
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +3 -3
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.types.d.ts +4 -4
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.d.ts +8 -8
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +5 -5
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +11 -11
- package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-settings.d.ts +1 -1
- 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 +7 -1
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.d.ts +1 -1
- package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.d.ts +1 -1
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.d.ts +1 -1
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +26 -5
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.d.ts +1 -1
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.js +1 -0
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.types.d.ts +1 -0
- package/lib/esm/components/c4-console-dashboard/elements/empty-state.d.ts +1 -1
- package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.d.ts +1 -1
- package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.types.d.ts +1 -1
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.d.ts +1 -1
- package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.d.ts +1 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +16 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.d.ts +1 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +5 -2
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.d.ts +1 -1
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.d.ts +1 -1
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.d.ts +1 -1
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.d.ts +1 -1
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.d.ts +1 -1
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.d.ts +1 -1
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.d.ts +1 -1
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.d.ts +1 -1
- package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.d.ts +1 -1
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.d.ts +1 -1
- package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.d.ts +1 -1
- package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.types.d.ts +1 -1
- package/lib/esm/components/c4-data-table/c4-data-table.js +58 -4
- package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.d.ts +1 -1
- package/lib/esm/components/c4-divider/c4-divider.d.ts +1 -1
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.d.ts +1 -1
- package/lib/esm/components/c4-external-link/c4-external-link.d.ts +1 -1
- package/lib/esm/components/c4-help-center/c4-help-center.d.ts +1 -1
- package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.d.ts +1 -1
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.d.ts +1 -1
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +2 -47
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +4 -4
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.d.ts +2 -2
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.d.ts +3 -3
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.d.ts +3 -3
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.d.ts +2 -2
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +2 -2
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +4 -4
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.d.ts +1 -1
- package/lib/esm/components/c4-job-dashboard-shared/c4-stories-data-generator.d.ts +2 -2
- package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.d.ts +1 -1
- package/lib/esm/components/c4-link-button/c4-link-button.d.ts +1 -1
- package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.d.ts +1 -1
- package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +2 -2
- package/lib/esm/components/c4-management-activity/c4-management-activity.js +9 -4
- package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.d.ts +1 -1
- package/lib/esm/components/c4-management-api/c4-management-api.d.ts +1 -1
- package/lib/esm/components/c4-management-api/c4-management-api.mocks.d.ts +1 -1
- package/lib/esm/components/c4-management-overview/c4-management-overview.d.ts +1 -1
- package/lib/esm/components/c4-management-settings/c4-management-settings.d.ts +2 -2
- package/lib/esm/components/c4-management-settings/c4-management-settings.js +9 -5
- package/lib/esm/components/c4-management-users/c4-management-users.d.ts +1 -1
- package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.d.ts +1 -1
- package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.d.ts +1 -1
- package/lib/esm/components/c4-navigation/c4-navigation.d.ts +2 -2
- package/lib/esm/components/c4-number-input/c4-number-input.d.ts +1 -1
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.d.ts +1 -1
- package/lib/esm/components/c4-optimize-activation-modal/c4-optimize-activation-modal.d.ts +1 -1
- package/lib/esm/components/c4-page-template/c4-page-template.d.ts +9 -4
- package/lib/esm/components/c4-page-template/c4-page-template.js +1 -1
- package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.d.ts +1 -1
- package/lib/esm/components/c4-pricing/c4-pricing.d.ts +1 -1
- package/lib/esm/components/c4-pricing/c4-pricing.types.d.ts +1 -1
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.d.ts +1 -1
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.utils.d.ts +1 -1
- package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.d.ts +1 -1
- package/lib/esm/components/c4-search/c4-search-results.d.ts +1 -1
- package/lib/esm/components/c4-search/c4-search-results.types.d.ts +1 -1
- package/lib/esm/components/c4-search/c4-search.d.ts +2 -2
- package/lib/esm/components/c4-search/c4-search.types.d.ts +1 -1
- package/lib/esm/components/c4-search/search.utils.d.ts +3 -3
- package/lib/esm/components/c4-sm-cluster-details/automation-components.d.ts +1 -1
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.d.ts +1 -1
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.types.d.ts +3 -3
- package/lib/esm/components/c4-sm-cluster-details/custom-properties.d.ts +1 -1
- package/lib/esm/components/c4-sm-cluster-details/details.d.ts +1 -1
- package/lib/esm/components/c4-sm-cluster-details/zeebe-components.d.ts +1 -1
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.d.ts +1 -1
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +2 -2
- package/lib/esm/components/c4-sm-dashboard/cluster-tile.d.ts +1 -1
- package/lib/esm/components/c4-sm-dashboard/explore.d.ts +1 -1
- package/lib/esm/components/c4-sm-dashboard/health-status.d.ts +1 -1
- package/lib/esm/components/c4-sm-dashboard/overview.d.ts +1 -1
- package/lib/esm/components/c4-stat/c4-stat.d.ts +1 -1
- package/lib/esm/components/c4-stateful-button/c4-stateful-button.d.ts +1 -1
- package/lib/esm/components/c4-tabs/c4-tabs.d.ts +1 -1
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.d.ts +1 -1
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.types.d.ts +1 -1
- package/lib/esm/components/c4-telemetry-page/telemetry-for-component.d.ts +2 -2
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.d.ts +1 -1
- package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.d.ts +1 -1
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.d.ts +1 -1
- package/lib/esm/components/c4-toggle/c4-toggle.d.ts +1 -1
- package/lib/esm/components/c4-tsuga-links/c4-tsuga-links.d.ts +8 -0
- package/lib/esm/components/c4-tsuga-links/c4-tsuga-links.js +18 -0
- package/lib/esm/components/c4-tsuga-links/c4-tsuga-links.types.d.ts +15 -0
- package/lib/esm/components/c4-tsuga-links/tsuga-logs-url.d.ts +5 -0
- package/lib/esm/components/c4-tsuga-links/tsuga-logs-url.js +36 -0
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.d.ts +1 -1
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.utils.d.ts +1 -1
- package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.d.ts +1 -1
- package/lib/esm/components/c4-usage-history/c4-usage-history.d.ts +2 -2
- package/lib/esm/components/c4-usage-history/c4-usage-history.js +5 -2
- package/lib/esm/components/c4-usage-history/c4-usage-history.types.d.ts +1 -1
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +2 -2
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +6 -2
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.d.ts +2 -2
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +14 -8
- package/lib/esm/components/c4-user-details/c4-user-details.d.ts +1 -1
- package/lib/esm/components/c4-user-details/c4-user-details.types.d.ts +3 -3
- package/lib/esm/components/shared-charts/recharts-tokens.d.ts +14 -2
- package/lib/esm/components/shared-charts/recharts-tokens.js +22 -1
- package/lib/esm/externalUrls.const.d.ts +6 -6
- package/lib/esm/i18n/en/entities/orgroles.json +2 -0
- package/lib/esm/i18n/en/modals/users.json +0 -1
- package/lib/esm/i18n/en/pages/clusterdetails.json +14 -3
- package/lib/esm/i18n/en/pages/dashboard.json +1 -0
- package/lib/esm/i18n/en/pages/orgmanagement.json +8 -0
- package/lib/esm/icons/c4-icons.d.ts +1 -1
- package/lib/esm/index.d.ts +237 -253
- package/lib/esm/index.js +6 -11
- package/lib/esm/modals/c4-create-cluster-api-client-modal-handle.d.ts +1 -1
- package/lib/esm/modals/c4-create-connector-secret-modal-handle.d.ts +1 -1
- package/lib/esm/modals/c4-create-console-api-client-modal-handle.d.ts +1 -1
- package/lib/esm/modals/c4-invite-user-to-organization-modal-handle.d.ts +1 -1
- package/lib/esm/modals/c4-rename-organization-modal-handle.d.ts +1 -1
- package/lib/esm/notifications/c4-console-notifications-handle.d.ts +1 -1
- package/lib/esm/runtime/build-cluster-swagger-url.d.ts +1 -1
- package/lib/esm/runtime/c4-console-data-context.d.ts +19 -7
- package/lib/esm/runtime/c4-console-data-context.js +40 -15
- package/lib/esm/runtime/c4-console-data-context.types.d.ts +6 -0
- package/lib/esm/runtime/c4-console-data-store.d.ts +12 -1
- package/lib/esm/runtime/c4-console-data-store.js +74 -34
- package/lib/esm/runtime/c4-console-notifications-context.d.ts +1 -1
- package/lib/esm/runtime/c4-console-runtime-context.d.ts +1 -1
- package/lib/esm/runtime/c4-user-notifications-context.d.ts +1 -1
- package/lib/esm/runtime/index.d.ts +40 -0
- package/lib/esm/runtime/index.js +18 -0
- package/lib/esm/runtime/nav/use-webapp-nav-data.js +11 -3
- package/lib/esm/runtime/to-api-config.d.ts +2 -2
- package/lib/esm/runtime/to-api-config.js +6 -0
- package/lib/esm/runtime/to-api-domain.d.ts +1 -1
- package/lib/esm/runtime/to-identity-api-base-url.d.ts +1 -1
- package/lib/esm/ui/c4-modal-dialog.js +16 -3
- package/lib/esm/ui/index.d.ts +2 -2
- package/lib/esm/ui/index.js +28 -2
- package/lib/esm/utils/role-labels.d.ts +20 -0
- package/lib/esm/utils/role-labels.js +79 -0
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.d.ts +1 -1
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.types.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +55 -2
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +8 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +4 -1
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-activity-tab.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-audit-log-tab.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +5 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +4 -4
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +3 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +6 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.d.ts +4 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +31 -6
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +4 -2
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +23 -8
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.d.ts +3 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +5 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +115 -45
- package/lib/esm/widgets/cluster-details/tabs/use-restart-confirm.d.ts +36 -0
- package/lib/esm/widgets/cluster-details/tabs/use-restart-confirm.js +58 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.js +2 -2
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +12 -3
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +1 -1
- package/lib/esm/widgets/dashboard/c4-dashboard-app.d.ts +1 -1
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +25 -6
- package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker-details-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker-overview-page.d.ts +1 -1
- package/lib/esm/widgets/job-worker/c4-job-worker.helpers.d.ts +1 -1
- package/lib/esm/widgets/management/c4-management-app.d.ts +2 -2
- package/lib/esm/widgets/management/c4-management-app.js +142 -22
- package/lib/esm/widgets/management/c4-management-app.types.d.ts +16 -1
- package/lib/esm/widgets/management/c4-management-page.d.ts +1 -1
- package/lib/esm/widgets/management/c4-management-page.types.d.ts +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-activity-tab.d.ts +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.d.ts +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.d.ts +3 -0
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +19 -3
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.d.ts +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-settings-tab.d.ts +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +1 -1
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.d.ts +4 -8
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +63 -87
- package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.js +29 -82
- package/package.json +50 -30
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.d.ts +0 -1
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.js +0 -43
- package/lib/esm/components/c4-billing-page/elements/value-metric.spec.d.ts +0 -1
- package/lib/esm/components/c4-billing-page/elements/value-metric.spec.js +0 -67
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.spec.d.ts +0 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.spec.js +0 -132
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.d.ts +0 -1
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.waiting.spec.js +0 -87
- package/lib/esm/components/c4-cluster-overview/applications.spec.d.ts +0 -1
- package/lib/esm/components/c4-cluster-overview/applications.spec.js +0 -58
- package/lib/esm/components/c4-cluster-overview/cluster-load.formatNumber.test.d.ts +0 -1
- package/lib/esm/components/c4-cluster-overview/cluster-load.formatNumber.test.js +0 -38
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.d.ts +0 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.js +0 -93
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.d.ts +0 -1
- package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.js +0 -50
- package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.spec.d.ts +0 -1
- package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.spec.js +0 -42
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.d.ts +0 -1
- package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.js +0 -120
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.d.ts +0 -1
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.js +0 -40
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.d.ts +0 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.js +0 -83
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.d.ts +0 -1
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.js +0 -350
- package/lib/esm/components/c4-data-table/c4-data-table.spec.d.ts +0 -1
- package/lib/esm/components/c4-data-table/c4-data-table.spec.js +0 -71
- package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.d.ts +0 -1
- package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.js +0 -151
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.d.ts +0 -1
- package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.js +0 -33
- package/lib/esm/components/c4-page-template/c4-page-template.spec.d.ts +0 -1
- package/lib/esm/components/c4-page-template/c4-page-template.spec.js +0 -58
- package/lib/esm/components/c4-page-template/c4-page-template.stories.d.ts +0 -6
- package/lib/esm/components/c4-page-template/c4-page-template.stories.js +0 -73
- package/lib/esm/components/c4-stackdriver-links/c4-stackdriver-links.d.ts +0 -3
- package/lib/esm/components/c4-stackdriver-links/c4-stackdriver-links.js +0 -26
- package/lib/esm/components/c4-stackdriver-links/c4-stackdriver-links.types.d.ts +0 -12
- package/lib/esm/components/c4-tabs/c4-tabs.spec.d.ts +0 -1
- package/lib/esm/components/c4-tabs/c4-tabs.spec.js +0 -97
- package/lib/esm/components/c4-tabs/c4-tabs.stories.d.ts +0 -6
- package/lib/esm/components/c4-tabs/c4-tabs.stories.js +0 -35
- package/lib/esm/components/shared-charts/ds-charts.smoke.spec.d.ts +0 -1
- package/lib/esm/components/shared-charts/ds-charts.smoke.spec.js +0 -47
- package/lib/esm/externalUrls.const.spec.d.ts +0 -1
- package/lib/esm/externalUrls.const.spec.js +0 -102
- package/lib/esm/runtime/c4-console-authz.spec.d.ts +0 -1
- package/lib/esm/runtime/c4-console-authz.spec.js +0 -202
- package/lib/esm/runtime/c4-console-data-store.nav.spec.d.ts +0 -1
- package/lib/esm/runtime/c4-console-data-store.nav.spec.js +0 -121
- package/lib/esm/runtime/c4-console-data-store.spec.d.ts +0 -1
- package/lib/esm/runtime/c4-console-data-store.spec.js +0 -263
- package/lib/esm/runtime/c4-user-notifications-context.spec.d.ts +0 -1
- package/lib/esm/runtime/c4-user-notifications-context.spec.js +0 -80
- package/lib/esm/runtime/nav/camunda-apps.spec.d.ts +0 -1
- package/lib/esm/runtime/nav/camunda-apps.spec.js +0 -90
- package/lib/esm/runtime/nav/use-webapp-nav-data.spec.d.ts +0 -1
- package/lib/esm/runtime/nav/use-webapp-nav-data.spec.js +0 -91
- package/lib/esm/setupTests.d.ts +0 -1
- package/lib/esm/setupTests.js +0 -37
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.js +0 -49
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.permissions.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.permissions.spec.js +0 -471
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +0 -95
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.js +0 -33
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.spec.js +0 -72
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.spec.js +0 -85
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.mcp.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.mcp.spec.js +0 -105
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.js +0 -226
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.spec.js +0 -179
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +0 -1255
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.spec.js +0 -397
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +0 -488
- package/lib/esm/widgets/cluster-details/tabs/url-utils.test.d.ts +0 -1
- package/lib/esm/widgets/cluster-details/tabs/url-utils.test.js +0 -34
- package/lib/esm/widgets/clusters/c4-clusters-page.spec.d.ts +0 -1
- package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +0 -502
- package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.d.ts +0 -1
- package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +0 -226
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.spec.d.ts +0 -1
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.spec.js +0 -191
- package/lib/esm/widgets/group-details/c4-group-details-page.spec.d.ts +0 -1
- package/lib/esm/widgets/group-details/c4-group-details-page.spec.js +0 -35
- package/lib/esm/widgets/management/c4-management-app.spec.d.ts +0 -1
- package/lib/esm/widgets/management/c4-management-app.spec.js +0 -509
- package/lib/esm/widgets/management/c4-management-page.spec.d.ts +0 -1
- package/lib/esm/widgets/management/c4-management-page.spec.js +0 -40
- package/lib/esm/widgets/management/management-tabs.spec.d.ts +0 -1
- package/lib/esm/widgets/management/management-tabs.spec.js +0 -28
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.spec.d.ts +0 -1
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.spec.js +0 -246
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.d.ts +0 -1
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.js +0 -225
- package/lib/esm/widgets/use-extend-trial.spec.d.ts +0 -1
- package/lib/esm/widgets/use-extend-trial.spec.js +0 -79
- package/lib/esm/widgets/user-details/c4-user-details-page.spec.d.ts +0 -1
- package/lib/esm/widgets/user-details/c4-user-details-page.spec.js +0 -65
- /package/lib/esm/components/{c4-stackdriver-links/c4-stackdriver-links.types.js → c4-tsuga-links/c4-tsuga-links.types.js} +0 -0
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
-
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
-
* You may not use this file except in compliance with the commercial license.
|
|
5
|
-
*/
|
|
6
|
-
import { SseEntity, SseType } from '@camunda/ccma-shared-types';
|
|
7
|
-
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
8
|
-
import { ConsoleDataStore } from './c4-console-data-store.js';
|
|
9
|
-
vi.mock('@camunda/ccma-api', () => ({
|
|
10
|
-
ExternalAccountsService: {
|
|
11
|
-
getMyOrganizations: vi.fn(),
|
|
12
|
-
},
|
|
13
|
-
ExternalConsoleService: {
|
|
14
|
-
getOrgClusters: vi.fn(),
|
|
15
|
-
},
|
|
16
|
-
// Unused by these tests but imported by the store module.
|
|
17
|
-
AuditLoggerService: {},
|
|
18
|
-
ConsoleClusterService: {},
|
|
19
|
-
EarlyAccessFeaturesService: {},
|
|
20
|
-
GenerationService: {},
|
|
21
|
-
HdpService: {},
|
|
22
|
-
HttpError: class {
|
|
23
|
-
},
|
|
24
|
-
OrganizationMembersService: {},
|
|
25
|
-
OrgsService: {},
|
|
26
|
-
}));
|
|
27
|
-
import { ExternalAccountsService, ExternalConsoleService, } from '@camunda/ccma-api';
|
|
28
|
-
const FAKE_RUNTIME = {
|
|
29
|
-
stage: 'dev',
|
|
30
|
-
auth: { getAccessToken: async () => 'token' },
|
|
31
|
-
backendUrls: {},
|
|
32
|
-
};
|
|
33
|
-
const cacheEntry = (data) => ({
|
|
34
|
-
data,
|
|
35
|
-
isLoading: false,
|
|
36
|
-
error: null,
|
|
37
|
-
lastFetched: null,
|
|
38
|
-
});
|
|
39
|
-
const makeStore = (webappClusters = {}) => ConsoleDataStore.create({
|
|
40
|
-
clusters: {},
|
|
41
|
-
orgInfo: {},
|
|
42
|
-
orgOwner: {},
|
|
43
|
-
earlyAccessFeatures: {},
|
|
44
|
-
members: {},
|
|
45
|
-
audits: {},
|
|
46
|
-
clusterCapacity: {},
|
|
47
|
-
upgradableGenerations: {},
|
|
48
|
-
generationDetails: {},
|
|
49
|
-
webappClusters,
|
|
50
|
-
});
|
|
51
|
-
describe('ConsoleDataStore.fetchMyOrgs', () => {
|
|
52
|
-
beforeEach(() => vi.clearAllMocks());
|
|
53
|
-
it('sorts organizations alphabetically by name', async () => {
|
|
54
|
-
vi.mocked(ExternalAccountsService.getMyOrganizations).mockResolvedValue([
|
|
55
|
-
{ uuid: '1', name: 'Zeta' },
|
|
56
|
-
{ uuid: '2', name: 'Alpha' },
|
|
57
|
-
]);
|
|
58
|
-
const store = makeStore();
|
|
59
|
-
store.setRuntime(FAKE_RUNTIME);
|
|
60
|
-
await store.fetchMyOrgs();
|
|
61
|
-
expect(store.getMyOrgs()?.map((o) => o.name)).toEqual(['Alpha', 'Zeta']);
|
|
62
|
-
});
|
|
63
|
-
it('skips the fetch when already cached (no force)', async () => {
|
|
64
|
-
vi.mocked(ExternalAccountsService.getMyOrganizations).mockResolvedValue([
|
|
65
|
-
{ uuid: '1', name: 'Alpha' },
|
|
66
|
-
]);
|
|
67
|
-
const store = makeStore();
|
|
68
|
-
store.setRuntime(FAKE_RUNTIME);
|
|
69
|
-
await store.fetchMyOrgs();
|
|
70
|
-
await store.fetchMyOrgs();
|
|
71
|
-
expect(ExternalAccountsService.getMyOrganizations).toHaveBeenCalledTimes(1);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
describe('ConsoleDataStore.fetchWebappClusters', () => {
|
|
75
|
-
beforeEach(() => vi.clearAllMocks());
|
|
76
|
-
it('caches clusters keyed by orgId', async () => {
|
|
77
|
-
vi.mocked(ExternalConsoleService.getOrgClusters).mockResolvedValue([
|
|
78
|
-
{ uuid: 'c1', name: 'Cluster 1' },
|
|
79
|
-
]);
|
|
80
|
-
const store = makeStore();
|
|
81
|
-
store.setRuntime(FAKE_RUNTIME);
|
|
82
|
-
await store.fetchWebappClusters('org-1');
|
|
83
|
-
expect(store.getWebappClusters('org-1')?.map((c) => c.uuid)).toEqual(['c1']);
|
|
84
|
-
expect(ExternalConsoleService.getOrgClusters).toHaveBeenCalledWith(expect.objectContaining({ params: { orgId: 'org-1' } }));
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
describe('handleClusterChange patches the webappClusters cache', () => {
|
|
88
|
-
it('upserts a cluster from an SSE payload when the cache is populated', () => {
|
|
89
|
-
const store = makeStore({
|
|
90
|
-
'org-1': cacheEntry([{ uuid: 'c1', name: 'Old name' }]),
|
|
91
|
-
});
|
|
92
|
-
store.setRuntime(FAKE_RUNTIME);
|
|
93
|
-
store.handleClusterChange({
|
|
94
|
-
org: 'org-1',
|
|
95
|
-
entity: SseEntity.CLUSTER,
|
|
96
|
-
type: SseType.UPDATED,
|
|
97
|
-
clusterId: 'c1',
|
|
98
|
-
payload: { cluster: { uuid: 'c1', name: 'New name' } },
|
|
99
|
-
});
|
|
100
|
-
expect(store.getWebappClusters('org-1')?.[0]).toMatchObject({
|
|
101
|
-
uuid: 'c1',
|
|
102
|
-
name: 'New name',
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
it('removes a cluster on a DELETED event', () => {
|
|
106
|
-
const store = makeStore({
|
|
107
|
-
'org-1': cacheEntry([
|
|
108
|
-
{ uuid: 'c1', name: 'One' },
|
|
109
|
-
{ uuid: 'c2', name: 'Two' },
|
|
110
|
-
]),
|
|
111
|
-
});
|
|
112
|
-
store.setRuntime(FAKE_RUNTIME);
|
|
113
|
-
store.handleClusterChange({
|
|
114
|
-
org: 'org-1',
|
|
115
|
-
entity: SseEntity.CLUSTER,
|
|
116
|
-
type: SseType.DELETED,
|
|
117
|
-
clusterId: 'c1',
|
|
118
|
-
});
|
|
119
|
-
expect(store.getWebappClusters('org-1')?.map((c) => c.uuid)).toEqual(['c2']);
|
|
120
|
-
});
|
|
121
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
-
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
-
* You may not use this file except in compliance with the commercial license.
|
|
5
|
-
*/
|
|
6
|
-
import { SseEntity } from '@camunda/ccma-shared-types';
|
|
7
|
-
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
8
|
-
import { ConsoleDataStore } from './c4-console-data-store.js';
|
|
9
|
-
vi.mock('@camunda/ccma-api', () => ({
|
|
10
|
-
GenerationService: {
|
|
11
|
-
getUpgradableMulti: vi
|
|
12
|
-
.fn()
|
|
13
|
-
.mockResolvedValue({ preferred: null, options: [] }),
|
|
14
|
-
getGeneration: vi.fn().mockResolvedValue(undefined),
|
|
15
|
-
upgradeCluster: vi.fn().mockResolvedValue(undefined),
|
|
16
|
-
},
|
|
17
|
-
ClusterService: { updateCluster: vi.fn() },
|
|
18
|
-
OrgsService: { getOrgInfo: vi.fn(), getOwner: vi.fn() },
|
|
19
|
-
EarlyAccessService: { getEarlyAccessFeatures: vi.fn() },
|
|
20
|
-
MembersService: { getMembers: vi.fn() },
|
|
21
|
-
AuditService: { getAudits: vi.fn() },
|
|
22
|
-
}));
|
|
23
|
-
import { GenerationService } from '@camunda/ccma-api';
|
|
24
|
-
const FAKE_RUNTIME = {
|
|
25
|
-
stage: 'dev',
|
|
26
|
-
auth: { getAccessToken: async () => 'token' },
|
|
27
|
-
backendUrls: {
|
|
28
|
-
consoleApiBaseUrl: 'https://console.example.com',
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
const makeStore = () => ConsoleDataStore.create({
|
|
32
|
-
clusters: {},
|
|
33
|
-
orgInfo: {},
|
|
34
|
-
orgOwner: {},
|
|
35
|
-
earlyAccessFeatures: {},
|
|
36
|
-
members: {},
|
|
37
|
-
audits: {},
|
|
38
|
-
clusterCapacity: {},
|
|
39
|
-
upgradableGenerations: {},
|
|
40
|
-
generationDetails: {},
|
|
41
|
-
});
|
|
42
|
-
describe('ConsoleDataStore.fetchUpgradableGenerations', () => {
|
|
43
|
-
beforeEach(() => {
|
|
44
|
-
vi.clearAllMocks();
|
|
45
|
-
});
|
|
46
|
-
it('passes clusterId to GenerationService.getUpgradableMulti', async () => {
|
|
47
|
-
const store = makeStore();
|
|
48
|
-
store.setRuntime(FAKE_RUNTIME);
|
|
49
|
-
await store.fetchUpgradableGenerations('gen-uuid', 'cluster-uuid');
|
|
50
|
-
expect(GenerationService.getUpgradableMulti).toHaveBeenCalledWith(expect.objectContaining({
|
|
51
|
-
fromGenerationUuid: 'gen-uuid',
|
|
52
|
-
clusterId: 'cluster-uuid',
|
|
53
|
-
}));
|
|
54
|
-
});
|
|
55
|
-
it('calls GenerationService.getUpgradableMulti without clusterId when not provided', async () => {
|
|
56
|
-
const store = makeStore();
|
|
57
|
-
store.setRuntime(FAKE_RUNTIME);
|
|
58
|
-
await store.fetchUpgradableGenerations('gen-uuid');
|
|
59
|
-
expect(GenerationService.getUpgradableMulti).toHaveBeenCalledWith(expect.objectContaining({
|
|
60
|
-
fromGenerationUuid: 'gen-uuid',
|
|
61
|
-
}));
|
|
62
|
-
expect(GenerationService.getUpgradableMulti).toHaveBeenCalledWith(expect.not.objectContaining({ clusterId: expect.anything() }));
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
describe('ConsoleDataStore.handleClusterChange', () => {
|
|
66
|
-
it('bumps sse entity versions for all SseEntity values', () => {
|
|
67
|
-
const store = ConsoleDataStore.create({
|
|
68
|
-
clusters: {},
|
|
69
|
-
orgInfo: {},
|
|
70
|
-
orgOwner: {},
|
|
71
|
-
earlyAccessFeatures: {},
|
|
72
|
-
members: {},
|
|
73
|
-
audits: {},
|
|
74
|
-
clusterCapacity: {},
|
|
75
|
-
upgradableGenerations: {},
|
|
76
|
-
generationDetails: {},
|
|
77
|
-
});
|
|
78
|
-
const orgId = 'org-1';
|
|
79
|
-
const clusterId = 'cluster-1';
|
|
80
|
-
const entities = Object.values(SseEntity);
|
|
81
|
-
for (const entity of entities) {
|
|
82
|
-
const before = store.getSseEntityVersion(orgId, entity, clusterId);
|
|
83
|
-
store.handleClusterChange({
|
|
84
|
-
org: orgId,
|
|
85
|
-
entity,
|
|
86
|
-
clusterId,
|
|
87
|
-
payload: { name: 'x', uuid: 'u' },
|
|
88
|
-
type: 'created',
|
|
89
|
-
});
|
|
90
|
-
const after = store.getSseEntityVersion(orgId, entity, clusterId);
|
|
91
|
-
expect(after).toBe(before + 1);
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
it('upserts refreshed cluster data into the shared cache', () => {
|
|
95
|
-
const store = ConsoleDataStore.create({
|
|
96
|
-
clusters: {
|
|
97
|
-
'org-1': {
|
|
98
|
-
data: [
|
|
99
|
-
{
|
|
100
|
-
uuid: 'cluster-1',
|
|
101
|
-
externalMetadata: {
|
|
102
|
-
tasklistV2Enabled: false,
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
isLoading: false,
|
|
107
|
-
error: null,
|
|
108
|
-
lastFetched: null,
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
orgInfo: {},
|
|
112
|
-
orgOwner: {},
|
|
113
|
-
earlyAccessFeatures: {},
|
|
114
|
-
members: {},
|
|
115
|
-
audits: {},
|
|
116
|
-
clusterCapacity: {},
|
|
117
|
-
upgradableGenerations: {},
|
|
118
|
-
generationDetails: {},
|
|
119
|
-
});
|
|
120
|
-
store.upsertCluster('org-1', {
|
|
121
|
-
uuid: 'cluster-1',
|
|
122
|
-
externalMetadata: {
|
|
123
|
-
tasklistV2Enabled: true,
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
|
-
expect(store.getClusters('org-1')).toEqual([
|
|
127
|
-
expect.objectContaining({
|
|
128
|
-
uuid: 'cluster-1',
|
|
129
|
-
externalMetadata: expect.objectContaining({
|
|
130
|
-
tasklistV2Enabled: true,
|
|
131
|
-
}),
|
|
132
|
-
}),
|
|
133
|
-
]);
|
|
134
|
-
});
|
|
135
|
-
it('preserves nested planType fields when an SSE payload is partial', () => {
|
|
136
|
-
const store = ConsoleDataStore.create({
|
|
137
|
-
clusters: {
|
|
138
|
-
'org-1': {
|
|
139
|
-
data: [
|
|
140
|
-
{
|
|
141
|
-
uuid: 'cluster-1',
|
|
142
|
-
planType: {
|
|
143
|
-
uuid: 'plan-1',
|
|
144
|
-
name: 'Advanced',
|
|
145
|
-
category: 'ADVANCED_OFFERING',
|
|
146
|
-
availabilityClass: 'MULTI_TENANT',
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
isLoading: false,
|
|
151
|
-
error: null,
|
|
152
|
-
lastFetched: null,
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
orgInfo: {},
|
|
156
|
-
orgOwner: {},
|
|
157
|
-
earlyAccessFeatures: {},
|
|
158
|
-
members: {},
|
|
159
|
-
audits: {},
|
|
160
|
-
clusterCapacity: {},
|
|
161
|
-
upgradableGenerations: {},
|
|
162
|
-
generationDetails: {},
|
|
163
|
-
});
|
|
164
|
-
store.handleClusterChange({
|
|
165
|
-
org: 'org-1',
|
|
166
|
-
entity: SseEntity.CLUSTER,
|
|
167
|
-
clusterId: 'cluster-1',
|
|
168
|
-
type: 'updated',
|
|
169
|
-
payload: {
|
|
170
|
-
cluster: {
|
|
171
|
-
uuid: 'cluster-1',
|
|
172
|
-
planType: {
|
|
173
|
-
uuid: 'plan-1',
|
|
174
|
-
name: 'Advanced',
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
});
|
|
179
|
-
expect(store.getClusters('org-1')).toEqual([
|
|
180
|
-
expect.objectContaining({
|
|
181
|
-
uuid: 'cluster-1',
|
|
182
|
-
planType: expect.objectContaining({
|
|
183
|
-
uuid: 'plan-1',
|
|
184
|
-
name: 'Advanced',
|
|
185
|
-
category: 'ADVANCED_OFFERING',
|
|
186
|
-
availabilityClass: 'MULTI_TENANT',
|
|
187
|
-
}),
|
|
188
|
-
}),
|
|
189
|
-
]);
|
|
190
|
-
});
|
|
191
|
-
it('treats nested Date values as scalar data during merges', () => {
|
|
192
|
-
const previousUpdatedAt = new Date('2026-01-01T00:00:00.000Z');
|
|
193
|
-
const nextUpdatedAt = new Date('2026-02-01T00:00:00.000Z');
|
|
194
|
-
const store = ConsoleDataStore.create({
|
|
195
|
-
clusters: {
|
|
196
|
-
'org-1': {
|
|
197
|
-
data: [
|
|
198
|
-
{
|
|
199
|
-
uuid: 'cluster-1',
|
|
200
|
-
status: {
|
|
201
|
-
ready: 'Healthy',
|
|
202
|
-
updatedAt: previousUpdatedAt,
|
|
203
|
-
},
|
|
204
|
-
},
|
|
205
|
-
],
|
|
206
|
-
isLoading: false,
|
|
207
|
-
error: null,
|
|
208
|
-
lastFetched: null,
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
|
-
orgInfo: {},
|
|
212
|
-
orgOwner: {},
|
|
213
|
-
earlyAccessFeatures: {},
|
|
214
|
-
members: {},
|
|
215
|
-
audits: {},
|
|
216
|
-
clusterCapacity: {},
|
|
217
|
-
upgradableGenerations: {},
|
|
218
|
-
generationDetails: {},
|
|
219
|
-
});
|
|
220
|
-
store.upsertCluster('org-1', {
|
|
221
|
-
uuid: 'cluster-1',
|
|
222
|
-
status: {
|
|
223
|
-
updatedAt: nextUpdatedAt,
|
|
224
|
-
},
|
|
225
|
-
});
|
|
226
|
-
expect(store.getClusters('org-1')).toEqual([
|
|
227
|
-
expect.objectContaining({
|
|
228
|
-
uuid: 'cluster-1',
|
|
229
|
-
status: expect.objectContaining({
|
|
230
|
-
ready: 'Healthy',
|
|
231
|
-
updatedAt: nextUpdatedAt,
|
|
232
|
-
}),
|
|
233
|
-
}),
|
|
234
|
-
]);
|
|
235
|
-
});
|
|
236
|
-
it('clears externalMetadata.optimizeFiltering when a CLUSTER event turns it off', () => {
|
|
237
|
-
const store = makeStore();
|
|
238
|
-
store.upsertCluster('org-1', {
|
|
239
|
-
uuid: 'cluster-1',
|
|
240
|
-
externalMetadata: {
|
|
241
|
-
optimizeFiltering: {
|
|
242
|
-
processDefinition: { inclusion: ['order-process'] },
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
});
|
|
246
|
-
// Disabling drops the `optimizeFiltering` key entirely from the JSON
|
|
247
|
-
// wire payload (the backend persists/serializes it as `undefined`, which
|
|
248
|
-
// JSON.stringify omits) rather than sending an explicit `null`.
|
|
249
|
-
const disabledPayload = JSON.parse(JSON.stringify({
|
|
250
|
-
uuid: 'cluster-1',
|
|
251
|
-
externalMetadata: { optimizeFiltering: undefined },
|
|
252
|
-
}));
|
|
253
|
-
store.handleClusterChange({
|
|
254
|
-
org: 'org-1',
|
|
255
|
-
entity: SseEntity.CLUSTER,
|
|
256
|
-
clusterId: 'cluster-1',
|
|
257
|
-
type: 'updated',
|
|
258
|
-
payload: { cluster: disabledPayload },
|
|
259
|
-
});
|
|
260
|
-
const cluster = store.getClusters('org-1')?.[0];
|
|
261
|
-
expect(cluster?.externalMetadata?.optimizeFiltering).toBeUndefined();
|
|
262
|
-
});
|
|
263
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { act, renderHook, waitFor } from '@testing-library/react';
|
|
3
|
-
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
4
|
-
vi.mock('@camunda/ccma-api', () => ({
|
|
5
|
-
ExternalNotificationsService: {
|
|
6
|
-
getUserNotifications: vi.fn(),
|
|
7
|
-
setNotificationState: vi.fn().mockResolvedValue(undefined),
|
|
8
|
-
markManyAsRead: vi.fn().mockResolvedValue(undefined),
|
|
9
|
-
dismissAll: vi.fn().mockResolvedValue(undefined),
|
|
10
|
-
trackEvent: vi.fn().mockResolvedValue(undefined),
|
|
11
|
-
streamUserNotifications: vi.fn(() => ({ close: vi.fn(), state: 'closed' })),
|
|
12
|
-
},
|
|
13
|
-
}));
|
|
14
|
-
import { ExternalNotificationsService } from '@camunda/ccma-api';
|
|
15
|
-
import { C4ConsoleRuntimeProvider } from './c4-console-runtime-context.js';
|
|
16
|
-
import { C4UserNotificationsProvider, useC4UserNotifications, } from './c4-user-notifications-context.js';
|
|
17
|
-
const runtime = {
|
|
18
|
-
stage: 'dev',
|
|
19
|
-
auth: { getAccessToken: async () => 'token' },
|
|
20
|
-
backendUrls: {},
|
|
21
|
-
};
|
|
22
|
-
const notif = (over) => ({
|
|
23
|
-
uuid: 'n1',
|
|
24
|
-
timestamp: 1,
|
|
25
|
-
state: 'new',
|
|
26
|
-
source: 'console',
|
|
27
|
-
type: 'org',
|
|
28
|
-
title: 't',
|
|
29
|
-
description: 'd',
|
|
30
|
-
...over,
|
|
31
|
-
});
|
|
32
|
-
const wrapper = ({ children }) => (_jsx(C4ConsoleRuntimeProvider, { config: runtime, children: _jsx(C4UserNotificationsProvider, { orgId: 'org-1', live: false, children: children }) }));
|
|
33
|
-
const mockService = vi.mocked(ExternalNotificationsService);
|
|
34
|
-
beforeEach(() => {
|
|
35
|
-
vi.clearAllMocks();
|
|
36
|
-
mockService.getUserNotifications.mockResolvedValue([
|
|
37
|
-
notif({ uuid: 'old', timestamp: 1, state: 'read' }),
|
|
38
|
-
notif({ uuid: 'new', timestamp: 2, state: 'new' }),
|
|
39
|
-
]);
|
|
40
|
-
});
|
|
41
|
-
describe('C4UserNotificationsProvider', () => {
|
|
42
|
-
it('fetches, sorts newest-first, and derives hasUnread', async () => {
|
|
43
|
-
const { result } = renderHook(() => useC4UserNotifications(), { wrapper });
|
|
44
|
-
await waitFor(() => expect(result.current.isLoading).toBe(false));
|
|
45
|
-
expect(result.current.notifications.map((n) => n.uuid)).toEqual([
|
|
46
|
-
'new',
|
|
47
|
-
'old',
|
|
48
|
-
]);
|
|
49
|
-
expect(result.current.hasUnread).toBe(true);
|
|
50
|
-
});
|
|
51
|
-
it('markAsRead optimistically flips state and persists', async () => {
|
|
52
|
-
const { result } = renderHook(() => useC4UserNotifications(), { wrapper });
|
|
53
|
-
await waitFor(() => expect(result.current.isLoading).toBe(false));
|
|
54
|
-
act(() => result.current.markAsRead('new'));
|
|
55
|
-
expect(result.current.notifications.find((n) => n.uuid === 'new')?.state).toBe('read');
|
|
56
|
-
expect(result.current.hasUnread).toBe(false);
|
|
57
|
-
expect(mockService.setNotificationState).toHaveBeenCalledWith(expect.objectContaining({ params: { uuid: 'new', state: 'read' } }));
|
|
58
|
-
});
|
|
59
|
-
it('dismiss removes the notification and persists', async () => {
|
|
60
|
-
const { result } = renderHook(() => useC4UserNotifications(), { wrapper });
|
|
61
|
-
await waitFor(() => expect(result.current.isLoading).toBe(false));
|
|
62
|
-
act(() => result.current.dismiss('old'));
|
|
63
|
-
expect(result.current.notifications.map((n) => n.uuid)).toEqual(['new']);
|
|
64
|
-
expect(mockService.setNotificationState).toHaveBeenCalledWith(expect.objectContaining({ params: { uuid: 'old', state: 'dismiss' } }));
|
|
65
|
-
});
|
|
66
|
-
it('markAllAsRead batches only the unread uuids', async () => {
|
|
67
|
-
const { result } = renderHook(() => useC4UserNotifications(), { wrapper });
|
|
68
|
-
await waitFor(() => expect(result.current.isLoading).toBe(false));
|
|
69
|
-
act(() => result.current.markAllAsRead());
|
|
70
|
-
expect(mockService.markManyAsRead).toHaveBeenCalledWith(expect.objectContaining({ params: { uuids: ['new'] } }));
|
|
71
|
-
expect(result.current.hasUnread).toBe(false);
|
|
72
|
-
});
|
|
73
|
-
it('dismissAll clears the list and calls the bulk endpoint', async () => {
|
|
74
|
-
const { result } = renderHook(() => useC4UserNotifications(), { wrapper });
|
|
75
|
-
await waitFor(() => expect(result.current.isLoading).toBe(false));
|
|
76
|
-
act(() => result.current.dismissAll());
|
|
77
|
-
expect(result.current.notifications).toHaveLength(0);
|
|
78
|
-
expect(mockService.dismissAll).toHaveBeenCalledWith(expect.objectContaining({ params: { orgId: 'org-1' } }));
|
|
79
|
-
});
|
|
80
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
3
|
-
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
4
|
-
* You may not use this file except in compliance with the commercial license.
|
|
5
|
-
*/
|
|
6
|
-
import { describe, expect, it } from 'vitest';
|
|
7
|
-
import { buildModelerOrgUrl, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, resolveAdminAppName, } from './camunda-apps.js';
|
|
8
|
-
const cluster = (overrides) => ({
|
|
9
|
-
uuid: 'c1',
|
|
10
|
-
name: 'Cluster 1',
|
|
11
|
-
...overrides,
|
|
12
|
-
});
|
|
13
|
-
describe('isAdminApp', () => {
|
|
14
|
-
it('treats admin and identity as the same', () => {
|
|
15
|
-
expect(isAdminApp('admin')).toBe(true);
|
|
16
|
-
expect(isAdminApp('identity')).toBe(true);
|
|
17
|
-
expect(isAdminApp('operate')).toBe(false);
|
|
18
|
-
expect(isAdminApp(undefined)).toBe(false);
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
describe('resolveAdminAppName', () => {
|
|
22
|
-
it('is admin for zeebe >= 8.9.0-alpha5', () => {
|
|
23
|
-
expect(resolveAdminAppName(cluster({ generation: { versions: { zeebe: '8.9.0' } } }))).toBe('admin');
|
|
24
|
-
});
|
|
25
|
-
it('is identity for older zeebe', () => {
|
|
26
|
-
expect(resolveAdminAppName(cluster({ generation: { versions: { zeebe: '8.8.0' } } }))).toBe('identity');
|
|
27
|
-
});
|
|
28
|
-
it('is admin for SNAPSHOT builds', () => {
|
|
29
|
-
expect(resolveAdminAppName(cluster({ generation: { versions: { zeebe: '8.9.0-SNAPSHOT' } } }))).toBe('admin');
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
describe('getEndpointForApp', () => {
|
|
33
|
-
it('resolves admin via the identity fallback', () => {
|
|
34
|
-
expect(getEndpointForApp('admin', { identity: 'https://identity.example' })).toBe('https://identity.example');
|
|
35
|
-
});
|
|
36
|
-
it('prefers admin over identity when both present', () => {
|
|
37
|
-
expect(getEndpointForApp('admin', {
|
|
38
|
-
admin: 'https://admin.example',
|
|
39
|
-
identity: 'https://identity.example',
|
|
40
|
-
})).toBe('https://admin.example');
|
|
41
|
-
});
|
|
42
|
-
it('returns the direct endpoint for non-admin apps', () => {
|
|
43
|
-
expect(getEndpointForApp('operate', { operate: 'https://op.example' })).toBe('https://op.example');
|
|
44
|
-
});
|
|
45
|
-
it('returns undefined when endpoints are missing', () => {
|
|
46
|
-
expect(getEndpointForApp('operate', undefined)).toBeUndefined();
|
|
47
|
-
expect(getEndpointForApp('operate', {})).toBeUndefined();
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
describe('isAppHealthyOnCluster', () => {
|
|
51
|
-
it('uses zeebe as the health proxy for admin/identity', () => {
|
|
52
|
-
expect(isAppHealthyOnCluster(cluster({ status: { zeebe: 'Healthy' } }), 'admin')).toBe(true);
|
|
53
|
-
expect(isAppHealthyOnCluster(cluster({ status: { zeebe: 'Unhealthy' } }), 'identity')).toBe(false);
|
|
54
|
-
});
|
|
55
|
-
it('checks the app status directly for non-admin apps', () => {
|
|
56
|
-
expect(isAppHealthyOnCluster(cluster({ status: { operate: 'Healthy' } }), 'operate')).toBe(true);
|
|
57
|
-
expect(isAppHealthyOnCluster(cluster({}), 'operate')).toBe(false);
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
describe('hasReadPermissionForApp', () => {
|
|
61
|
-
it('reads the admin OR identity permission for admin apps', () => {
|
|
62
|
-
expect(hasReadPermissionForApp('admin', {
|
|
63
|
-
cluster: { identity: { read: true } },
|
|
64
|
-
})).toBe(true);
|
|
65
|
-
expect(hasReadPermissionForApp('admin', { cluster: {} })).toBe(false);
|
|
66
|
-
});
|
|
67
|
-
it('reads the app permission for non-admin apps', () => {
|
|
68
|
-
expect(hasReadPermissionForApp('operate', {
|
|
69
|
-
cluster: { operate: { read: true } },
|
|
70
|
-
})).toBe(true);
|
|
71
|
-
expect(hasReadPermissionForApp('operate', undefined)).toBe(false);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
describe('buildModelerOrgUrl', () => {
|
|
75
|
-
it('rewrites the path to /org/:orgId and drops the query', () => {
|
|
76
|
-
expect(buildModelerOrgUrl('https://modeler.camunda.io/foo?x=1', 'org-9')).toBe('https://modeler.camunda.io/org/org-9');
|
|
77
|
-
});
|
|
78
|
-
it('returns undefined for an unparseable URL', () => {
|
|
79
|
-
expect(buildModelerOrgUrl('not a url', 'org-9')).toBeUndefined();
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
describe('getReadableAppName / getClusterStage', () => {
|
|
83
|
-
it('title-cases the app name', () => {
|
|
84
|
-
expect(getReadableAppName('operate')).toBe('Operate');
|
|
85
|
-
});
|
|
86
|
-
it('reads the first camunda label as the stage', () => {
|
|
87
|
-
expect(getClusterStage(cluster({ labels: { camunda: ['stable'] } }))).toBe('stable');
|
|
88
|
-
expect(getClusterStage(cluster({}))).toBeUndefined();
|
|
89
|
-
});
|
|
90
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { renderHook } from '@testing-library/react';
|
|
3
|
-
import { describe, expect, it } from 'vitest';
|
|
4
|
-
import { C4ConsoleDataProvider } from '../c4-console-data-context.js';
|
|
5
|
-
import { C4ConsoleRuntimeProvider } from '../c4-console-runtime-context.js';
|
|
6
|
-
import { useC4ClusterNavEntries, useC4WebappBreadcrumbData, } from './use-webapp-nav-data.js';
|
|
7
|
-
const runtime = {
|
|
8
|
-
stage: 'dev',
|
|
9
|
-
auth: { getAccessToken: async () => 'token' },
|
|
10
|
-
backendUrls: {},
|
|
11
|
-
publicUrls: { modelerBaseUrl: 'https://modeler.example.com' },
|
|
12
|
-
};
|
|
13
|
-
const healthyCluster = {
|
|
14
|
-
uuid: 'c1',
|
|
15
|
-
name: 'Prod',
|
|
16
|
-
status: { operate: 'Healthy', zeebe: 'Healthy' },
|
|
17
|
-
endpoints: {
|
|
18
|
-
operate: 'https://c1.operate',
|
|
19
|
-
admin: 'https://c1.admin',
|
|
20
|
-
},
|
|
21
|
-
labels: { camunda: ['stable'] },
|
|
22
|
-
generation: { versions: { zeebe: '8.9.0' } },
|
|
23
|
-
};
|
|
24
|
-
// Seed the shared cache so the hooks' auto-fetch is a no-op (cache hit) and no
|
|
25
|
-
// network is touched.
|
|
26
|
-
const wrapper = (initialState) => ({ children }) => (_jsx(C4ConsoleRuntimeProvider, { config: runtime, children: _jsx(C4ConsoleDataProvider, { initialState: initialState, children: children }) }));
|
|
27
|
-
const cacheEntry = (data) => ({
|
|
28
|
-
data,
|
|
29
|
-
isLoading: false,
|
|
30
|
-
error: null,
|
|
31
|
-
lastFetched: null,
|
|
32
|
-
});
|
|
33
|
-
describe('useC4ClusterNavEntries', () => {
|
|
34
|
-
it('builds per-cluster app entries with resolved alias, health and stage', () => {
|
|
35
|
-
const { result } = renderHook(() => useC4ClusterNavEntries('org-1'), {
|
|
36
|
-
wrapper: wrapper({
|
|
37
|
-
webappClusters: { 'org-1': cacheEntry([healthyCluster]) },
|
|
38
|
-
}),
|
|
39
|
-
});
|
|
40
|
-
expect(result.current).toHaveLength(1);
|
|
41
|
-
const entry = result.current[0];
|
|
42
|
-
expect(entry.cluster).toMatchObject({
|
|
43
|
-
uuid: 'c1',
|
|
44
|
-
name: 'Prod',
|
|
45
|
-
stage: 'stable',
|
|
46
|
-
});
|
|
47
|
-
// admin resolves to 'admin' (zeebe 8.9.0); operate stays operate.
|
|
48
|
-
const apps = entry.apps.map((a) => a.app);
|
|
49
|
-
expect(apps).toContain('operate');
|
|
50
|
-
expect(apps).toContain('admin');
|
|
51
|
-
const operate = entry.apps.find((a) => a.app === 'operate');
|
|
52
|
-
expect(operate).toMatchObject({ href: 'https://c1.operate', healthy: true });
|
|
53
|
-
});
|
|
54
|
-
it('omits apps with no endpoint', () => {
|
|
55
|
-
const { result } = renderHook(() => useC4ClusterNavEntries('org-1'), {
|
|
56
|
-
wrapper: wrapper({
|
|
57
|
-
webappClusters: {
|
|
58
|
-
'org-1': cacheEntry([
|
|
59
|
-
{ uuid: 'c1', name: 'Prod', endpoints: {}, status: {} },
|
|
60
|
-
]),
|
|
61
|
-
},
|
|
62
|
-
}),
|
|
63
|
-
});
|
|
64
|
-
expect(result.current).toHaveLength(0);
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
describe('useC4WebappBreadcrumbData', () => {
|
|
68
|
-
it('builds org > cluster > app crumbs with a selected app', () => {
|
|
69
|
-
const { result } = renderHook(() => useC4WebappBreadcrumbData({
|
|
70
|
-
orgId: 'org-1',
|
|
71
|
-
currentApp: 'operate',
|
|
72
|
-
currentClusterUuid: 'c1',
|
|
73
|
-
}), {
|
|
74
|
-
wrapper: wrapper({
|
|
75
|
-
myOrgs: cacheEntry([
|
|
76
|
-
{ uuid: 'org-1', name: 'My Org' },
|
|
77
|
-
{ uuid: 'org-2', name: 'Other Org' },
|
|
78
|
-
]),
|
|
79
|
-
webappClusters: { 'org-1': cacheEntry([healthyCluster]) },
|
|
80
|
-
}),
|
|
81
|
-
});
|
|
82
|
-
const keys = result.current.map((c) => c.key);
|
|
83
|
-
expect(keys).toEqual(['org', 'cluster', 'app']);
|
|
84
|
-
const org = result.current[0];
|
|
85
|
-
expect(org.label).toBe('My Org');
|
|
86
|
-
// A sibling org + modeler URL yields a switch dropdown.
|
|
87
|
-
expect(org.dropdownItems?.some((d) => d.key === 'org-2')).toBe(true);
|
|
88
|
-
const app = result.current[2];
|
|
89
|
-
expect(app.label).toBe('Operate');
|
|
90
|
-
});
|
|
91
|
-
});
|
package/lib/esm/setupTests.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|