@camunda/ccma-saas-frontend 0.7.2 → 0.8.1

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 (109) hide show
  1. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.d.ts +10 -0
  2. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.js +78 -0
  3. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.mocks.d.ts +6 -0
  4. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.mocks.js +90 -0
  5. package/lib/esm/components/c4-api-client-scope-picker/c4-api-client-scope-picker.types.d.ts +25 -0
  6. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +5 -1
  7. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +9 -0
  8. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +6 -3
  9. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.types.d.ts +3 -0
  10. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +9 -0
  11. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.mocks.js +2 -0
  12. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.types.d.ts +2 -0
  13. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.d.ts +1 -1
  14. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.js +11 -18
  15. package/lib/esm/components/c4-cluster-details-encryption/c4-cluster-details-encryption.types.d.ts +19 -2
  16. package/lib/esm/components/c4-cluster-overview/applications.d.ts +12 -0
  17. package/lib/esm/components/c4-cluster-overview/applications.js +10 -2
  18. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.d.ts +6 -1
  19. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.mocks.js +15 -2
  20. package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +1 -0
  21. package/lib/esm/components/c4-cluster-overview/cluster-load.js +14 -6
  22. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
  23. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +4 -2
  24. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
  25. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.d.ts +3 -1
  26. package/lib/esm/components/c4-cluster-settings/elements/cluster-settings.js +7 -3
  27. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.d.ts +9 -1
  28. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +69 -12
  29. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +10 -1
  30. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +16 -2
  31. package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.d.ts +14 -0
  32. package/lib/esm/components/c4-cluster-settings/elements/optional-telemetry-toggle.js +12 -0
  33. package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.d.ts +15 -0
  34. package/lib/esm/components/c4-cluster-settings/elements/secrets-filter-mode-toggle.js +10 -0
  35. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.d.ts +4 -2
  36. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +24 -3
  37. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +1 -1
  38. package/lib/esm/components/c4-create-cluster/c4-create-cluster.mocks.js +1 -0
  39. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +2 -0
  40. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +13 -30
  41. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +10 -5
  42. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +10 -5
  43. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.js +1 -1
  44. package/lib/esm/components/c4-tile-with-title-and-action/c4-tile-with-title-and-action.types.d.ts +5 -0
  45. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +2 -1
  46. package/lib/esm/externalUrls.const.d.ts +1 -1
  47. package/lib/esm/externalUrls.const.js +1 -1
  48. package/lib/esm/i18n/c4-console-i18n.js +6 -0
  49. package/lib/esm/i18n/en/modals/apiclients.json +4 -0
  50. package/lib/esm/i18n/en/pages/clusterdetails.json +25 -3
  51. package/lib/esm/i18n/en/pages/orgmanagement.json +1 -0
  52. package/lib/esm/index.d.ts +3 -3
  53. package/lib/esm/index.js +2 -3
  54. package/lib/esm/runtime/build-cluster-sso-callback-url.d.ts +34 -0
  55. package/lib/esm/runtime/build-cluster-sso-callback-url.js +49 -0
  56. package/lib/esm/runtime/build-cluster-swagger-url.d.ts +7 -2
  57. package/lib/esm/runtime/build-cluster-swagger-url.js +20 -5
  58. package/lib/esm/runtime/c4-console-runtime-context.d.ts +10 -0
  59. package/lib/esm/runtime/c4-console-runtime-context.js +12 -0
  60. package/lib/esm/runtime/index.d.ts +2 -1
  61. package/lib/esm/runtime/index.js +2 -1
  62. package/lib/esm/runtime/use-hub-api-naming.d.ts +17 -0
  63. package/lib/esm/runtime/use-hub-api-naming.js +23 -0
  64. package/lib/esm/ui/families.d.ts +4 -0
  65. package/lib/esm/ui/families.js +22 -2
  66. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +16 -1
  67. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +70 -21
  68. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
  69. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +54 -13
  70. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +10 -0
  71. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.d.ts +1 -0
  72. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +3 -0
  73. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.d.ts +11 -0
  74. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js +8 -3
  75. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.d.ts +7 -0
  76. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +26 -5
  77. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +43 -16
  78. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +174 -3
  79. package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.d.ts +13 -0
  80. package/lib/esm/widgets/cluster-details/tabs/cluster-load-texts.js +29 -0
  81. package/lib/esm/widgets/cluster-health-override.d.ts +16 -0
  82. package/lib/esm/widgets/cluster-health-override.js +33 -0
  83. package/lib/esm/widgets/clusters/c4-clusters-page.js +8 -8
  84. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +1 -1
  85. package/lib/esm/widgets/environment/c4-cluster-api-clients-widget.js +6 -1
  86. package/lib/esm/widgets/environment/c4-cluster-connector-secrets-widget.js +2 -1
  87. package/lib/esm/widgets/environment/use-cluster-swagger-url.d.ts +7 -4
  88. package/lib/esm/widgets/environment/use-cluster-swagger-url.js +7 -4
  89. package/lib/esm/widgets/management/c4-management-app.js +6 -2
  90. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +16 -31
  91. package/package.json +24 -24
  92. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.d.ts +0 -16
  93. package/lib/esm/components/c4-advanced-search-filters/ArrayFieldContainer.js +0 -40
  94. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.d.ts +0 -16
  95. package/lib/esm/components/c4-advanced-search-filters/AutosuggestInput.js +0 -142
  96. package/lib/esm/components/c4-advanced-search-filters/FieldRow.d.ts +0 -14
  97. package/lib/esm/components/c4-advanced-search-filters/FieldRow.js +0 -136
  98. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.d.ts +0 -13
  99. package/lib/esm/components/c4-advanced-search-filters/FiltersSection.js +0 -58
  100. package/lib/esm/components/c4-advanced-search-filters/OrSection.d.ts +0 -16
  101. package/lib/esm/components/c4-advanced-search-filters/OrSection.js +0 -118
  102. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.d.ts +0 -3
  103. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.js +0 -408
  104. package/lib/esm/components/c4-advanced-search-filters/c4-advanced-search-filters.types.d.ts +0 -32
  105. package/lib/esm/components/c4-advanced-search-filters/state.types.d.ts +0 -14
  106. package/lib/esm/components/c4-advanced-search-filters/state.types.js +0 -6
  107. package/lib/esm/components/c4-advanced-search-filters/utils.d.ts +0 -5
  108. package/lib/esm/components/c4-advanced-search-filters/utils.js +0 -58
  109. /package/lib/esm/components/{c4-advanced-search-filters/c4-advanced-search-filters.types.js → c4-api-client-scope-picker/c4-api-client-scope-picker.types.js} +0 -0
