@camunda/ccma-saas-frontend 0.0.31
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 +40 -0
- package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.d.ts +3 -0
- package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.js +25 -0
- package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.types.d.ts +9 -0
- package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.types.js +6 -0
- package/lib/esm/components/c4-activity-graph/c4-activity-graph.d.ts +3 -0
- package/lib/esm/components/c4-activity-graph/c4-activity-graph.js +135 -0
- package/lib/esm/components/c4-activity-graph/c4-activity-graph.types.d.ts +13 -0
- package/lib/esm/components/c4-activity-graph/c4-activity-graph.types.js +6 -0
- package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.d.ts +16 -0
- package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +39 -0
- package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.d.ts +16 -0
- package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +147 -0
- package/lib/esm/components/c4-advanced-search-filters/FieldRow.d.ts +14 -0
- package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +133 -0
- package/lib/esm/components/c4-advanced-search-filters/FiltersSection.d.ts +13 -0
- package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +63 -0
- package/lib/esm/components/c4-advanced-search-filters/OrSection.d.ts +16 -0
- package/lib/esm/components/c4-advanced-search-filters/OrSection.js +116 -0
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.d.ts +3 -0
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +406 -0
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.types.d.ts +32 -0
- package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.types.js +6 -0
- package/lib/esm/components/c4-advanced-search-filters/state.types.d.ts +14 -0
- package/lib/esm/components/c4-advanced-search-filters/state.types.js +6 -0
- package/lib/esm/components/c4-advanced-search-filters/utils.d.ts +5 -0
- package/lib/esm/components/c4-advanced-search-filters/utils.js +58 -0
- package/lib/esm/components/c4-ai-usage/c4-ai-usage.d.ts +3 -0
- package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +38 -0
- package/lib/esm/components/c4-ai-usage/c4-ai-usage.types.d.ts +59 -0
- package/lib/esm/components/c4-ai-usage/c4-ai-usage.types.js +6 -0
- package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.d.ts +3 -0
- package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js +8 -0
- package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.types.d.ts +12 -0
- package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.types.js +6 -0
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.d.ts +3 -0
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.js +20 -0
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.types.d.ts +12 -0
- package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.types.js +6 -0
- package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.d.ts +2 -0
- package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.js +22 -0
- package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.types.d.ts +13 -0
- package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.types.js +6 -0
- package/lib/esm/components/c4-async-modal/c4-async-modal.d.ts +3 -0
- package/lib/esm/components/c4-async-modal/c4-async-modal.js +68 -0
- package/lib/esm/components/c4-async-modal/c4-async-modal.types.d.ts +28 -0
- package/lib/esm/components/c4-async-modal/c4-async-modal.types.js +6 -0
- package/lib/esm/components/c4-audit-log/c4-audit-log.d.ts +3 -0
- package/lib/esm/components/c4-audit-log/c4-audit-log.js +147 -0
- package/lib/esm/components/c4-audit-log/c4-audit-log.types.d.ts +13 -0
- package/lib/esm/components/c4-audit-log/c4-audit-log.types.js +6 -0
- package/lib/esm/components/c4-billing-page/c4-billing-page.d.ts +10 -0
- package/lib/esm/components/c4-billing-page/c4-billing-page.js +39 -0
- package/lib/esm/components/c4-billing-page/c4-billing-page.types.d.ts +13 -0
- package/lib/esm/components/c4-billing-page/c4-billing-page.types.js +6 -0
- package/lib/esm/components/c4-billing-page/custom-styles.d.ts +13 -0
- package/lib/esm/components/c4-billing-page/custom-styles.js +18 -0
- package/lib/esm/components/c4-billing-page/elements/cluster-reservations.d.ts +29 -0
- package/lib/esm/components/c4-billing-page/elements/cluster-reservations.js +32 -0
- package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.d.ts +16 -0
- package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +62 -0
- package/lib/esm/components/c4-billing-page/elements/plan-details.d.ts +20 -0
- package/lib/esm/components/c4-billing-page/elements/plan-details.js +16 -0
- package/lib/esm/components/c4-billing-page/elements/usage-alerts.d.ts +30 -0
- package/lib/esm/components/c4-billing-page/elements/usage-alerts.js +18 -0
- package/lib/esm/components/c4-billing-page/elements/value-metric.d.ts +28 -0
- package/lib/esm/components/c4-billing-page/elements/value-metric.js +116 -0
- package/lib/esm/components/c4-bottom-links/c4-bottom-links.d.ts +3 -0
- package/lib/esm/components/c4-bottom-links/c4-bottom-links.js +9 -0
- package/lib/esm/components/c4-bottom-links/c4-bottom-links.types.d.ts +4 -0
- package/lib/esm/components/c4-bottom-links/c4-bottom-links.types.js +6 -0
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.d.ts +3 -0
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +33 -0
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.d.ts +22 -0
- package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.types.js +6 -0
- package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.d.ts +3 -0
- package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.js +56 -0
- package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.types.d.ts +83 -0
- package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.types.js +6 -0
- package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.d.ts +6 -0
- package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +87 -0
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.d.ts +7 -0
- package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +37 -0
- package/lib/esm/components/c4-charts-dashboard/elements/line-chart.d.ts +7 -0
- package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +35 -0
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.d.ts +3 -0
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +133 -0
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.types.d.ts +43 -0
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.types.js +6 -0
- package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.d.ts +4 -0
- package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +58 -0
- package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.types.d.ts +39 -0
- package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.types.js +6 -0
- package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.d.ts +4 -0
- package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +64 -0
- package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.types.d.ts +45 -0
- package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.types.js +6 -0
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +46 -0
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.types.d.ts +24 -0
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.types.js +6 -0
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +124 -0
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.types.d.ts +51 -0
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.types.js +6 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +206 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.types.d.ts +58 -0
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.types.js +6 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +192 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.types.d.ts +53 -0
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.types.js +6 -0
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +104 -0
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts +76 -0
- package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.js +6 -0
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +222 -0
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.types.d.ts +89 -0
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.types.js +6 -0
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +93 -0
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.types.d.ts +36 -0
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.types.js +6 -0
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.d.ts +3 -0
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +174 -0
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.types.d.ts +118 -0
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.types.js +6 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +3 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +220 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +75 -0
- package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.js +6 -0
- package/lib/esm/components/c4-cluster-overview/applications.d.ts +47 -0
- package/lib/esm/components/c4-cluster-overview/applications.js +132 -0
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +20 -0
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +101 -0
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.types.d.ts +22 -0
- package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.types.js +6 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +116 -0
- package/lib/esm/components/c4-cluster-overview/cluster-details.js +170 -0
- package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +35 -0
- package/lib/esm/components/c4-cluster-overview/cluster-load.formatNumber.test.d.ts +1 -0
- package/lib/esm/components/c4-cluster-overview/cluster-load.formatNumber.test.js +38 -0
- package/lib/esm/components/c4-cluster-overview/cluster-load.js +334 -0
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +3 -0
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +17 -0
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +12 -0
- package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.js +6 -0
- package/lib/esm/components/c4-cluster-settings/elements/autoUpdate.d.ts +14 -0
- package/lib/esm/components/c4-cluster-settings/elements/autoUpdate.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/business-id-uniqueness-toggle.d.ts +14 -0
- package/lib/esm/components/c4-cluster-settings/elements/business-id-uniqueness-toggle.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +23 -0
- package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +34 -0
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.d.ts +16 -0
- package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/enforce-groups.d.ts +14 -0
- package/lib/esm/components/c4-cluster-settings/elements/enforce-groups.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/identity-based-authorizations.d.ts +13 -0
- package/lib/esm/components/c4-cluster-settings/elements/identity-based-authorizations.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/low-latency-toggle.d.ts +14 -0
- package/lib/esm/components/c4-cluster-settings/elements/low-latency-toggle.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/mcp-toggle.d.ts +14 -0
- package/lib/esm/components/c4-cluster-settings/elements/mcp-toggle.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.d.ts +13 -0
- package/lib/esm/components/c4-cluster-settings/elements/multi-tenancy.js +15 -0
- package/lib/esm/components/c4-cluster-settings/elements/resource-based-authorizations.d.ts +27 -0
- package/lib/esm/components/c4-cluster-settings/elements/resource-based-authorizations.js +20 -0
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.d.ts +7 -0
- package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/swagger-toggle.d.ts +14 -0
- package/lib/esm/components/c4-cluster-settings/elements/swagger-toggle.js +12 -0
- package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-settings.d.ts +5 -0
- package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-settings.js +7 -0
- package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-toggle.d.ts +13 -0
- package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-toggle.js +13 -0
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.d.ts +3 -0
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +64 -0
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.types.d.ts +15 -0
- package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.types.js +6 -0
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.d.ts +3 -0
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +44 -0
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.types.d.ts +25 -0
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.types.js +6 -0
- package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.d.ts +3 -0
- package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.js +15 -0
- package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.types.d.ts +6 -0
- package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.types.js +6 -0
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.d.ts +3 -0
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +216 -0
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.types.d.ts +130 -0
- package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.types.js +6 -0
- package/lib/esm/components/c4-console-dashboard/elements/empty-state.d.ts +13 -0
- package/lib/esm/components/c4-console-dashboard/elements/empty-state.js +21 -0
- package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.d.ts +3 -0
- package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.js +66 -0
- package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.types.d.ts +12 -0
- package/lib/esm/components/c4-convert-trial-organization-modal/c4-convert-trial-organization-modal.types.js +6 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.d.ts +3 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +508 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +209 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.js +6 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.d.ts +2 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +182 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.types.d.ts +26 -0
- package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.types.js +6 -0
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.d.ts +2 -0
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +96 -0
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.types.d.ts +18 -0
- package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.types.js +6 -0
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.d.ts +2 -0
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +352 -0
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.types.d.ts +20 -0
- package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.types.js +6 -0
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.d.ts +3 -0
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +52 -0
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.types.d.ts +19 -0
- package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.types.js +6 -0
- package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.d.ts +3 -0
- package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.js +9 -0
- package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.types.d.ts +6 -0
- package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.types.js +6 -0
- package/lib/esm/components/c4-divider/c4-divider.d.ts +2 -0
- package/lib/esm/components/c4-divider/c4-divider.js +11 -0
- package/lib/esm/components/c4-divider/c4-divider.types.d.ts +3 -0
- package/lib/esm/components/c4-divider/c4-divider.types.js +6 -0
- package/lib/esm/components/c4-external-link/c4-external-link.d.ts +3 -0
- package/lib/esm/components/c4-external-link/c4-external-link.js +10 -0
- package/lib/esm/components/c4-external-link/c4-external-link.types.d.ts +9 -0
- package/lib/esm/components/c4-external-link/c4-external-link.types.js +6 -0
- package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.d.ts +3 -0
- package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.js +18 -0
- package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.types.d.ts +6 -0
- package/lib/esm/components/c4-info-tooltip/c4-info-tooltip.types.js +6 -0
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.d.ts +2 -0
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +187 -0
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.types.d.ts +22 -0
- package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.types.js +6 -0
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.d.ts +8 -0
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +46 -0
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.d.ts +101 -0
- package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.types.js +6 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.d.ts +7 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +18 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.d.ts +12 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +65 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.d.ts +13 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +74 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.d.ts +16 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +81 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.d.ts +13 -0
- package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +45 -0
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.d.ts +4 -0
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +40 -0
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +23 -0
- package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.js +6 -0
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.d.ts +3 -0
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +88 -0
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.d.ts +44 -0
- package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.types.js +6 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-background-fetching-indicator.d.ts +8 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-background-fetching-indicator.js +10 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.d.ts +30 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +51 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-shared.types.d.ts +23 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-shared.types.js +6 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.d.ts +17 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +47 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-stories-data-generator.d.ts +4 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-stories-data-generator.js +30 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-timestamp-information.d.ts +6 -0
- package/lib/esm/components/c4-job-dashboard-shared/c4-timestamp-information.js +14 -0
- package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.d.ts +3 -0
- package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +25 -0
- package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.types.d.ts +7 -0
- package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.types.js +6 -0
- package/lib/esm/components/c4-link-button/c4-link-button.d.ts +3 -0
- package/lib/esm/components/c4-link-button/c4-link-button.js +18 -0
- package/lib/esm/components/c4-link-button/c4-link-button.types.d.ts +8 -0
- package/lib/esm/components/c4-link-button/c4-link-button.types.js +6 -0
- package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.d.ts +3 -0
- package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.js +81 -0
- package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.types.d.ts +58 -0
- package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.types.js +6 -0
- package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +3 -0
- package/lib/esm/components/c4-management-activity/c4-management-activity.js +16 -0
- package/lib/esm/components/c4-management-activity/c4-management-activity.types.d.ts +22 -0
- package/lib/esm/components/c4-management-activity/c4-management-activity.types.js +6 -0
- package/lib/esm/components/c4-management-api/c4-management-api.d.ts +3 -0
- package/lib/esm/components/c4-management-api/c4-management-api.js +204 -0
- package/lib/esm/components/c4-management-api/c4-management-api.types.d.ts +66 -0
- package/lib/esm/components/c4-management-api/c4-management-api.types.js +6 -0
- package/lib/esm/components/c4-management-overview/c4-management-overview.d.ts +3 -0
- package/lib/esm/components/c4-management-overview/c4-management-overview.js +22 -0
- package/lib/esm/components/c4-management-overview/c4-management-overview.types.d.ts +17 -0
- package/lib/esm/components/c4-management-overview/c4-management-overview.types.js +6 -0
- package/lib/esm/components/c4-management-settings/c4-management-settings.d.ts +3 -0
- package/lib/esm/components/c4-management-settings/c4-management-settings.js +131 -0
- package/lib/esm/components/c4-management-settings/c4-management-settings.types.d.ts +77 -0
- package/lib/esm/components/c4-management-settings/c4-management-settings.types.js +6 -0
- package/lib/esm/components/c4-management-users/c4-management-users.d.ts +3 -0
- package/lib/esm/components/c4-management-users/c4-management-users.js +17 -0
- package/lib/esm/components/c4-management-users/c4-management-users.types.d.ts +23 -0
- package/lib/esm/components/c4-management-users/c4-management-users.types.js +6 -0
- package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.d.ts +3 -0
- package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +48 -0
- package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.types.d.ts +31 -0
- package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.types.js +6 -0
- package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.d.ts +2 -0
- package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js +45 -0
- package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.types.d.ts +18 -0
- package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.types.js +6 -0
- package/lib/esm/components/c4-number-input/c4-number-input.d.ts +2 -0
- package/lib/esm/components/c4-number-input/c4-number-input.js +21 -0
- package/lib/esm/components/c4-number-input/c4-number-input.types.d.ts +11 -0
- package/lib/esm/components/c4-number-input/c4-number-input.types.js +6 -0
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.d.ts +3 -0
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +62 -0
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +60 -0
- package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.js +6 -0
- package/lib/esm/components/c4-page-template/c4-page-template.d.ts +29 -0
- package/lib/esm/components/c4-page-template/c4-page-template.js +17 -0
- package/lib/esm/components/c4-page-template/c4-page-template.spec.d.ts +1 -0
- package/lib/esm/components/c4-page-template/c4-page-template.spec.js +58 -0
- package/lib/esm/components/c4-page-template/c4-page-template.stories.d.ts +6 -0
- package/lib/esm/components/c4-page-template/c4-page-template.stories.js +73 -0
- package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.d.ts +3 -0
- package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.js +44 -0
- package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.types.d.ts +12 -0
- package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.types.js +6 -0
- package/lib/esm/components/c4-pricing/c4-pricing.d.ts +3 -0
- package/lib/esm/components/c4-pricing/c4-pricing.js +59 -0
- package/lib/esm/components/c4-pricing/c4-pricing.types.d.ts +20 -0
- package/lib/esm/components/c4-pricing/c4-pricing.types.js +6 -0
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.d.ts +3 -0
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +51 -0
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.types.d.ts +53 -0
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.types.js +6 -0
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.utils.d.ts +13 -0
- package/lib/esm/components/c4-pricing-card/c4-pricing-card.utils.js +58 -0
- package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.d.ts +2 -0
- package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +68 -0
- package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.types.d.ts +15 -0
- package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.types.js +6 -0
- package/lib/esm/components/c4-search/c4-search-results.d.ts +2 -0
- package/lib/esm/components/c4-search/c4-search-results.js +235 -0
- package/lib/esm/components/c4-search/c4-search-results.types.d.ts +33 -0
- package/lib/esm/components/c4-search/c4-search-results.types.js +6 -0
- package/lib/esm/components/c4-search/c4-search.d.ts +35 -0
- package/lib/esm/components/c4-search/c4-search.js +134 -0
- package/lib/esm/components/c4-search/c4-search.types.d.ts +20 -0
- package/lib/esm/components/c4-search/c4-search.types.js +6 -0
- package/lib/esm/components/c4-search/search.utils.d.ts +61 -0
- package/lib/esm/components/c4-search/search.utils.js +421 -0
- package/lib/esm/components/c4-sm-cluster-details/automation-components.d.ts +3 -0
- package/lib/esm/components/c4-sm-cluster-details/automation-components.js +20 -0
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.d.ts +3 -0
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.js +27 -0
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.types.d.ts +71 -0
- package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.types.js +6 -0
- package/lib/esm/components/c4-sm-cluster-details/custom-properties.d.ts +4 -0
- package/lib/esm/components/c4-sm-cluster-details/custom-properties.js +29 -0
- package/lib/esm/components/c4-sm-cluster-details/details.d.ts +7 -0
- package/lib/esm/components/c4-sm-cluster-details/details.js +24 -0
- package/lib/esm/components/c4-sm-cluster-details/zeebe-components.d.ts +3 -0
- package/lib/esm/components/c4-sm-cluster-details/zeebe-components.js +43 -0
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.d.ts +3 -0
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.js +34 -0
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +40 -0
- package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.js +6 -0
- package/lib/esm/components/c4-sm-dashboard/cluster-tile.d.ts +9 -0
- package/lib/esm/components/c4-sm-dashboard/cluster-tile.js +59 -0
- package/lib/esm/components/c4-sm-dashboard/component-tile.d.ts +14 -0
- package/lib/esm/components/c4-sm-dashboard/component-tile.js +45 -0
- package/lib/esm/components/c4-sm-dashboard/explore.d.ts +20 -0
- package/lib/esm/components/c4-sm-dashboard/explore.js +29 -0
- package/lib/esm/components/c4-sm-dashboard/health-status.d.ts +10 -0
- package/lib/esm/components/c4-sm-dashboard/health-status.js +60 -0
- package/lib/esm/components/c4-sm-dashboard/overview.d.ts +13 -0
- package/lib/esm/components/c4-sm-dashboard/overview.js +148 -0
- package/lib/esm/components/c4-sm-dashboard/usage-tile.d.ts +22 -0
- package/lib/esm/components/c4-sm-dashboard/usage-tile.js +35 -0
- package/lib/esm/components/c4-stackdriver-links/c4-stackdriver-links.d.ts +3 -0
- package/lib/esm/components/c4-stackdriver-links/c4-stackdriver-links.js +26 -0
- package/lib/esm/components/c4-stackdriver-links/c4-stackdriver-links.types.d.ts +12 -0
- package/lib/esm/components/c4-stackdriver-links/c4-stackdriver-links.types.js +6 -0
- package/lib/esm/components/c4-stat/c4-stat.d.ts +3 -0
- package/lib/esm/components/c4-stat/c4-stat.js +11 -0
- package/lib/esm/components/c4-stat/c4-stat.types.d.ts +4 -0
- package/lib/esm/components/c4-stat/c4-stat.types.js +6 -0
- package/lib/esm/components/c4-stateful-button/c4-stateful-button.d.ts +3 -0
- package/lib/esm/components/c4-stateful-button/c4-stateful-button.js +38 -0
- package/lib/esm/components/c4-stateful-button/c4-stateful-button.types.d.ts +7 -0
- package/lib/esm/components/c4-stateful-button/c4-stateful-button.types.js +6 -0
- package/lib/esm/components/c4-tabs/c4-tabs.d.ts +3 -0
- package/lib/esm/components/c4-tabs/c4-tabs.js +49 -0
- package/lib/esm/components/c4-tabs/c4-tabs.spec.d.ts +1 -0
- package/lib/esm/components/c4-tabs/c4-tabs.spec.js +97 -0
- package/lib/esm/components/c4-tabs/c4-tabs.stories.d.ts +6 -0
- package/lib/esm/components/c4-tabs/c4-tabs.stories.js +35 -0
- package/lib/esm/components/c4-tabs/c4-tabs.types.d.ts +14 -0
- package/lib/esm/components/c4-tabs/c4-tabs.types.js +6 -0
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.d.ts +4 -0
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.js +110 -0
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.types.d.ts +45 -0
- package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.types.js +6 -0
- package/lib/esm/components/c4-telemetry-page/component-metrics.d.ts +26 -0
- package/lib/esm/components/c4-telemetry-page/component-metrics.js +47 -0
- package/lib/esm/components/c4-telemetry-page/metrics-empty-state-image.d.ts +2 -0
- package/lib/esm/components/c4-telemetry-page/metrics-empty-state-image.js +6 -0
- package/lib/esm/components/c4-telemetry-page/telemetry-for-component.d.ts +50 -0
- package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +90 -0
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.d.ts +3 -0
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.js +80 -0
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.types.d.ts +40 -0
- package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.types.js +6 -0
- package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.d.ts +23 -0
- package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.js +187 -0
- package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.types.d.ts +23 -0
- package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.types.js +6 -0
- package/lib/esm/components/c4-theme-switcher/cyberzee-removebg-preview-100.png +0 -0
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.d.ts +3 -0
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +39 -0
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.types.d.ts +18 -0
- package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.types.js +6 -0
- package/lib/esm/components/c4-toggle/c4-toggle.d.ts +3 -0
- package/lib/esm/components/c4-toggle/c4-toggle.js +16 -0
- package/lib/esm/components/c4-toggle/c4-toggle.types.d.ts +27 -0
- package/lib/esm/components/c4-toggle/c4-toggle.types.js +6 -0
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.d.ts +3 -0
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.js +14 -0
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.types.d.ts +14 -0
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.types.js +6 -0
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.utils.d.ts +6 -0
- package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.utils.js +21 -0
- package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.d.ts +3 -0
- package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js +15 -0
- package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.types.d.ts +30 -0
- package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.types.js +6 -0
- package/lib/esm/components/c4-usage-history/c4-usage-history.d.ts +3 -0
- package/lib/esm/components/c4-usage-history/c4-usage-history.js +79 -0
- package/lib/esm/components/c4-usage-history/c4-usage-history.types.d.ts +36 -0
- package/lib/esm/components/c4-usage-history/c4-usage-history.types.js +6 -0
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +35 -0
- package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +44 -0
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.d.ts +3 -0
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +107 -0
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.types.d.ts +50 -0
- package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.types.js +6 -0
- package/lib/esm/components/c4-user-details/c4-user-details.d.ts +3 -0
- package/lib/esm/components/c4-user-details/c4-user-details.js +46 -0
- package/lib/esm/components/c4-user-details/c4-user-details.types.d.ts +22 -0
- package/lib/esm/components/c4-user-details/c4-user-details.types.js +6 -0
- package/lib/esm/components/c4-user-details/tabs/authorized-resources.d.ts +20 -0
- package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +15 -0
- package/lib/esm/components/c4-user-details/tabs/details.d.ts +10 -0
- package/lib/esm/components/c4-user-details/tabs/details.js +17 -0
- package/lib/esm/components/c4-user-details/tabs/roles.d.ts +32 -0
- package/lib/esm/components/c4-user-details/tabs/roles.js +63 -0
- package/lib/esm/i18n/c4-console-i18n.d.ts +8 -0
- package/lib/esm/i18n/c4-console-i18n.js +138 -0
- package/lib/esm/i18n/en/components/fatalError.json +5 -0
- package/lib/esm/i18n/en/components/navbar.json +44 -0
- package/lib/esm/i18n/en/entities/orgroles.json +100 -0
- package/lib/esm/i18n/en/modals/alerts.json +99 -0
- package/lib/esm/i18n/en/modals/apiclients.json +151 -0
- package/lib/esm/i18n/en/modals/backups.json +66 -0
- package/lib/esm/i18n/en/modals/billing.json +192 -0
- package/lib/esm/i18n/en/modals/clusterclients.json +145 -0
- package/lib/esm/i18n/en/modals/clusters.json +177 -0
- package/lib/esm/i18n/en/modals/connectorsecrets.json +123 -0
- package/lib/esm/i18n/en/modals/createtrialorg.json +29 -0
- package/lib/esm/i18n/en/modals/invitations.json +48 -0
- package/lib/esm/i18n/en/modals/ipwhitelist.json +46 -0
- package/lib/esm/i18n/en/modals/usagealerts.json +40 -0
- package/lib/esm/i18n/en/modals/users.json +95 -0
- package/lib/esm/i18n/en/modals/validation.json +9 -0
- package/lib/esm/i18n/en/pages/clusterdetails.json +595 -0
- package/lib/esm/i18n/en/pages/clusters.json +77 -0
- package/lib/esm/i18n/en/pages/connectormanagement.json +8 -0
- package/lib/esm/i18n/en/pages/createcluster.json +90 -0
- package/lib/esm/i18n/en/pages/dashboard.json +94 -0
- package/lib/esm/i18n/en/pages/home.json +12 -0
- package/lib/esm/i18n/en/pages/job-dashboard.json +101 -0
- package/lib/esm/i18n/en/pages/orgmanagement.json +488 -0
- package/lib/esm/icons/c4-icons.d.ts +12 -0
- package/lib/esm/icons/c4-icons.js +28 -0
- package/lib/esm/icons/c4-icons.types.d.ts +3 -0
- package/lib/esm/icons/c4-icons.types.js +6 -0
- package/lib/esm/index.d.ts +210 -0
- package/lib/esm/index.js +112 -0
- package/lib/esm/index.scss +267 -0
- package/lib/esm/modals/c4-create-cluster-api-client-modal-handle.d.ts +3 -0
- package/lib/esm/modals/c4-create-cluster-api-client-modal-handle.js +12 -0
- package/lib/esm/modals/c4-create-connector-secret-modal-handle.d.ts +3 -0
- package/lib/esm/modals/c4-create-connector-secret-modal-handle.js +12 -0
- package/lib/esm/modals/c4-create-console-api-client-modal-handle.d.ts +3 -0
- package/lib/esm/modals/c4-create-console-api-client-modal-handle.js +12 -0
- package/lib/esm/modals/c4-invite-user-to-organization-modal-handle.d.ts +3 -0
- package/lib/esm/modals/c4-invite-user-to-organization-modal-handle.js +12 -0
- package/lib/esm/modals/c4-rename-organization-modal-handle.d.ts +3 -0
- package/lib/esm/modals/c4-rename-organization-modal-handle.js +12 -0
- package/lib/esm/notifications/c4-console-notifications-handle.d.ts +8 -0
- package/lib/esm/notifications/c4-console-notifications-handle.js +15 -0
- package/lib/esm/runtime/c4-console-authz.d.ts +31 -0
- package/lib/esm/runtime/c4-console-authz.js +191 -0
- package/lib/esm/runtime/c4-console-authz.spec.d.ts +1 -0
- package/lib/esm/runtime/c4-console-authz.spec.js +45 -0
- package/lib/esm/runtime/c4-console-data-context.d.ts +38 -0
- package/lib/esm/runtime/c4-console-data-context.js +229 -0
- package/lib/esm/runtime/c4-console-data-context.types.d.ts +49 -0
- package/lib/esm/runtime/c4-console-data-context.types.js +6 -0
- package/lib/esm/runtime/c4-console-data-store.d.ts +75 -0
- package/lib/esm/runtime/c4-console-data-store.js +440 -0
- package/lib/esm/runtime/c4-console-data-store.spec.d.ts +1 -0
- package/lib/esm/runtime/c4-console-data-store.spec.js +33 -0
- package/lib/esm/runtime/c4-console-notifications-context.d.ts +7 -0
- package/lib/esm/runtime/c4-console-notifications-context.js +76 -0
- package/lib/esm/runtime/c4-console-notifications-context.types.d.ts +34 -0
- package/lib/esm/runtime/c4-console-notifications-context.types.js +6 -0
- package/lib/esm/runtime/c4-console-runtime-context.d.ts +8 -0
- package/lib/esm/runtime/c4-console-runtime-context.js +13 -0
- package/lib/esm/runtime/c4-console-runtime.types.d.ts +45 -0
- package/lib/esm/runtime/c4-console-runtime.types.js +6 -0
- package/lib/esm/runtime/to-api-config.d.ts +3 -0
- package/lib/esm/runtime/to-api-config.js +31 -0
- package/lib/esm/runtime/to-identity-api-base-url.d.ts +5 -0
- package/lib/esm/runtime/to-identity-api-base-url.js +22 -0
- package/lib/esm/setupTests.d.ts +1 -0
- package/lib/esm/setupTests.js +37 -0
- package/lib/esm/themes/barbie-light.css +446 -0
- package/lib/esm/themes/barbie.css +446 -0
- package/lib/esm/themes/cyberpunk-brutalism-light.css +748 -0
- package/lib/esm/themes/cyberpunk-brutalism.css +956 -0
- package/lib/esm/themes/cyberpunk-rose-light.css +750 -0
- package/lib/esm/themes/cyberpunk-rose.css +958 -0
- package/lib/esm/themes/terminal-light.css +422 -0
- package/lib/esm/themes/terminal.css +474 -0
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.d.ts +4 -0
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +492 -0
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.types.d.ts +14 -0
- package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.types.js +6 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +5 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +1029 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +44 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.js +6 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +3 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +116 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +67 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +31 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.js +6 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-activity-tab.d.ts +12 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-activity-tab.js +31 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.d.ts +32 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +232 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-audit-log-tab.d.ts +12 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-audit-log-tab.js +5 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.d.ts +20 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +289 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +20 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +483 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +17 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +466 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.d.ts +15 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +256 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.d.ts +18 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +454 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.d.ts +17 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +205 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +43 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +750 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.d.ts +16 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +338 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +17 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +340 -0
- package/lib/esm/widgets/cluster-details/tabs/url-utils.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/tabs/url-utils.js +28 -0
- package/lib/esm/widgets/cluster-details/tabs/url-utils.test.d.ts +1 -0
- package/lib/esm/widgets/cluster-details/tabs/url-utils.test.js +34 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +4 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.js +682 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.spec.d.ts +1 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +155 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +49 -0
- package/lib/esm/widgets/clusters/c4-clusters-page.types.js +6 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.d.ts +4 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +76 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.types.d.ts +24 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.types.js +6 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.d.ts +4 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +76 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.types.d.ts +24 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.types.js +6 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +4 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.js +74 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.d.ts +1 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +140 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +18 -0
- package/lib/esm/widgets/connector-management/c4-connector-management-page.types.js +6 -0
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.d.ts +14 -0
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +97 -0
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +5 -0
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +841 -0
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.spec.d.ts +1 -0
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.spec.js +179 -0
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +29 -0
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.js +6 -0
- package/lib/esm/widgets/dashboard/c4-dashboard-app.d.ts +14 -0
- package/lib/esm/widgets/dashboard/c4-dashboard-app.js +456 -0
- package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +80 -0
- package/lib/esm/widgets/dashboard/c4-dashboard-app.types.js +6 -0
- package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +5 -0
- package/lib/esm/widgets/group-details/c4-group-details-page.js +193 -0
- package/lib/esm/widgets/group-details/c4-group-details-page.spec.d.ts +1 -0
- package/lib/esm/widgets/group-details/c4-group-details-page.spec.js +35 -0
- package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +17 -0
- package/lib/esm/widgets/group-details/c4-group-details-page.types.js +6 -0
- package/lib/esm/widgets/management/c4-management-app.d.ts +5 -0
- package/lib/esm/widgets/management/c4-management-app.js +2303 -0
- package/lib/esm/widgets/management/c4-management-app.types.d.ts +69 -0
- package/lib/esm/widgets/management/c4-management-app.types.js +6 -0
- package/lib/esm/widgets/management/c4-management-page.d.ts +3 -0
- package/lib/esm/widgets/management/c4-management-page.js +35 -0
- package/lib/esm/widgets/management/c4-management-page.spec.d.ts +1 -0
- package/lib/esm/widgets/management/c4-management-page.spec.js +40 -0
- package/lib/esm/widgets/management/c4-management-page.types.d.ts +11 -0
- package/lib/esm/widgets/management/c4-management-page.types.js +6 -0
- package/lib/esm/widgets/management/tabs/c4-management-activity-tab.d.ts +5 -0
- package/lib/esm/widgets/management/tabs/c4-management-activity-tab.js +5 -0
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.d.ts +61 -0
- package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +629 -0
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.d.ts +43 -0
- package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +340 -0
- package/lib/esm/widgets/management/tabs/c4-management-groups-tab.d.ts +13 -0
- package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +26 -0
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.d.ts +12 -0
- package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +85 -0
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.d.ts +20 -0
- package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +266 -0
- package/lib/esm/widgets/management/tabs/c4-management-settings-tab.d.ts +39 -0
- package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +103 -0
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +49 -0
- package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +72 -0
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.d.ts +25 -0
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +259 -0
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.d.ts +1 -0
- package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.js +65 -0
- package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +5 -0
- package/lib/esm/widgets/user-details/c4-user-details-page.js +591 -0
- package/lib/esm/widgets/user-details/c4-user-details-page.spec.d.ts +1 -0
- package/lib/esm/widgets/user-details/c4-user-details-page.spec.js +61 -0
- package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +29 -0
- package/lib/esm/widgets/user-details/c4-user-details-page.types.js +6 -0
- package/package.json +88 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { C4CreateConsoleApiClientModalHandle, C4CreateConsoleApiClientModalOpenParams } from '../components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.types';
|
|
2
|
+
export declare function setC4CreateConsoleApiClientModalHandle(next: C4CreateConsoleApiClientModalHandle | undefined): void;
|
|
3
|
+
export declare function openC4CreateConsoleApiClientModal(params: C4CreateConsoleApiClientModalOpenParams): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
let handle;
|
|
7
|
+
export function setC4CreateConsoleApiClientModalHandle(next) {
|
|
8
|
+
handle = next;
|
|
9
|
+
}
|
|
10
|
+
export function openC4CreateConsoleApiClientModal(params) {
|
|
11
|
+
handle?.open(params);
|
|
12
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { C4InviteUserToOrganizationModalHandle, C4InviteUserToOrganizationModalOpenParams } from '../components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.types';
|
|
2
|
+
export declare function setC4InviteUserToOrganizationModalHandle(handle: C4InviteUserToOrganizationModalHandle | undefined): void;
|
|
3
|
+
export declare function openC4InviteUserToOrganizationModal(params: C4InviteUserToOrganizationModalOpenParams): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
let inviteModalHandle;
|
|
7
|
+
export function setC4InviteUserToOrganizationModalHandle(handle) {
|
|
8
|
+
inviteModalHandle = handle;
|
|
9
|
+
}
|
|
10
|
+
export function openC4InviteUserToOrganizationModal(params) {
|
|
11
|
+
inviteModalHandle?.open(params);
|
|
12
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { C4RenameOrganizationModalHandle, C4RenameOrganizationModalOpenParams } from '../components/c4-rename-organization-modal/c4-rename-organization-modal.types';
|
|
2
|
+
export declare function setC4RenameOrganizationModalHandle(next: C4RenameOrganizationModalHandle | undefined): void;
|
|
3
|
+
export declare function openC4RenameOrganizationModal(params: C4RenameOrganizationModalOpenParams): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
let handle;
|
|
7
|
+
export function setC4RenameOrganizationModalHandle(next) {
|
|
8
|
+
handle = next;
|
|
9
|
+
}
|
|
10
|
+
export function openC4RenameOrganizationModal(params) {
|
|
11
|
+
handle?.open(params);
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AddC4ConsoleNotificationOptions } from '../runtime/c4-console-notifications-context.types';
|
|
2
|
+
export interface C4ConsoleNotificationsHandle {
|
|
3
|
+
add: (options: AddC4ConsoleNotificationOptions) => string;
|
|
4
|
+
removeById: (id: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const setC4ConsoleNotificationsHandle: (next: C4ConsoleNotificationsHandle | undefined) => void;
|
|
7
|
+
export declare const addC4ConsoleNotification: (options: AddC4ConsoleNotificationOptions) => string | undefined;
|
|
8
|
+
export declare const removeC4ConsoleNotificationById: (id: string) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
let handle;
|
|
7
|
+
export const setC4ConsoleNotificationsHandle = (next) => {
|
|
8
|
+
handle = next;
|
|
9
|
+
};
|
|
10
|
+
export const addC4ConsoleNotification = (options) => {
|
|
11
|
+
return handle?.add(options);
|
|
12
|
+
};
|
|
13
|
+
export const removeC4ConsoleNotificationById = (id) => {
|
|
14
|
+
handle?.removeById(id);
|
|
15
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type AccountsPermissions, ConsolePermissions } from '@camunda/ccma-shared-types';
|
|
2
|
+
export interface C4ConsoleAuthzFeatures {
|
|
3
|
+
console: ConsolePermissions.Features;
|
|
4
|
+
accounts?: AccountsPermissions.Features;
|
|
5
|
+
}
|
|
6
|
+
export interface C4ConsoleVisibilities {
|
|
7
|
+
clusters?: {
|
|
8
|
+
canCreate?: boolean;
|
|
9
|
+
canEdit?: boolean;
|
|
10
|
+
canDelete?: boolean;
|
|
11
|
+
canUpdateTag?: boolean;
|
|
12
|
+
canWake?: boolean;
|
|
13
|
+
canSeeClusterLoad?: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface C4ConsoleAuthzState {
|
|
17
|
+
tokenPermissions: string[];
|
|
18
|
+
orgRoles: string[];
|
|
19
|
+
features: C4ConsoleAuthzFeatures;
|
|
20
|
+
visibilities: C4ConsoleVisibilities;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
error?: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface DeriveConsoleAuthzParams {
|
|
25
|
+
accessToken: string;
|
|
26
|
+
orgId: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function deriveConsoleAuthzFromAccessToken(params: DeriveConsoleAuthzParams): Omit<C4ConsoleAuthzState, 'isLoading' | 'error'>;
|
|
29
|
+
export declare const useC4ConsoleAuthz: (params: {
|
|
30
|
+
orgId: string;
|
|
31
|
+
}) => C4ConsoleAuthzState;
|
|
@@ -0,0 +1,191 @@
|
|
|
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 { accountsUserFeaturesFromPermissions, ConsolePermissions, consoleUserFeaturesFromPermissions, OrganizationRole, } from '@camunda/ccma-shared-types';
|
|
7
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
8
|
+
import { useC4ConsoleRuntime } from './c4-console-runtime-context.js';
|
|
9
|
+
const AUTH0_BASE_CLAIM = 'https://camunda.com';
|
|
10
|
+
const AUTH0_TOKEN_ATTRIBUTE_ORGS = 'orgs';
|
|
11
|
+
function base64UrlDecodeToString(input) {
|
|
12
|
+
const padded = input
|
|
13
|
+
.replace(/-/g, '+')
|
|
14
|
+
.replace(/_/g, '/')
|
|
15
|
+
.padEnd(Math.ceil(input.length / 4) * 4, '=');
|
|
16
|
+
return atob(padded);
|
|
17
|
+
}
|
|
18
|
+
function tryDecodeJwtPayload(accessToken) {
|
|
19
|
+
const parts = accessToken.split('.');
|
|
20
|
+
if (parts.length < 2) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
const json = base64UrlDecodeToString(parts[1] ?? '');
|
|
25
|
+
const parsed = JSON.parse(json);
|
|
26
|
+
if (!parsed || typeof parsed !== 'object') {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
return parsed;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function stringArrayFromUnknown(input) {
|
|
36
|
+
if (!Array.isArray(input)) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
return input.filter((item) => typeof item === 'string');
|
|
40
|
+
}
|
|
41
|
+
function orgMembershipsFromUnknown(input) {
|
|
42
|
+
if (!Array.isArray(input)) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
return input
|
|
46
|
+
.map((item) => {
|
|
47
|
+
if (!item || typeof item !== 'object') {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
const maybe = item;
|
|
51
|
+
if (typeof maybe.id !== 'string') {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
id: maybe.id,
|
|
56
|
+
roles: stringArrayFromUnknown(maybe.roles),
|
|
57
|
+
};
|
|
58
|
+
})
|
|
59
|
+
.filter((item) => Boolean(item));
|
|
60
|
+
}
|
|
61
|
+
function hashString(input) {
|
|
62
|
+
let hash = 5381;
|
|
63
|
+
for (let i = 0; i < input.length; i += 1) {
|
|
64
|
+
hash = (hash * 33) ^ input.charCodeAt(i);
|
|
65
|
+
}
|
|
66
|
+
return (hash >>> 0).toString(36);
|
|
67
|
+
}
|
|
68
|
+
export function deriveConsoleAuthzFromAccessToken(params) {
|
|
69
|
+
const payload = tryDecodeJwtPayload(params.accessToken);
|
|
70
|
+
const tokenPermissions = stringArrayFromUnknown(payload?.permissions);
|
|
71
|
+
const orgsKey = `${AUTH0_BASE_CLAIM}/${AUTH0_TOKEN_ATTRIBUTE_ORGS}`;
|
|
72
|
+
const orgMemberships = orgMembershipsFromUnknown(payload?.[orgsKey]);
|
|
73
|
+
const orgRoles = orgMemberships.find((membership) => membership.id === params.orgId)
|
|
74
|
+
?.roles ?? [];
|
|
75
|
+
const features = {
|
|
76
|
+
console: consoleUserFeaturesFromPermissions(tokenPermissions),
|
|
77
|
+
accounts: accountsUserFeaturesFromPermissions(tokenPermissions),
|
|
78
|
+
};
|
|
79
|
+
const orgAdminRoles = new Set([
|
|
80
|
+
OrganizationRole.ADMIN,
|
|
81
|
+
OrganizationRole.OWNER,
|
|
82
|
+
OrganizationRole.ORGANIZATION_ADMIN,
|
|
83
|
+
OrganizationRole.ORGANIZATION_OWNER,
|
|
84
|
+
]);
|
|
85
|
+
const isOrgAdmin = orgRoles.some((role) => orgAdminRoles.has(role));
|
|
86
|
+
const clusters = features.console.clusters;
|
|
87
|
+
const visibilities = {
|
|
88
|
+
clusters: {
|
|
89
|
+
canCreate: isOrgAdmin || clusters.createOnBehalf,
|
|
90
|
+
canDelete: isOrgAdmin || clusters.canDeleteAllClusters,
|
|
91
|
+
canWake: clusters.canSendToSleep,
|
|
92
|
+
canEdit: isOrgAdmin ||
|
|
93
|
+
clusters.canMoveToOtherOrg ||
|
|
94
|
+
clusters.canOverrideEnvVars ||
|
|
95
|
+
clusters.canUpdateClusterPlanType ||
|
|
96
|
+
clusters.canUpgradeGeneration ||
|
|
97
|
+
clusters.canUpgradeGenerationYolo,
|
|
98
|
+
canUpdateTag: isOrgAdmin ||
|
|
99
|
+
clusters.canMoveToOtherOrg ||
|
|
100
|
+
clusters.canUpdateClusterPlanType ||
|
|
101
|
+
clusters.canOverrideEnvVars,
|
|
102
|
+
canSeeClusterLoad: clusters.canReadAllClusterInfo,
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
return {
|
|
106
|
+
tokenPermissions,
|
|
107
|
+
orgRoles,
|
|
108
|
+
features,
|
|
109
|
+
visibilities,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
const authzCache = new Map();
|
|
113
|
+
export const useC4ConsoleAuthz = (params) => {
|
|
114
|
+
const runtime = useC4ConsoleRuntime();
|
|
115
|
+
const hasResolvedOnceRef = useRef(false);
|
|
116
|
+
const [state, setState] = useState(() => ({
|
|
117
|
+
tokenPermissions: [],
|
|
118
|
+
orgRoles: [],
|
|
119
|
+
features: {
|
|
120
|
+
console: ConsolePermissions.createEmptyFeatures(),
|
|
121
|
+
accounts: undefined,
|
|
122
|
+
},
|
|
123
|
+
visibilities: {},
|
|
124
|
+
isLoading: true,
|
|
125
|
+
error: undefined,
|
|
126
|
+
}));
|
|
127
|
+
const orgId = params.orgId;
|
|
128
|
+
const cacheKeyPrefix = useMemo(() => {
|
|
129
|
+
return `org:${orgId}:stage:${runtime.stage}`;
|
|
130
|
+
}, [orgId, runtime.stage]);
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
let isCancelled = false;
|
|
133
|
+
async function run() {
|
|
134
|
+
// Avoid toggling back to a global loading state once we've already
|
|
135
|
+
// resolved permissions at least once. This prevents UI churn and
|
|
136
|
+
// repeated tab initialization when runtime/auth identities change.
|
|
137
|
+
if (!hasResolvedOnceRef.current) {
|
|
138
|
+
setState((previous) => ({
|
|
139
|
+
...previous,
|
|
140
|
+
isLoading: true,
|
|
141
|
+
error: undefined,
|
|
142
|
+
}));
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
setState((previous) => ({
|
|
146
|
+
...previous,
|
|
147
|
+
error: undefined,
|
|
148
|
+
}));
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
const accessToken = await runtime.auth.getAccessToken();
|
|
152
|
+
const cacheKey = `${cacheKeyPrefix}:token:${hashString(accessToken)}`;
|
|
153
|
+
const cached = authzCache.get(cacheKey);
|
|
154
|
+
if (cached) {
|
|
155
|
+
if (!isCancelled) {
|
|
156
|
+
setState(cached);
|
|
157
|
+
}
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const derived = deriveConsoleAuthzFromAccessToken({
|
|
161
|
+
accessToken,
|
|
162
|
+
orgId,
|
|
163
|
+
});
|
|
164
|
+
const resolved = {
|
|
165
|
+
...derived,
|
|
166
|
+
isLoading: false,
|
|
167
|
+
error: undefined,
|
|
168
|
+
};
|
|
169
|
+
authzCache.set(cacheKey, resolved);
|
|
170
|
+
if (!isCancelled) {
|
|
171
|
+
setState(resolved);
|
|
172
|
+
}
|
|
173
|
+
hasResolvedOnceRef.current = true;
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
if (!isCancelled) {
|
|
177
|
+
setState((previous) => ({
|
|
178
|
+
...previous,
|
|
179
|
+
isLoading: false,
|
|
180
|
+
error,
|
|
181
|
+
}));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
run();
|
|
186
|
+
return () => {
|
|
187
|
+
isCancelled = true;
|
|
188
|
+
};
|
|
189
|
+
}, [cacheKeyPrefix, orgId, runtime.auth]);
|
|
190
|
+
return state;
|
|
191
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { ConsolePermissions, OrganizationRole, } from '@camunda/ccma-shared-types';
|
|
7
|
+
import { describe, expect, it } from 'vitest';
|
|
8
|
+
import { deriveConsoleAuthzFromAccessToken } from './c4-console-authz.js';
|
|
9
|
+
function base64UrlEncode(input) {
|
|
10
|
+
return btoa(input).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/g, '');
|
|
11
|
+
}
|
|
12
|
+
function makeFakeJwt(payload) {
|
|
13
|
+
const header = { alg: 'none', typ: 'JWT' };
|
|
14
|
+
const encodedHeader = base64UrlEncode(JSON.stringify(header));
|
|
15
|
+
const encodedPayload = base64UrlEncode(JSON.stringify(payload));
|
|
16
|
+
return `${encodedHeader}.${encodedPayload}.`;
|
|
17
|
+
}
|
|
18
|
+
describe('deriveConsoleAuthzFromAccessToken', () => {
|
|
19
|
+
it('extracts permissions and org roles from the token', () => {
|
|
20
|
+
const token = makeFakeJwt({
|
|
21
|
+
permissions: [ConsolePermissions.CLUSTERS_DELETE_CLUSTER],
|
|
22
|
+
'https://camunda.com/orgs': [
|
|
23
|
+
{ id: 'org-1', roles: [OrganizationRole.ADMIN] },
|
|
24
|
+
{ id: 'org-2', roles: [OrganizationRole.VISITOR] },
|
|
25
|
+
],
|
|
26
|
+
});
|
|
27
|
+
const result = deriveConsoleAuthzFromAccessToken({
|
|
28
|
+
accessToken: token,
|
|
29
|
+
orgId: 'org-1',
|
|
30
|
+
});
|
|
31
|
+
expect(result.tokenPermissions).toContain(ConsolePermissions.CLUSTERS_DELETE_CLUSTER);
|
|
32
|
+
expect(result.orgRoles).toEqual([OrganizationRole.ADMIN]);
|
|
33
|
+
expect(result.features.console.clusters.canDeleteAllClusters).toBe(true);
|
|
34
|
+
expect(result.visibilities.clusters?.canDelete).toBe(true);
|
|
35
|
+
});
|
|
36
|
+
it('is safe on invalid tokens', () => {
|
|
37
|
+
const result = deriveConsoleAuthzFromAccessToken({
|
|
38
|
+
accessToken: 'not-a-jwt',
|
|
39
|
+
orgId: 'org-1',
|
|
40
|
+
});
|
|
41
|
+
expect(result.tokenPermissions).toEqual([]);
|
|
42
|
+
expect(result.orgRoles).toEqual([]);
|
|
43
|
+
expect(result.visibilities.clusters?.canDelete).toBe(false);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { C4ConsoleDataState } from './c4-console-data-context.types';
|
|
3
|
+
import { type ConsoleDataStoreSnapshotIn } from './c4-console-data-store';
|
|
4
|
+
export interface C4ConsoleDataProviderProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* Optional cache seed used once at provider initialization.
|
|
8
|
+
* Intended for tests to avoid network calls.
|
|
9
|
+
*/
|
|
10
|
+
initialState?: Partial<ConsoleDataStoreSnapshotIn>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Provider component for shared console data.
|
|
14
|
+
* Must be nested inside C4ConsoleRuntimeProvider.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <C4ConsoleRuntimeProvider config={runtime}>
|
|
18
|
+
* <C4ConsoleDataProvider>
|
|
19
|
+
* <C4DashboardApp orgId="123" />
|
|
20
|
+
* </C4ConsoleDataProvider>
|
|
21
|
+
* </C4ConsoleRuntimeProvider>
|
|
22
|
+
*/
|
|
23
|
+
export declare const C4ConsoleDataProvider: ({ children, initialState, }: C4ConsoleDataProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Hook to access shared console data state
|
|
26
|
+
*
|
|
27
|
+
* Must be used within C4ConsoleDataProvider.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const data = useC4ConsoleData()
|
|
31
|
+
*
|
|
32
|
+
* useEffect(() => {
|
|
33
|
+
* data.fetchClusters(orgId)
|
|
34
|
+
* }, [orgId])
|
|
35
|
+
*
|
|
36
|
+
* const clusters = data.getClusters(orgId) ?? []
|
|
37
|
+
*/
|
|
38
|
+
export declare const useC4ConsoleData: () => C4ConsoleDataState;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
|
4
|
+
* under one or more contributor license agreements. Licensed under a commercial license.
|
|
5
|
+
* You may not use this file except in compliance with the commercial license.
|
|
6
|
+
*/
|
|
7
|
+
import { SseEntity, SseType } from '@camunda/ccma-shared-types';
|
|
8
|
+
import { onSnapshot } from 'mobx-state-tree';
|
|
9
|
+
import { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, } from 'react';
|
|
10
|
+
import { addC4ConsoleNotification } from '../notifications/c4-console-notifications-handle.js';
|
|
11
|
+
import { ConsoleDataStore, } from './c4-console-data-store.js';
|
|
12
|
+
import { useC4ConsoleRuntime } from './c4-console-runtime-context.js';
|
|
13
|
+
/**
|
|
14
|
+
* Shared data context for C4 console widgets
|
|
15
|
+
*
|
|
16
|
+
* Provides centralized data caching to avoid duplicate API requests.
|
|
17
|
+
* Internal implementation uses MobX State Tree for reactive state.
|
|
18
|
+
* External API is pure React Context hooks (framework-agnostic).
|
|
19
|
+
*/
|
|
20
|
+
const DataContext = createContext(undefined);
|
|
21
|
+
/**
|
|
22
|
+
* Provider component for shared console data.
|
|
23
|
+
* Must be nested inside C4ConsoleRuntimeProvider.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <C4ConsoleRuntimeProvider config={runtime}>
|
|
27
|
+
* <C4ConsoleDataProvider>
|
|
28
|
+
* <C4DashboardApp orgId="123" />
|
|
29
|
+
* </C4ConsoleDataProvider>
|
|
30
|
+
* </C4ConsoleRuntimeProvider>
|
|
31
|
+
*/
|
|
32
|
+
export const C4ConsoleDataProvider = ({ children, initialState, }) => {
|
|
33
|
+
const runtime = useC4ConsoleRuntime();
|
|
34
|
+
const initialStateRef = useRef(initialState);
|
|
35
|
+
// Create store instance (stable across renders)
|
|
36
|
+
const store = useMemo(() => {
|
|
37
|
+
return ConsoleDataStore.create({
|
|
38
|
+
clusters: {},
|
|
39
|
+
members: {},
|
|
40
|
+
audits: {},
|
|
41
|
+
clusterCapacity: {},
|
|
42
|
+
...initialStateRef.current,
|
|
43
|
+
});
|
|
44
|
+
}, []);
|
|
45
|
+
// Re-render provider consumers whenever the MST store changes.
|
|
46
|
+
const [storeVersion, setStoreVersion] = useState(0);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
return onSnapshot(store, () => {
|
|
49
|
+
setStoreVersion((prev) => prev + 1);
|
|
50
|
+
});
|
|
51
|
+
}, [store]);
|
|
52
|
+
// Inject runtime config into store before child effects run
|
|
53
|
+
useLayoutEffect(() => {
|
|
54
|
+
store.setRuntime(runtime);
|
|
55
|
+
}, [runtime, store]);
|
|
56
|
+
// Stable action wrappers (avoid recreating function identities on every snapshot)
|
|
57
|
+
const fetchClusters = useCallback((orgId, options) => store.fetchClusters(orgId, options), [store]);
|
|
58
|
+
const fetchMembers = useCallback((orgId, options) => store.fetchMembers(orgId, options), [store]);
|
|
59
|
+
const fetchAudits = useCallback((orgId, options) => store.fetchAudits(orgId, options), [store]);
|
|
60
|
+
const fetchClusterCapacity = useCallback((orgId, clusterIds, options) => store.fetchClusterCapacity(orgId, clusterIds, options), [store]);
|
|
61
|
+
const invalidateClusters = useCallback((orgId) => store.invalidateClusters(orgId), [store]);
|
|
62
|
+
const invalidateClusterCapacity = useCallback((orgId) => store.invalidateClusterCapacity(orgId), [store]);
|
|
63
|
+
const invalidateMembers = useCallback((orgId) => store.invalidateMembers(orgId), [store]);
|
|
64
|
+
const invalidateAudits = useCallback((orgId) => store.invalidateAudits(orgId), [store]);
|
|
65
|
+
const invalidateAll = useCallback((orgId) => store.invalidateAll(orgId), [store]);
|
|
66
|
+
const getClusters = useCallback((orgId) => store.getClusters(orgId), [store]);
|
|
67
|
+
const getMembers = useCallback((orgId) => store.getMembers(orgId), [store]);
|
|
68
|
+
const getAudits = useCallback((orgId) => store.getAudits(orgId), [store]);
|
|
69
|
+
const getClusterCapacity = useCallback((orgId, clusterId) => store.getClusterCapacity(orgId, clusterId), [store]);
|
|
70
|
+
const getSseEntityVersion = useCallback((orgId, entity, clusterId) => store.getSseEntityVersion(orgId, entity, clusterId), [store]);
|
|
71
|
+
const api = useMemo(() => ({
|
|
72
|
+
get clusters() {
|
|
73
|
+
const result = {};
|
|
74
|
+
store.clusters.forEach((value, key) => {
|
|
75
|
+
result[key] = {
|
|
76
|
+
data: value.data,
|
|
77
|
+
isLoading: value.isLoading,
|
|
78
|
+
error: (value.error ?? undefined),
|
|
79
|
+
lastFetched: value.lastFetched ?? undefined,
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
return result;
|
|
83
|
+
},
|
|
84
|
+
get members() {
|
|
85
|
+
const result = {};
|
|
86
|
+
store.members.forEach((value, key) => {
|
|
87
|
+
result[key] = {
|
|
88
|
+
data: value.data,
|
|
89
|
+
isLoading: value.isLoading,
|
|
90
|
+
error: (value.error ?? undefined),
|
|
91
|
+
lastFetched: value.lastFetched ?? undefined,
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
return result;
|
|
95
|
+
},
|
|
96
|
+
get audits() {
|
|
97
|
+
const result = {};
|
|
98
|
+
store.audits.forEach((value, key) => {
|
|
99
|
+
result[key] = {
|
|
100
|
+
data: value.data,
|
|
101
|
+
isLoading: value.isLoading,
|
|
102
|
+
error: (value.error ?? undefined),
|
|
103
|
+
lastFetched: value.lastFetched ?? undefined,
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
return result;
|
|
107
|
+
},
|
|
108
|
+
get clusterCapacity() {
|
|
109
|
+
const result = {};
|
|
110
|
+
store.clusterCapacity.forEach((value, key) => {
|
|
111
|
+
result[key] = value;
|
|
112
|
+
});
|
|
113
|
+
return result;
|
|
114
|
+
},
|
|
115
|
+
// Actions
|
|
116
|
+
fetchClusters,
|
|
117
|
+
fetchMembers,
|
|
118
|
+
fetchAudits,
|
|
119
|
+
fetchClusterCapacity,
|
|
120
|
+
// Invalidation
|
|
121
|
+
invalidateClusters,
|
|
122
|
+
invalidateClusterCapacity,
|
|
123
|
+
invalidateMembers,
|
|
124
|
+
invalidateAudits,
|
|
125
|
+
invalidateAll,
|
|
126
|
+
// Convenience getters
|
|
127
|
+
getClusters,
|
|
128
|
+
getMembers,
|
|
129
|
+
getAudits,
|
|
130
|
+
getClusterCapacity,
|
|
131
|
+
getSseEntityVersion,
|
|
132
|
+
}), [
|
|
133
|
+
store,
|
|
134
|
+
storeVersion,
|
|
135
|
+
fetchClusters,
|
|
136
|
+
fetchMembers,
|
|
137
|
+
fetchAudits,
|
|
138
|
+
fetchClusterCapacity,
|
|
139
|
+
invalidateClusters,
|
|
140
|
+
invalidateClusterCapacity,
|
|
141
|
+
invalidateMembers,
|
|
142
|
+
invalidateAudits,
|
|
143
|
+
invalidateAll,
|
|
144
|
+
getClusters,
|
|
145
|
+
getMembers,
|
|
146
|
+
getAudits,
|
|
147
|
+
getClusterCapacity,
|
|
148
|
+
getSseEntityVersion,
|
|
149
|
+
]);
|
|
150
|
+
// Subscribe to console SSE updates (via window CustomEvent 'clusterchange')
|
|
151
|
+
useEffect(() => {
|
|
152
|
+
const handler = (event) => {
|
|
153
|
+
const detail = event.detail;
|
|
154
|
+
store.handleClusterChange(detail);
|
|
155
|
+
const parsed = detail;
|
|
156
|
+
const orgId = typeof parsed.org === 'string' ? parsed.org : undefined;
|
|
157
|
+
const entity = parsed.entity;
|
|
158
|
+
const sseType = parsed.type;
|
|
159
|
+
const clusterId = typeof parsed.clusterId === 'string' ? parsed.clusterId : undefined;
|
|
160
|
+
const payload = parsed.payload;
|
|
161
|
+
if (!orgId) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
// Only emit notifications for the org currently visible in the URL.
|
|
165
|
+
if (!window.location.pathname.includes(`/org/${orgId}`)) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (entity === SseEntity.CLUSTER &&
|
|
169
|
+
(sseType === SseType.CREATED || sseType === SseType.UPGRADED) &&
|
|
170
|
+
clusterId &&
|
|
171
|
+
typeof payload?.name === 'string') {
|
|
172
|
+
const clusterUrlPath = `/org/${orgId}/cluster/${clusterId}`;
|
|
173
|
+
const alreadyOnClusterPage = window.location.pathname.includes(clusterUrlPath);
|
|
174
|
+
if (!alreadyOnClusterPage) {
|
|
175
|
+
addC4ConsoleNotification({
|
|
176
|
+
title: 'Cluster ready for use',
|
|
177
|
+
subtitle: `${payload.name} is healthy and ready to use`,
|
|
178
|
+
action: {
|
|
179
|
+
text: 'Manage Cluster',
|
|
180
|
+
link: clusterUrlPath,
|
|
181
|
+
},
|
|
182
|
+
kind: 'success',
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if (entity === SseEntity.BACKUP &&
|
|
187
|
+
(sseType === SseType.CREATED || sseType === SseType.FAILED) &&
|
|
188
|
+
clusterId &&
|
|
189
|
+
typeof payload?.name === 'string') {
|
|
190
|
+
const clusterUrlPath = `/org/${orgId}/cluster/${clusterId}`;
|
|
191
|
+
addC4ConsoleNotification({
|
|
192
|
+
title: `Backup ${String(sseType)}`,
|
|
193
|
+
subtitle: `Backup ${payload.name} ${String(sseType)}`,
|
|
194
|
+
action: {
|
|
195
|
+
text: 'Manage Cluster',
|
|
196
|
+
link: clusterUrlPath,
|
|
197
|
+
},
|
|
198
|
+
kind: sseType === SseType.FAILED ? 'error' : 'success',
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
window.addEventListener('clusterchange', handler);
|
|
203
|
+
return () => {
|
|
204
|
+
window.removeEventListener('clusterchange', handler);
|
|
205
|
+
};
|
|
206
|
+
}, [store]);
|
|
207
|
+
return _jsx(DataContext.Provider, { value: api, children: children });
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Hook to access shared console data state
|
|
211
|
+
*
|
|
212
|
+
* Must be used within C4ConsoleDataProvider.
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* const data = useC4ConsoleData()
|
|
216
|
+
*
|
|
217
|
+
* useEffect(() => {
|
|
218
|
+
* data.fetchClusters(orgId)
|
|
219
|
+
* }, [orgId])
|
|
220
|
+
*
|
|
221
|
+
* const clusters = data.getClusters(orgId) ?? []
|
|
222
|
+
*/
|
|
223
|
+
export const useC4ConsoleData = () => {
|
|
224
|
+
const context = useContext(DataContext);
|
|
225
|
+
if (!context) {
|
|
226
|
+
throw new Error('useC4ConsoleData must be used within C4ConsoleDataProvider');
|
|
227
|
+
}
|
|
228
|
+
return context;
|
|
229
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { SseEntity } from '@camunda/ccma-shared-types';
|
|
2
|
+
/**
|
|
3
|
+
* Shared data cache state for C4 console widgets
|
|
4
|
+
*
|
|
5
|
+
* This provides a centralized cache to avoid duplicate API requests
|
|
6
|
+
* when multiple widgets need the same data (e.g., clusters, members).
|
|
7
|
+
*/
|
|
8
|
+
export interface CacheState<T> {
|
|
9
|
+
data: T | undefined;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
error: Error | undefined;
|
|
12
|
+
lastFetched: Date | undefined;
|
|
13
|
+
}
|
|
14
|
+
export type OrgCache<T> = Record<string, CacheState<T>>;
|
|
15
|
+
export interface C4ConsoleDataState {
|
|
16
|
+
clusters: OrgCache<any[]>;
|
|
17
|
+
members: OrgCache<any[]>;
|
|
18
|
+
audits: OrgCache<any[]>;
|
|
19
|
+
clusterCapacity: Record<string, Map<string, number>>;
|
|
20
|
+
fetchClusters: (orgId: string, options?: {
|
|
21
|
+
force?: boolean;
|
|
22
|
+
}) => Promise<void>;
|
|
23
|
+
fetchMembers: (orgId: string, options?: {
|
|
24
|
+
force?: boolean;
|
|
25
|
+
}) => Promise<void>;
|
|
26
|
+
fetchAudits: (orgId: string, options?: {
|
|
27
|
+
force?: boolean;
|
|
28
|
+
}) => Promise<void>;
|
|
29
|
+
fetchClusterCapacity: (orgId: string, clusterIds: string[], options?: {
|
|
30
|
+
force?: boolean;
|
|
31
|
+
}) => Promise<void>;
|
|
32
|
+
invalidateClusters: (orgId: string) => void;
|
|
33
|
+
invalidateClusterCapacity: (orgId: string) => void;
|
|
34
|
+
invalidateMembers: (orgId: string) => void;
|
|
35
|
+
invalidateAudits: (orgId: string) => void;
|
|
36
|
+
invalidateAll: (orgId: string) => void;
|
|
37
|
+
getClusters: (orgId: string) => any[] | undefined;
|
|
38
|
+
getMembers: (orgId: string) => any[] | undefined;
|
|
39
|
+
getAudits: (orgId: string) => any[] | undefined;
|
|
40
|
+
getClusterCapacity: (orgId: string, clusterId: string) => number | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a monotonically increasing number that changes when C4 observes an
|
|
43
|
+
* SSE event for the given entity.
|
|
44
|
+
*
|
|
45
|
+
* Widgets can use this in a `useEffect` dependency array to re-run their
|
|
46
|
+
* existing reload logic without directly subscribing to window events.
|
|
47
|
+
*/
|
|
48
|
+
getSseEntityVersion: (orgId: string, entity: SseEntity, clusterId?: string) => number;
|
|
49
|
+
}
|