@camunda/ccma-saas-frontend 0.7.2 → 0.8.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 (95) hide show
  1. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +5 -1
  2. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +9 -0
  3. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +6 -3
  4. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.types.d.ts +3 -0
  5. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +9 -0
  6. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +2 -0
  7. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.types.d.ts +2 -0
  8. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.d.ts +1 -1
  9. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +11 -18
  10. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts +19 -2
  11. package/lib/esm/components/c4-cluster-overview/applications.d.ts +12 -0
  12. package/lib/esm/components/c4-cluster-overview/applications.js +10 -2
  13. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +6 -1
  14. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +15 -2
  15. package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +1 -0
  16. package/lib/esm/components/c4-cluster-overview/cluster-load.js +14 -6
  17. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
  18. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +4 -2
  19. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
  20. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +3 -1
  21. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +7 -3
  22. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +9 -1
  23. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +69 -12
  24. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +10 -1
  25. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +16 -2
  26. package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.d.ts +14 -0
  27. package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.js +12 -0
  28. package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.d.ts +15 -0
  29. package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.js +10 -0
  30. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +4 -2
  31. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +24 -3
  32. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +1 -1
  33. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +1 -0
  34. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +2 -0
  35. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +10 -5
  36. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +10 -5
  37. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
  38. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.types.d.ts +5 -0
  39. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +2 -1
  40. package/lib/esm/externalUrls.const.d.ts +1 -1
  41. package/lib/esm/externalUrls.const.js +1 -1
  42. package/lib/esm/i18n/c4-console-i18n.js +6 -0
  43. package/lib/esm/i18n/en/pages/clusterdetails.json +25 -3
  44. package/lib/esm/index.d.ts +1 -3
  45. package/lib/esm/index.js +1 -3
  46. package/lib/esm/runtime/build-cluster-sso-callback-url.d.ts +34 -0
  47. package/lib/esm/runtime/build-cluster-sso-callback-url.js +49 -0
  48. package/lib/esm/runtime/build-cluster-swagger-url.d.ts +7 -2
  49. package/lib/esm/runtime/build-cluster-swagger-url.js +20 -5
  50. package/lib/esm/runtime/index.d.ts +1 -0
  51. package/lib/esm/runtime/index.js +1 -0
  52. package/lib/esm/ui/families.d.ts +4 -0
  53. package/lib/esm/ui/families.js +22 -2
  54. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +16 -1
  55. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +70 -21
  56. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
  57. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +54 -13
  58. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +10 -0
  59. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +1 -0
  60. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +3 -0
  61. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +11 -0
  62. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +8 -3
  63. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.d.ts +7 -0
  64. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +26 -5
  65. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +43 -16
  66. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +174 -3
  67. package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.d.ts +13 -0
  68. package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.js +29 -0
  69. package/lib/esm/widgets/cluster-health-override.d.ts +16 -0
  70. package/lib/esm/widgets/cluster-health-override.js +33 -0
  71. package/lib/esm/widgets/clusters/c4-clusters-page.js +8 -8
  72. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
  73. package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.js +6 -1
  74. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +2 -1
  75. package/lib/esm/widgets/environment/use-cluster-swagger-url.d.ts +7 -4
  76. package/lib/esm/widgets/environment/use-cluster-swagger-url.js +7 -4
  77. package/package.json +24 -24
  78. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.d.ts +0 -16
  79. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +0 -40
  80. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.d.ts +0 -16
  81. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +0 -142
  82. package/lib/esm/components/c4-advanced-search-filters/FieldRow.d.ts +0 -14
  83. package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +0 -136
  84. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.d.ts +0 -13
  85. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +0 -58
  86. package/lib/esm/components/c4-advanced-search-filters/OrSection.d.ts +0 -16
  87. package/lib/esm/components/c4-advanced-search-filters/OrSection.js +0 -118
  88. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.d.ts +0 -3
  89. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +0 -408
  90. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.types.d.ts +0 -32
  91. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.types.js +0 -6
  92. package/lib/esm/components/c4-advanced-search-filters/state.types.d.ts +0 -14
  93. package/lib/esm/components/c4-advanced-search-filters/state.types.js +0 -6
  94. package/lib/esm/components/c4-advanced-search-filters/utils.d.ts +0 -5
  95. package/lib/esm/components/c4-advanced-search-filters/utils.js +0 -58
@@ -3,8 +3,6 @@ export { C4ActionableNotification } from './components/c4-actionable-notificatio
3
3
  export type { C4ActionableNotificationProps } from './components/c4-actionable-notification/c4-actionable-notification.types.js';
4
4
  export { C4ActivityGraph } from './components/c4-activity-graph/c4-activity-graph.js';
5
5
  export type { C4ActivityGraphProps } from './components/c4-activity-graph/c4-activity-graph.types.js';
6
- export { C4AdvancedSearchFilters } from './components/c4-advanced-search-filters/c4-advanced-search-filters.js';
7
- export type { AdvancedFilterOperator, C4AdvancedSearchFiltersProps, FieldSpec, FieldSpecMap, FilterPayload, } from './components/c4-advanced-search-filters/c4-advanced-search-filters.types.js';
8
6
  export { C4AiUsage } from './components/c4-ai-usage/c4-ai-usage.js';
9
7
  export type { C4AiUsageProps } from './components/c4-ai-usage/c4-ai-usage.types.js';
10
8
  export { C4AlphaClusterAtCheckout } from './components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js';
