@camunda/ccma-saas-frontend 0.0.46 → 0.3.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.
Files changed (371) hide show
  1. package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.d.ts +20 -3
  2. package/lib/esm/components/c4-actionable-notification/c4-actionable-notification.js +50 -17
  3. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +2 -1
  4. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +1 -6
  5. package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +4 -1
  6. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +1 -6
  7. package/lib/esm/components/c4-advanced-search-filters/OrSection.js +3 -1
  8. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +3 -1
  9. package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +2 -7
  10. package/lib/esm/components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js +7 -7
  11. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.js +1 -6
  12. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.d.ts +1 -0
  13. package/lib/esm/components/c4-app-teaser-card/c4-app-teaster-card.spec.js +43 -0
  14. package/lib/esm/components/c4-app-teaser-cards/c4-app-teaser-cards.js +1 -1
  15. package/lib/esm/components/c4-async-modal/c4-async-modal.js +3 -2
  16. package/lib/esm/components/c4-audit-log/c4-audit-log.js +4 -3
  17. package/lib/esm/components/c4-billing-page/c4-billing-page.js +8 -6
  18. package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.d.ts +3 -0
  19. package/lib/esm/components/c4-billing-page/c4-billing-page.mocks.js +154 -0
  20. package/lib/esm/components/c4-billing-page/elements/cluster-reservations.js +9 -14
  21. package/lib/esm/components/c4-billing-page/elements/current-usage-metrics.js +2 -1
  22. package/lib/esm/components/c4-billing-page/elements/usage-alerts.js +3 -8
  23. package/lib/esm/components/c4-billing-page/elements/value-metric.d.ts +2 -0
  24. package/lib/esm/components/c4-billing-page/elements/value-metric.js +15 -3
  25. package/lib/esm/components/c4-billing-page/elements/value-metric.spec.js +18 -0
  26. package/lib/esm/components/c4-bottom-links/c4-bottom-links.js +1 -6
  27. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +3 -6
  28. package/lib/esm/components/c4-charts-dashboard/c4-charts-dashboard.js +1 -1
  29. package/lib/esm/components/c4-charts-dashboard/elements/alluvial-chart.js +59 -2
  30. package/lib/esm/components/c4-charts-dashboard/elements/bar-chart.js +41 -7
  31. package/lib/esm/components/c4-charts-dashboard/elements/line-chart.js +7 -1
  32. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +6 -10
  33. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +8 -3
  34. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +8 -3
  35. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +6 -5
  36. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +12 -14
  37. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.d.ts +5 -0
  38. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.mocks.js +83 -0
  39. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +6 -10
  40. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.d.ts +6 -0
  41. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +79 -0
  42. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +8 -11
  43. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.d.ts +3 -0
  44. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +65 -0
  45. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +9 -4
  46. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +12 -8
  47. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.d.ts +60 -0
  48. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.mocks.js +143 -0
  49. package/lib/esm/components/c4-cluster-details-hot-backups-restore/c4-cluster-details-hot-backups-restore.js +3 -2
  50. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +7 -10
  51. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.d.ts +6 -0
  52. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.mocks.js +51 -0
  53. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +15 -21
  54. package/lib/esm/components/c4-cluster-list/c4-cluster-list.d.ts +1 -1
  55. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +69 -6
  56. package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.d.ts +4 -0
  57. package/lib/esm/components/c4-cluster-list/c4-cluster-list.mocks.js +132 -0
  58. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +7 -0
  59. package/lib/esm/components/c4-cluster-overview/applications.js +19 -4
  60. package/lib/esm/components/c4-cluster-overview/applications.spec.js +27 -1
  61. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +4 -3
  62. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +8 -0
  63. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +203 -0
  64. package/lib/esm/components/c4-cluster-overview/cluster-details.d.ts +2 -0
  65. package/lib/esm/components/c4-cluster-overview/cluster-details.js +68 -16
  66. package/lib/esm/components/c4-cluster-overview/cluster-load.js +39 -4
  67. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +1 -6
  68. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.d.ts +16 -0
  69. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.js +104 -0
  70. package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.d.ts +14 -0
  71. package/lib/esm/components/c4-cluster-settings/elements/app-integrations-toggle.js +12 -0
  72. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +5 -1
  73. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +10 -3
  74. package/lib/esm/components/c4-cluster-settings/elements/danger-zone.js +1 -6
  75. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +20 -0
  76. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +85 -0
  77. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.d.ts +1 -0
  78. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.spec.js +93 -0
  79. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +20 -0
  80. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +15 -0
  81. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.d.ts +1 -0
  82. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.spec.js +50 -0
  83. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.d.ts +10 -4
  84. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.js +117 -25
  85. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.d.ts +1 -0
  86. package/lib/esm/components/c4-cluster-settings/elements/optimize-filtering-settings.spec.js +120 -0
  87. package/lib/esm/components/c4-cluster-settings/elements/resource-based-authorizations.js +2 -7
  88. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +1 -6
  89. package/lib/esm/components/c4-cluster-settings/elements/tasklist-mode-toggle.js +1 -1
  90. package/lib/esm/components/c4-cluster-tag-selector/c4-cluster-tag-selector.js +23 -3
  91. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +18 -14
  92. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.d.ts +1 -0
  93. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.spec.js +40 -0
  94. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.types.d.ts +2 -0
  95. package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.js +4 -9
  96. package/lib/esm/components/c4-clusters-trial-notification/c4-clusters-trial-notification.types.d.ts +2 -0
  97. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +11 -7
  98. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.d.ts +2 -0
  99. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.mocks.js +186 -0
  100. package/lib/esm/components/c4-console-dashboard/elements/empty-state.js +2 -2
  101. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.d.ts +2 -0
  102. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +132 -0
  103. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.d.ts +2 -0
  104. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.js +20 -0
  105. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.d.ts +22 -0
  106. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.js +6 -0
  107. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +32 -0
  108. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +71 -0
  109. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.d.ts +1 -0
  110. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.spec.js +83 -0
  111. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +56 -54
  112. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.d.ts +64 -0
  113. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +298 -0
  114. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +51 -31
  115. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.d.ts +2 -0
  116. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.mocks.js +23 -0
  117. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.types.d.ts +2 -0
  118. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.js +4 -2
  119. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.d.ts +2 -0
  120. package/lib/esm/components/c4-create-connector-secret-modal/c4-create-connector-secret-modal.mocks.js +15 -0
  121. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +6 -5
  122. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.d.ts +2 -0
  123. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.mocks.js +13 -0
  124. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.types.d.ts +1 -0
  125. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.d.ts +2 -0
  126. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +77 -0
  127. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.d.ts +2 -0
  128. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.mocks.js +11 -0
  129. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.d.ts +14 -0
  130. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.types.js +6 -0
  131. package/lib/esm/components/c4-create-trial-organization-modal/c4-create-trial-organization-modal.js +2 -1
  132. package/lib/esm/components/c4-dashboard-first-launch/c4-dashboard-first-launch.js +1 -6
  133. package/lib/esm/components/c4-data-table/c4-data-table-skeleton.d.ts +15 -0
  134. package/lib/esm/components/c4-data-table/c4-data-table-skeleton.js +26 -0
  135. package/lib/esm/components/c4-data-table/c4-data-table.d.ts +3 -0
  136. package/lib/esm/components/c4-data-table/c4-data-table.js +277 -0
  137. package/lib/esm/components/c4-data-table/c4-data-table.spec.d.ts +1 -0
  138. package/lib/esm/components/c4-data-table/c4-data-table.spec.js +71 -0
  139. package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.d.ts +1 -0
  140. package/lib/esm/components/c4-data-table/c4-data-table.stability.spec.js +151 -0
  141. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +3 -2
  142. package/lib/esm/components/c4-empty-state/c4-empty-state.d.ts +47 -0
  143. package/lib/esm/components/c4-empty-state/c4-empty-state.js +33 -0
  144. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.d.ts +3 -0
  145. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.js +51 -0
  146. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.d.ts +1 -0
  147. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.spec.js +33 -0
  148. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.d.ts +8 -0
  149. package/lib/esm/components/c4-extend-trial-modal/c4-extend-trial-modal.types.js +1 -0
  150. package/lib/esm/components/c4-external-link/c4-external-link.js +1 -6
  151. package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.d.ts +40 -0
  152. package/lib/esm/components/c4-feedback-modal/c4-feedback-modal.js +109 -0
  153. package/lib/esm/components/c4-help-center/c4-help-center.d.ts +50 -0
  154. package/lib/esm/components/c4-help-center/c4-help-center.js +39 -0
  155. package/lib/esm/components/c4-inline-notification/c4-inline-notification.d.ts +15 -0
  156. package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +37 -0
  157. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +4 -3
  158. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.js +4 -2
  159. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.d.ts +2 -0
  160. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +231 -0
  161. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-chart-heading.js +1 -1
  162. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +3 -8
  163. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +56 -2
  164. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +37 -2
  165. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-worker-table.js +3 -3
  166. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +2 -1
  167. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.js +43 -46
  168. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.d.ts +2 -0
  169. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +102 -0
  170. package/lib/esm/components/c4-job-dashboard-shared/c4-background-fetching-indicator.js +1 -6
  171. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +10 -0
  172. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +16 -0
  173. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +1 -1
  174. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-table-heading-with-tooltip.js +1 -1
  175. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +1 -1
  176. package/lib/esm/components/c4-leave-organization-modal/c4-leave-organization-modal.js +1 -6
  177. package/lib/esm/components/c4-link-button/c4-link-button.js +1 -6
  178. package/lib/esm/components/c4-llm-usage-meter/c4-llm-usage-meter.js +1 -1
  179. package/lib/esm/components/c4-management-activity/c4-management-activity.d.ts +1 -1
  180. package/lib/esm/components/c4-management-activity/c4-management-activity.js +109 -9
  181. package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.d.ts +4 -0
  182. package/lib/esm/components/c4-management-activity/c4-management-activity.mocks.js +63 -0
  183. package/lib/esm/components/c4-management-activity/c4-management-activity.types.d.ts +11 -0
  184. package/lib/esm/components/c4-management-api/c4-management-api.js +9 -11
  185. package/lib/esm/components/c4-management-api/c4-management-api.mocks.d.ts +43 -0
  186. package/lib/esm/components/c4-management-api/c4-management-api.mocks.js +118 -0
  187. package/lib/esm/components/c4-management-overview/c4-management-overview.js +12 -14
  188. package/lib/esm/components/c4-management-settings/c4-management-settings.js +9 -11
  189. package/lib/esm/components/c4-management-users/c4-management-users.js +4 -9
  190. package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -2
  191. package/lib/esm/components/c4-multi-step-modal-ugly/c4-multi-step-modal-ugly.js +4 -2
  192. package/lib/esm/components/c4-navigation/c4-navigation.d.ts +55 -0
  193. package/lib/esm/components/c4-navigation/c4-navigation.js +175 -0
  194. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +3 -2
  195. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +1 -0
  196. package/lib/esm/components/c4-page-layout/c4-page-layout.d.ts +13 -0
  197. package/lib/esm/components/c4-page-layout/c4-page-layout.js +23 -0
  198. package/lib/esm/components/c4-page-template/c4-page-template.js +14 -3
  199. package/lib/esm/components/c4-permission-error-page/c4-permission-error-page.js +1 -1
  200. package/lib/esm/components/c4-pricing/c4-pricing.js +3 -7
  201. package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +1 -1
  202. package/lib/esm/components/c4-rename-organization-modal/c4-rename-organization-modal.js +1 -1
  203. package/lib/esm/components/c4-search/c4-search-results.js +2 -1
  204. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.d.ts +20 -0
  205. package/lib/esm/components/c4-selectable-tile/c4-selectable-tile.js +44 -0
  206. package/lib/esm/components/c4-sm-cluster-details/automation-components.js +2 -1
  207. package/lib/esm/components/c4-sm-cluster-details/c4-sm-cluster-details.js +1 -6
  208. package/lib/esm/components/c4-sm-cluster-details/custom-properties.js +4 -8
  209. package/lib/esm/components/c4-sm-cluster-details/details.js +5 -4
  210. package/lib/esm/components/c4-sm-cluster-details/zeebe-components.js +2 -1
  211. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.js +1 -1
  212. package/lib/esm/components/c4-sm-dashboard/c4-sm-dashboard.types.d.ts +1 -1
  213. package/lib/esm/components/c4-sm-dashboard/cluster-tile.js +2 -1
  214. package/lib/esm/components/c4-sm-dashboard/component-tile.js +2 -1
  215. package/lib/esm/components/c4-sm-dashboard/explore.js +1 -6
  216. package/lib/esm/components/c4-sm-dashboard/overview.js +1 -1
  217. package/lib/esm/components/c4-sm-dashboard/usage-tile.js +2 -1
  218. package/lib/esm/components/c4-stat/c4-stat.js +1 -6
  219. package/lib/esm/components/c4-stateful-button/c4-stateful-button.js +2 -1
  220. package/lib/esm/components/c4-structured-list/c4-structured-list.d.ts +21 -0
  221. package/lib/esm/components/c4-structured-list/c4-structured-list.js +75 -0
  222. package/lib/esm/components/c4-tabs/c4-tabs.js +2 -1
  223. package/lib/esm/components/c4-telemetry-page/c4-telemetry-page.js +6 -2
  224. package/lib/esm/components/c4-telemetry-page/component-metrics.js +1 -6
  225. package/lib/esm/components/c4-telemetry-page/telemetry-for-component.js +60 -37
  226. package/lib/esm/components/c4-telemetry-teaser-page/c4-telemetry-teaser-page.js +1 -1
  227. package/lib/esm/components/c4-theme-switcher/c4-theme-switcher.js +1 -1
  228. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
  229. package/lib/esm/components/c4-toast-notification/c4-toast-notification.d.ts +14 -0
  230. package/lib/esm/components/c4-toast-notification/c4-toast-notification.js +27 -0
  231. package/lib/esm/components/c4-toggle/c4-toggle.js +6 -8
  232. package/lib/esm/components/c4-tutorial-tile/c4-tutorial-tile.js +1 -1
  233. package/lib/esm/components/c4-usage-alert-update-modal/c4-usage-alert-update-modal.js +4 -2
  234. package/lib/esm/components/c4-usage-history/c4-usage-history.js +5 -3
  235. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +7 -1
  236. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +8 -7
  237. package/lib/esm/components/c4-user-details/c4-user-details.js +2 -2
  238. package/lib/esm/components/c4-user-details/tabs/authorized-resources.js +4 -2
  239. package/lib/esm/components/c4-user-details/tabs/details.js +6 -10
  240. package/lib/esm/components/c4-user-details/tabs/roles.js +3 -8
  241. package/lib/esm/components/shared-charts/ds-charts.smoke.spec.d.ts +1 -0
  242. package/lib/esm/components/shared-charts/ds-charts.smoke.spec.js +47 -0
  243. package/lib/esm/components/shared-charts/ds-line-chart.d.ts +33 -0
  244. package/lib/esm/components/shared-charts/ds-line-chart.js +55 -0
  245. package/lib/esm/components/shared-charts/ds-meter-chart.d.ts +22 -0
  246. package/lib/esm/components/shared-charts/ds-meter-chart.js +48 -0
  247. package/lib/esm/components/shared-charts/recharts-tokens.d.ts +24 -0
  248. package/lib/esm/components/shared-charts/recharts-tokens.js +51 -0
  249. package/lib/esm/externalUrls.const.d.ts +2 -0
  250. package/lib/esm/externalUrls.const.js +7 -0
  251. package/lib/esm/externalUrls.const.spec.js +2 -0
  252. package/lib/esm/i18n/c4-console-i18n.js +8 -0
  253. package/lib/esm/i18n/en/entities/orgroles.json +0 -16
  254. package/lib/esm/i18n/en/modals/clusters.json +0 -8
  255. package/lib/esm/i18n/en/pages/clusterdetails.json +14 -2
  256. package/lib/esm/i18n/en/pages/orgmanagement.json +12 -3
  257. package/lib/esm/index.d.ts +33 -1
  258. package/lib/esm/index.js +23 -1
  259. package/lib/esm/runtime/c4-console-authz.d.ts +26 -0
  260. package/lib/esm/runtime/c4-console-authz.js +59 -29
  261. package/lib/esm/runtime/c4-console-authz.spec.js +87 -20
  262. package/lib/esm/runtime/c4-console-data-context.js +40 -0
  263. package/lib/esm/runtime/c4-console-data-context.types.d.ts +19 -1
  264. package/lib/esm/runtime/c4-console-data-store.d.ts +25 -1
  265. package/lib/esm/runtime/c4-console-data-store.js +145 -31
  266. package/lib/esm/runtime/c4-console-data-store.nav.spec.d.ts +1 -0
  267. package/lib/esm/runtime/c4-console-data-store.nav.spec.js +121 -0
  268. package/lib/esm/runtime/c4-console-data-store.spec.js +35 -6
  269. package/lib/esm/runtime/c4-console-events-context.d.ts +18 -0
  270. package/lib/esm/runtime/c4-console-events-context.js +62 -0
  271. package/lib/esm/runtime/c4-console-runtime-context.d.ts +8 -1
  272. package/lib/esm/runtime/c4-console-runtime-context.js +50 -1
  273. package/lib/esm/runtime/c4-console-runtime.types.d.ts +20 -0
  274. package/lib/esm/runtime/c4-user-notifications-context.d.ts +19 -0
  275. package/lib/esm/runtime/c4-user-notifications-context.js +201 -0
  276. package/lib/esm/runtime/c4-user-notifications-context.spec.d.ts +1 -0
  277. package/lib/esm/runtime/c4-user-notifications-context.spec.js +80 -0
  278. package/lib/esm/runtime/c4-user-notifications-context.types.d.ts +31 -0
  279. package/lib/esm/runtime/c4-user-notifications-context.types.js +6 -0
  280. package/lib/esm/runtime/c4-user-theme.d.ts +27 -0
  281. package/lib/esm/runtime/c4-user-theme.js +106 -0
  282. package/lib/esm/runtime/decode-access-token.d.ts +12 -0
  283. package/lib/esm/runtime/decode-access-token.js +39 -0
  284. package/lib/esm/runtime/nav/camunda-apps.d.ts +45 -0
  285. package/lib/esm/runtime/nav/camunda-apps.js +100 -0
  286. package/lib/esm/runtime/nav/camunda-apps.spec.d.ts +1 -0
  287. package/lib/esm/runtime/nav/camunda-apps.spec.js +90 -0
  288. package/lib/esm/runtime/nav/use-webapp-nav-data.d.ts +75 -0
  289. package/lib/esm/runtime/nav/use-webapp-nav-data.js +211 -0
  290. package/lib/esm/runtime/nav/use-webapp-nav-data.spec.d.ts +1 -0
  291. package/lib/esm/runtime/nav/use-webapp-nav-data.spec.js +91 -0
  292. package/lib/esm/runtime/to-api-config.js +4 -0
  293. package/lib/esm/ui/c4-modal-dialog.d.ts +14 -0
  294. package/lib/esm/ui/c4-modal-dialog.js +35 -0
  295. package/lib/esm/ui/families.d.ts +42 -0
  296. package/lib/esm/ui/families.js +46 -0
  297. package/lib/esm/ui/index.d.ts +32 -0
  298. package/lib/esm/ui/index.js +95 -0
  299. package/lib/esm/ui/switchable.d.ts +14 -0
  300. package/lib/esm/ui/switchable.js +27 -0
  301. package/lib/esm/ui/tabs.d.ts +21 -0
  302. package/lib/esm/ui/tabs.js +27 -0
  303. package/lib/esm/widgets/cluster-client-details/c4-cluster-client-details-app.js +7 -5
  304. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +1 -0
  305. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +39 -15
  306. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.d.ts +1 -0
  307. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.merge.spec.js +49 -0
  308. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +8 -0
  309. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +1 -1
  310. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.spec.js +2 -0
  311. package/lib/esm/widgets/cluster-details/cluster-details-tabs.d.ts +23 -0
  312. package/lib/esm/widgets/cluster-details/cluster-details-tabs.js +83 -0
  313. package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.d.ts +1 -0
  314. package/lib/esm/widgets/cluster-details/cluster-details-tabs.spec.js +33 -0
  315. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.js +25 -88
  316. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +5 -3
  317. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +7 -5
  318. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +10 -6
  319. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +3 -1
  320. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +25 -39
  321. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +88 -35
  322. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.spec.js +134 -19
  323. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +12 -9
  324. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.d.ts +2 -0
  325. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +194 -6
  326. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.spec.js +60 -1
  327. package/lib/esm/widgets/clusters/c4-clusters-page.d.ts +1 -1
  328. package/lib/esm/widgets/clusters/c4-clusters-page.js +173 -81
  329. package/lib/esm/widgets/clusters/c4-clusters-page.spec.js +146 -13
  330. package/lib/esm/widgets/clusters/c4-clusters-page.types.d.ts +3 -0
  331. package/lib/esm/widgets/connector-management/c4-connector-management-executable-details-page.js +1 -1
  332. package/lib/esm/widgets/connector-management/c4-connector-management-executables-table-page.js +3 -2
  333. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.d.ts +4 -0
  334. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.js +59 -0
  335. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.d.ts +18 -0
  336. package/lib/esm/widgets/connector-management/c4-connector-management-outbound-details-page.types.js +6 -0
  337. package/lib/esm/widgets/connector-management/c4-connector-management-page.d.ts +1 -1
  338. package/lib/esm/widgets/connector-management/c4-connector-management-page.js +38 -5
  339. package/lib/esm/widgets/connector-management/c4-connector-management-page.spec.js +86 -0
  340. package/lib/esm/widgets/connector-management/c4-connector-management-page.types.d.ts +11 -0
  341. package/lib/esm/widgets/connector-management/c4-connector-management.shared.d.ts +1 -0
  342. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +14 -5
  343. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
  344. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +21 -2
  345. package/lib/esm/widgets/group-details/c4-group-details-page.js +3 -2
  346. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  347. package/lib/esm/widgets/management/c4-management-app.js +132 -23
  348. package/lib/esm/widgets/management/c4-management-app.spec.js +163 -1
  349. package/lib/esm/widgets/management/c4-management-app.types.d.ts +5 -0
  350. package/lib/esm/widgets/management/c4-management-page.js +1 -6
  351. package/lib/esm/widgets/management/management-tabs.d.ts +22 -0
  352. package/lib/esm/widgets/management/management-tabs.js +76 -0
  353. package/lib/esm/widgets/management/management-tabs.spec.d.ts +1 -0
  354. package/lib/esm/widgets/management/management-tabs.spec.js +28 -0
  355. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +4 -2
  356. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -1
  357. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +1 -1
  358. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.d.ts +3 -1
  359. package/lib/esm/widgets/management/tabs/c4-management-overview-tab.js +19 -3
  360. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +2 -1
  361. package/lib/esm/widgets/management/tabs/c4-management-settings-tab.js +1 -1
  362. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +1 -1
  363. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +13 -11
  364. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +37 -5
  365. package/lib/esm/widgets/management/tabs/c4-management-users-tab.spec.js +98 -0
  366. package/lib/esm/widgets/use-extend-trial.d.ts +8 -0
  367. package/lib/esm/widgets/use-extend-trial.js +36 -0
  368. package/lib/esm/widgets/use-extend-trial.spec.d.ts +1 -0
  369. package/lib/esm/widgets/use-extend-trial.spec.js +79 -0
  370. package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -14
  371. package/package.json +16 -7
