@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
@@ -27,7 +27,7 @@ function renderInlineLink0(value, linkRenderer) {
27
27
  }
28
28
  const C4ClusterDetailsConnectorSecretsTabImpl = (props) => {
29
29
  const { Select, SelectItem } = useSelectFamily();
30
- const { orgId, clusterId, apiConfig, canMutateCluster, connectorSecretsPermissions, docsUrl, t, onNavigate, useClusterSecretsLabel, scope = 'cluster', onPanelState, } = props;
30
+ const { orgId, clusterId, apiConfig, canMutateCluster, connectorSecretsPermissions, docsUrl, t, onNavigate, useClusterSecretsLabel, permissionsLoading = false, scope = 'cluster', onPanelState, } = props;
31
31
  const pickSecretsText = (connectorKey, connectorFallback, clusterKey, clusterFallback) => useClusterSecretsLabel
32
32
  ? safeTranslate(t, clusterKey, clusterFallback)
33
33
  : safeTranslate(t, connectorKey, connectorFallback);
@@ -150,7 +150,10 @@ const C4ClusterDetailsConnectorSecretsTabImpl = (props) => {
150
150
  isProtected: key.startsWith('CAMUNDA_PROVIDED_'),
151
151
  }));
152
152
  const title = pickSecretsText('clusterdetails:connectorSecrets.title', 'Connector secrets', 'clusterdetails:clusterSecrets.title', 'Cluster secrets');
153
- const isEmpty = !connectorSecretsLoading && !connectorSecretsError && secrets.length === 0;
153
+ // `permissionsLoading` counts as loading. The fetch cannot start yet, so
154
+ // "no secrets" is not a fact yet.
155
+ const isListLoading = connectorSecretsLoading || permissionsLoading;
156
+ const isEmpty = !isListLoading && !connectorSecretsError && secrets.length === 0;
154
157
  useEffect(() => {
155
158
  onPanelState?.({ isEmpty, title });
156
159
  }, [isEmpty, title, onPanelState]);
@@ -173,7 +176,7 @@ const C4ClusterDetailsConnectorSecretsTabImpl = (props) => {
173
176
  url: docsUrl ?? '',
174
177
  });
175
178
  }, children: label })));