@@ -200,7 +198,7 @@ export { openC4CreateConsoleApiClientModal, setC4CreateConsoleApiClientModalHand
200
198
  export { openC4InviteUserToOrganizationModal, setC4InviteUserToOrganizationModalHandle, } from './modals/c4-invite-user-to-organization-modal-handle.js';
201
199
  export { openC4RenameOrganizationModal, setC4RenameOrganizationModalHandle, } from './modals/c4-rename-organization-modal-handle.js';
202
200
  export type { AccountsPermissions, AddC4ConsoleNotificationOptions, C4BreadcrumbCrumb, C4BreadcrumbDropdownItem, C4ClusterNavAppEntry, C4ClusterNavEntry, C4ConsoleAuthzFeatures, C4ConsoleAuthzState, C4ConsoleDataState, C4ConsoleEventsProviderProps, C4ConsoleNotification, C4ConsoleNotificationAction, C4ConsoleNotificationKind, C4ConsoleNotificationsState, C4ConsoleRuntimeConfig, C4ConsoleVisibilities, C4ResolvedTheme, C4ThemePreference, C4UserNotificationsProviderProps, C4UserNotificationsState, C4UserThemeState, CacheState, CamundaWebApp, ConsoleAuth, ConsoleBackendUrls, ConsoleClickwrapConfig, ConsoleClusterDto, ConsolePermissions, ConsolePublicUrls, ConsoleStage, ConsoleTelemetry, ConsoleUser, ExternalClusterDto, ExternalOrganizationDto, NotificationDto, OrganizationPermissions, OrganizationRole, OrgCache, SseEntity, UpgradableGenerationsDto, UseC4ClusterNavEntriesOptions, UseC4WebappBreadcrumbDataOptions, } from './runtime/index.js';
203
- export { addC4ConsoleNotification, buildClusterSwaggerUrl, buildModelerOrgUrl, C4ConsoleDataProvider, C4ConsoleEventsProvider, C4ConsoleNotificationsProvider, C4ConsoleRuntimeProvider, C4UserNotificationsProvider, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, removeC4ConsoleNotificationById, resolveAdminAppName, setC4ConsoleNotificationsHandle, useC4ClusterNavEntries, useC4ConsoleAuthz, useC4ConsoleData, useC4ConsoleEventsState, useC4ConsoleNotifications, useC4ConsoleRuntime, useC4DesignSystem, useC4UserNotifications, useC4UserTheme, useC4WebappBreadcrumbData, } from './runtime/index.js';
201
+ export { addC4ConsoleNotification, buildClusterSsoCallbackUrl, buildClusterSwaggerUrl, buildModelerOrgUrl, C4ConsoleDataProvider, C4ConsoleEventsProvider, C4ConsoleNotificationsProvider, C4ConsoleRuntimeProvider, C4UserNotificationsProvider, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, removeC4ConsoleNotificationById, resolveAdminAppName, setC4ConsoleNotificationsHandle, useC4ClusterNavEntries, useC4ConsoleAuthz, useC4ConsoleData, useC4ConsoleEventsState, useC4ConsoleNotifications, useC4ConsoleRuntime, useC4DesignSystem, useC4UserNotifications, useC4UserTheme, useC4WebappBreadcrumbData, } from './runtime/index.js';
204
202
  export type { TranslateFn } from './utils/safe-translate.js';
205
203
  export { ENVIRONMENT_KEY_SUFFIX, safeTranslate, scopedTranslate, } from './utils/safe-translate.js';
206
204
  export type { C4WidgetScope } from './widgets/c4-widget-scope.types.js';
package/lib/esm/index.js CHANGED
@@ -6,8 +6,6 @@
6
6
  export { C4_ASSET_URLS } from './assetUrls.js';
7
7
  export { C4ActionableNotification } from './components/c4-actionable-notification/c4-actionable-notification.js';
8
8
  export { C4ActivityGraph } from './components/c4-activity-graph/c4-activity-graph.js';
9
- // Re-export chart definition types for consumers
10
- export { C4AdvancedSearchFilters } from './components/c4-advanced-search-filters/c4-advanced-search-filters.js';
11
9
  export { C4AiUsage } from './components/c4-ai-usage/c4-ai-usage.js';
12
10
  export { C4AlphaClusterAtCheckout } from './components/c4-alpha-cluster-at-checkout/c4-alpha-cluster-at-checkout.js';
13
11
  export { C4AppTeaserCard } from './components/c4-app-teaser-card/c4-app-teaster-card.js';
@@ -114,7 +112,7 @@ export { openC4RenameOrganizationModal, setC4RenameOrganizationModalHandle, } fr
114
112
  // re-listed per module, so the package root and the
115
113
  // `@camunda/ccma-saas-frontend/runtime` subpath expose one identical surface.
116
114
  // Add runtime exports in `src/runtime/index.ts` and mirror them here.
117
- export { addC4ConsoleNotification, buildClusterSwaggerUrl, buildModelerOrgUrl, C4ConsoleDataProvider, C4ConsoleEventsProvider, C4ConsoleNotificationsProvider, C4ConsoleRuntimeProvider, C4UserNotificationsProvider, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, removeC4ConsoleNotificationById, resolveAdminAppName, setC4ConsoleNotificationsHandle, useC4ClusterNavEntries, useC4ConsoleAuthz, useC4ConsoleData, useC4ConsoleEventsState, useC4ConsoleNotifications, useC4ConsoleRuntime, useC4DesignSystem, useC4UserNotifications, useC4UserTheme, useC4WebappBreadcrumbData, } from './runtime/index.js';
115
+ export { addC4ConsoleNotification, buildClusterSsoCallbackUrl, buildClusterSwaggerUrl, buildModelerOrgUrl, C4ConsoleDataProvider, C4ConsoleEventsProvider, C4ConsoleNotificationsProvider, C4ConsoleRuntimeProvider, C4UserNotificationsProvider, DEFAULT_NAV_APPS, getClusterStage, getEndpointForApp, getReadableAppName, hasReadPermissionForApp, isAdminApp, isAppHealthyOnCluster, removeC4ConsoleNotificationById, resolveAdminAppName, setC4ConsoleNotificationsHandle, useC4ClusterNavEntries, useC4ConsoleAuthz, useC4ConsoleData, useC4ConsoleEventsState, useC4ConsoleNotifications, useC4ConsoleRuntime, useC4DesignSystem, useC4UserNotifications, useC4UserTheme, useC4WebappBreadcrumbData, } from './runtime/index.js';
118
116
  export { ENVIRONMENT_KEY_SUFFIX, safeTranslate, scopedTranslate, } from './utils/safe-translate.js';
119
117
  export { C4ClusterClientDetailsApp } from './widgets/cluster-client-details/c4-cluster-client-details-app.js';
120
118
  export { C4ClusterDetailsApp } from './widgets/cluster-details/c4-cluster-details-app.js';
@@ -0,0 +1,34 @@
1
+ import type { ConsoleClusterDto } from '@camunda/ccma-shared-types';
2
+ import type { ConsoleStage } from './c4-console-runtime.types.js';
3
+ /**
4
+ * Builds the OIDC callback URL an admin registers with their own identity
5
+ * provider (#9866).
6
+ *
7
+ * The path is Spring's default (`{baseUrl}/sso-callback`) and is not
8
+ * configurable, so an admin had no way to find this out from Console and had to
9
+ * be told out of band. This is not the `post_logout_redirect_uri`, which is a
10
+ * different URL used only during logout.
11
+ *
12
+ * Shape: `https://{regionId}.api.{domain}/sso-callback?uuid={clusterId}`, for
13
+ * example `https://bru-2.api.camunda.io/sso-callback?uuid={clusterId}`.
14
+ *
15
+ * The region id comes from the first label of the operator-written
16
+ * `status.operateUrl`, the same source `buildClusterSwaggerUrl` uses. Console
17
+ * does not hold the region slug itself: `K8sContext.region` carries the cloud
18
+ * region (`us-east-1`) and `K8sContext.name` a display label, so the operator's
19
+ * own hostname is the only place the slug appears.
20
+ *
21
+ * Returns `undefined` when the URL cannot be built for certain:
22
+ * - The cluster status carries no `operateUrl` yet, because the cluster is
23
+ * still in creation.
24
+ * - The `operateUrl` does not parse, or carries no region label.
25
+ *
26
+ * A wrong redirect URI fails at login, and it fails inside the customer's
27
+ * identity provider where Console cannot see it. So this returns nothing rather
28
+ * than a guess, and the caller shows nothing rather than something to copy.
29
+ */
30
+ export declare function buildClusterSsoCallbackUrl(params: {
31
+ cluster: Pick<ConsoleClusterDto, 'status'> | undefined;
32
+ clusterId: string;
33
+ stage: ConsoleStage;
34
+ }): string | undefined;
@@ -0,0 +1,49 @@
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
+ */
5
+ import { toServiceDomain } from './to-api-domain.js';
6
+ /**
7
+ * Builds the OIDC callback URL an admin registers with their own identity
8
+ * provider (#9866).
9
+ *
10
+ * The path is Spring's default (`{baseUrl}/sso-callback`) and is not
11
+ * configurable, so an admin had no way to find this out from Console and had to
12
+ * be told out of band. This is not the `post_logout_redirect_uri`, which is a
13
+ * different URL used only during logout.
14
+ *
15
+ * Shape: `https://{regionId}.api.{domain}/sso-callback?uuid={clusterId}`, for
16
+ * example `https://bru-2.api.camunda.io/sso-callback?uuid={clusterId}`.
17
+ *
18
+ * The region id comes from the first label of the operator-written
19
+ * `status.operateUrl`, the same source `buildClusterSwaggerUrl` uses. Console
20
+ * does not hold the region slug itself: `K8sContext.region` carries the cloud
21
+ * region (`us-east-1`) and `K8sContext.name` a display label, so the operator's
22
+ * own hostname is the only place the slug appears.
23
+ *
24
+ * Returns `undefined` when the URL cannot be built for certain:
25
+ * - The cluster status carries no `operateUrl` yet, because the cluster is
26
+ * still in creation.
27
+ * - The `operateUrl` does not parse, or carries no region label.
28
+ *
29
+ * A wrong redirect URI fails at login, and it fails inside the customer's
30
+ * identity provider where Console cannot see it. So this returns nothing rather
31
+ * than a guess, and the caller shows nothing rather than something to copy.
32
+ */
33
+ export function buildClusterSsoCallbackUrl(params) {
34
+ const operateUrl = params.cluster?.status?.operateUrl;
35
+ if (!operateUrl)
36
+ return undefined;
37
+ let regionId;
38
+ try {
39
+ regionId = new URL(operateUrl).hostname.split('.')[0];
40
+ }
41
+ catch {
42
+ return undefined;
43
+ }
44
+ // A hostname with no label before the first dot, or one that is the bare
45
+ // domain, gives nothing to build on.
46
+ if (!regionId || regionId === operateUrl)
47
+ return undefined;
48
+ return `https://${regionId}.${toServiceDomain(params.stage, 'api')}/sso-callback?uuid=${params.clusterId}`;
49
+ }
@@ -3,8 +3,13 @@ import type { ConsoleStage } from './c4-console-runtime.types.js';
3
3
  /**
4
4
  * Builds the cluster-specific Swagger UI URL.
5
5
  *
6
- * Returns `undefined` when the swagger feature is disabled or when the cluster
7
- * status does not yet carry an operateUrl (e.g. cluster is still being created).
6
+ * Returns `undefined` in these cases:
7
+ * - The cluster's Zeebe version is older than `SWAGGER_MIN_VERSION`, or the
8
+ * version is missing or invalid.
9
+ * - The swagger feature is disabled for the cluster.
10
+ * - The cluster status carries no operateUrl yet, because the cluster is still
11
+ * in creation.
12
+ * - The operateUrl does not parse as a valid URL.
8
13
  *
9
14
  * URL format depends on the cluster generation version:
10
15
  * - Camunda 8.8.x: https://{regionId}.operate.{domain}/{clusterId}/swagger-ui/index.html
@@ -3,13 +3,18 @@
3
3
  * under one or more contributor license agreements. Licensed under a commercial license.
4
4
  * You may not use this file except in compliance with the commercial license.
5
5
  */
6
- import { checkVersion, SWAGGER_URL_8_9_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
6
+ import { checkVersion, SWAGGER_MIN_VERSION, SWAGGER_URL_8_9_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
7
7
  import { toServiceDomain } from './to-api-domain.js';
8
8
  /**
9
9
  * Builds the cluster-specific Swagger UI URL.
10
10
  *
11
- * Returns `undefined` when the swagger feature is disabled or when the cluster
12
- * status does not yet carry an operateUrl (e.g. cluster is still being created).
11
+ * Returns `undefined` in these cases:
12
+ * - The cluster's Zeebe version is older than `SWAGGER_MIN_VERSION`, or the
13
+ * version is missing or invalid.
14
+ * - The swagger feature is disabled for the cluster.
15
+ * - The cluster status carries no operateUrl yet, because the cluster is still
16
+ * in creation.
17
+ * - The operateUrl does not parse as a valid URL.
13
18
  *
14
19
  * URL format depends on the cluster generation version:
15
20
  * - Camunda 8.8.x: https://{regionId}.operate.{domain}/{clusterId}/swagger-ui/index.html
@@ -18,7 +23,18 @@ import { toServiceDomain } from './to-api-domain.js';
18
23
  export function buildClusterSwaggerUrl(params) {
19
24
  const swaggerEnabled = params.cluster.externalMetadata?.swagger ?? true;
20
25
  const operateUrl = params.cluster?.status?.operateUrl;
21
- if (!swaggerEnabled || !operateUrl) {
26
+ const zeebeVersion = params.cluster.generation?.versions?.zeebe;
27
+ // A cluster older than this floor serves no Swagger UI at either URL shape.
28
+ // Without this gate the function still builds a correct 8.8 URL for it. A
29
+ // caller that only tests for `undefined` then shows a dead "Open Swagger UI".
30
+ const supportsSwagger = checkVersion({
31
+ possiblyVersionOrDockerPath: zeebeVersion,
32
+ trueForSnapshot: true,
33
+ trueOnInvalidVersion: false,
34
+ versionToCompareTo: SWAGGER_MIN_VERSION,
35
+ operator: VersionCheckOperator.GreaterThanOrEqual,
36
+ });
37
+ if (!supportsSwagger || !swaggerEnabled || !operateUrl) {
22
38
  return undefined;
23
39
  }
24
40
  let regionId;
@@ -28,7 +44,6 @@ export function buildClusterSwaggerUrl(params) {
28
44
  catch {
29
45
  return undefined;
30
46
  }
31
- const zeebeVersion = params.cluster.generation?.versions?.zeebe;
32
47
  const is89OrHigher = checkVersion({
33
48
  possiblyVersionOrDockerPath: zeebeVersion,
34
49
  trueForSnapshot: true,
@@ -21,6 +21,7 @@
21
21
  */
22
22
  export type { AccountsPermissions, CamundaWebApp, ConsoleClusterDto, ConsolePermissions, ExternalClusterDto, ExternalOrganizationDto, NotificationDto, OrganizationPermissions, OrganizationRole, SseEntity, UpgradableGenerationsDto, } from '@camunda/ccma-shared-types';
23
23
  export { addC4ConsoleNotification, removeC4ConsoleNotificationById, setC4ConsoleNotificationsHandle, } from '../notifications/c4-console-notifications-handle.js';
24
+ export { buildClusterSsoCallbackUrl } from './build-cluster-sso-callback-url.js';
24
25
  export { buildClusterSwaggerUrl } from './build-cluster-swagger-url.js';
25
26
  export type { C4ConsoleAuthzFeatures, C4ConsoleAuthzState, C4ConsoleVisibilities, } from './c4-console-authz.js';
26
27
  export { useC4ConsoleAuthz } from './c4-console-authz.js';
@@ -7,6 +7,7 @@
7
7
  // request failures, and a host app calls `setC4ConsoleNotificationsHandle` to
8
8
  // receive them. The module itself is a dependency-free leaf.
9
9
  export { addC4ConsoleNotification, removeC4ConsoleNotificationById, setC4ConsoleNotificationsHandle, } from '../notifications/c4-console-notifications-handle.js';
10
+ export { buildClusterSsoCallbackUrl } from './build-cluster-sso-callback-url.js';
10
11
  export { buildClusterSwaggerUrl } from './build-cluster-swagger-url.js';
11
12
  export { useC4ConsoleAuthz } from './c4-console-authz.js';
12
13
  export { C4ConsoleDataProvider, useC4ConsoleData, } from './c4-console-data-context.js';
@@ -40,3 +40,7 @@ export declare const useBreadcrumbFamily: () => {
40
40
  Breadcrumb: import("react").ForwardRefExoticComponent<import("@carbon/react").BreadcrumbProps & import("react").RefAttributes<HTMLElement>>;
41
41
  BreadcrumbItem: import("react").ForwardRefExoticComponent<import("@carbon/react").BreadcrumbItemProps & import("react").RefAttributes<HTMLLIElement>>;
42
42
  };
43
+ export declare const useDatePickerFamily: () => {
44
+ DatePicker: import("react").ForwardRefExoticComponent<import("@carbon/react").DatePickerProps & import("react").RefAttributes<HTMLDivElement>>;
45
+ DatePickerInput: import("react").ForwardRefExoticComponent<import("@carbon/react").DatePickerInputProps & import("react").RefAttributes<HTMLDivElement>>;
46
+ };
@@ -3,8 +3,9 @@
3
3
  * under one or more contributor license agreements. Licensed under a commercial license.
4
4
  * You may not use this file except in compliance with the commercial license.
5
5
  */
6
- import { Breadcrumb as DsBreadcrumb, BreadcrumbItem as DsBreadcrumbItem, ContentSwitcher as DsContentSwitcher, MenuButton as DsMenuButton, MenuItem as DsMenuItem, RadioButton as DsRadioButton, RadioButtonGroup as DsRadioButtonGroup, Select as DsSelect, SelectItem as DsSelectItem, Switch as DsSwitch, } from '@camunda/design-system/carbon-compat';
7
- import { Breadcrumb as CarbonBreadcrumb, BreadcrumbItem as CarbonBreadcrumbItem, ContentSwitcher as CarbonContentSwitcher, MenuButton as CarbonMenuButton, MenuItem as CarbonMenuItem, RadioButton as CarbonRadioButton, RadioButtonGroup as CarbonRadioButtonGroup, Select as CarbonSelect, SelectItem as CarbonSelectItem, Switch as CarbonSwitch, } from '@carbon/react';
6
+ import { Breadcrumb as DsBreadcrumb, BreadcrumbItem as DsBreadcrumbItem, ContentSwitcher as DsContentSwitcher, DatePicker as DsDatePicker, DatePickerInput as DsDatePickerInput, MenuButton as DsMenuButton, MenuItem as DsMenuItem, RadioButton as DsRadioButton, RadioButtonGroup as DsRadioButtonGroup, Select as DsSelect, SelectItem as DsSelectItem, Switch as DsSwitch, } from '@camunda/design-system/carbon-compat';
7
+ import { Breadcrumb as CarbonBreadcrumb, BreadcrumbItem as CarbonBreadcrumbItem, ContentSwitcher as CarbonContentSwitcher, DatePicker as CarbonDatePicker, DatePickerInput as CarbonDatePickerInput, MenuButton as CarbonMenuButton, MenuItem as CarbonMenuItem, RadioButton as CarbonRadioButton, RadioButtonGroup as CarbonRadioButtonGroup, Select as CarbonSelect, SelectItem as CarbonSelectItem, Switch as CarbonSwitch, } from '@carbon/react';
8
+ import { createElement } from 'react';
8
9
  import { useC4DesignSystem } from '../runtime/c4-console-runtime-context.js';
9
10
  /**
10
11
  * Compound-family switching for c4.
@@ -44,3 +45,22 @@ export const useBreadcrumbFamily = makeFamily({ Breadcrumb: CarbonBreadcrumb, Br
44
45
  Breadcrumb: DsBreadcrumb,
45
46
  BreadcrumbItem: DsBreadcrumbItem,
46
47
  });
48
+ /**
49
+ * DS renders a date range as ONE control, so it composes the trigger label from
50
+ * the two `DatePickerInput` `labelText`s and joins them with a separator. The
51
+ * upstream default is the word "to", which reads badly for the relational
52
+ * labels our call sites pass ("From" + "To" -> "From to To"). An en dash reads
53
+ * better, so the label becomes "From" en dash "To".
54
+ *
55
+ * The separator goes after the spread, so a call site cannot set it: the prop
56
+ * has no Carbon equivalent, and Carbon puts props it does not know on its
57
+ * wrapper element. Call sites keep the Carbon props, which is why they can not
58
+ * name it in the first place.
59
+ */
60
+ function DsRangeLabelDatePicker(props) {
61
+ return createElement(DsDatePicker, { ...props, rangeLabelSeparator: '\u2013' });
62
+ }
63
+ export const useDatePickerFamily = makeFamily({ DatePicker: CarbonDatePicker, DatePickerInput: CarbonDatePickerInput }, {
64
+ DatePicker: DsRangeLabelDatePicker,
65
+ DatePickerInput: DsDatePickerInput,
66
+ });
@@ -1,7 +1,22 @@
1
- import { type HdpPrometheusDataCapacityDataPoint } from '@camunda/ccma-shared-types';
1
+ import { type ConsoleClusterDto, deriveSecondaryStorageStatus, type HdpPrometheusDataCapacityDataPoint } from '@camunda/ccma-shared-types';
2
2
  import { type JSX } from 'react';
3
3
  import type { C4ClusterDetailsAppProps } from './c4-cluster-details-app.types.js';
4
4
  export declare function mergeNestedSnapshot<T>(previous: T | undefined, next: T): T;
5
+ /**
6
+ * True when this is a dual-region BYOK cluster and the secondary region's
7
+ * key is not accessible. Exported (and kept pure) so both the header
8
+ * indicator and the Encryption tab's own warning read the same computation,
9
+ * and so this can be tested without rendering the full component.
10
+ *
11
+ * Gated on `encryption === 'External'` to match the Encryption tab's own
12
+ * visibility (`tab.visible` below) — otherwise the header indicator could
13
+ * tell the customer to click through to a tab that is not shown.
14
+ */
15
+ export declare function computeSecondaryReplicationNotReady(cluster: Pick<ConsoleClusterDto, 'encryption' | 'backupRegionCodes'> & {
16
+ status?: {
17
+ conditions?: Parameters<typeof deriveSecondaryStorageStatus>[0];
18
+ };
19
+ }): boolean;
5
20
  export declare function ensureClusterLoadPerDay(perDay: HdpPrometheusDataCapacityDataPoint[]): HdpPrometheusDataCapacityDataPoint[];
6
21
  export declare function ensureClusterLoad24h(last24h: HdpPrometheusDataCapacityDataPoint[]): HdpPrometheusDataCapacityDataPoint[];
7
22
  export declare const C4ClusterDetailsApp: ((props: C4ClusterDetailsAppProps) => JSX.Element) & {
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
5
5
  * You may not use this file except in compliance with the commercial license.
6
6
  */
7
7
  import { AuditLoggerService, ConsoleAlertsService, ConsoleByomMonitoringService, ConsoleClusterParametersService, ConsoleClusterService, HdpService, HttpError, SaaSJobsService, } from '@camunda/ccma-api';
8
- import { AUDIT_LOG_TAB_MIN_VERSION, CLUSTER_STATISTICS_CONFIG_MIN_VERSION, checkVersion, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
8
+ import { AUDIT_LOG_TAB_MIN_VERSION, CLUSTER_STATISTICS_CONFIG_MIN_VERSION, checkVersion, deriveEncryptionStatus, deriveSecondaryStorageStatus, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
9
9
  import { observer } from 'mobx-react-lite';
10
10
  import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
11
11
  import { normalizeClusterStatus } from '../../components/c4-cluster-overview/applications.js';
@@ -15,6 +15,7 @@ import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
15
15
  import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
16
16
  import { toApiConfig } from '../../runtime/to-api-config.js';
17
17
  import { Modal, Stack, TextInput } from '../../ui/index.js';
18
+ import { clusterHealthOverride } from '../cluster-health-override.js';
18
19
  import { useClusterApiClients } from '../environment/use-cluster-api-clients.js';
19
20
  import { useClusterVersionFlags } from '../environment/use-cluster-version-flags.js';
20
21
  import { C4ClusterDetailsPage } from './c4-cluster-details-page.js';
@@ -135,6 +136,22 @@ export function mergeNestedSnapshot(previous, next) {
135
136
  }
136
137
  return merged;
137
138
  }
139
+ /**
140
+ * True when this is a dual-region BYOK cluster and the secondary region's
141
+ * key is not accessible. Exported (and kept pure) so both the header
142
+ * indicator and the Encryption tab's own warning read the same computation,
143
+ * and so this can be tested without rendering the full component.
144
+ *
145
+ * Gated on `encryption === 'External'` to match the Encryption tab's own
146
+ * visibility (`tab.visible` below) — otherwise the header indicator could
147
+ * tell the customer to click through to a tab that is not shown.
148
+ */
149
+ export function computeSecondaryReplicationNotReady(cluster) {
150
+ return (cluster.encryption === 'External' &&
151
+ (cluster.backupRegionCodes?.length ?? 0) > 1 &&
152
+ deriveSecondaryStorageStatus(cluster.status?.conditions) ===
153
+ 'SecondaryEncryptionNotReady');
154
+ }
138
155
  // Client-side dismissal of the "restore failed" banner. The failed state is
139
156
  // derived from the Restore CR, so there is no server-side "seen" flag — we
140
157
  // remember dismissed restore ids (per browser) in localStorage instead. Keyed
@@ -1067,6 +1084,7 @@ export const C4ClusterDetailsApp = observer((props) => {
1067
1084
  const canMutateClusterApiResources = Boolean(authz.visibilities.clusters?.canEdit);
1068
1085
  const clientsComponent = useMemo(() => {
1069
1086
  return (_jsx(C4ClusterDetailsClientsTab, { cluster: cluster, clients: clients, clientsLoading: clientsLoading, clientsError: clientsError, hasIdentityIntegration: hasIdentityIntegration, useClusterSecretsLabel: useClusterSecretsLabel, orgId: props.orgId, clusterId: props.clusterId, clientsDocsUrl: clientsDocsUrl, mcpSetupDocsUrl: urls.docs.mcpSetup, identityAuthorizationDocsUrl: urls.docs.identityAuthorization, springZeebeGettingStartedDocsUrl: urls.docs.springZeebeGettingStarted, springZeebeConfigDocsUrl: urls.docs.springZeebeConfig, apiConfig: apiConfig, canMutateCluster: canMutateClusterApiResources, clientsPermissions: {
1087
+ canRead: Boolean(orgPermissions?.cluster.clients.read),
1070
1088
  canCreate: Boolean(orgPermissions?.cluster.clients.create),
1071
1089
  canUpdate: Boolean(orgPermissions?.cluster.clients.update),
1072
1090
  canDelete: Boolean(orgPermissions?.cluster.clients.delete),
@@ -1288,7 +1306,34 @@ export const C4ClusterDetailsApp = observer((props) => {
1288
1306
  clustersOfOrg?.some((sibling) => sibling.uuid !== cluster.uuid &&
1289
1307
  sibling.stableId === cluster.stableId &&
1290
1308
  sibling.isFailoverSource === true));
1291
- const encryptionComponent = (_jsx(C4ClusterDetailsEncryptionTab, { cluster: cluster, orgId: props.orgId, clusterId: props.clusterId, apiConfig: apiConfig, translate: t ?? ((key) => key), activeTabId: activeTabId, onReloadCluster: reloadCluster, restoreInProgress: cluster?.restoreInProgress, isFailoverTarget: isFailoverTarget, docsUrls: {
1309
+ // A failover target with a pending key-policy update needs the customer
1310
+ // in the Encryption tab, not Overview — Overview has nothing that tells
1311
+ // them a key policy update is needed.
1312
+ const needsFailoverEncryptionAction = isFailoverTarget &&
1313
+ deriveEncryptionStatus(cluster?.status?.conditions) ===
1314
+ 'ExternalEncryptionKeyNotReady';
1315
+ // Computed once here (not inside the Encryption tab) because the header
1316
+ // indicator needs it too, and the two must never disagree about whether
1317
+ // there's a problem.
1318
+ const secondaryReplicationNotReady = cluster
1319
+ ? computeSecondaryReplicationNotReady(cluster)
1320
+ : false;
1321
+ // Guards on needsFailoverEncryptionAction itself, not on "cluster has
1322
+ // loaded" — the operator can report the condition after the first
1323
+ // fetch, so waiting for it (instead of locking in "no action" on the
1324
+ // first render) still catches a failover target that needs this.
1325
+ const appliedFailoverEncryptionDefaultRef = useRef(false);
1326
+ useEffect(() => {
1327
+ if (props.desiredTabId)
1328
+ return;
1329
+ if (appliedFailoverEncryptionDefaultRef.current)
1330
+ return;
1331
+ if (!needsFailoverEncryptionAction)
1332
+ return;
1333
+ appliedFailoverEncryptionDefaultRef.current = true;
1334
+ setActiveTabId('encryption');
1335
+ }, [props.desiredTabId, needsFailoverEncryptionAction]);
1336
+ const encryptionComponent = (_jsx(C4ClusterDetailsEncryptionTab, { cluster: cluster, orgId: props.orgId, clusterId: props.clusterId, apiConfig: apiConfig, translate: t ?? ((key) => key), activeTabId: activeTabId, onReloadCluster: reloadCluster, restoreInProgress: cluster?.restoreInProgress, isFailoverTarget: isFailoverTarget, secondaryReplicationNotReady: secondaryReplicationNotReady, docsUrls: {
1292
1337
  encryption: urls.docs.encryption,
1293
1338
  encryptionCli: urls.docs.encryptionCli,
1294
1339
  encryptionManual: urls.docs.encryptionManual,
@@ -1464,7 +1509,8 @@ export const C4ClusterDetailsApp = observer((props) => {
1464
1509
  // repeated here, next to the cluster name, so they read at a glance without scrolling to the
1465
1510
  // Cluster Details table below.
1466
1511
  const headerPhaseTag = cluster?.labels?.camunda?.[0];
1467
- const headerHealthStatus = normalizeClusterStatus(cluster?.status?.ready);
1512
+ const headerHealthStatus = clusterHealthOverride(cluster) ??
1513
+ normalizeClusterStatus(cluster?.status?.ready);
1468
1514
  // `generation.name` already reads "Camunda 8.10.0-alpha4" — the org's Clusters list renders it
1469
1515
  // verbatim as the Generation column, so this does too rather than prefixing "Camunda" again.
1470
1516
  const headerVersionLabel = cluster?.generation?.name;
@@ -1472,31 +1518,34 @@ export const C4ClusterDetailsApp = observer((props) => {
1472
1518
  // generation, or disabled authorizations all matter more than a
1473
1519
  // one-time "update your endpoint" nudge.
1474
1520
  const banner = primaryBanner ?? failoverUriBanner;
1521
+ // Shared by the tab strip's onChange and the secondary-replication
1522
+ // header indicator's click action — both switch to a tab the same way.
1523
+ const handleTabChange = (tabId) => {
1524
+ const next = tabId;
1525
+ const telemetryTabId = getClusterDetailsTabTelemetryId(next);
1526
+ runtime.telemetry?.track?.(`clusterOverview:tabChange:${telemetryTabId}`, {
1527
+ message: `Cluster Details: Changed tab to ${telemetryTabId}`,
1528
+ orgId: props.orgId,
1529
+ clusterId: props.clusterId,
1530
+ tabId: telemetryTabId,
1531
+ });
1532
+ setActiveTabId(next);
1533
+ props.onNavigate?.({
1534
+ kind: 'tabChange',
1535
+ orgId: props.orgId,
1536
+ clusterId: props.clusterId,
1537
+ tabId: next,
1538
+ });
1539
+ };
1475
1540
  return (_jsxs(_Fragment, { children: [_jsx(C4ClusterDetailsPage, { loading: isClusterLoading || authz.isLoading, padding: props.padding, clusterName: cluster?.name, phaseTag: headerPhaseTag, healthStatus: headerHealthStatus, versionLabel: headerVersionLabel, isDevelopmentPlan: cluster?.planType?.development, urls: { clusters: urls.clusters }, onNavigateToClusters: () => props.onNavigate?.({ kind: 'clusters', orgId: props.orgId }), menu: {
1476
1541
  canRename,
1477
1542
  canDelete,
1478
1543
  onRename: canRename ? () => setRenameOpen(true) : undefined,
1479
1544
  onDelete: canDelete ? () => setDeleteOpen(true) : undefined,
1480
- }, banner: banner, tabs: {
1545
+ }, banner: banner, secondaryReplicationNotReady: secondaryReplicationNotReady, onGoToEncryptionTab: () => handleTabChange('encryption'), tabs: {
1481
1546
  list: tabs,
1482
1547
  desiredTabId: activeTabId,
1483
- onChange: (tabId) => {
1484
- const next = tabId;
1485
- const telemetryTabId = getClusterDetailsTabTelemetryId(next);
1486
- runtime.telemetry?.track?.(`clusterOverview:tabChange:${telemetryTabId}`, {
1487
- message: `Cluster Details: Changed tab to ${telemetryTabId}`,
1488
- orgId: props.orgId,
1489
- clusterId: props.clusterId,
1490
- tabId: telemetryTabId,
1491
- });
1492
- setActiveTabId(next);
1493
- props.onNavigate?.({
1494
- kind: 'tabChange',
1495
- orgId: props.orgId,
1496
- clusterId: props.clusterId,
1497
- tabId: next,
1498
- });
1499
- },
1548
+ onChange: handleTabChange,
1500
1549
  } }), _jsx(Modal, { open: renameOpen, modalHeading: 'Rename cluster', primaryButtonText: 'Rename', secondaryButtonText: 'Cancel', primaryButtonDisabled: clusterMutationBusy ||
1501
1550
  newClusterName.length === 0 ||
1502
1551
  !!cluster?.restoreInProgress, onRequestClose: () => setRenameOpen(false), onRequestSubmit: () => {
@@ -1,3 +1,3 @@
1
1
  import type { JSX } from 'react';
2
2
  import type { C4ClusterDetailsPageProps } from './c4-cluster-details-page.types.js';
3
- export declare const C4ClusterDetailsPage: ({ loading, clusterName, isDevelopmentPlan, phaseTag, healthStatus, versionLabel, urls, onNavigateToClusters, menu, banner, tabs, padding, }: C4ClusterDetailsPageProps) => JSX.Element;
3
+ export declare const C4ClusterDetailsPage: ({ loading, clusterName, isDevelopmentPlan, phaseTag, healthStatus, versionLabel, urls, onNavigateToClusters, menu, banner, secondaryReplicationNotReady, onGoToEncryptionTab, tabs, padding, }: C4ClusterDetailsPageProps) => JSX.Element;
@@ -12,6 +12,7 @@ import { ClusterStatusElement } from '../../components/c4-cluster-overview/appli
12
12
  import { C4PageTemplate } from '../../components/c4-page-template/c4-page-template.js';
13
13
  import { useC4ConsoleRuntime, useC4DesignSystem, } from '../../runtime/c4-console-runtime-context.js';
14
14
  import { BreadcrumbSkeleton, Link, SkeletonText, Stack, TabsSkeleton, Tooltip, } from '../../ui/index.js';
15
+ import { safeTranslate } from '../../utils/safe-translate.js';
15
16
  const breadCrumbWrapperStyles = {
16
17
  minHeight: '40px',
17
18
  display: 'grid',
@@ -41,15 +42,6 @@ const headerBadgeStyle = {
41
42
  fontSize: 'var(--cds-label-01-font-size, 0.75rem)',
42
43
  whiteSpace: 'nowrap',
43
44
  };
44
- function safeTranslate(t, key, fallback) {
45
- try {
46
- const translated = t?.(key);
47
- return translated && translated !== key ? translated : fallback;
48
- }
49
- catch {
50
- return fallback;
51
- }
52
- }
53
45
  function buildMenuItems(opts) {
54
46
  const { menu, t } = opts;
55
47
  if (!menu) {
@@ -177,7 +169,42 @@ function AuthorizationsDisabledIndicator(props) {
177
169
  fontSize: 'var(--cds-body-compact-01-font-size)',
178
170
  }, children: [_jsx(WarningAltFilled, { size: 16, style: { fill: 'var(--cds-support-caution-major)' } }), title] }) }) }));
179
171
  }
180
- export const C4ClusterDetailsPage = ({ loading, clusterName, isDevelopmentPlan, phaseTag, healthStatus, versionLabel, urls, onNavigateToClusters, menu, banner, tabs, padding = 'default', }) => {
172
+ /**
173
+ * Cluster-header indicator for "secondary key not accessible" (BYOK,
174
+ * dual-region). Independent of `banner` — the single banner slot can be
175
+ * showing something else entirely (or nothing), and this still has to be
176
+ * visible, since the customer may not come back to this page for a long
177
+ * time while replication stays broken.
178
+ *
179
+ * No carbon/ds split needed: unlike `AuthorizationsDisabledIndicator`, the
180
+ * tooltip description here is plain text, not a nested interactive link, so
181
+ * the switchable `Tooltip` from `../ui` already works in both modes. The
182
+ * action lives on the trigger itself instead.
183
+ */
184
+ function SecondaryReplicationNotReadyIndicator(props) {
185
+ const { onGoToEncryptionTab, t } = props;
186
+ const title = safeTranslate(t, 'c4console:clusterDetails.indicator.secondaryReplicationNotReady.title', 'Secondary key not accessible');
187
+ const subtitle = safeTranslate(t, 'c4console:clusterDetails.indicator.secondaryReplicationNotReady.subtitle', "Your secondary region's encryption key isn't accessible, so replication to that region isn't working. Go to the Encryption tab to review the key policy.");
188
+ return (_jsx(Tooltip, { align: 'bottom-end', autoAlign: true, dropShadow: true, description: _jsx("span", { style: { display: 'block', whiteSpace: 'normal', maxWidth: '20rem' }, children: subtitle }), children: _jsxs("button", { type: 'button', "aria-label": title, onClick: onGoToEncryptionTab, style: {
189
+ display: 'inline-flex',
190
+ alignItems: 'center',
191
+ gap: '0.25rem',
192
+ padding: 0,
193
+ border: 0,
194
+ background: 'transparent',
195
+ cursor: onGoToEncryptionTab ? 'pointer' : 'default',
196
+ color: 'var(--cds-text-secondary)',
197
+ fontSize: 'var(--cds-body-compact-01-font-size)',
198
+ }, children: [_jsx(WarningAltFilled, { size: 16, style: { fill: 'var(--cds-support-caution-major)' } }), title] }) }));
199
+ }
200
+ /** The three facts beside the cluster name: phase, health, generation. */
201
+ const clusterHeaderBadges = ({ phaseTag, healthStatus, versionLabel, }) => {
202
+ if (!phaseTag && !healthStatus && !versionLabel) {
203
+ return undefined;
204
+ }
205
+ return (_jsxs(Stack, { orientation: 'horizontal', gap: 3, children: [phaseTag && _jsx(C3ClusterTag, { stage: phaseTag }), healthStatus && (_jsx("span", { style: headerBadgeStyle, children: _jsx(ClusterStatusElement, { status: healthStatus }) })), versionLabel && _jsx("span", { style: headerBadgeStyle, children: versionLabel })] }));
206
+ };
207
+ export const C4ClusterDetailsPage = ({ loading, clusterName, isDevelopmentPlan, phaseTag, healthStatus, versionLabel, urls, onNavigateToClusters, menu, banner, secondaryReplicationNotReady, onGoToEncryptionTab, tabs, padding = 'default', }) => {
181
208
  const runtime = useC4ConsoleRuntime();
182
209
  const t = runtime.i18n?.t;
183
210
  if (loading) {
@@ -187,9 +214,23 @@ export const C4ClusterDetailsPage = ({ loading, clusterName, isDevelopmentPlan,
187
214
  ? safeTranslate(t, 'c4console:clusterDetails.tag.development', 'Development')
188
215
  : '';
189
216
  const bannerProps = buildBanner({ banner, t });
190
- const indicator = banner?.kind === 'authorizationsDisabled' ? (_jsx(AuthorizationsDisabledIndicator, { banner: banner, t: t })) : undefined;
191
- const hasHeaderBadges = Boolean(phaseTag || healthStatus || versionLabel);
192
- const subtitleBadges = hasHeaderBadges ? (_jsxs(Stack, { orientation: 'horizontal', gap: 3, children: [phaseTag && _jsx(C3ClusterTag, { stage: phaseTag }), healthStatus && (_jsx("span", { style: headerBadgeStyle, children: _jsx(ClusterStatusElement, { status: healthStatus }) })), versionLabel && _jsx("span", { style: headerBadgeStyle, children: versionLabel })] })) : undefined;
217
+ const authorizationsIndicator = banner?.kind === 'authorizationsDisabled' ? (_jsx(AuthorizationsDisabledIndicator, { banner: banner, t: t }, 'authorizationsDisabled')) : undefined;
218
+ // secondaryReplicationNotReady is intentionally independent of `banner` —
219
+ // see the doc comment on SecondaryReplicationNotReadyIndicator.
220
+ const secondaryReplicationIndicator = secondaryReplicationNotReady ? (_jsx(SecondaryReplicationNotReadyIndicator, { onGoToEncryptionTab: onGoToEncryptionTab, t: t }, 'secondaryReplicationNotReady')) : undefined;
221
+ const activeIndicators = [
222
+ authorizationsIndicator,
223
+ secondaryReplicationIndicator,
224
+ ].filter((el) => Boolean(el));
225
+ // Only one of these fires in practice today, so this stays exactly what
226
+ // `authorizationsIndicator` alone used to render — no new wrapper element
227
+ // around it, so carbon mode's existing render is untouched.
228
+ const indicator = activeIndicators.length > 1 ? (_jsx(Stack, { orientation: 'horizontal', gap: 3, children: activeIndicators })) : (activeIndicators[0]);
229
+ const subtitleBadges = clusterHeaderBadges({
230
+ phaseTag,
231
+ healthStatus,
232
+ versionLabel,
233
+ });
193
234
  return (_jsx(C4PageTemplate, { loading: loading, banner: bannerProps, header: {
194
235
  title: clusterName ?? '',
195
236
  tag,
@@ -48,6 +48,16 @@ export interface C4ClusterDetailsPageProps {
48
48
  onDelete?: () => void;
49
49
  };
50
50
  banner?: C4ClusterDetailsPageBanner;
51
+ /**
52
+ * True when this is a dual-region BYOK cluster and the secondary region's
53
+ * key is not accessible. Shown as a header indicator, independent of
54
+ * `banner` — unlike the banner, it stays visible no matter which banner
55
+ * (if any) currently holds that single slot, since a customer can go a
56
+ * long time without revisiting this page while it stays broken.
57
+ */
58
+ secondaryReplicationNotReady?: boolean;
59
+ /** Called when the customer clicks the secondary-replication indicator. */
60
+ onGoToEncryptionTab?: () => void;
51
61
  tabs: {
52
62
  list: C4ClusterDetailsTab[];
53
63
  desiredTabId?: string;
@@ -18,6 +18,7 @@ interface C4ClusterDetailsClientsTabProps {
18
18
  apiConfig: RequestBaseParamsConfig;
19
19
  canMutateCluster: boolean;
20
20
  clientsPermissions?: {
21
+ canRead: boolean;
21
22
  canCreate: boolean;
22
23
  canUpdate: boolean;
23
24
  canDelete: boolean;
@@ -160,11 +160,14 @@ export const C4ClusterDetailsClientsTab = (props) => {
160
160
  emptyTitle: safeTranslate(t, 'clusterdetails:clients.noClientsMessage.title', 'Use our secure, scalable API'),
161
161
  emptyDescription: renderInlineStrong(safeTranslate(t, 'clusterdetails:clients.noClientsMessage.text', 'Click <strong>Create your first client</strong> to deploy processes, start instances, and interact with them programmatically.')),
162
162
  learnMoreLabel: 'View the Client Configuration documentation',
163
+ forbiddenTitle: safeTranslate(t, 'clusterdetails:clients.forbidden.title', "You don't have access to client credentials"),
164
+ forbiddenDescription: safeTranslate(t, 'clusterdetails:clients.forbidden.description', "You don't have permission to view client credentials for this cluster. Contact an organization owner or admin for access."),
163
165
  }, urls: {
164
166
  clientDetails: (clientId) => `/org/${orgId}/cluster/${clusterId}/api/${clientId}`,
165
167
  identity: cluster?.status?.identityUrl ?? '',
166
168
  docs: clientsDocsUrl,
167
169
  }, permissions: {
170
+ canRead: clientsPermissions?.canRead ?? canMutateCluster,
168
171
  canCreate: clientsPermissions?.canCreate ?? canMutateCluster,
169
172
  canUpdate: clientsPermissions?.canUpdate ?? canMutateCluster,
170
173
  canDelete: clientsPermissions?.canDelete ?? canMutateCluster,
@@ -20,6 +20,17 @@ interface C4ClusterDetailsConnectorSecretsTabProps {
20
20
  url?: string;
21
21
  }) => void;
22
22
  useClusterSecretsLabel?: boolean;
23
+ /**
24
+ * The caller is still resolving `connectorSecretsPermissions`.
25
+ *
26
+ * Until the permissions resolve, `canRead` is `false` and this tab cannot
27
+ * fetch. Without this flag the tab then reads as "loaded, and empty", and it
28
+ * shows the empty state for one render pass.
29
+ *
30
+ * The cluster-details page folds the same signal into its own page loading
31
+ * state. The standalone widget passes it here instead.
32
+ */
33
+ permissionsLoading?: boolean;
23
34
  /**
24
35
  * Surface this tab is rendered on. Defaults to `'cluster'`.
25
36
  *