@@ -1,17 +1,22 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { BackupStatus, ClusterEncryptionKey, OrganizationRole, SalesPlanType, } from '@camunda/ccma-shared-types';
3
- import { InlineNotification, Modal, Select, SelectItem, Stack, TextInput, } from '@carbon/react';
2
+ import { BackupStatus, ClusterEncryptionKey, isSupportedFailoverRegionPair, OrganizationRole, SalesPlanType, } from '@camunda/ccma-shared-types';
4
3
  import { observer } from 'mobx-react-lite';
5
- import { useCallback, useEffect, useMemo, useState } from 'react';
4
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
6
5
  import { C4ClusterList } from '../../components/c4-cluster-list/c4-cluster-list.js';
7
6
  import { C4ClustersEmptyState } from '../../components/c4-clusters-empty-state/c4-clusters-empty-state.js';
8
7
  import { C4ClustersTrialNotification } from '../../components/c4-clusters-trial-notification/c4-clusters-trial-notification.js';
8
+ import { C4ExtendTrialModal } from '../../components/c4-extend-trial-modal/c4-extend-trial-modal.js';
9
+ import { C4InlineNotification } from '../../components/c4-inline-notification/c4-inline-notification.js';
9
10
  import { getC4ClustersGettingStartedHref } from '../../externalUrls.const.js';