@@ -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
  }
@@ -50,7 +50,12 @@ const C4ClusterApiClientsWidgetImpl = ({ orgId, clusterId, scope = 'cluster', ur
50
50
  useEffect(() => {
51
51
  void reload();
52
52
  }, [reload]);
53
- return (_jsx(C4ClusterDetailsClientsTab, { cluster: cluster, clients: clients, clientsLoading: loading, clientsError: error, hasIdentityIntegration: hasIdentityIntegration, useClusterSecretsLabel: useClusterSecretsLabel, orgId: orgId, clusterId: clusterId, clientsDocsUrl: resolvedUrls.docs.clients, mcpSetupDocsUrl: resolvedUrls.docs.mcpSetup, identityAuthorizationDocsUrl: resolvedUrls.docs.identityAuthorization, springZeebeGettingStartedDocsUrl: resolvedUrls.docs.springZeebeGettingStarted, springZeebeConfigDocsUrl: resolvedUrls.docs.springZeebeConfig, apiConfig: apiConfig, canMutateCluster: Boolean(orgPermissions?.cluster.clients.create), clientsPermissions: {
53
+ return (_jsx(C4ClusterDetailsClientsTab, { cluster: cluster, clients: clients,
54
+ // `canReadClients` is false until the token decodes, so no fetch starts.
55
+ // Without `authz.isLoading` the panel shows its "create your first
56
+ // client" empty state for one render pass, then swaps to the real list.
57
+ clientsLoading: loading || authz.isLoading, clientsError: error, hasIdentityIntegration: hasIdentityIntegration, useClusterSecretsLabel: useClusterSecretsLabel, orgId: orgId, clusterId: clusterId, clientsDocsUrl: resolvedUrls.docs.clients, mcpSetupDocsUrl: resolvedUrls.docs.mcpSetup, identityAuthorizationDocsUrl: resolvedUrls.docs.identityAuthorization, springZeebeGettingStartedDocsUrl: resolvedUrls.docs.springZeebeGettingStarted, springZeebeConfigDocsUrl: resolvedUrls.docs.springZeebeConfig, apiConfig: apiConfig, canMutateCluster: Boolean(orgPermissions?.cluster.clients.create), clientsPermissions: {
58
+ canRead: canReadClients,
54
59
  canCreate: Boolean(orgPermissions?.cluster.clients.create),
55
60
  canUpdate: Boolean(orgPermissions?.cluster.clients.update),
56
61
  canDelete: Boolean(orgPermissions?.cluster.clients.delete),
@@ -6,6 +6,7 @@ import { useC4ConsoleAuthz } from '../../runtime/c4-console-authz.js';
6
6
  import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
7
7
  import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
8
8
  import { toApiConfig } from '../../runtime/to-api-config.js';
9
+ import { SECTION_HEADING_STYLE } from '../../utils/section-heading-style.js';
9
10
  import { C4ClusterDetailsConnectorSecretsTab } from '../cluster-details/tabs/c4-cluster-details-connector-secrets-tab.js';
10
11
  import { useClusterVersionFlags } from './use-cluster-version-flags.js';
11
12
  /**
@@ -47,7 +48,7 @@ const C4ClusterConnectorSecretsWidgetImpl = ({ orgId, clusterId, scope = 'cluste
47
48
  // `onPanelState` report rather than re-derived, so there is exactly one
48
49
  // place resolving this string.
49
50
  const [panelState, setPanelState] = useState({ isEmpty: false, title: '' });
50
- return (_jsxs(_Fragment, { children: [panelState.isEmpty && _jsx("h3", { children: panelState.title }), _jsx(C4ClusterDetailsConnectorSecretsTab, { orgId: orgId, clusterId: clusterId, apiConfig: apiConfig, canMutateCluster: Boolean(orgPermissions?.cluster.connectorSecrets.update), useClusterSecretsLabel: useClusterSecretsLabel, connectorSecretsPermissions: {
51
+ return (_jsxs(_Fragment, { children: [panelState.isEmpty && (_jsx("h3", { style: SECTION_HEADING_STYLE, children: panelState.title })), _jsx(C4ClusterDetailsConnectorSecretsTab, { permissionsLoading: authz.isLoading, orgId: orgId, clusterId: clusterId, apiConfig: apiConfig, canMutateCluster: Boolean(orgPermissions?.cluster.connectorSecrets.update), useClusterSecretsLabel: useClusterSecretsLabel, connectorSecretsPermissions: {
51
52
  canCreate: Boolean(orgPermissions?.cluster.connectorSecrets.create),
52
53
  canRead: Boolean(orgPermissions?.cluster.connectorSecrets.read),
53
54
  canUpdate: Boolean(orgPermissions?.cluster.connectorSecrets.update),
@@ -1,10 +1,13 @@
1
1
  /**
2
2
  * The cluster's Swagger UI URL, or `undefined` when there isn't one.
3
3
  *
4
- * `undefined` covers four cases a host must handle the same way — hide the
5
- * affordance: the cluster has swagger disabled, it has no `operateUrl` yet
6
- * (still being created), it simply hasn't loaded into the data context, or
7
- * its `operateUrl` fails to parse as a URL.
4
+ * A host must handle all five `undefined` cases the same way, and hide the
5
+ * affordance:
6
+ * - The cluster is older than `SWAGGER_MIN_VERSION`.
7
+ * - The cluster has swagger disabled.
8
+ * - The cluster has no `operateUrl` yet, because it is still in creation.
9
+ * - The cluster is not loaded into the data context.
10
+ * - The `operateUrl` of the cluster does not parse as a URL.
8
11
  *
9
12
  * This reads the cluster from the c4 data context — which fetches Console's
10
13
  * internal API from the browser with the viewer's own token — so a host can
@@ -10,10 +10,13 @@ import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js
10
10
  /**
11
11
  * The cluster's Swagger UI URL, or `undefined` when there isn't one.
12
12
  *
13
- * `undefined` covers four cases a host must handle the same way — hide the
14
- * affordance: the cluster has swagger disabled, it has no `operateUrl` yet
15
- * (still being created), it simply hasn't loaded into the data context, or
16
- * its `operateUrl` fails to parse as a URL.
13
+ * A host must handle all five `undefined` cases the same way, and hide the
14
+ * affordance:
15
+ * - The cluster is older than `SWAGGER_MIN_VERSION`.
16
+ * - The cluster has swagger disabled.
17
+ * - The cluster has no `operateUrl` yet, because it is still in creation.
18
+ * - The cluster is not loaded into the data context.
19
+ * - The `operateUrl` of the cluster does not parse as a URL.
17
20
  *
18
21
  * This reads the cluster from the c4 data context — which fetches Console's
19
22
  * internal API from the browser with the viewer's own token — so a host can
@@ -19,6 +19,7 @@ import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
19
19
  import { useC4ConsoleRuntime, useC4DesignSystem, } from '../../runtime/c4-console-runtime-context.js';
20
20
  import { toApiConfig } from '../../runtime/to-api-config.js';
21
21
  import { toIdentityApiBaseUrl } from '../../runtime/to-identity-api-base-url.js';
22
+ import { useHubApiNaming } from '../../runtime/use-hub-api-naming.js';
22
23
  import { Link, Stack } from '../../ui/index.js';
23
24
  import { clientErrorMessage } from '../../utils/http-error-message.js';
24
25
  import { legacySectionRoles } from '../../utils/role-labels.js';
@@ -565,6 +566,7 @@ function themeNameToClassName(theme) {
565
566
  export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onNavigate, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, tenantsValueMetricEnabled = false, hdpValueMetricsFor2025Enabled = false, permissionsReworkEnabled = false, urls, onNeedsReload, }) => {
566
567
  const runtime = useC4ConsoleRuntime();
567
568
  const designSystem = useC4DesignSystem();
569
+ const hubNaming = useHubApiNaming();
568
570
  const data = useC4ConsoleData();
569
571
  const apiConfig = useMemo(() => toApiConfig(runtime), [runtime]);
570
572
  const fetchMembers = data.fetchMembers;
@@ -2585,7 +2587,9 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
2585
2587
  headerByomClientScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.byomClientScopes', 'BYOM client scopes'),
2586
2588
  headerIpWhiteListScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.ipWhiteListScopes', 'IP whitelist scopes'),
2587
2589
  headerSecretsScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.secretsScopes', 'Secrets scopes'),
2588
- headerModelerScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.modelerScopes', 'Modeler scopes'),
2590
+ headerModelerScopes: safeTranslate(t, hubNaming
2591
+ ? 'orgmanagement:tabs.api.table.modelerScopesHub'
2592
+ : 'orgmanagement:tabs.api.table.modelerScopes', hubNaming ? 'Hub Scopes' : 'Modeler Scopes'),
2589
2593
  headerMemberScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.memberScopes', 'Member scopes'),
2590
2594
  headerHotBackupScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.hotBackupScopes', 'Hot backup scopes'),
2591
2595
  headerActivityScopes: safeTranslate(t, 'orgmanagement:tabs.api.table.activityScopes', 'Activity scopes'),
@@ -2601,7 +2605,7 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
2601
2605
  emptyStateButton: safeTranslate(t, 'orgmanagement:tabs.api.noClients.button', 'Create API client'),
2602
2606
  emptyStateLinkLabel: safeTranslate(t, 'orgmanagement:tabs.api.noClients.link', 'Learn more'),
2603
2607
  };
2604
- }, [apiUrls.docsLink, t]);
2608
+ }, [apiUrls.docsLink, t, hubNaming]);
2605
2609
  const apiTabProps = useMemo(() => {
2606
2610
  return {
2607
2611
  apiClientsItems,
@@ -1,9 +1,11 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { useMemo, useState } from 'react';
3
+ import { C4ApiClientScopePicker } from '../../../components/c4-api-client-scope-picker/c4-api-client-scope-picker.js';
3
4
  import { C4ClusterClientCredentialsModal } from '../../../components/c4-cluster-client-credentials/c4-cluster-client-credentials.js';
4
5
  import { C4ManagementApi } from '../../../components/c4-management-api/c4-management-api.js';
5
6
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListRow, C4StructuredListWrapper, } from '../../../components/c4-structured-list/c4-structured-list.js';
6
- import { Checkbox, Form, FormGroup, Link, Modal, Stack, TextInput, } from '../../../ui/index.js';
7
+ import { useHubApiNaming } from '../../../runtime/use-hub-api-naming.js';
8
+ import { Form, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
7
9
  // Helper functions
8
10
  function isApiClientNameValid(name) {
9
11
  if (!name.trim()) {
@@ -237,6 +239,7 @@ export const C4ManagementApiTab = (props) => {
237
239
  // Details modal state
238
240
  const [apiDetailsModalOpen, setApiDetailsModalOpen] = useState(false);
239
241
  const [apiDetailsTargetUuid, setApiDetailsTargetUuid] = useState(undefined);
242
+ const hubNaming = useHubApiNaming();
240
243
  // Available scopes for create modal
241
244
  const apiClientAvailableScopes = useMemo(() => {
242
245
  const scopes = [
@@ -312,7 +315,9 @@ export const C4ManagementApiTab = (props) => {
312
315
  ],
313
316
  },
314
317
  {
315
- label: safeTranslate(t, 'apiclients:create.fields.scopes.modeler.label', 'Modeler'),
318
+ label: safeTranslate(t, hubNaming
319
+ ? 'apiclients:create.fields.scopes.modeler.labelHub'
320
+ : 'apiclients:create.fields.scopes.modeler.label', hubNaming ? 'Hub API' : 'Web Modeler API'),
316
321
  scopes: [
317
322
  {
318
323
  label: safeTranslate(t, 'apiclients:create.fields.scopes.modeler.get', 'Get'),
@@ -423,7 +428,7 @@ export const C4ManagementApiTab = (props) => {
423
428
  },
424
429
  ];
425
430
  return scopes;
426
- }, [t]);
431
+ }, [t, hubNaming]);
427
432
  const docsUrl = apiUrls.docsLink;
428
433
  const openDocs = () => {
429
434
  if (!docsUrl) {
@@ -480,35 +485,13 @@ export const C4ManagementApiTab = (props) => {
480
485
  setApiCreateSaving(false);
481
486
  }
482
487
  })();
483
- }, size: 'sm', id: 'c4-create-api-client-modal', children: _jsx(Stack, { gap: 6, children: _jsx(Form, { children: _jsxs(Stack, { gap: 6, children: [_jsx(TextInput, { id: 'c4-api-client-name-create', labelText: safeTranslate(t, 'apiclients:create.fields.name.label', 'Name'), maxLength: 50, value: apiCreateName, helperText: safeTranslate(t, 'apiclients:create.fields.name.helperText', ''), onChange: (e) => setApiCreateName(e.currentTarget.value), invalid: Boolean(apiCreateError), invalidText: apiCreateError, disabled: apiCreateSaving }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { children: safeTranslate(t, 'apiclients:create.fields.scopes.label', 'Scopes') }), _jsx("p", { children: renderInlineLink0(safeTranslate(t, 'apiclients:create.fields.scopes.helperText', 'Select scopes for this client.'), (label) => docsUrl ? (_jsx(Link, { size: 'sm', href: docsUrl, onClick: (e) => {
488
+ },
489
+ // The scope picker needs the width for its columns. A narrower modal
490
+ // gives one column and about three screens of vertical scroll.
491
+ size: 'lg', id: 'c4-create-api-client-modal', children: _jsx(Stack, { gap: 6, children: _jsx(Form, { children: _jsxs(Stack, { gap: 6, children: [_jsx(TextInput, { id: 'c4-api-client-name-create', labelText: safeTranslate(t, 'apiclients:create.fields.name.label', 'Name'), maxLength: 50, value: apiCreateName, helperText: safeTranslate(t, 'apiclients:create.fields.name.helperText', ''), onChange: (e) => setApiCreateName(e.currentTarget.value), invalid: Boolean(apiCreateError), invalidText: apiCreateError, disabled: apiCreateSaving }), _jsxs(Stack, { gap: 2, children: [_jsx("h3", { children: safeTranslate(t, 'apiclients:create.fields.scopes.label', 'Scopes') }), _jsx("p", { children: renderInlineLink0(safeTranslate(t, 'apiclients:create.fields.scopes.helperText', 'Select scopes for this client.'), (label) => docsUrl ? (_jsx(Link, { size: 'sm', href: docsUrl, onClick: (e) => {
484
492
  e.preventDefault();
485
493
  openDocs();
486
- }, children: label })) : (_jsx("span", { children: label }))) })] }), _jsx(Stack, { gap: 4, children: apiClientAvailableScopes.map((group, groupIndex) => {
487
- const groupValues = group.scopes.map((s) => s.value);
488
- const selectedCount = groupValues.filter((v) => apiCreatePermissions.includes(v)).length;
489
- const allSelected = selectedCount === groupValues.length;
490
- const indeterminate = selectedCount > 0 && !allSelected;
491
- return (_jsx(FormGroup, { legendText: '', children: _jsxs(Stack, { gap: 2, children: [_jsx(Checkbox, { id: `c4-api-scope-group-${groupIndex}`, labelText: group.label, checked: allSelected, indeterminate: indeterminate, onChange: () => {
492
- setApiCreatePermissions((current) => {
493
- const currentSet = new Set(current);
494
- const isAllSelected = groupValues.every((v) => currentSet.has(v));
495
- if (isAllSelected) {
496
- groupValues.forEach((v) => currentSet.delete(v));
497
- }
498
- else {
499
- groupValues.forEach((v) => currentSet.add(v));
500
- }
501
- return Array.from(currentSet);
502
- });
503
- }, disabled: apiCreateSaving }), _jsx("div", { style: { marginLeft: 'var(--cds-spacing-06)' }, children: _jsx(Stack, { gap: 0, style: { rowGap: '0px' }, children: group.scopes.map((scope) => {
504
- const checked = apiCreatePermissions.includes(scope.value);
505
- return (_jsx(Checkbox, { id: `c4-api-scope-${scope.value}`, labelText: scope.label, checked: checked, onChange: () => {
506
- setApiCreatePermissions((current) => checked
507
- ? current.filter((v) => v !== scope.value)
508
- : [...current, scope.value]);
509
- }, disabled: apiCreateSaving }, scope.value));
510
- }) }) })] }) }, `${group.label}-${groupIndex}`));
511
- }) })] }) }) }) })), apiCreateResponseOpen && apiCreateResponse ? (_jsx(C4ClusterClientCredentialsModal, { isOpen: apiCreateResponseOpen, heading: safeTranslate(t, 'apiclients:create.heading.response', 'API client credentials'), onRequestClose: () => setApiCreateResponseOpen(false), notificationText: safeTranslate(t, 'apiclients:completed.notificationText', 'Save these credentials now.'), description: _jsx("span", { children: renderInlineLink0(safeTranslate(t, 'apiclients:completed.description', 'You can use these credentials to access the Console API.'), (label) => docsUrl ? (_jsx(Link, { size: 'sm', href: docsUrl, onClick: (e) => {
494
+ }, children: label })) : (_jsx("span", { children: label }))) })] }), _jsx(C4ApiClientScopePicker, { groups: apiClientAvailableScopes, selectedScopes: apiCreatePermissions, onChange: setApiCreatePermissions, disabled: apiCreateSaving, idPrefix: 'c4-api' })] }) }) }) })), apiCreateResponseOpen && apiCreateResponse ? (_jsx(C4ClusterClientCredentialsModal, { isOpen: apiCreateResponseOpen, heading: safeTranslate(t, 'apiclients:create.heading.response', 'API client credentials'), onRequestClose: () => setApiCreateResponseOpen(false), notificationText: safeTranslate(t, 'apiclients:completed.notificationText', 'Save these credentials now.'), description: _jsx("span", { children: renderInlineLink0(safeTranslate(t, 'apiclients:completed.description', 'You can use these credentials to access the Console API.'), (label) => docsUrl ? (_jsx(Link, { size: 'sm', href: docsUrl, onClick: (e) => {
512
495
  e.preventDefault();
513
496
  openDocs();
514
497
  }, children: label })) : (_jsx("span", { children: label }))) }), variants: (() => {
@@ -623,7 +606,9 @@ export const C4ManagementApiTab = (props) => {
623
606
  },
624
607
  {
625
608
  id: 'modeler-scopes',
626
- label: safeTranslate(t, 'apiclients:details.fields.modelerScopes', 'Modeler scopes'),
609
+ label: safeTranslate(t, hubNaming
610
+ ? 'apiclients:details.fields.modelerScopesHub'
611
+ : 'apiclients:details.fields.modelerScopes', hubNaming ? 'Hub Scopes' : 'Modeler Scopes'),
627
612
  value: scopes.modelerScopes,
628
613
  },
629
614
  {