176
- return (_jsxs(_Fragment, { children: [_jsx(C4ClusterDetailsConnectorSecrets, { secrets: secrets, isLoading: connectorSecretsLoading, hasError: connectorSecretsError, hasImportFromClusterFeature: true, hasExportFeature: true, text: {
179
+ return (_jsxs(_Fragment, { children: [_jsx(C4ClusterDetailsConnectorSecrets, { secrets: secrets, isLoading: isListLoading, hasError: connectorSecretsError, hasImportFromClusterFeature: true, hasExportFeature: true, text: {
177
180
  title,
178
181
  createButton: safeTranslate(t, 'clusterdetails:connectorSecrets.createButton', 'Create secret'),
179
182
  bulkImportButton: safeTranslate(t, 'clusterdetails:connectorSecrets.bulkImportButton', 'Bulk import'),
@@ -196,6 +199,8 @@ const C4ClusterDetailsConnectorSecretsTabImpl = (props) => {
196
199
  infoText,
197
200
  // Label for the badge shown on CAMUNDA_PROVIDED_ secrets
198
201
  protectedBadge: safeTranslate(t, 'clusterdetails:connectorSecrets.protectedBadge', 'Hidden'),
202
+ forbiddenTitle: pickSecretsText('clusterdetails:connectorSecrets.forbidden.title', "You don't have access to connector secrets", 'clusterdetails:clusterSecrets.forbidden.title', "You don't have access to cluster secrets"),
203
+ forbiddenDescription: pickSecretsText('clusterdetails:connectorSecrets.forbidden.description', "You don't have permission to view connector secrets for this cluster. Contact an organization owner or admin for access.", 'clusterdetails:clusterSecrets.forbidden.description', "You don't have permission to view cluster secrets for this cluster. Contact an organization owner or admin for access."),
199
204
  }, urls: { docs: docsUrl ?? '' }, permissions: {
200
205
  canCreate: connectorSecretsPermissions?.canCreate ?? canMutateCluster,
201
206
  canRead: connectorSecretsPermissions?.canRead ?? canMutateCluster,
@@ -13,6 +13,13 @@ interface C4ClusterDetailsEncryptionTabProps {
13
13
  restoreInProgress?: boolean;
14
14
  /** True when this cluster was created by failing over from a sibling. */
15
15
  isFailoverTarget?: boolean;
16
+ /**
17
+ * True when this is a dual-region BYOK cluster and the secondary region's
18
+ * key is not accessible. Computed by the caller (not here), so the
19
+ * Encryption tab's own warning and the page-header indicator can never
20
+ * disagree about whether there's a problem.
21
+ */
22
+ secondaryReplicationNotReady?: boolean;
16
23
  docsUrls: {
17
24
  encryption: string;
18
25
  encryptionCli: string;
@@ -23,8 +23,21 @@ function toIsoString(value) {
23
23
  const date = value instanceof Date ? value : new Date(String(value));
24
24
  return Number.isNaN(date.getTime()) ? undefined : date.toISOString();
25
25
  }
26
+ // The statement the customer adds to the failover region's key policy, so
27
+ // the clone role can write the restored backup into this cluster's bucket.
28
+ // Only the failover region's key needs it — the secondary key just needs
29
+ // its principals swapped to the failover cluster's role.
30
+ function buildCloneRolePolicyStatement(cloneRoleArn) {
31
+ return JSON.stringify({
32
+ Sid: 'Allow bucket clone role to write destination objects',
33
+ Effect: 'Allow',
34
+ Principal: { AWS: cloneRoleArn },
35
+ Action: ['kms:GenerateDataKey*', 'kms:Decrypt', 'kms:DescribeKey'],
36
+ Resource: '*',
37
+ }, null, 2);
38
+ }
26
39
  export const C4ClusterDetailsEncryptionTab = (props) => {
27
- const { cluster, orgId, clusterId, apiConfig, activeTabId, onReloadCluster, restoreInProgress, isFailoverTarget, docsUrls, } = props;
40
+ const { cluster, orgId, clusterId, apiConfig, activeTabId, onReloadCluster, restoreInProgress, isFailoverTarget, secondaryReplicationNotReady, docsUrls, } = props;
28
41
  // BYOK script content
29
42
  const [byokCliSingle, setByokCliSingle] = useState('');
30
43
  const [byokCliDual, setByokCliDual] = useState('');
@@ -134,6 +147,9 @@ export const C4ClusterDetailsEncryptionTab = (props) => {
134
147
  const failoverKeyPolicy = isFailoverTarget && encryptionStatus === 'ExternalEncryptionKeyNotReady'
135
148
  ? deriveFailoverKeyPolicyPrincipals(tenantRoleArn, cluster?.stableId)
136
149
  : undefined;
150
+ const failoverCloneRolePolicyStatement = failoverKeyPolicy
151
+ ? buildCloneRolePolicyStatement(failoverKeyPolicy.cloneRole)
152
+ : undefined;
137
153
  const renderedPolicy = byokKeyPolicy.replaceAll('<TENANT-ROLE-ARN>', tenantRoleArn);
138
154
  const cliTemplate = isDualRegion ? byokCliDual : byokCliSingle;
139
155
  const renderedCli = cliTemplate
@@ -197,7 +213,7 @@ export const C4ClusterDetailsEncryptionTab = (props) => {
197
213
  isDualRegion,
198
214
  status: encryptionStatus,
199
215
  accountId: tenantRoleArn,
200
- }, encryption: encryption, failoverKeyPolicy: failoverKeyPolicy, scripts: {
216
+ }, encryption: encryption, failoverKeyPolicy: failoverKeyPolicy, failoverCloneRolePolicyStatement: failoverCloneRolePolicyStatement, secondaryReplicationNotReady: secondaryReplicationNotReady, scripts: {
201
217
  cliScript: renderedCli,
202
218
  keyPolicy: renderedPolicy,
203
219
  }, text: {
@@ -236,10 +252,15 @@ export const C4ClusterDetailsEncryptionTab = (props) => {
236
252
  downloadKeyPolicy: 'Download key policy',
237
253
  failoverKeyPolicyTitle: 'Action required',
238
254
  failoverKeyPolicyText: 'Update your encryption key policy so this cluster can read its restored data.',
239
- failoverKeyPolicyInstruction: 'This cluster uses the encryption keys from the cluster it was failed over from, so no new key is needed. Grant the three roles below the same key permissions as your original cluster, on both the primary and secondary key. Until then, the restore cannot decrypt your backup data. Policy changes can take about 10 minutes to propagate, so allow some time after saving before the restore proceeds.',
240
- failoverKeyPolicyCloneRole: 'Clone role — copies backup data into this cluster',
255
+ failoverKeyPolicyInstruction: "This cluster uses the encryption keys from the cluster it failed over from, so it doesn't need a new key. Update the key policies below so this cluster's role can access them. Policy changes can take about 10 minutes to propagate, so allow time after saving before the restore continues.",
256
+ failoverKeyPolicyPrimaryTitle: 'Key policy',
257
+ failoverKeyPolicyStatementLabel: 'Statement to add:',
258
+ failoverKeyPolicyStatementInstruction: "Replace every principal in this key policy — except the account root principal — with this cluster's role. Then add the statement below, so the clone role can access the key during the restore.",
259
+ failoverKeyPolicySecondaryTitle: 'Secondary key policy',
260
+ failoverKeyPolicySecondaryInstruction: "Replace every principal in this key policy — except the account root principal — with this cluster's role. This key doesn't need the clone role.",
241
261
  failoverKeyPolicyClusterRole: "This cluster's role",
242
- failoverKeyPolicyReplicationRole: 'Replication role — replicates to the secondary region',
262
+ secondaryReplicationNotReadyTitle: 'Action required',
263
+ secondaryReplicationNotReadyText: "Your secondary region's encryption key isn't accessible, so replication to that region isn't working. Review the key policy in the secondary region and grant this cluster's role access.",
243
264
  }, urls: {
244
265
  byokMain: docsUrls.encryption,
245
266
  cliScriptLearnMore: docsUrls.encryptionCli,
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
6
6
  */
7
7
  import { C3ClusterTag, useC3Profile, } from '@camunda/camunda-composite-components';
8
8
  import { SaaSJobsService, } from '@camunda/ccma-api';
9
- import { ADMIN_APP_RENAME_MIN_VERSION, ClusterPlanTypeAvailabilityClass, ClusterPlanTypeCategory, CONNECTORS_MANAGEMENT_LINK_MIN_VERSION, checkVersion, IDENTITY_AUTHORIZATION_MIN_VERSION, IDENTITY_AUTHORIZATION_NOTICE_MAX_VERSION, INTERNAL_CONNECTORS_MANAGEMENT_MIN_VERSION, JOB_DASHBOARD_MIN_VERSION, LINE_8_9_MIN_VERSION, LINE_8_10_MIN_VERSION, MAX_HARDWARE_PACKAGE_COUNT, SWAGGER_MIN_VERSION, sortGenerationBySemverOfZeebe, TASKLIST_V2_UPGRADE_MIN_VERSION, TASKLIST_V2_UPGRADE_TARGET_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
9
+ import { ADMIN_APP_RENAME_MIN_VERSION, ClusterPlanTypeAvailabilityClass, ClusterPlanTypeCategory, CONNECTORS_MANAGEMENT_LINK_MIN_VERSION, checkVersion, deriveConnectivityMessage, deriveConnectivityStatus, IDENTITY_AUTHORIZATION_MIN_VERSION, IDENTITY_AUTHORIZATION_NOTICE_MAX_VERSION, INTERNAL_CONNECTORS_MANAGEMENT_MIN_VERSION, JOB_DASHBOARD_MIN_VERSION, LINE_8_9_MIN_VERSION, LINE_8_10_MIN_VERSION, MAX_HARDWARE_PACKAGE_COUNT, SWAGGER_MIN_VERSION, sortGenerationBySemverOfZeebe, TASKLIST_V2_UPGRADE_MIN_VERSION, TASKLIST_V2_UPGRADE_TARGET_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
10
10
  import { Api_1, ApiKey, CheckmarkFilled, Renew, Security, UserAccessLocked, } from '@carbon/react/icons/index.esm.js';
11
11
  import { observer } from 'mobx-react-lite';
12
12
  import { Fragment, useCallback, useEffect, useMemo, useRef, useState, } from 'react';
@@ -22,13 +22,27 @@ import { useC4ConsoleData } from '../../../runtime/c4-console-data-context.js';
22
22
  import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
23
23
  import { Checkbox, Link, Modal, Stack, Tag } from '../../../ui/index.js';
24
24
  import { useRadioFamily } from '../../../ui/families.js';
25
+ import { clusterHealthOverride } from '../../cluster-health-override.js';
25
26
  import { isClusterReconciliationPaused } from '../../is-cluster-reconciliation-paused.js';
26
- // Helper function to ensure translations work
27
+ import { buildClusterLoadTexts } from './cluster-load-texts.js';
28
+ // Local copy of `utils/safe-translate.ts`, because these call sites also pass
29
+ // interpolation options, which the shared helper does not take. Keep the miss
30
+ // detection of the two in step.
27
31
  function safeTranslate(t, key, fallback, options) {
28
32
  if (!t)
29
33
  return fallback;
30
34
  const result = t(key, options);
31
- return result === key ? fallback : result;
35
+ if (!result || result === key)
36
+ return fallback;
37
+ // i18next answers a miss with the key without its namespace:
38
+ // `clusterdetails:overview.title` -> `overview.title`. That is a miss too,
39
+ // and without this the raw key reaches the customer.
40
+ if (key.includes(':')) {
41
+ const withoutNamespace = key.split(':').slice(1).join(':');
42
+ if (result === withoutNamespace)
43
+ return fallback;
44
+ }
45
+ return result;
32
46
  }
33
47
  function renderStrongTextTranslation(t, key, fallback, options) {
34
48
  const text = safeTranslate(t, key, fallback, options);
@@ -1076,9 +1090,7 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
1076
1090
  linkVisible: app.linkVisible !== false,
1077
1091
  };
1078
1092
  };
1079
- const statusValue = isClusterPausedReconciliation
1080
- ? 'maintenance'
1081
- : (cluster.status?.ready ?? '');
1093
+ const statusValue = clusterHealthOverride(cluster) ?? cluster.status?.ready ?? '';
1082
1094
  const normalizedReadyStatus = normalizeClusterStatus(statusValue);
1083
1095
  const generationName = cluster.generation?.name ?? '-';
1084
1096
  const clusterUpdateType = (() => {
@@ -1159,6 +1171,7 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
1159
1171
  optimize: safeTranslate(t, 'clusterdetails:overview.applications.descriptions.optimize', 'Get insights to improve your processes'),
1160
1172
  connectors: safeTranslate(t, 'clusterdetails:overview.applications.descriptions.connectors', 'Integrate with external systems'),
1161
1173
  identity: safeTranslate(t, 'clusterdetails:overview.applications.descriptions.identity', 'Manage authentication and authorization'),
1174
+ connectivity: safeTranslate(t, 'clusterdetails:overview.applications.descriptions.connectivity', 'Public access to your cluster'),
1162
1175
  };
1163
1176
  const isAdminVersion = checkVersion({
1164
1177
  possiblyVersionOrDockerPath: cluster.generation?.versions?.zeebe,
@@ -1275,6 +1288,28 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
1275
1288
  description: appDescription.identity,
1276
1289
  linkLabel: launchLabel,
1277
1290
  }),
1291
+ // Public route health (issue#9884). The operator reports it as the
1292
+ // `PublicConnectivityReady` condition and not as a component status:
1293
+ // broken public routes demote the cluster to Unhealthy while every
1294
+ // component above stays Healthy, so this tile is the only place that
1295
+ // says why. The condition is absent when the operator runs without the
1296
+ // public connectivity controller. Then the tile stays out, because an
1297
+ // absent condition is unknown health and not bad health.
1298
+ connectivity: (() => {
1299
+ const connectivityStatus = deriveConnectivityStatus(cluster.status?.conditions);
1300
+ if (!connectivityStatus)
1301
+ return undefined;
1302
+ return {
1303
+ name: 'Connectivity',
1304
+ status: isClusterPausedReconciliation
1305
+ ? 'maintenance'
1306
+ : (normalizeClusterStatus(connectivityStatus) ?? 'unhealthy'),
1307
+ version: '',
1308
+ description: appDescription.connectivity,
1309
+ // Names the routes that are not ready. Empty for a healthy cluster.
1310
+ infoTooltip: deriveConnectivityMessage(cluster.status?.conditions),
1311
+ };
1312
+ })(),
1278
1313
  };
1279
1314
  const regionName = cluster.k8sContext?.name ?? 'unknown';
1280
1315
  const regionId = (() => {
@@ -1314,16 +1349,7 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
1314
1349
  : (cluster.planType?.name ?? '-');
1315
1350
  const clusterLoadProps = canSeeClusterLoad && (clusterLoadLatest || clusterLoadLoading)
1316
1351
  ? {
1317
- texts: {
1318
- title: safeTranslate(t, 'clusterdetails:overview.clusterLoad.title', 'Cluster Load'),
1319
- last: safeTranslate(t, 'clusterdetails:overview.clusterLoad.last', 'Last'),
1320
- day30: safeTranslate(t, 'clusterdetails:overview.clusterLoad.options.30days', '30 days'),
1321
- day7: safeTranslate(t, 'clusterdetails:overview.clusterLoad.options.7days', '7 days'),
1322
- last24h: safeTranslate(t, 'clusterdetails:overview.clusterLoad.options.24hours', '24 hours'),
1323
- current: safeTranslate(t, 'clusterdetails:overview.clusterLoad.current', 'Current'),
1324
- clusterLoadTooltip: safeTranslate(t, 'clusterdetails:overview.clusterLoad.tooltip', "Cluster load: Indicates how much of the cluster's resources are in use."),
1325
- docs: safeTranslate(t, 'clusterdetails:overview.clusterLoad.docs', 'Learn more about cluster load'),
1326
- },
1352
+ texts: buildClusterLoadTexts(t),
1327
1353
  values: {
1328
1354
  latest: clusterLoadLatest ??
1329
1355
  {
@@ -1610,6 +1636,7 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
1610
1636
  : apps.optimize,
1611
1637
  connectors: apps.connectors,
1612
1638
  identity: apps.identity,
1639
+ connectivity: apps.connectivity,
1613
1640
  },
1614
1641
  }, details: details, clusterLoad: clusterLoadProps, rbaNotification: rbaNotification, jobDashboard: jobDashboardEntryPoint, overviewSection: overviewSection }), isOptimizeDisabledForTrial && canEditCluster && isOptimizeModalOpen && (_jsx(C4OptimizeActivationModal, { open: isOptimizeModalOpen, description: safeTranslate(t, 'clusterdetails:overview.applications.optimize.disabled.modal.description', 'When enabled, the Optimize component is deployed alongside this cluster for process analytics and reporting.'), onClose: () => setIsOptimizeModalOpen(false), onActivate: activateOptimize }))] }));
1615
1642
  };
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ConsoleClusterService } from '@camunda/ccma-api';
3
- import { BUSINESS_ID_UNIQUENESS_MIN_VERSION, BYOIDP_MIN_VERSION, checkVersion, ENFORCE_GROUPS_TASKLIST_V2_HIDDEN_MIN_VERSION, ENFORCE_GROUPS_TOGGLE_MIN_VERSION, IDENTITY_MANAGEMENT_MIN_VERSION, isAppIntegrationsVersionSupported, LINE_8_10_MIN_VERSION, MCP_MIN_VERSION, MULTI_TENANCY_TOGGLE_MIN_VERSION, OPTIMIZE_FILTERING_MIN_VERSION, RESOURCE_BASED_AUTHORIZATIONS_MIN_VERSION, SESSION_CONFIG_MIN_VERSION, SWAGGER_MIN_VERSION, TASKLIST_UPGRADE_BANNER_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
3
+ import { BUSINESS_ID_UNIQUENESS_MIN_VERSION, BYOIDP_MIN_VERSION, checkVersion, ENFORCE_GROUPS_TASKLIST_V2_HIDDEN_MIN_VERSION, ENFORCE_GROUPS_TOGGLE_MIN_VERSION, IDENTITY_MANAGEMENT_MIN_VERSION, isAppIntegrationsVersionSupported, isSecretsFilterModeConfigurable, LINE_8_10_MIN_VERSION, MCP_MIN_VERSION, MULTI_TENANCY_TOGGLE_MIN_VERSION, OPTIMIZE_FILTERING_MIN_VERSION, OPTIONAL_TELEMETRY_MIN_VERSION, RESOURCE_BASED_AUTHORIZATIONS_MIN_VERSION, SESSION_CONFIG_MIN_VERSION, SWAGGER_MIN_VERSION, TASKLIST_UPGRADE_BANNER_MIN_VERSION, VersionCheckOperator, } from '@camunda/ccma-shared-types';
4
4
  import { Fragment, useCallback, useMemo, useState, } from 'react';
5
5
  import { C4ClusterSettings } from '../../../components/c4-cluster-settings/c4-cluster-settings.js';
6
6
  import { ExternalIdentityProviderModal, } from '../../../components/c4-cluster-settings/elements/external-identity-provider-modal.js';
7
7
  import { C4InlineNotification } from '../../../components/c4-inline-notification/c4-inline-notification.js';
8
+ import { buildClusterSsoCallbackUrl } from '../../../runtime/build-cluster-sso-callback-url.js';
8
9
  import { buildClusterSwaggerUrl } from '../../../runtime/build-cluster-swagger-url.js';
9
10
  import { useC4ConsoleRuntime } from '../../../runtime/c4-console-runtime-context.js';
10
11
  import { Link, Modal } from '../../../ui/index.js';
@@ -49,8 +50,10 @@ export const C4ClusterDetailsSettingsTab = (props) => {
49
50
  const [isUpdatingLowLatency, setIsUpdatingLowLatency] = useState(false);
50
51
  const [isUpdatingSwagger, setIsUpdatingSwagger] = useState(false);
51
52
  const [isUpdatingMcp, setIsUpdatingMcp] = useState(false);
53
+ const [isUpdatingSecretsFilterMode, setIsUpdatingSecretsFilterMode] = useState(false);
52
54
  const [isUpdatingBusinessIdUniqueness, setIsUpdatingBusinessIdUniqueness] = useState(false);
53
55
  const [isUpdatingAppIntegrations, setIsUpdatingAppIntegrations] = useState(false);
56
+ const [isUpdatingOptionalTelemetry, setIsUpdatingOptionalTelemetry] = useState(false);
54
57
  const [isUpdatingTasklistV2, setIsUpdatingTasklistV2] = useState(false);
55
58
  const [showTasklistV2ConfirmModal, setShowTasklistV2ConfirmModal] = useState(false);
56
59
  const [tasklistV2UpgradeError, setTasklistV2UpgradeError] = useState(undefined);
@@ -78,6 +81,17 @@ export const C4ClusterDetailsSettingsTab = (props) => {
78
81
  body: (_jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.restartConfirm.body', 'Changing this setting restarts your cluster. Your cluster is briefly unavailable while it restarts.') })),
79
82
  errorFallback: settingUpdateFailedFallback,
80
83
  });
84
+ // BYOIDP (#9864): the delete is irreversible and takes the client secret with
85
+ // it, so it gets its own confirmation rather than the restart wording — a
86
+ // "Restart required" heading over a "Continue" button undersells what the
87
+ // action does.
88
+ const deleteExternalIdpConfirm = useRestartConfirm({
89
+ heading: safeTranslate(props.t, 'clusterdetails:settings.externalIdp.deleteConfirm.heading', 'Delete configuration'),
90
+ primaryButtonText: safeTranslate(props.t, 'clusterdetails:settings.externalIdp.deleteConfirm.confirm', 'Delete'),
91
+ secondaryButtonText: safeTranslate(props.t, 'clusterdetails:settings.externalIdp.deleteConfirm.cancel', 'Cancel'),
92
+ body: (_jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.externalIdp.deleteConfirm.body', 'This deletes the configuration and the client secret for this provider. To set it up again, you enter the configuration and a new client secret. Your cluster restarts.') })),
93
+ errorFallback: settingUpdateFailedFallback,
94
+ });
81
95
  // Fire-and-forget wrapper for atomic toggles: asks for restart confirmation
82
96
  // before applying.
83
97
  const applyWithRestartConfirm = useCallback((apply) => () => {
@@ -133,6 +147,11 @@ export const C4ClusterDetailsSettingsTab = (props) => {
133
147
  const isSwaggerToggleVisible = useMemo(() => {
134
148
  return checkClusterVersion(SWAGGER_MIN_VERSION);
135
149
  }, [checkClusterVersion]);
150
+ // isSecretsFilterModeConfigurable has its own floor per zeebe minor line, so
151
+ // it cannot use checkClusterVersion (a single floor).
152
+ const isSecretsFilterModeToggleVisible = useMemo(() => {
153
+ return isSecretsFilterModeConfigurable(props.cluster?.generation?.versions?.zeebe);
154
+ }, [props.cluster?.generation?.versions?.zeebe]);
136
155
  const isMcpToggleVisible = useMemo(() => {
137
156
  return checkClusterVersion(MCP_MIN_VERSION);
138
157
  }, [checkClusterVersion]);
@@ -270,6 +289,32 @@ export const C4ClusterDetailsSettingsTab = (props) => {
270
289
  setIsUpdatingSwagger(false);
271
290
  }
272
291
  }, [props, runtime.telemetry]);
292
+ const updateSecretsFilterMode = useCallback(async (mode) => {
293
+ if (!props.cluster)
294
+ return;
295
+ setIsUpdatingSecretsFilterMode(true);
296
+ try {
297
+ await ConsoleClusterService.updateCluster({
298
+ config: props.apiConfig,
299
+ params: { orgId: props.orgId, clusterId: props.clusterId },
300
+ body: { secretsFilterMode: mode },
301
+ });
302
+ await props.onReloadCluster();
303
+ }
304
+ catch (error) {
305
+ runtime.telemetry?.captureException?.(error, {
306
+ eventName: `secretsFilterMode:${mode}:confirm`,
307
+ message: `Error while setting secretsFilterMode to ${mode}`,
308
+ orgId: props.orgId,
309
+ clusterId: props.clusterId,
310
+ state: mode,
311
+ });
312
+ setOperationError(error instanceof Error ? error.message : settingUpdateFailedFallback);
313
+ }
314
+ finally {
315
+ setIsUpdatingSecretsFilterMode(false);
316
+ }
317
+ }, [props, runtime.telemetry]);
273
318
  const toggleMcp = useCallback(async () => {
274
319
  if (!props.cluster)
275
320
  return;
@@ -354,6 +399,33 @@ export const C4ClusterDetailsSettingsTab = (props) => {
354
399
  setIsUpdatingAppIntegrations(false);
355
400
  }
356
401
  }, [props, runtime.telemetry]);
402
+ const toggleOptionalTelemetry = useCallback(async () => {
403
+ if (!props.cluster)
404
+ return;
405
+ const nextState = !(props.cluster.optionalTelemetryEnabled ?? true);
406
+ setIsUpdatingOptionalTelemetry(true);
407
+ try {
408
+ await ConsoleClusterService.updateCluster({
409
+ config: props.apiConfig,
410
+ params: { orgId: props.orgId, clusterId: props.clusterId },
411
+ body: { optionalTelemetryEnabled: nextState },
412
+ });
413
+ await props.onReloadCluster();
414
+ }
415
+ catch (error) {
416
+ runtime.telemetry?.captureException?.(error, {
417
+ eventName: `optionalTelemetry:${nextState}:confirm`,
418
+ message: `Error while ${nextState ? 'enabling' : 'disabling'} optional telemetry`,
419
+ orgId: props.orgId,
420
+ clusterId: props.clusterId,
421
+ state: nextState,
422
+ });
423
+ setOperationError(error instanceof Error ? error.message : settingUpdateFailedFallback);
424
+ }
425
+ finally {
426
+ setIsUpdatingOptionalTelemetry(false);
427
+ }
428
+ }, [props, runtime.telemetry]);
357
429
  const toggleTasklistV2 = useCallback(async () => {
358
430
  if (!props.cluster)
359
431
  return;
@@ -641,6 +713,35 @@ export const C4ClusterDetailsSettingsTab = (props) => {
641
713
  setIsUpdatingExternalIdp(false);
642
714
  }
643
715
  }, [props, runtime.telemetry, settingUpdateFailedFallback]);
716
+ // BYOIDP (#9864): remove config, CR entry, and secret in one call. The toggle
717
+ // keeps the config on purpose (D4), so this is the only way back to a cluster
718
+ // that has never been configured.
719
+ const deleteExternalIdp = useCallback(async () => {
720
+ runtime.telemetry?.track?.('byoidp:delete', {
721
+ orgId: props.orgId,
722
+ clusterId: props.clusterId,
723
+ });
724
+ setIsUpdatingExternalIdp(true);
725
+ try {
726
+ await ConsoleClusterService.deleteExternalIdp({
727
+ config: props.apiConfig,
728
+ params: { orgId: props.orgId, clusterId: props.clusterId },
729
+ });
730
+ await props.onReloadCluster();
731
+ }
732
+ catch (error) {
733
+ runtime.telemetry?.captureException?.(error, {
734
+ eventName: 'byoidp:delete',
735
+ message: 'Error while deleting external identity provider',
736
+ orgId: props.orgId,
737
+ clusterId: props.clusterId,
738
+ });
739
+ setOperationError(error instanceof Error ? error.message : settingUpdateFailedFallback);
740
+ }
741
+ finally {
742
+ setIsUpdatingExternalIdp(false);
743
+ }
744
+ }, [props, runtime.telemetry, settingUpdateFailedFallback]);
644
745
  const openIdentityBasedAuthorizationsConfirmation = useCallback(() => {
645
746
  if (!props.cluster)
646
747
  return;
@@ -685,6 +786,30 @@ export const C4ClusterDetailsSettingsTab = (props) => {
685
786
  props.cluster?.generation?.versions?.connectorBridge,
686
787
  isAppIntegrationsFeatureEnabled,
687
788
  ]);
789
+ const isOptionalTelemetryFeatureEnabled = runtime.featureFlags?.isEnabled?.('console.optionalTelemetry') ?? false;
790
+ const shouldShowOptionalTelemetry = useMemo(() => {
791
+ if (!isOptionalTelemetryFeatureEnabled) {
792
+ return false;
793
+ }
794
+ // The broker's analytics-exporter exists from 8.10.0-alpha1 onward
795
+ // (camunda-operator's AnalyticsExporterSupported feature gate). The floor
796
+ // here is higher because the toggle stays untested on real clusters
797
+ // below alpha5.
798
+ return checkClusterVersion(OPTIONAL_TELEMETRY_MIN_VERSION);
799
+ }, [checkClusterVersion, isOptionalTelemetryFeatureEnabled]);
800
+ // Both directions feed getZeebeSpec's analyticsExporter and restart the
801
+ // cluster, so both go through the shared restart confirmation. Only the disable
802
+ // direction gets the data-collection wording, since that's the direction
803
+ // that changes what leaves the cluster.
804
+ const handleOptionalTelemetryClick = useCallback(() => {
805
+ const currentlyEnabled = props.cluster?.optionalTelemetryEnabled ?? true;
806
+ restartConfirm.request({
807
+ onConfirm: toggleOptionalTelemetry,
808
+ ...(currentlyEnabled && {
809
+ body: (_jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.optionalTelemetry.confirmBody', "Turning off optional telemetry restarts your cluster. Your cluster is briefly unavailable while it restarts. Camunda still collects contractual telemetry, which is required and can't be turned off.") })),
810
+ }),
811
+ });
812
+ }, [props.cluster, props.t, restartConfirm, toggleOptionalTelemetry]);
688
813
  // Optimize data filters feed the generated spec, so a change restarts the
689
814
  // cluster. The toggle/save actions are awaited by the child panel, so route
690
815
  // them through the promise-based restart-confirm wrapper.
@@ -909,6 +1034,18 @@ export const C4ClusterDetailsSettingsTab = (props) => {
909
1034
  setShowExternalIdpModal(true);
910
1035
  },
911
1036
  },
1037
+ // Only offered once something is configured — there is nothing to
1038
+ // delete before that, and the row already offers "Configure".
1039
+ deleteAction: props.cluster.externalIdpConfig
1040
+ ? {
1041
+ label: 'Delete configuration',
1042
+ onClick: () => {
1043
+ deleteExternalIdpConfirm.request({
1044
+ onConfirm: deleteExternalIdp,
1045
+ });
1046
+ },
1047
+ }
1048
+ : undefined,
912
1049
  onToggle: () => {
913
1050
  // Can only enable once configured; opening the modal handles first setup.
914
1051
  if (!props.cluster?.externalIdpConfig) {
@@ -1030,7 +1167,37 @@ export const C4ClusterDetailsSettingsTab = (props) => {
1030
1167
  },
1031
1168
  },
1032
1169
  }),
1033
- }, ...(canUpgradeTasklist &&
1170
+ ...(isSecretsFilterModeToggleVisible && {
1171
+ secretsFilterModeToggle: {
1172
+ mode: props.cluster.externalMetadata?.secretsFilterMode ?? 'STRICT',
1173
+ description: safeTranslate(props.t, 'clusterdetails:settings.secretsFilterMode.description', 'Controls how Connectors filters secrets read from process variables. Strict blocks reads outside the allowed scope, Lax allows them with a warning, and Disabled turns the filter off.'),
1174
+ permissions: {
1175
+ mayChange: effectiveCanEdit,
1176
+ },
1177
+ action: {
1178
+ label: safeTranslate(props.t, 'clusterdetails:settings.secretsFilterMode.title', 'Secrets filter mode'),
1179
+ onChange: (mode) => applyWithRestartConfirm(() => updateSecretsFilterMode(mode))(),
1180
+ disabled: isUpdatingSecretsFilterMode,
1181
+ },
1182
+ },
1183
+ }),
1184
+ }, ...(shouldShowOptionalTelemetry && {
1185
+ // Its own peer tile, not a row inside `settings` — CONTRACTUAL
1186
+ // telemetry has no toggle anywhere, per issue #9725.
1187
+ optionalTelemetrySettings: {
1188
+ title: safeTranslate(props.t, 'clusterdetails:settings.optionalTelemetry.tileTitle', 'Optional telemetry'),
1189
+ enabled: props.cluster.optionalTelemetryEnabled ?? true,
1190
+ description: safeTranslate(props.t, 'clusterdetails:settings.optionalTelemetry.description', "Camunda collects optional usage data from this cluster to improve our products. When disabled, Camunda still collects contractual telemetry, which is required and can't be turned off."),
1191
+ permissions: {
1192
+ mayChange: effectiveCanEdit,
1193
+ },
1194
+ action: {
1195
+ label: safeTranslate(props.t, 'clusterdetails:settings.optionalTelemetry.title', 'Enable optional telemetry'),
1196
+ onClick: handleOptionalTelemetryClick,
1197
+ disabled: isUpdatingOptionalTelemetry,
1198
+ },
1199
+ },
1200
+ }), ...(canUpgradeTasklist &&
1034
1201
  !props.cluster.externalMetadata?.tasklistV2Enabled && {
1035
1202
  tasklistSettings: {
1036
1203
  title: safeTranslate(props.t, 'clusterdetails:settings.tasklistMode.title', 'Upgrade to Tasklist v2'),
@@ -1104,7 +1271,11 @@ export const C4ClusterDetailsSettingsTab = (props) => {
1104
1271
  setAuthorizationsConfirmError(undefined);
1105
1272
  }, onRequestSubmit: () => {
1106
1273
  void submitAuthorizationsConfirmation();
1107
- }, size: 'sm', children: [authorizationsConfirmDescription, _jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.restartConfirm.note', 'Changing this setting also restarts your cluster. Your cluster is briefly unavailable while it restarts.') }), authorizationsConfirmError && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', hideCloseButton: true, title: '', subtitle: authorizationsConfirmError }))] })), restartConfirm.modal, shouldShowExternalIdp && (_jsx(ExternalIdentityProviderModal, { open: showExternalIdpModal, initialConfig: props.cluster.externalIdpConfig, saving: isUpdatingExternalIdp, error: externalIdpError, onClose: () => {
1274
+ }, size: 'sm', children: [authorizationsConfirmDescription, _jsx("p", { children: safeTranslate(props.t, 'clusterdetails:settings.restartConfirm.note', 'Changing this setting also restarts your cluster. Your cluster is briefly unavailable while it restarts.') }), authorizationsConfirmError && (_jsx(C4InlineNotification, { lowContrast: true, kind: 'error', hideCloseButton: true, title: '', subtitle: authorizationsConfirmError }))] })), restartConfirm.modal, deleteExternalIdpConfirm.modal, shouldShowExternalIdp && (_jsx(ExternalIdentityProviderModal, { open: showExternalIdpModal, initialConfig: props.cluster.externalIdpConfig, saving: isUpdatingExternalIdp, error: externalIdpError, callbackUrl: buildClusterSsoCallbackUrl({
1275
+ cluster: props.cluster,
1276
+ clusterId: props.clusterId,
1277
+ stage: runtime.stage,
1278
+ }), onClose: () => {
1108
1279
  if (isUpdatingExternalIdp)
1109
1280
  return;
1110
1281
  setShowExternalIdpModal(false);
@@ -0,0 +1,13 @@
1
+ import type { ClusterLoadProps } from '../../../components/c4-cluster-overview/cluster-load.js';
2
+ import { type TranslateFn } from '../../../utils/safe-translate.js';
3
+ /**
4
+ * Copy for the cluster load card, from the i18n bundle.
5
+ *
6
+ * This function depends only on `t`.
7
+ * Use it when you cannot render the Overview tab widget (for example, in Storybook).
8
+ * Before this file, the screenshots used mock strings.
9
+ * As a result, an i18n-only change did not update the screenshots.
10
+ *
11
+ * `cluster-details-tabs.ts` stores tab titles for the same reason.
12
+ */
13
+ export declare function buildClusterLoadTexts(t: TranslateFn | undefined): ClusterLoadProps['texts'];
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. Licensed under a commercial license.
4
+ * You may not use this file except in compliance with the commercial license.
5
+ */
6
+ import { safeTranslate } from '../../../utils/safe-translate.js';
7
+ /**
8
+ * Copy for the cluster load card, from the i18n bundle.
9
+ *
10
+ * This function depends only on `t`.
11
+ * Use it when you cannot render the Overview tab widget (for example, in Storybook).
12
+ * Before this file, the screenshots used mock strings.
13
+ * As a result, an i18n-only change did not update the screenshots.
14
+ *
15
+ * `cluster-details-tabs.ts` stores tab titles for the same reason.
16
+ */
17
+ export function buildClusterLoadTexts(t) {
18
+ return {
19
+ title: safeTranslate(t, 'clusterdetails:overview.clusterLoad.title', 'Cluster Load'),
20
+ last: safeTranslate(t, 'clusterdetails:overview.clusterLoad.last', 'Last'),
21
+ day30: safeTranslate(t, 'clusterdetails:overview.clusterLoad.options.30days', '30 days'),
22
+ day7: safeTranslate(t, 'clusterdetails:overview.clusterLoad.options.7days', '7 days'),
23
+ last24h: safeTranslate(t, 'clusterdetails:overview.clusterLoad.options.24hours', '24 hours'),
24
+ current: safeTranslate(t, 'clusterdetails:overview.clusterLoad.current', 'Current'),
25
+ clusterLoadTooltip: safeTranslate(t, 'clusterdetails:overview.clusterLoad.tooltip', "Cluster load: Indicates how much of the cluster's resources are in use."),
26
+ docs: safeTranslate(t, 'clusterdetails:overview.clusterLoad.docs', 'Learn more about cluster load'),
27
+ reload: safeTranslate(t, 'clusterdetails:overview.clusterLoad.reload', 'Reload'),
28
+ };
29
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The health state that replaces the raw `status.ready` of a cluster.
3
+ * Returns `undefined` when the raw status is correct.
4
+ *
5
+ * A restoring or reconciliation-paused cluster reports `Suspended` or
6
+ * `Unhealthy`. That status is true but useless, because the operator stopped
7
+ * reconciliation on purpose. Both states have their own label instead.
8
+ *
9
+ * `restoring` wins over `maintenance`. A restore also pauses reconciliation,
10
+ * and the restore is the more specific fact.
11
+ *
12
+ * Three surfaces read this: the Clusters list, the header badge of the cluster
13
+ * page, and the Cluster Details table on the overview tab. Each kept its own
14
+ * copy, and they showed three different labels for one cluster.
15
+ */
16
+ export declare function clusterHealthOverride(cluster: unknown): 'restoring' | 'maintenance' | undefined;
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
3
+ * under one or more contributor license agreements. Licensed under a commercial license.
4
+ * You may not use this file except in compliance with the commercial license.
5
+ */
6
+ import { isClusterReconciliationPaused } from './is-cluster-reconciliation-paused.js';
7
+ /**
8
+ * The health state that replaces the raw `status.ready` of a cluster.
9
+ * Returns `undefined` when the raw status is correct.
10
+ *
11
+ * A restoring or reconciliation-paused cluster reports `Suspended` or
12
+ * `Unhealthy`. That status is true but useless, because the operator stopped
13
+ * reconciliation on purpose. Both states have their own label instead.
14
+ *
15
+ * `restoring` wins over `maintenance`. A restore also pauses reconciliation,
16
+ * and the restore is the more specific fact.
17
+ *
18
+ * Three surfaces read this: the Clusters list, the header badge of the cluster
19
+ * page, and the Cluster Details table on the overview tab. Each kept its own
20
+ * copy, and they showed three different labels for one cluster.
21
+ */
22
+ export function clusterHealthOverride(cluster) {
23
+ if (!cluster || typeof cluster !== 'object') {
24
+ return undefined;
25
+ }
26
+ if (cluster.restoreInProgress === true) {
27
+ return 'restoring';
28
+ }
29
+ if (isClusterReconciliationPaused(cluster)) {
30
+ return 'maintenance';
31
+ }
32
+ return undefined;
33
+ }
@@ -15,6 +15,7 @@ import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js
15
15
  import { toApiConfig } from '../../runtime/to-api-config.js';
16
16
  import { Checkbox, Modal, Stack, TextInput } from '../../ui/index.js';
17
17
  import { useSelectFamily } from '../../ui/families.js';
18
+ import { clusterHealthOverride } from '../cluster-health-override.js';
18
19
  import { isClusterReconciliationPaused } from '../is-cluster-reconciliation-paused.js';
19
20
  import { useExtendTrial } from '../use-extend-trial.js';
20
21
  function getString(record, key) {
@@ -372,14 +373,13 @@ export const C4ClustersPage = observer(({ orgId, scope = 'cluster', gettingStart
372
373
  const item = mapClusterToListItem(rawCluster, index);
373
374
  if (!item)
374
375
  return undefined;
375
- // A restoring cluster pauses reconciliation (and may report a
376
- // suspended/paused status); surface the more specific "Restoring"
377
- // state so the list matches the restore-in-progress notification.
378
- if (getBoolean(rawCluster, 'restoreInProgress')) {
379
- return { ...item, status: 'restoring' };
380
- }
381
- if (isClusterReconciliationPaused(rawCluster)) {
382
- return { ...item, status: 'maintenance' };
376
+ // A restoring or reconciliation-paused cluster reports a raw status
377
+ // that says nothing useful. `clusterHealthOverride` owns the label
378
+ // that replaces it. This list, the header badge of the cluster page,
379
+ // and the Cluster Details table read the one function.
380
+ const healthOverride = clusterHealthOverride(rawCluster);
381
+ if (healthOverride) {
382
+ return { ...item, status: healthOverride };
383
383
  }
384
384
  const generationUuid = getClusterGenerationUuid(rawCluster);
385
385
  const representativeClusterId = generationUuid
@@ -42,7 +42,7 @@ function mapRegionBackups(region) {
42
42
  })
43
43
  .filter((region) => region.id && region.label)
44
44
  : [];
45
- return { uuid, regions };
45
+ return { uuid, regions, failover: getBoolean(backup, 'failover') };
46
46
  })
47
47
  .filter((backup) => Boolean(backup));
48
48
  }