10
- import { useC4ConsoleAuthz } from '../../runtime/c4-console-authz.js';
11
+ import { addC4ConsoleNotification } from '../../notifications/c4-console-notifications-handle.js';
12
+ import { hasAvailableClusterReservation, isDeveloperBlockedFromClusterCreate, useC4ConsoleAuthz, } from '../../runtime/c4-console-authz.js';
11
13
  import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
12
14
  import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
13
15
  import { toApiConfig } from '../../runtime/to-api-config.js';
16
+ import { Checkbox, Modal, Stack, TextInput } from '../../ui/index.js';
17
+ import { useSelectFamily } from '../../ui/families.js';
14
18
  import { isClusterReconciliationPaused } from '../is-cluster-reconciliation-paused.js';
19
+ import { useExtendTrial } from '../use-extend-trial.js';
15
20
  function getString(record, key) {
16
21
  const value = record[key];
17
22
  return typeof value === 'string' ? value : undefined;
@@ -50,6 +55,17 @@ function getPathUnknown(record, path) {
50
55
  }
51
56
  return current;
52
57
  }
58
+ /**
59
+ * Backup picker row label: name, completion timestamp, and the generation the
60
+ * backup was taken on (what the failover cluster will run) — see #9117.
61
+ */
62
+ function formatFailoverBackupLabel(backup) {
63
+ const completed = backup.completed && backup.completed !== '-'
64
+ ? backup.completed
65
+ : backup.created;
66
+ const generation = backup.generationName ? ` · ${backup.generationName}` : '';
67
+ return `${backup.name} — ${completed}${generation}`;
68
+ }
53
69
  function normalizeStatus(input) {
54
70
  if (typeof input !== 'string') {
55
71
  return 'unknown';
@@ -162,6 +178,7 @@ function buildDefaultTranslations(t) {
162
178
  delete: translate('c4console:clusters.list.overflowMenu.delete', 'Delete'),
163
179
  resume: translate('c4console:clusters.list.overflowMenu.resume', 'Resume'),
164
180
  failover: translate('c4console:clusters.list.overflowMenu.failover', 'Failover'),
181
+ failoverSyncPending: translate('c4console:clusters.list.overflowMenu.failoverSyncPending', 'Failover (unavailable until backup data is synced to the secondary region)'),
165
182
  },
166
183
  tags: {
167
184
  addLabel: translate('c4console:clusters.tags.addLabel', 'Add tag'),
@@ -214,24 +231,32 @@ function mergePermissions(base, override) {
214
231
  }
215
232
  return { ...base, ...override };
216
233
  }
217
- export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate, translations, permissionsOverride, clusterCapMessage, isClusterPaused: isClusterPausedOverride, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride, onRequestAssignTag, onRequestDeleteCluster, onRequestWakeCluster, onRequestFailoverCluster, }) => {
234
+ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate, translations, permissionsOverride, clusterCapMessage, isClusterPaused: isClusterPausedOverride, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride, onRequestAssignTag, onRequestDeleteCluster, onRequestWakeCluster, onRequestFailoverCluster, onNeedsReload, }) => {
235
+ const { Select, SelectItem } = useSelectFamily();
218
236
  const resolvedGettingStartedHref = useMemo(() => getC4ClustersGettingStartedHref(gettingStartedHref), [gettingStartedHref]);
219
237
  const runtime = useC4ConsoleRuntime();
220
238
  const data = useC4ConsoleData();
221
239
  const authz = useC4ConsoleAuthz({ orgId });
222
240
  const isOrgAdmin = useMemo(() => {
241
+ // authz.orgRoles is the raw, un-normalized org-role claim (normalization
242
+ // only happens internally when deriving `orgPermissions`).
223
243
  const orgAdminRoles = new Set([
224
244
  OrganizationRole.ADMIN,
225
245
  OrganizationRole.OWNER,
226
- OrganizationRole.ORGANIZATION_ADMIN,
227
- OrganizationRole.ORGANIZATION_OWNER,
228
246
  ]);
229
- const roles = authz.orgRoles ?? [];
247
+ const roles = authz.orgRoles;
230
248
  return roles.some((role) => orgAdminRoles.has(role));
231
249
  }, [authz]);
232
250
  const apiConfig = useMemo(() => {
233
251
  return toApiConfig(runtime);
234
252
  }, [runtime]);
253
+ const [isExtendModalOpen, setIsExtendModalOpen] = useState(false);
254
+ const { submit: submitExtendTrial, isSubmitting: isExtendSubmitting, error: extendError, } = useExtendTrial(orgId, {
255
+ onSuccess: () => {
256
+ setIsExtendModalOpen(false);
257
+ onNeedsReload?.();
258
+ },
259
+ });
235
260
  const [deleteModalOpen, setDeleteModalOpen] = useState(false);
236
261
  const [deleteTarget, setDeleteTarget] = useState(undefined);
237
262
  const [deleteConfirmation, setDeleteConfirmation] = useState('');
@@ -242,10 +267,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
242
267
  const [selectedTag, setSelectedTag] = useState('');
243
268
  const [tagBusy, setTagBusy] = useState(false);
244
269
  const [tagError, setTagError] = useState(undefined);
245
- const [wakeModalOpen, setWakeModalOpen] = useState(false);
246
- const [wakeTarget, setWakeTarget] = useState(undefined);
247
- const [wakeBusy, setWakeBusy] = useState(false);
248
- const [wakeError, setWakeError] = useState(undefined);
270
+ const wakeInFlight = useRef(false);
249
271
  const [failoverModalOpen, setFailoverModalOpen] = useState(false);
250
272
  const [failoverTarget, setFailoverTarget] = useState(undefined);
251
273
  const [failoverBusy, setFailoverBusy] = useState(false);
@@ -253,6 +275,9 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
253
275
  const [failoverBackups, setFailoverBackups] = useState([]);
254
276
  const [failoverBackupsLoading, setFailoverBackupsLoading] = useState(false);
255
277
  const [failoverBackupsError, setFailoverBackupsError] = useState(false);
278
+ // Backups to clone into the failover cluster (BucketClone.spec.backups[]).
279
+ const [selectedCloneIds, setSelectedCloneIds] = useState([]);
280
+ // The single backup to restore from immediately; must be one of selectedCloneIds.
256
281
  const [selectedBackupId, setSelectedBackupId] = useState('');
257
282
  useEffect(() => {
258
283
  if (!orgId) {
@@ -488,10 +513,28 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
488
513
  typeof countdownDays === 'number' &&
489
514
  countdownDays <= 7 &&
490
515
  countdownDays >= 0;
516
+ const extensionsUsed = getOptionalNumber(organizationToSalesPlan, 'trialExtensionsUsed') ?? 0;
517
+ const canBillingUpdate = getPathUnknown(orgInfoRecord, [
518
+ 'permissions',
519
+ 'org',
520
+ 'billing',
521
+ 'update',
522
+ ]) === true;
523
+ const canSelfExtend = isTrial && trialStateExpired && extensionsUsed < 3 && canBillingUpdate;
524
+ const canSelfExtendForBanner = isTrial &&
525
+ !trialStateExpired &&
526
+ typeof countdownDays === 'number' &&
527
+ countdownDays <= 7 &&
528
+ countdownDays >= 0 &&
529
+ extensionsUsed < 3 &&
530
+ canBillingUpdate;
491
531
  return {
492
532
  isTrial,
493
533
  trialStateExpired,
494
534
  showClusterListBanner,
535
+ canSelfExtend,
536
+ canSelfExtendForBanner,
537
+ countdownDays,
495
538
  };
496
539
  }, [orgInfo]);
497
540
  const contactUrl = 'https://camunda.com/contact';
@@ -499,16 +542,24 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
499
542
  if (!trialState.showClusterListBanner) {
500
543
  return undefined;
501
544
  }
502
- const prelude = safeTranslate('c4console:clusters.list.banner.trialIsAboutToExpirePrelude', 'Your trial is about to expire.');
503
- const actionText = isOrgAdmin
504
- ? safeTranslate('c4console:clusters.list.banner.actionAdmin', 'Upgrade your plan to keep using Camunda.')
505
- : safeTranslate('c4console:clusters.list.banner.actionMember', 'Contact your admin to upgrade your plan.');
506
- return (_jsx(C4ClustersTrialNotification, { title: `${prelude} ${actionText}`, showUpgradeAction: isOrgAdmin, upgradeButtonLabel: safeTranslate('c4console:clusters.list.banner.upgradeButton', 'Upgrade'), onUpgradeClick: () => openUrlInNewTab(contactUrl) }));
545
+ const days = trialState.countdownDays;
546
+ const title = days === 0
547
+ ? safeTranslate('c4console:navbar.banner.trialExpiresToday', 'Modeling is free, but your free process execution trial ends today')
548
+ : days === 1
549
+ ? safeTranslate('c4console:navbar.banner.trialExpiresInOneDay', 'Modeling is free, but your free process execution trial ends tomorrow')
550
+ : safeTranslate('c4console:navbar.banner.trialExpiresInMultipleDays', `Modeling is free, but your free process execution trial ends in ${days ?? ''} days`, { days: days ?? '' });
551
+ return (_jsx(C4ClustersTrialNotification, { title: title, showUpgradeAction: isOrgAdmin, upgradeButtonLabel: safeTranslate('c4console:navbar.banner.upgradeButton', 'Contact us'), onUpgradeClick: () => openUrlInNewTab(contactUrl), extendTrialButtonLabel: trialState.canSelfExtendForBanner
552
+ ? safeTranslate('c4console:navbar.banner.extendTrial', 'Extend trial')
553
+ : undefined, onExtendTrialClick: trialState.canSelfExtendForBanner
554
+ ? () => setIsExtendModalOpen(true)
555
+ : undefined }));
507
556
  }, [
508
557
  contactUrl,
509
558
  isOrgAdmin,
510
559
  safeTranslate,
511
560
  trialState.showClusterListBanner,
561
+ trialState.countdownDays,
562
+ trialState.canSelfExtendForBanner,
512
563
  ]);
513
564
  const encryptionNotification = hasEncryptionWarning
514
565
  ? {
@@ -519,30 +570,41 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
519
570
  hideCloseButton: true,
520
571
  }
521
572
  : undefined;
522
- const orgFailoverLimitEnabled = useMemo(() => {
523
- if (!orgInfo || typeof orgInfo !== 'object')
524
- return false;
525
- const limits = getPathUnknown(orgInfo, [
573
+ const orgLimits = useMemo(() => orgInfo && typeof orgInfo === 'object'
574
+ ? getPathUnknown(orgInfo, [
526
575
  'organizationToSalesPlan',
527
576
  'limits',
528
- ]);
529
- return getBoolean(limits ?? {}, 'failover') === true;
530
- }, [orgInfo]);
577
+ ])
578
+ : undefined, [orgInfo]);
579
+ const orgFailoverLimitEnabled = useMemo(() => getBoolean(orgLimits ?? {}, 'failover') === true, [orgLimits]);
580
+ const developerBlockedFromClusterCreate = useMemo(() => isDeveloperBlockedFromClusterCreate({
581
+ developerNoClusterCreateLimit: getBoolean(orgLimits ?? {}, 'developerNoClusterCreate') === true,
582
+ orgRoles: authz.orgRoles,
583
+ }), [orgLimits, authz.orgRoles]);
584
+ const reservationAvailable = useMemo(() => hasAvailableClusterReservation({
585
+ clusterCount: rawClusters.length,
586
+ clusterPlanTypesToReserved: getPathUnknown(orgInfo, ['organizationToSalesPlan', 'clusterPlanTypesToReserved']),
587
+ }), [orgInfo, rawClusters.length]);
531
588
  const derivedPermissions = useMemo(() => {
532
589
  const clustersVisibility = authz.visibilities.clusters;
590
+ const canCreate = (clustersVisibility?.canCreate ?? false) &&
591
+ !developerBlockedFromClusterCreate &&
592
+ reservationAvailable;
533
593
  const base = {
534
- canCreateCluster: clustersVisibility?.canCreate ?? false,
594
+ canCreateCluster: canCreate,
535
595
  canEditCluster: clustersVisibility?.canEdit ?? false,
536
596
  canDeleteCluster: clustersVisibility?.canDelete ?? false,
537
597
  canUpdateTag: clustersVisibility?.canUpdateTag ?? false,
538
598
  canSeeClusterLoad: clustersVisibility?.canSeeClusterLoad ?? false,
539
599
  canWakeCluster: clustersVisibility?.canWake ?? false,
540
600
  canFailoverCluster: (clustersVisibility?.canFailover ?? false) && orgFailoverLimitEnabled,
541
- createClusterButtonDisabled: !(clustersVisibility?.canCreate ?? false),
601
+ createClusterButtonDisabled: !canCreate,
542
602
  };
543
603
  return mergePermissions(base, permissionsOverride);
544
604
  }, [
545
605
  authz.visibilities.clusters,
606
+ developerBlockedFromClusterCreate,
607
+ reservationAvailable,
546
608
  orgFailoverLimitEnabled,
547
609
  permissionsOverride,
548
610
  ]);
@@ -574,7 +636,9 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
574
636
  }
575
637
  if (trialState.isTrial && trialState.trialStateExpired) {
576
638
  const variant = isOrgAdmin ? 'trialExpiredAdmin' : 'trialExpiredMember';
577
- return (_jsx(C4ClustersEmptyState, { variant: variant, docsHref: resolvedGettingStartedHref, onUpgrade: isOrgAdmin ? () => openUrlInNewTab(contactUrl) : undefined, texts: {
639
+ return (_jsx(C4ClustersEmptyState, { variant: variant, docsHref: resolvedGettingStartedHref, onUpgrade: isOrgAdmin ? () => openUrlInNewTab(contactUrl) : undefined, onExtendTrial: trialState.canSelfExtend
640
+ ? () => setIsExtendModalOpen(true)
641
+ : undefined, texts: {
578
642
  noClusters: {
579
643
  heading: safeTranslate('c4console:clusters.emptyState.noClusters.heading', 'Processes run on clusters'),
580
644
  description: safeTranslate('c4console:clusters.emptyState.noClusters.description', 'Create a cluster to get started.'),
@@ -586,6 +650,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
586
650
  adminDescription: safeTranslate('c4console:clusters.list.trialExpired.admin.text', 'Upgrade your plan to continue using Camunda.'),
587
651
  memberDescription: safeTranslate('c4console:clusters.list.trialExpired.member.text', 'Contact your admin to upgrade your plan.'),
588
652
  upgradeButtonLabel: safeTranslate('c4console:clusters.list.trialExpired.admin.upgradeButton', 'Upgrade'),
653
+ extendTrialButtonLabel: safeTranslate('c4console:clusters.emptyState.extendTrialButton', 'Extend trial'),
589
654
  },
590
655
  } }));
591
656
  }
@@ -609,6 +674,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
609
674
  adminDescription: safeTranslate('c4console:clusters.list.trialExpired.admin.text', 'Upgrade your plan to continue using Camunda.'),
610
675
  memberDescription: safeTranslate('c4console:clusters.list.trialExpired.member.text', 'Contact your admin to upgrade your plan.'),
611
676
  upgradeButtonLabel: safeTranslate('c4console:clusters.list.trialExpired.admin.upgradeButton', 'Upgrade'),
677
+ extendTrialButtonLabel: safeTranslate('c4console:clusters.emptyState.extendTrialButton', 'Extend trial'),
612
678
  },
613
679
  } }));
614
680
  }, [
@@ -625,6 +691,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
625
691
  safeTranslate,
626
692
  trialState.isTrial,
627
693
  trialState.trialStateExpired,
694
+ trialState.canSelfExtend,
628
695
  urls.createCluster,
629
696
  ]);
630
697
  const handleDeleteCluster = (clusterId) => {
@@ -658,14 +725,39 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
658
725
  const handleWakeCluster = (clusterId) => {
659
726
  onRequestWakeCluster?.(clusterId);
660
727
  if (!onRequestWakeCluster) {
661
- const cluster = clusterById.get(clusterId);
662
- setWakeTarget({
663
- clusterId,
664
- clusterName: cluster?.name ?? clusterId,
665
- });
666
- setWakeError(undefined);
667
- setWakeModalOpen(true);
728
+ if (wakeInFlight.current)
729
+ return;
668
730
  runtime.telemetry?.track?.('c4Clusters.wake.requested', { clusterId });
731
+ wakeInFlight.current = true;
732
+ void (async () => {
733
+ try {
734
+ const { ConsoleClusterService } = await import('@camunda/ccma-api');
735
+ await ConsoleClusterService.wakeCluster({
736
+ config: apiConfig,
737
+ params: { orgId, clusterId },
738
+ });
739
+ data.invalidateClusters(orgId);
740
+ await data.fetchClusters(orgId, { force: true });
741
+ }
742
+ catch (error) {
743
+ runtime.telemetry?.captureException?.(error, {
744
+ widget: 'C4ClustersPage',
745
+ action: 'wake',
746
+ orgId,
747
+ clusterId,
748
+ });
749
+ addC4ConsoleNotification({
750
+ kind: 'error',
751
+ title: safeTranslate('c4console:clusters.notifications.wake.error.title', 'Failed to resume cluster'),
752
+ subtitle: error instanceof Error
753
+ ? error.message
754
+ : safeTranslate('c4console:clusters.notifications.wake.error.unknownError', 'Unknown error'),
755
+ });
756
+ }
757
+ finally {
758
+ wakeInFlight.current = false;
759
+ }
760
+ })();
669
761
  }
670
762
  };
671
763
  const handleFailoverCluster = (clusterId) => {
@@ -677,6 +769,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
677
769
  clusterName: cluster?.name ?? clusterId,
678
770
  });
679
771
  setFailoverError(undefined);
772
+ setSelectedCloneIds([]);
680
773
  setSelectedBackupId('');
681
774
  setFailoverBackups([]);
682
775
  setFailoverModalOpen(true);
@@ -722,8 +815,9 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
722
815
  const isRunningOnUnsupportedGenerationFallback = (clusterId) => {
723
816
  return unsupportedGenerationById.get(clusterId) ?? false;
724
817
  };
725
- const multiRegionClusterIds = useMemo(() => {
726
- const set = new Set();
818
+ const { multiRegionClusterIds, syncPendingClusterIds } = useMemo(() => {
819
+ const eligible = new Set();
820
+ const syncPending = new Set();
727
821
  for (const rawCluster of rawClusters) {
728
822
  // Failover requires a secondary region to fail over to. A selected
729
823
  // backup config (`backupRegionId`) is not enough — that config can be
@@ -735,6 +829,11 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
735
829
  backupRegionCodes.length <= 1) {
736
830
  continue;
737
831
  }
832
+ // Only surface failover for supported reverse-region pairs (#9120) —
833
+ // the backend enforces the same list as a backstop.
834
+ if (!isSupportedFailoverRegionPair(backupRegionCodes[0], backupRegionCodes[1])) {
835
+ continue;
836
+ }
738
837
  // Must use the same priority as mapClusterToListItem so the ID stored
739
838
  // here matches the row.id the action's visible() receives.
740
839
  const clusterId = getString(rawCluster, 'id') ??
@@ -742,12 +841,22 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
742
841
  getString(rawCluster, 'uuid') ??
743
842
  getString(rawCluster, 'clusterUuid');
744
843
  if (clusterId) {
745
- set.add(clusterId);
844
+ eligible.add(clusterId);
845
+ // Failover is only safe once the initial primary→secondary bucket
846
+ // sync has completed — until then the action is shown disabled with
847
+ // a reason (#9141). The backend enforces the same gate as a backstop.
848
+ if (rawCluster.secondaryBucketSyncCompleted !== true) {
849
+ syncPending.add(clusterId);
850
+ }
746
851
  }
747
852
  }
748
- return set;
853
+ return {
854
+ multiRegionClusterIds: eligible,
855
+ syncPendingClusterIds: syncPending,
856
+ };
749
857
  }, [rawClusters]);
750
858
  const isMultiRegionClusterFallback = useCallback((clusterId) => multiRegionClusterIds.has(clusterId), [multiRegionClusterIds]);
859
+ const isFailoverSyncPending = useCallback((clusterId) => syncPendingClusterIds.has(clusterId), [syncPendingClusterIds]);
751
860
  const isPageLoading = isLoading || authz.isLoading;
752
861
  useEffect(() => {
753
862
  if (!error) {
@@ -758,7 +867,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
758
867
  orgId,
759
868
  });
760
869
  }, [error, orgId, runtime.telemetry]);
761
- return (_jsxs(_Fragment, { children: [_jsx(C4ClusterList, { orgId: orgId, clusters: clusters, loading: isPageLoading, urls: urls, permissions: derivedPermissions, onNavigate: handleNavigate, onDeleteCluster: handleDeleteCluster, onAssignTag: handleAssignTag, onWakeCluster: handleWakeCluster, onFailoverCluster: handleFailoverCluster, trialNotification: derivedTrialNotification, encryptionNotification: encryptionNotification, clusterCapMessage: clusterCapMessage, emptyStateContent: derivedEmptyStateContent, translations: resolvedTranslations, isClusterPaused: isClusterPausedOverride ?? isClusterPausedFallback, isMultiRegionCluster: isMultiRegionClusterFallback, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride ??
870
+ return (_jsxs(_Fragment, { children: [_jsx(C4ClusterList, { orgId: orgId, clusters: clusters, loading: isPageLoading, urls: urls, permissions: derivedPermissions, onNavigate: handleNavigate, onDeleteCluster: handleDeleteCluster, onAssignTag: handleAssignTag, onWakeCluster: handleWakeCluster, onFailoverCluster: handleFailoverCluster, trialNotification: derivedTrialNotification, encryptionNotification: encryptionNotification, clusterCapMessage: clusterCapMessage, emptyStateContent: derivedEmptyStateContent, translations: resolvedTranslations, isClusterPaused: isClusterPausedOverride ?? isClusterPausedFallback, isMultiRegionCluster: isMultiRegionClusterFallback, isFailoverSyncPending: isFailoverSyncPending, isRunningOnUnsupportedGeneration: isRunningOnUnsupportedGenerationOverride ??
762
871
  isRunningOnUnsupportedGenerationFallback }), deleteTarget ? (_jsx(Modal, { open: deleteModalOpen, danger: true, modalHeading: safeTranslate('clustermodals:delete.heading', 'Delete cluster'), primaryButtonText: safeTranslate('clustermodals:delete.buttons.primary', 'Delete'), secondaryButtonText: safeTranslate('clustermodals:delete.buttons.secondary', 'Cancel'), primaryButtonDisabled: deleteBusy || deleteConfirmation.trim() !== 'DELETE', onRequestClose: () => {
763
872
  if (deleteBusy)
764
873
  return;
@@ -792,7 +901,7 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
792
901
  finally {
793
902
  setDeleteBusy(false);
794
903
  }
795
- }, children: _jsxs(Stack, { gap: 4, children: [deleteError ? (_jsx(InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate('clustermodals:delete.error.generic', 'Error deleting cluster'), subtitle: deleteError, hideCloseButton: true })) : null, _jsx("p", { children: safeTranslate('clustermodals:delete.description', `This will permanently delete ${deleteTarget.clusterName}.`, { clusterName: deleteTarget.clusterName }) }), _jsx(TextInput, { id: 'c4-delete-cluster-confirmation', labelText: safeTranslate('clustermodals:delete.confirm.label', 'Type the word DELETE to confirm'), value: deleteConfirmation, onChange: (e) => setDeleteConfirmation(e.target.value), disabled: deleteBusy })] }) })) : null, tagTarget ? (_jsx(Modal, { open: tagModalOpen, modalHeading: safeTranslate('clustermodals:assignTag.heading', 'Assign cluster tag'), primaryButtonText: safeTranslate('clustermodals:assignTag.buttons.primary', 'Assign'), secondaryButtonText: safeTranslate('clustermodals:assignTag.buttons.secondary', 'Cancel'), primaryButtonDisabled: tagBusy || selectedTag === '', onRequestClose: () => {
904
+ }, children: _jsxs(Stack, { gap: 4, children: [deleteError ? (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate('clustermodals:delete.error.generic', 'Error deleting cluster'), subtitle: deleteError, hideCloseButton: true })) : null, _jsx("p", { children: safeTranslate('clustermodals:delete.description', `This will permanently delete ${deleteTarget.clusterName}.`, { clusterName: deleteTarget.clusterName }) }), _jsx(TextInput, { id: 'c4-delete-cluster-confirmation', labelText: safeTranslate('clustermodals:delete.confirm.label', 'Type the word DELETE to confirm'), value: deleteConfirmation, onChange: (e) => setDeleteConfirmation(e.target.value), disabled: deleteBusy })] }) })) : null, tagTarget ? (_jsx(Modal, { open: tagModalOpen, modalHeading: safeTranslate('clustermodals:assignTag.heading', 'Assign cluster tag'), primaryButtonText: safeTranslate('clustermodals:assignTag.buttons.primary', 'Assign'), secondaryButtonText: safeTranslate('clustermodals:assignTag.buttons.secondary', 'Cancel'), primaryButtonDisabled: tagBusy || selectedTag === '', onRequestClose: () => {
796
905
  if (tagBusy)
797
906
  return;
798
907
  setTagModalOpen(false);
@@ -830,50 +939,21 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
830
939
  finally {
831
940
  setTagBusy(false);
832
941
  }
833
- }, children: _jsxs(Stack, { gap: 4, children: [tagError ? (_jsx(InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate('clustermodals:assignTag.errorMessage', 'Error assigning tag'), subtitle: tagError, hideCloseButton: true })) : null, _jsx("p", { children: safeTranslate('clustermodals:assignTag.description', `Assign an environment tag to ${tagTarget.clusterName}.`) }), _jsxs(Select, { id: 'c4-assign-cluster-tag', labelText: safeTranslate('clustermodals:assignTag.label', 'Tag'), value: selectedTag, disabled: tagBusy, onChange: (e) => {
942
+ }, children: _jsxs(Stack, { gap: 4, children: [tagError ? (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate('clustermodals:assignTag.errorMessage', 'Error assigning tag'), subtitle: tagError, hideCloseButton: true })) : null, _jsx("p", { children: safeTranslate('clustermodals:assignTag.description', `Assign an environment tag to ${tagTarget.clusterName}.`) }), _jsxs(Select, { id: 'c4-assign-cluster-tag', labelText: safeTranslate('clustermodals:assignTag.label', 'Tag'), value: selectedTag, disabled: tagBusy, onChange: (e) => {
834
943
  const value = e.target.value;
835
944
  setSelectedTag(value);
836
- }, children: [_jsx(SelectItem, { value: '', text: 'Select a tag' }), _jsx(SelectItem, { value: 'dev', text: 'dev' }), _jsx(SelectItem, { value: 'test', text: 'test' }), _jsx(SelectItem, { value: 'stage', text: 'stage' }), _jsx(SelectItem, { value: 'prod', text: 'prod' })] })] }) })) : null, wakeTarget ? (_jsx(Modal, { open: wakeModalOpen, modalHeading: safeTranslate('clustermodals:resume.heading', 'Resume cluster'), primaryButtonText: safeTranslate('clustermodals:resume.buttons.primary', 'Resume'), secondaryButtonText: safeTranslate('clustermodals:resume.buttons.secondary', 'Cancel'), primaryButtonDisabled: wakeBusy, onRequestClose: () => {
837
- if (wakeBusy)
838
- return;
839
- setWakeModalOpen(false);
840
- }, onRequestSubmit: async () => {
841
- if (wakeBusy)
842
- return;
843
- setWakeError(undefined);
844
- setWakeBusy(true);
845
- try {
846
- const { ConsoleClusterService } = await import('@camunda/ccma-api');
847
- await ConsoleClusterService.wakeCluster({
848
- config: apiConfig,
849
- params: { orgId, clusterId: wakeTarget.clusterId },
850
- });
851
- data.invalidateClusters(orgId);
852
- await data.fetchClusters(orgId, { force: true });
853
- setWakeModalOpen(false);
854
- }
855
- catch (error) {
856
- const message = error instanceof Error ? error.message : 'Unknown error';
857
- setWakeError(message);
858
- runtime.telemetry?.captureException?.(error, {
859
- widget: 'C4ClustersPage',
860
- action: 'wake',
861
- orgId,
862
- clusterId: wakeTarget.clusterId,
863
- });
864
- }
865
- finally {
866
- setWakeBusy(false);
867
- }
868
- }, children: _jsxs(Stack, { gap: 4, children: [wakeError ? (_jsx(InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate('clustermodals:resume.errorMessage', 'Error resuming cluster'), subtitle: wakeError, hideCloseButton: true })) : null, _jsx("p", { children: safeTranslate('clustermodals:resume.description', `Resume ${wakeTarget.clusterName}?`) })] }) })) : null, failoverTarget ? (_jsx(Modal, { open: failoverModalOpen, modalHeading: safeTranslate('clustermodals:failover.heading', 'Failover cluster'), primaryButtonText: safeTranslate('clustermodals:failover.buttons.primary', 'Start failover'), secondaryButtonText: safeTranslate('clustermodals:failover.buttons.secondary', 'Cancel'), primaryButtonDisabled: failoverBusy ||
945
+ }, children: [_jsx(SelectItem, { value: '', text: 'Select a tag' }), _jsx(SelectItem, { value: 'dev', text: 'dev' }), _jsx(SelectItem, { value: 'test', text: 'test' }), _jsx(SelectItem, { value: 'stage', text: 'stage' }), _jsx(SelectItem, { value: 'prod', text: 'prod' })] })] }) })) : null, failoverTarget ? (_jsx(Modal, { open: failoverModalOpen, modalHeading: safeTranslate('clustermodals:failover.heading', 'Failover cluster'), primaryButtonText: safeTranslate('clustermodals:failover.buttons.primary', 'Start failover'), secondaryButtonText: safeTranslate('clustermodals:failover.buttons.secondary', 'Cancel'), primaryButtonDisabled: failoverBusy ||
869
946
  failoverBackupsLoading ||
870
947
  failoverBackupsError ||
948
+ selectedCloneIds.length === 0 ||
871
949
  selectedBackupId === '', onRequestClose: () => {
872
950
  if (failoverBusy)
873
951
  return;
874
952
  setFailoverModalOpen(false);
875
953
  }, onRequestSubmit: async () => {
876
- if (failoverBusy || selectedBackupId === '')
954
+ if (failoverBusy ||
955
+ selectedCloneIds.length === 0 ||
956
+ selectedBackupId === '')
877
957
  return;
878
958
  setFailoverError(undefined);
879
959
  setFailoverBusy(true);
@@ -884,7 +964,10 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
884
964
  params: {
885
965
  orgId,
886
966
  clusterId: failoverTarget.clusterId,
887
- backupId: selectedBackupId,
967
+ },
968
+ body: {
969
+ backupIds: selectedCloneIds,
970
+ restoreBackupId: selectedBackupId,
888
971
  },
889
972
  });
890
973
  // Refresh regardless — the new cluster exists even on partial failure.
@@ -893,7 +976,6 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
893
976
  const stepLabels = {
894
977
  backupClone: 'Backup clone',
895
978
  restore: 'Restore',
896
- secureConnectivity: 'Secure connectivity',
897
979
  };
898
980
  const failedSteps = Object.entries(result.results).filter((entry) => typeof entry[1] === 'object' && 'error' in entry[1]);
899
981
  if (failedSteps.length > 0) {
@@ -927,11 +1009,21 @@ export const C4ClustersPage = observer(({ orgId, gettingStartedHref, onNavigate,
927
1009
  finally {
928
1010
  setFailoverBusy(false);
929
1011
  }
930
- }, children: _jsxs(Stack, { gap: 4, children: [failoverBackupsError ? (_jsx(InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate('clustermodals:failover.backup.error.title', 'Could not load backups'), subtitle: safeTranslate('clustermodals:failover.backup.error.subtitle', 'Failed to fetch backups for this cluster. Check your connection and try again.'), hideCloseButton: true })) : null, failoverError ? (_jsx(InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate('clustermodals:failover.error.generic', 'Failover failed'), subtitle: failoverError, hideCloseButton: true })) : null, _jsx("p", { children: safeTranslate('clustermodals:failover.description', `This will create a new cluster in the secondary region using a backup from ${failoverTarget.clusterName}. The original cluster will remain unchanged.`, { clusterName: failoverTarget.clusterName }) }), _jsxs(Select, { id: 'c4-failover-backup-select', labelText: safeTranslate('clustermodals:failover.backup.label', 'Select backup to restore from'), value: selectedBackupId, disabled: failoverBusy || failoverBackupsLoading, onChange: (e) => setSelectedBackupId(e.target.value), children: [_jsx(SelectItem, { value: '', text: failoverBackupsLoading
1012
+ }, children: _jsxs(Stack, { gap: 4, children: [failoverBackupsError ? (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate('clustermodals:failover.backup.error.title', 'Could not load backups'), subtitle: safeTranslate('clustermodals:failover.backup.error.subtitle', 'Failed to fetch backups for this cluster. Check your connection and try again.'), hideCloseButton: true })) : null, failoverError ? (_jsx(C4InlineNotification, { kind: 'error', lowContrast: true, title: safeTranslate('clustermodals:failover.error.generic', 'Failover failed'), subtitle: failoverError, hideCloseButton: true })) : null, _jsx("p", { children: safeTranslate('clustermodals:failover.description', `This will create a new cluster in the secondary region using a backup from ${failoverTarget.clusterName}. The original cluster will remain unchanged.`, { clusterName: failoverTarget.clusterName }) }), _jsxs("div", { children: [_jsx("p", { children: safeTranslate('clustermodals:failover.clone.label', 'Select backups to make available on the new cluster') }), failoverBackupsLoading ? (_jsx("p", { children: safeTranslate('clustermodals:failover.backup.loading', 'Loading backups…') })) : failoverBackups.length === 0 ? (_jsx("p", { children: safeTranslate('clustermodals:failover.backup.none', 'No completed backups available') })) : (failoverBackups.map((backup) => (_jsx(Checkbox, { id: `c4-failover-clone-${backup.uuid}`, labelText: formatFailoverBackupLabel(backup), checked: selectedCloneIds.includes(backup.uuid), disabled: failoverBusy, onChange: (_event, { checked }) => {
1013
+ setSelectedCloneIds((previous) => checked
1014
+ ? [...previous, backup.uuid]
1015
+ : previous.filter((id) => id !== backup.uuid));
1016
+ // The restore target must stay one of the selected clones.
1017
+ if (!checked && selectedBackupId === backup.uuid) {
1018
+ setSelectedBackupId('');
1019
+ }
1020
+ } }, backup.uuid))))] }), _jsxs(Select, { id: 'c4-failover-backup-select', labelText: safeTranslate('clustermodals:failover.backup.label', 'Select backup to restore from'), value: selectedBackupId, disabled: failoverBusy || failoverBackupsLoading, onChange: (e) => setSelectedBackupId(e.target.value), children: [_jsx(SelectItem, { value: '', text: failoverBackupsLoading
931
1021
  ? safeTranslate('clustermodals:failover.backup.loading', 'Loading backups…')
932
1022
  : failoverBackupsError
933
1023
  ? safeTranslate('clustermodals:failover.backup.error.select', 'Backup list unavailable')
934
- : failoverBackups.length === 0
935
- ? safeTranslate('clustermodals:failover.backup.none', 'No completed backups available')
936
- : safeTranslate('clustermodals:failover.backup.placeholder', 'Select a backup') }), failoverBackups.map((backup) => (_jsx(SelectItem, { value: backup.uuid, text: `${backup.name} — ${backup.created}` }, backup.uuid)))] })] }) })) : null] }));
1024
+ : selectedCloneIds.length === 0
1025
+ ? safeTranslate('clustermodals:failover.backup.noneSelected', 'Select backups above first')
1026
+ : safeTranslate('clustermodals:failover.backup.placeholder', 'Select a backup') }), failoverBackups
1027
+ .filter((backup) => selectedCloneIds.includes(backup.uuid))
1028
+ .map((backup) => (_jsx(SelectItem, { value: backup.uuid, text: formatFailoverBackupLabel(backup) }, backup.uuid)))] })] }) })) : null, isExtendModalOpen && (_jsx(C4ExtendTrialModal, { isOpen: isExtendModalOpen, onClose: () => setIsExtendModalOpen(false), onSubmit: submitExtendTrial, isSubmitting: isExtendSubmitting, error: extendError }))] }));
937
1029
  });