@camunda/ccma-saas-frontend 0.16.0 → 0.17.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 (99) hide show
  1. package/lib/esm/components/c4-audit-log/c4-audit-log.js +53 -42
  2. package/lib/esm/components/c4-billing-page/c4-billing-page.js +5 -1
  3. package/lib/esm/components/c4-breadcrumb/c4-breadcrumb.js +8 -3
  4. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.d.ts +10 -0
  5. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +9 -1
  6. package/lib/esm/components/c4-cluster-client-credentials/c4-cluster-client-credentials.js +13 -5
  7. package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.d.ts +14 -0
  8. package/lib/esm/components/c4-cluster-client-credentials/ds-credential-items.js +18 -0
  9. package/lib/esm/components/c4-cluster-client-credentials-identity/c4-cluster-client-credentials-identity.js +18 -7
  10. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.mocks.js +2 -2
  11. package/lib/esm/components/c4-cluster-overview/applications.d.ts +16 -0
  12. package/lib/esm/components/c4-cluster-overview/applications.js +39 -1
  13. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +5 -2
  14. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +8 -5
  15. package/lib/esm/components/c4-cluster-overview/cluster-details.js +10 -2
  16. package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +4 -3
  17. package/lib/esm/components/c4-cluster-overview/cluster-load.js +16 -13
  18. package/lib/esm/components/c4-cluster-overview/ds-section.d.ts +23 -0
  19. package/lib/esm/components/c4-cluster-overview/ds-section.js +19 -0
  20. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.js +1 -1
  21. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +7 -1
  22. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.d.ts +6 -1
  23. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +5 -2
  24. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +1 -3
  25. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +40 -15
  26. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +24 -4
  27. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +12 -0
  28. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +2 -1
  29. package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.d.ts +11 -0
  30. package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.js +16 -0
  31. package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +4 -1
  32. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +6 -2
  33. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.types.d.ts +6 -0
  34. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +1 -1
  35. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +1 -0
  36. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +1 -1
  37. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +13 -6
  38. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +24 -5
  39. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +4 -4
  40. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +1 -1
  41. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +1 -1
  42. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +3 -1
  43. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.d.ts +7 -1
  44. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +8 -4
  45. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +6 -1
  46. package/lib/esm/components/c4-management-settings/c4-management-settings.js +58 -42
  47. package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -0
  48. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +11 -10
  49. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +4 -0
  50. package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +9 -1
  51. package/lib/esm/components/c4-tabs/c4-tabs.js +6 -1
  52. package/lib/esm/externalUrls.const.d.ts +1 -1
  53. package/lib/esm/externalUrls.const.js +1 -2
  54. package/lib/esm/i18n/en/modals/billing.json +2 -2
  55. package/lib/esm/i18n/en/modals/clusterclients.json +6 -6
  56. package/lib/esm/i18n/en/modals/invitations.json +1 -0
  57. package/lib/esm/i18n/en/modals/users.json +1 -0
  58. package/lib/esm/i18n/en/pages/clusterdetails.json +4 -1
  59. package/lib/esm/i18n/en/pages/createcluster.json +5 -0
  60. package/lib/esm/i18n/en/pages/dashboard.json +7 -5
  61. package/lib/esm/i18n/en/pages/orgmanagement.json +4 -0
  62. package/lib/esm/ui/ds-compact-code-block.d.ts +15 -0
  63. package/lib/esm/ui/ds-compact-code-block.js +33 -0
  64. package/lib/esm/ui/index.d.ts +13 -3
  65. package/lib/esm/ui/index.js +6 -0
  66. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +21 -3
  67. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +4 -2
  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 +29 -9
  70. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +5 -0
  71. package/lib/esm/widgets/cluster-details/cluster-region-code.d.ts +8 -0
  72. package/lib/esm/widgets/cluster-details/cluster-region-code.js +17 -0
  73. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +44 -6
  74. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +6 -4
  75. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +7 -0
  76. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +20 -8
  77. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +11 -10
  78. package/lib/esm/widgets/cluster-details/upgrade-gate.d.ts +23 -0
  79. package/lib/esm/widgets/cluster-details/upgrade-gate.js +36 -0
  80. package/lib/esm/widgets/cluster-details/use-upgrade-gate.d.ts +24 -0
  81. package/lib/esm/widgets/cluster-details/use-upgrade-gate.js +73 -0
  82. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +3 -0
  83. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +38 -1
  84. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +7 -5
  85. package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
  86. package/lib/esm/widgets/group-details/c4-group-details-page.js +10 -3
  87. package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +5 -0
  88. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  89. package/lib/esm/widgets/management/c4-management-app.js +16 -4
  90. package/lib/esm/widgets/management/c4-management-app.types.d.ts +6 -0
  91. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -1
  92. package/lib/esm/widgets/management/tabs/c4-management-users-tab.d.ts +3 -1
  93. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +2 -2
  94. package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
  95. package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -2
  96. package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +5 -0
  97. package/package.json +9 -9
  98. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.d.ts +0 -13
  99. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +0 -26
@@ -27,6 +27,7 @@ import { useRadioFamily } from '../../../ui/families.js';
27
27
  import { safeTranslate } from '../../../utils/safe-translate.js';
28
28
  import { clusterHealthOverride } from '../../cluster-health-override.js';
29
29
  import { isClusterReconciliationPaused } from '../../is-cluster-reconciliation-paused.js';
30
+ import { resolveUpgradeWait } from '../upgrade-gate.js';
30
31
  import { buildClusterLoadTexts } from './cluster-load-texts.js';
31
32
  function renderStrongTextTranslation(t, key, fallback, options) {
32
33
  const text = safeTranslate(t, key, fallback, options);
@@ -53,7 +54,7 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
53
54
  const runtime = useC4ConsoleRuntime();
54
55
  const designSystem = useC4DesignSystem();
55
56
  const wakeInFlight = useRef(false);
56
- const { cluster, clusterError, creationParameters, clustersOfOrg, clusterPlanTypeReservations, clusterLoadLatest, clusterLoadPerDay, clusterLoad24h, clusterLoadLoading, canSeeClusterLoad, canEditCluster, canWakeCluster, canSleepCluster, canManageUsers, canViewConnectorsLink, hasIdentityIntegration, orgId, clusterId, jobDashboardEnabled, upgradeDocsUrls, statisticsConfig, apiConfig, t, onReloadCluster, onReloadClusterLoad, onNavigate, ignoreGracePeriod, clusterLoadDocsUrl, restoreInProgress, overviewSection, sectionVariant, } = props;
57
+ const { cluster, clusterError, creationParameters, clustersOfOrg, clusterPlanTypeReservations, clusterLoadLatest, clusterLoadPerDay, clusterLoad24h, clusterLoadLoading, canSeeClusterLoad, canEditCluster, canWakeCluster, canSleepCluster, canManageUsers, canViewConnectorsLink, hasIdentityIntegration, orgId, clusterId, jobDashboardEnabled, upgradeDocsUrls, statisticsConfig, apiConfig, t, onReloadCluster, onReloadClusterLoad, onNavigate, ignoreGracePeriod, upgradeGate, clusterLoadDocsUrl, restoreInProgress, overviewSection, sectionVariant, } = props;
57
58
  const data = useC4ConsoleData();
58
59
  // One flag blocks new clusters and generation updates. See
59
60
  // `CLUSTER_CREATION_BLOCKED_FLAG` for the name.
@@ -531,7 +532,11 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
531
532
  updateClusterStatus?.currentGeneration?.uuid,
532
533
  upgradableGenerations.length,
533
534
  ]);
534
- const waitBeforeUpdate = useMemo(() => {
535
+ // The local 24-hour rule. `resolveUpgradeGate` in console-backend
536
+ // (`controller/upgradeGate.ts`) holds a port of it. Keep the two the same
537
+ // until `console.upgradeReadinessGate` is on for every stage, then delete
538
+ // this copy.
539
+ const localWaitBeforeUpdate = useMemo(() => {
535
540
  if (ignoreGracePeriod) {
536
541
  return { shouldWait: false, hoursRemaining: 0, endDate: '' };
537
542
  }
@@ -590,6 +595,7 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
590
595
  runtime.stage,
591
596
  updateClusterStatus?.lastUpdatedTime,
592
597
  ]);
598
+ const waitBeforeUpdate = resolveUpgradeWait(upgradeGate, localWaitBeforeUpdate);
593
599
  const shouldShowJobDashboard = jobDashboardEnabled && jobDashboardSupportedByVersion;
594
600
  // Stable primitives so that useEffect dependencies don't change on every SSE
595
601
  // cluster update (which creates a new cluster object reference).
@@ -1127,12 +1133,18 @@ const C4ClusterDetailsOverviewTabImpl = (props) => {
1127
1133
  },
1128
1134
  updateAvailableWaitNeeded: {
1129
1135
  label: safeTranslate(t, 'clusterdetails:overview.clusterDetails.update.updateAvailable', 'Review Update'),
1130
- description: safeTranslate(t, 'clusterdetails:overview.clusterDetails.update.updateAvailableWaitNeeded', `To ensure cluster stabilization, your cluster can only be upgraded later.`, {
1131
- hours: waitBeforeUpdate.hoursRemaining,
1132
- endDate: waitBeforeUpdate.endDate,
1133
- })
1134
- .replaceAll('<0>', '')
1135
- .replaceAll('</0>', ''),
1136
+ description: waitBeforeUpdate.reason === 'pending'
1137
+ ? safeTranslate(t, 'clusterdetails:overview.clusterDetails.update.updateAvailableWaitChecking', 'Checking if your cluster is ready for an update.')
1138
+ : waitBeforeUpdate.reason === 'notReady'
1139
+ ? safeTranslate(t, 'clusterdetails:overview.clusterDetails.update.updateAvailableWaitReadiness', 'Your cluster is still finishing its last update. You can update it again when that is done.')
1140
+ : waitBeforeUpdate.reason === 'unknown'
1141
+ ? safeTranslate(t, 'clusterdetails:overview.clusterDetails.update.updateAvailableWaitUnknown', 'We could not check if your cluster is ready for an update. We will try again in a moment.')
1142
+ : safeTranslate(t, 'clusterdetails:overview.clusterDetails.update.updateAvailableWaitNeeded', `To ensure cluster stabilization, your cluster can only be upgraded later.`, {
1143
+ hours: waitBeforeUpdate.hoursRemaining,
1144
+ endDate: waitBeforeUpdate.endDate,
1145
+ })
1146
+ .replaceAll('<0>', '')
1147
+ .replaceAll('</0>', ''),
1136
1148
  },
1137
1149
  noUpdateLatest: {
1138
1150
  label: safeTranslate(t, 'clusterdetails:overview.clusterDetails.update.noUpdate', 'No updates available - running on latest available version'),
@@ -629,7 +629,7 @@ export const C4ClusterDetailsSettingsTab = (props) => {
629
629
  // FIRST, then persist config and enable — the secret now lands via the cloud
630
630
  // secret manager + ESO sync rather than a direct K8s Secret write, so it's
631
631
  // eventually (not immediately) consistent; the settings row's statusText reflects
632
- // that via the OidcProvidersPending condition. secretUpdatedAt is bumped here
632
+ // that via the OidcProvidersReady condition. secretUpdatedAt is bumped here
633
633
  // whenever a new secret was entered, so a rotation changes the CR and rolls the
634
634
  // pods once the sync completes.
635
635
  const submitExternalIdp = useCallback(async ({ config, clientSecret, }) => {
@@ -942,17 +942,18 @@ export const C4ClusterDetailsSettingsTab = (props) => {
942
942
  subtitle: "This cluster hasn't finished provisioning for secret storage. Save any other cluster setting, then try again.",
943
943
  }
944
944
  : undefined,
945
- // BYOIDP (camunda-operator#5760): the secret now reaches the cluster via
946
- // a cloud secret manager + ESO sync, which is eventually consistent
947
- // rather than synchronous. Surface the operator's condition instead of
948
- // assuming the write completed the moment the modal closed. The
949
- // condition clears when the operator either drops it or flips its
950
- // status to 'False', so treat present-and-not-False as pending (the
951
- // backend allowlists this type in clusterConditions.utils.ts).
945
+ // BYOIDP (camunda-operator#5760): the secret reaches the cluster via a
946
+ // cloud secret manager + ESO sync, which is eventually consistent. So
947
+ // the row reads the operator's condition instead of assuming that the
948
+ // write completed when the modal closed. The operator emits one
949
+ // condition, `OidcProvidersReady`. Its status is `False` (reason
950
+ // `OidcProvidersPending`) while a declared provider's secret is not
951
+ // materialized yet. It is `True` once every secret is. The condition
952
+ // is absent when no provider is declared.
952
953
  statusText: !props.cluster.externalIdpConfig
953
954
  ? 'Not configured'
954
- : props.cluster.status?.conditions?.some((condition) => condition.type === 'OidcProvidersPending' &&
955
- condition.status !== 'False')
955
+ : props.cluster.status?.conditions?.some((condition) => condition.type === 'OidcProvidersReady' &&
956
+ condition.status === 'False')
956
957
  ? `Pending: ${props.cluster.externalIdpConfig.clientName} (secret sync in progress)`
957
958
  : `Configured: ${props.cluster.externalIdpConfig.clientName}`,
958
959
  action: {
@@ -0,0 +1,23 @@
1
+ import type { UpgradeReadinessDto } from '@camunda/ccma-shared-types';
2
+ /**
3
+ * The upgrade gate of console-backend, as the widget sees it (PDP-3067).
4
+ * `undefined` means that the flag is off, and the local 24-hour rule decides.
5
+ * `pending` means that the first answer has not arrived yet.
6
+ */
7
+ export type UpgradeGateView = UpgradeReadinessDto | 'pending' | undefined;
8
+ export interface UpgradeWait {
9
+ shouldWait: boolean;
10
+ reason: 'none' | 'pending' | 'gracePeriod' | 'notReady' | 'unknown';
11
+ hoursRemaining: number;
12
+ endDate: string;
13
+ }
14
+ /**
15
+ * Decides if the update button waits, and why. While the gate of the server
16
+ * applies, the local rule does not decide: a local answer can show a button
17
+ * for an update that the server refuses.
18
+ */
19
+ export declare function resolveUpgradeWait(gate: UpgradeGateView, local: {
20
+ shouldWait: boolean;
21
+ hoursRemaining: number;
22
+ endDate: string;
23
+ }): UpgradeWait;
@@ -0,0 +1,36 @@
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
+ /**
7
+ * Decides if the update button waits, and why. While the gate of the server
8
+ * applies, the local rule does not decide: a local answer can show a button
9
+ * for an update that the server refuses.
10
+ */
11
+ export function resolveUpgradeWait(gate, local) {
12
+ if (gate === undefined) {
13
+ return { ...local, reason: 'gracePeriod' };
14
+ }
15
+ const wait = (reason) => ({
16
+ shouldWait: reason !== 'none',
17
+ reason,
18
+ hoursRemaining: 0,
19
+ endDate: '',
20
+ });
21
+ if (gate === 'pending') {
22
+ return wait('pending');
23
+ }
24
+ if (gate.canUpgrade) {
25
+ return wait('none');
26
+ }
27
+ if (gate.gracePeriod) {
28
+ return {
29
+ shouldWait: true,
30
+ reason: 'gracePeriod',
31
+ hoursRemaining: gate.gracePeriod.hoursRemaining,
32
+ endDate: new Date(gate.gracePeriod.waitUntilIso).toLocaleString(),
33
+ };
34
+ }
35
+ return wait(gate.readiness?.verdict === 'notReady' ? 'notReady' : 'unknown');
36
+ }
@@ -0,0 +1,24 @@
1
+ import type { UpgradeReadinessDto } from '@camunda/ccma-shared-types';
2
+ import type { UpgradeGateView } from './upgrade-gate.js';
3
+ /**
4
+ * Reads the upgrade gate of the cluster while the flag is on, and reads it
5
+ * again every 30 seconds while it blocks the update.
6
+ *
7
+ * The answer belongs to one cluster, generation and status. A change of any
8
+ * of them gives `pending` until the new answer arrives, and an answer that
9
+ * arrives after the flag turned off is dropped.
10
+ *
11
+ * A 404 gives `undefined`, the same as a flag that is off: the server has no
12
+ * gate for this org, and the local 24-hour rule decides, as it did before the
13
+ * gate. On dev, c4 reads the flag from the flag table and console-backend
14
+ * reads the code, so the two can disagree about an org. A rule that dropped
15
+ * the local wait on a 404 would change the behavior of an org that the gate
16
+ * never named.
17
+ */
18
+ export declare function useUpgradeGate(props: {
19
+ enabled: boolean;
20
+ clusterId: string;
21
+ generationUuid: string | undefined;
22
+ status: string | undefined;
23
+ read: () => Promise<UpgradeReadinessDto | undefined>;
24
+ }): UpgradeGateView;
@@ -0,0 +1,73 @@
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 { useEffect, useRef, useState } from 'react';
7
+ const POLL_MS = 30_000;
8
+ /**
9
+ * Reads the upgrade gate of the cluster while the flag is on, and reads it
10
+ * again every 30 seconds while it blocks the update.
11
+ *
12
+ * The answer belongs to one cluster, generation and status. A change of any
13
+ * of them gives `pending` until the new answer arrives, and an answer that
14
+ * arrives after the flag turned off is dropped.
15
+ *
16
+ * A 404 gives `undefined`, the same as a flag that is off: the server has no
17
+ * gate for this org, and the local 24-hour rule decides, as it did before the
18
+ * gate. On dev, c4 reads the flag from the flag table and console-backend
19
+ * reads the code, so the two can disagree about an org. A rule that dropped
20
+ * the local wait on a 404 would change the behavior of an org that the gate
21
+ * never named.
22
+ */
23
+ export function useUpgradeGate(props) {
24
+ const { enabled } = props;
25
+ const key = `${props.clusterId}:${props.generationUuid}:${props.status}`;
26
+ const [answer, setAnswer] = useState();
27
+ // A caller that makes a new `read` on each render must not restart the
28
+ // loop on each render, and a poll must use the newest `read`.
29
+ const readRef = useRef(props.read);
30
+ readRef.current = props.read;
31
+ useEffect(() => {
32
+ if (!enabled) {
33
+ return;
34
+ }
35
+ let stopped = false;
36
+ let timer;
37
+ const ask = async () => {
38
+ let gate;
39
+ try {
40
+ gate = await readRef.current();
41
+ }
42
+ catch {
43
+ // The server counts a gate that it cannot read as not ready, so the
44
+ // widget does too, and does not fall back to the local rule.
45
+ gate = {
46
+ gate: 'readiness',
47
+ canUpgrade: false,
48
+ readiness: {
49
+ verdict: 'unknown',
50
+ source: 'error',
51
+ checkedAtIso: new Date().toISOString(),
52
+ },
53
+ };
54
+ }
55
+ if (stopped) {
56
+ return;
57
+ }
58
+ setAnswer({ key, gate });
59
+ if (gate && !gate.canUpgrade) {
60
+ timer = setTimeout(ask, POLL_MS);
61
+ }
62
+ };
63
+ void ask();
64
+ return () => {
65
+ stopped = true;
66
+ clearTimeout(timer);
67
+ };
68
+ }, [enabled, key]);
69
+ if (!enabled) {
70
+ return undefined;
71
+ }
72
+ return answer?.key === key ? answer.gate : 'pending';
73
+ }
@@ -32,6 +32,9 @@ export declare function buildCreateClusterTranslations(t: ((key: string, options
32
32
  olderGenerationsLabel: string;
33
33
  olderGenerationsHelperText: string;
34
34
  orgUnlockedGenerationsHelperText: string;
35
+ clusterPlanTitle: string;
36
+ clusterPlanDefaultLabel: string;
37
+ clusterPlanDescription: string;
35
38
  autoUpdateTitle: string;
36
39
  autoUpdateDescription: string;
37
40
  autoUpdateDescriptionIfDisabled: string;
@@ -226,6 +226,9 @@ export function buildCreateClusterTranslations(t) {
226
226
  olderGenerationsLabel: translate('createcluster:form.generation.olderGenerationsLabel', 'View older generations'),
227
227
  olderGenerationsHelperText: translate('createcluster:form.generation.olderGenerationsHelperText', 'These are older generations that are used in your organization.'),
228
228
  orgUnlockedGenerationsHelperText: translate('createcluster:form.generation.orgUnlockedGenerationsHelperText', 'These are generations that have been unlocked for your organization.'),
229
+ clusterPlanTitle: translate('createcluster:form.clusterPlan.title', 'Cluster plan'),
230
+ clusterPlanDefaultLabel: translate('createcluster:form.clusterPlan.defaultLabel', 'Plan type default'),
231
+ clusterPlanDescription: translate('createcluster:form.clusterPlan.description', 'These cluster plans are unlocked for your organization. The cluster still uses a reservation of the selected cluster type.'),
229
232
  autoUpdateTitle: translate('createcluster:form.autoUpdate.title', 'Automatic cluster patch updates'),
230
233
  autoUpdateDescription: translate('createcluster:form.autoUpdate.description', 'When enabled, the cluster will be updated to the latest patch release. For entirely new cluster versions, updates will need to be performed manually. Please note that during the update, there may be a brief period of unavailability for the cluster.'),
231
234
  autoUpdateDescriptionIfDisabled: translate('createcluster:form.autoUpdate.descriptionIfDisabled', 'Only available for generations in the stable channel.'),
@@ -509,6 +512,21 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
509
512
  creationParameters,
510
513
  usageByPlanTypeUuid,
511
514
  ]);
515
+ const unlockedClusterPlans = useMemo(() => {
516
+ const raw = getPathUnknown(creationParameters, ['unlockedClusterPlans']);
517
+ if (!Array.isArray(raw)) {
518
+ return [];
519
+ }
520
+ return raw.filter(isRecord).flatMap((plan) => {
521
+ const uuid = getString(plan, 'uuid');
522
+ if (!uuid) {
523
+ return [];
524
+ }
525
+ // Plan names are not unique, so the label carries the uuid.
526
+ const name = getString(plan, 'name');
527
+ return [{ uuid, title: name ? `${name} (${uuid})` : uuid }];
528
+ });
529
+ }, [creationParameters]);
512
530
  const regions = useMemo(() => {
513
531
  const rawRegions = getPathUnknown(creationParameters, ['regions']);
514
532
  if (!Array.isArray(rawRegions)) {
@@ -674,6 +692,14 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
674
692
  }
675
693
  return channelsWithGenerations.find((channel) => channel.generations.some((generation) => generation.uuid === generationUuid))?.uuid;
676
694
  }, [channelsWithGenerations, sourceCluster]);
695
+ // The form pre-selects the plan of the source cluster only when the org
696
+ // can still pick it. Else the form opens on the plan type default.
697
+ const sourceUnlockedClusterPlan = useMemo(() => {
698
+ const uuid = getPathString(sourceCluster ?? {}, ['plan', 'uuid']);
699
+ return unlockedClusterPlans.some((plan) => plan.uuid === uuid)
700
+ ? uuid
701
+ : undefined;
702
+ }, [sourceCluster, unlockedClusterPlans]);
677
703
  const initialValues = useMemo(() => {
678
704
  if (!sourceCluster) {
679
705
  return undefined;
@@ -686,6 +712,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
686
712
  name: duplicateName,
687
713
  description: getString(sourceCluster, 'description'),
688
714
  clusterPlanType: getPathString(sourceCluster, ['planType', 'uuid']),
715
+ clusterPlan: sourceUnlockedClusterPlan,
689
716
  channel: sourceChannelUuid,
690
717
  generation: getPathString(sourceCluster, ['generation', 'uuid']),
691
718
  region: getString(sourceCluster, 'k8sContextUuid'),
@@ -704,7 +731,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
704
731
  ]),
705
732
  identityBackendChecksEnabled: getBoolean(sourceCluster, 'identityBackendChecksEnabled'),
706
733
  };
707
- }, [sourceChannelUuid, sourceCluster]);
734
+ }, [sourceChannelUuid, sourceCluster, sourceUnlockedClusterPlan]);
708
735
  /**
709
736
  * True when the plan type of the source cluster has no reservation left.
710
737
  * Counted without the exclusion that `usageByPlanTypeUuid` applies, thus
@@ -773,6 +800,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
773
800
  const body = {
774
801
  name: params.name,
775
802
  planTypeId: params.clusterPlanType,
803
+ ...(params.clusterPlan && { clusterPlanId: params.clusterPlan }),
776
804
  channelId: params.channel,
777
805
  generationId: params.generation,
778
806
  k8sContextId: params.region,
@@ -914,6 +942,14 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
914
942
  title: translations.planTypeTitle,
915
943
  options: planTypes,
916
944
  },
945
+ ...(unlockedClusterPlans.length > 0 && {
946
+ clusterPlan: {
947
+ title: translations.clusterPlanTitle,
948
+ defaultLabel: translations.clusterPlanDefaultLabel,
949
+ description: translations.clusterPlanDescription,
950
+ options: unlockedClusterPlans,
951
+ },
952
+ }),
917
953
  region: {
918
954
  title: translations.regionTitle,
919
955
  backupRegionTitle: translations.backupRegionTitle,
@@ -1044,6 +1080,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
1044
1080
  loading,
1045
1081
  translations,
1046
1082
  planTypes,
1083
+ unlockedClusterPlans,
1047
1084
  initialValues,
1048
1085
  duplicate,
1049
1086
  dualRegionBackups,
@@ -468,10 +468,11 @@ export const C4DashboardApp = observer((props) => {
468
468
  }, texts: {
469
469
  welcome: {
470
470
  title: safeTranslate(t, 'dashboard:welcome.title', 'Welcome'),
471
- text: safeTranslate(t, 'dashboard:welcome.text', ''),
472
- item1: safeTranslate(t, 'dashboard:welcome.item1', ''),
473
- item2: safeTranslate(t, 'dashboard:welcome.item2', ''),
474
- item3: safeTranslate(t, 'dashboard:welcome.item3', ''),
471
+ text: safeTranslate(t, 'dashboard:welcome.text', '<p>This is the Console, where you manage users and clusters. Clusters are the infrastructure you deploy your processes to. Each cluster runs your processes and hosts Operate, Tasklist, Optimize, and Admin. You have a few options to get started:</p>'),
472
+ item1: safeTranslate(t, 'dashboard:welcome.item1', '<strong>Create a workspace</strong>: Workspaces bring your team and projects together in one place.'),
473
+ item2: safeTranslate(t, 'dashboard:welcome.item2', '<strong>Model a process</strong>: Open a project in your workspace and model your first process.'),
474
+ item3: safeTranslate(t, 'dashboard:welcome.item3', '<strong>Review the Getting Started Guide</strong>: Our guides walk you through each step of orchestrating a process.'),
475
+ item4: safeTranslate(t, 'dashboard:welcome.item4', '<strong>Watch a demo</strong>: The Camunda Academy has free, on-demand content like a 25-minute product demo.'),
475
476
  cta: safeTranslate(t, 'dashboard:welcome.cta', 'Model a process'),
476
477
  gsg: safeTranslate(t, 'dashboard:welcome.gsg', 'Getting Started Guide'),
477
478
  watchADemo: safeTranslate(t, 'dashboard:welcome.watchADemo', 'Watch a demo'),
@@ -479,7 +480,8 @@ export const C4DashboardApp = observer((props) => {
479
480
  users: {
480
481
  title: safeTranslate(t, 'dashboard:users.title', 'Users'),
481
482
  viewAll: safeTranslate(t, 'dashboard:users.viewAll', 'View all'),
482
- alone: safeTranslate(t, 'dashboard:users.alone', ''),
483
+ alone: safeTranslate(t, 'dashboard:users.alone', 'You are the only user in this organization. Invite other users to help design, execute, and improve your processes.'),
484
+ inviteUser: safeTranslate(t, 'dashboard:users.inviteUser', 'Invite a user'),
483
485
  text: safeTranslate(t, 'dashboard:users.text', ''),
484
486
  user: safeTranslate(t, 'dashboard:users.user', 'User'),
485
487
  users: safeTranslate(t, 'dashboard:users.users', 'Users'),
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
2
  import type { C4GroupDetailsPageProps } from './c4-group-details-page.types.js';
3
- export declare const C4GroupDetailsPage: (({ orgId, groupId, externalLinks, onNavigate, }: C4GroupDetailsPageProps) => React.ReactElement) & {
3
+ export declare const C4GroupDetailsPage: (({ orgId, groupId, externalLinks, onNavigate, environmentsEnabled, }: C4GroupDetailsPageProps) => React.ReactElement) & {
4
4
  displayName: string;
5
5
  };
@@ -24,7 +24,7 @@ function sendNavigate(onNavigate, event) {
24
24
  function resolveLinks(links) {
25
25
  return getC4GroupDetailsExternalLinks(links);
26
26
  }
27
- export const C4GroupDetailsPage = observer(({ orgId, groupId, externalLinks, onNavigate, }) => {
27
+ export const C4GroupDetailsPage = observer(({ orgId, groupId, externalLinks, onNavigate, environmentsEnabled = false, }) => {
28
28
  const runtime = useC4ConsoleRuntime();
29
29
  const designSystem = useC4DesignSystem();
30
30
  const data = useC4ConsoleData();
@@ -171,8 +171,15 @@ export const C4GroupDetailsPage = observer(({ orgId, groupId, externalLinks, onN
171
171
  data.fetchMembers(orgId, { force: true });
172
172
  }, show87Warning: hasAtLeastOneIdentityIntegrationCluster, infoFor88Groups: {
173
173
  visible: true,
174
- title: 'Organization group management updates starting with 8.8 clusters',
175
- description: (_jsx(_Fragment, { children: _jsx("p", { children: "Starting with version 8.8, groups created in Console are no longer recommended for use; instead, user groups and authorizations must be managed in the cluster\u2019s Admin component." }) })),
174
+ ...(environmentsEnabled
175
+ ? {
176
+ title: safeTranslate(t, 'orgmanagement:tabs.groups.environmentsNotice.title', 'Organization group management updates for environments on version 8.8 or higher'),
177
+ description: (_jsx("p", { children: safeTranslate(t, 'orgmanagement:tabs.groups.environmentsNotice.description', 'Starting with version 8.8, groups created in Console are no longer recommended for use. Instead, user groups and authorizations must be managed in the Admin application of an environment.') })),
178
+ }
179
+ : {
180
+ title: 'Organization group management updates starting with 8.8 clusters',
181
+ description: (_jsx(_Fragment, { children: _jsx("p", { children: "Starting with version 8.8, groups created in Console are no longer recommended for use; instead, user groups and authorizations must be managed in the cluster\u2019s Admin component." }) })),
182
+ }),
176
183
  action: {
177
184
  label: 'Learn more',
178
185
  onClick: () => {
@@ -13,4 +13,9 @@ export interface C4GroupDetailsPageProps {
13
13
  groupId: string;
14
14
  externalLinks?: C4GroupDetailsExternalLinks;
15
15
  onNavigate?: (event: C4GroupDetailsNavigateEvent) => void;
16
+ /**
17
+ * True when the organization uses environments. See
18
+ * `C4ManagementAppProps.environmentsEnabled`. Defaults to false.
19
+ */
20
+ environmentsEnabled?: boolean;
16
21
  }
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from 'react';
2
2
  import type { C4ManagementAppProps } from './c4-management-app.types.js';
3
- export declare const C4ManagementApp: (({ orgId, embedded, desiredTabId, onTabChange, onNavigate, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, permissionsReworkEnabled, urls, onNeedsReload, }: C4ManagementAppProps) => JSX.Element) & {
3
+ export declare const C4ManagementApp: (({ orgId, embedded, environmentsEnabled, desiredTabId, onTabChange, onNavigate, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, permissionsReworkEnabled, urls, onNeedsReload, }: C4ManagementAppProps) => JSX.Element) & {
4
4
  displayName: string;
5
5
  };
@@ -546,7 +546,7 @@ function themeNameToClassName(theme) {
546
546
  return 'g10';
547
547
  }
548
548
  }
549
- export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId, onTabChange, onNavigate, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, permissionsReworkEnabled = false, urls, onNeedsReload, }) => {
549
+ export const C4ManagementApp = observer(({ orgId, embedded = false, environmentsEnabled = false, desiredTabId, onTabChange, onNavigate, legacyTabs, userPersonaRole, isLicensingModel2025: isLicensingModel2025Prop, permissionsReworkEnabled = false, urls, onNeedsReload, }) => {
550
550
  const runtime = useC4ConsoleRuntime();
551
551
  const designSystem = useC4DesignSystem();
552
552
  const hubNaming = useHubApiNaming();
@@ -3037,7 +3037,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
3037
3037
  id: 'users',
3038
3038
  label: getTabLabel(legacyTabs, 'users', tabTitle('users')),
3039
3039
  visible: canReadMembers,
3040
- component: (_jsx(C4ManagementUsersTab, { orgId: orgId, members: members, loading: membersLoading, mayManageUsersActions: mayManageUsersActions, mayInviteUsers: Boolean(mayInviteMembers || mayInviteAdmins), showLegacyClusterRoles: showLegacyClusterRoles, permissionsReworkEnabled: permissionsReworkEnabled, inviteModal: {
3040
+ component: (_jsx(C4ManagementUsersTab, { orgId: orgId, environmentsEnabled: environmentsEnabled, members: members, loading: membersLoading, mayManageUsersActions: mayManageUsersActions, mayInviteUsers: Boolean(mayInviteMembers || mayInviteAdmins), showLegacyClusterRoles: showLegacyClusterRoles, permissionsReworkEnabled: permissionsReworkEnabled, inviteModal: {
3041
3041
  showAdminRole: Boolean(mayInviteAdmins),
3042
3042
  learnMoreUrl: identityAuthorizationsDocsUrl,
3043
3043
  }, changeRolesModal: {
@@ -3128,8 +3128,18 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
3128
3128
  });
3129
3129
  }, permissions: groupsPermissions, notification: {
3130
3130
  visible: true,
3131
- title: 'Organization group management updates starting with 8.8 clusters',
3132
- description: (_jsx(_Fragment, { children: _jsxs("p", { children: ["Starting with version 8.8, groups created in Console are no longer recommended for use; instead, user groups and authorizations must be managed in the", ' ', introToIdentityDocsUrl ? (_jsx("a", { href: introToIdentityDocsUrl, target: '_blank', rel: 'noopener noreferrer', children: "cluster\u2019s Admin component." })) : (_jsx("span", { children: "cluster\u2019s Admin component." }))] }) })),
3131
+ // With environments, the description names the Admin
3132
+ // application of an environment and has no link of its own:
3133
+ // the "Learn more" action below is the link.
3134
+ ...(environmentsEnabled
3135
+ ? {
3136
+ title: safeTranslate(t, 'orgmanagement:tabs.groups.environmentsNotice.title', 'Organization group management updates for environments on version 8.8 or higher'),
3137
+ description: (_jsx("p", { children: safeTranslate(t, 'orgmanagement:tabs.groups.environmentsNotice.description', 'Starting with version 8.8, groups created in Console are no longer recommended for use. Instead, user groups and authorizations must be managed in the Admin application of an environment.') })),
3138
+ }
3139
+ : {
3140
+ title: 'Organization group management updates starting with 8.8 clusters',
3141
+ description: (_jsx(_Fragment, { children: _jsxs("p", { children: ["Starting with version 8.8, groups created in Console are no longer recommended for use; instead, user groups and authorizations must be managed in the", ' ', introToIdentityDocsUrl ? (_jsx("a", { href: introToIdentityDocsUrl, target: '_blank', rel: 'noopener noreferrer', children: "cluster\u2019s Admin component." })) : (_jsx("span", { children: "cluster\u2019s Admin component." }))] }) })),
3142
+ }),
3133
3143
  action: {
3134
3144
  label: 'Learn more',
3135
3145
  onClick: () => {
@@ -3338,8 +3348,10 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
3338
3348
  loading,
3339
3349
  org,
3340
3350
  orgId,
3351
+ environmentsEnabled,
3341
3352
  apiConfig,
3342
3353
  hasAtLeastOneIdentityIntegrationCluster,
3354
+ isIdentityReady,
3343
3355
  settingsProps,
3344
3356
  loadUsage,
3345
3357
  t,
@@ -49,6 +49,12 @@ export interface C4ManagementAppProps {
49
49
  * false.
50
50
  */
51
51
  embedded?: boolean;
52
+ /**
53
+ * True when the organization uses environments (Hub with environments on).
54
+ * Copy about clusters in the Users and Groups tabs then talks about
55
+ * environments. It changes wording only. Defaults to false.
56
+ */
57
+ environmentsEnabled?: boolean;
52
58
  desiredTabId?: string;
53
59
  onTabChange?: (tabId: string) => void;
54
60
  onNavigate?: (event: C4ManagementNavigateEvent) => void;
@@ -136,7 +136,7 @@ export const C4ManagementPricingTab = (props) => {
136
136
  },
137
137
  price: {
138
138
  text: safeTranslate(t, 'billing:requestPaid.enterprise.price', 'Custom pricing'),
139
- additional: safeTranslate(t, 'billing:requestPaid.enterprise.priceAdditional', 'Paid annualy via invoice'),
139
+ additional: safeTranslate(t, 'billing:requestPaid.enterprise.priceAdditional', 'Paid annually via invoice'),
140
140
  },
141
141
  cta: {
142
142
  disabled: false,
@@ -3,6 +3,8 @@ import type { JSX } from 'react';
3
3
  import type { C4InviteUserToOrganizationRole } from '../../../components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.types.js';
4
4
  import type { UserDataTableRow } from '../../../components/c4-management-users/c4-management-users.types.js';
5
5
  export interface C4ManagementUsersTabProps {
6
+ /** True when the organization uses environments. Passed to the invite modal. */
7
+ environmentsEnabled?: boolean;
6
8
  orgId: string;
7
9
  members: UserDataTableRow[];
8
10
  loading: boolean;
@@ -35,4 +37,4 @@ export interface C4ManagementUsersTabProps {
35
37
  onAssignNewOwner: (newOwnerUserId: string, oldOwnerNewRoles: string[]) => Promise<void>;
36
38
  onUpdateUserRoles: (userId: string, roles: string[]) => Promise<void>;
37
39
  }
38
- export declare const C4ManagementUsersTab: ({ orgId, members, loading, mayManageUsersActions, mayInviteUsers, mayAssignNewOwner, showLegacyClusterRoles, permissionsReworkEnabled, inviteModal, changeRolesModal, currentUserEmail, onNavigateToUser, t, telemetry, onRemoveUser, onInviteUser, onResendInvite, onCancelInvite, onAssignNewOwner, onUpdateUserRoles, }: C4ManagementUsersTabProps) => JSX.Element;
40
+ export declare const C4ManagementUsersTab: ({ orgId, members, loading, mayManageUsersActions, mayInviteUsers, mayAssignNewOwner, showLegacyClusterRoles, permissionsReworkEnabled, environmentsEnabled, inviteModal, changeRolesModal, currentUserEmail, onNavigateToUser, t, telemetry, onRemoveUser, onInviteUser, onResendInvite, onCancelInvite, onAssignNewOwner, onUpdateUserRoles, }: C4ManagementUsersTabProps) => JSX.Element;
@@ -12,7 +12,7 @@ import { C4ManagementUsers } from '../../../components/c4-management-users/c4-ma
12
12
  import { Checkbox, Link, Modal, Stack, TextInput } from '../../../ui/index.js';
13
13
  import { isLegacyLabeledRole, isRoleAssignable, legacySectionRoles, moreRolesHeadingText, orderPrimaryRoles, roleLabelDescription, } from '../../../utils/role-labels.js';
14
14
  import { safeTranslate } from '../../../utils/safe-translate.js';
15
- export const C4ManagementUsersTab = ({ orgId, members, loading, mayManageUsersActions, mayInviteUsers, mayAssignNewOwner, showLegacyClusterRoles = false, permissionsReworkEnabled = false, inviteModal, changeRolesModal, currentUserEmail, onNavigateToUser, t, telemetry, onRemoveUser, onInviteUser, onResendInvite, onCancelInvite, onAssignNewOwner, onUpdateUserRoles, }) => {
15
+ export const C4ManagementUsersTab = ({ orgId, members, loading, mayManageUsersActions, mayInviteUsers, mayAssignNewOwner, showLegacyClusterRoles = false, permissionsReworkEnabled = false, environmentsEnabled = false, inviteModal, changeRolesModal, currentUserEmail, onNavigateToUser, t, telemetry, onRemoveUser, onInviteUser, onResendInvite, onCancelInvite, onAssignNewOwner, onUpdateUserRoles, }) => {
16
16
  const trackEvent = (eventName, message, meta) => {
17
17
  telemetry?.track?.(eventName, {
18
18
  message,
@@ -556,7 +556,7 @@ export const C4ManagementUsersTab = ({ orgId, members, loading, mayManageUsersAc
556
556
  return next;
557
557
  });
558
558
  } }), _jsx("span", { className: 'cds--label', style: { marginLeft: '27px' }, children: enriched.description })] }, `management-role-more-${role}`));
559
- })] })] }) })), _jsx(C4InviteUserToOrganizationModal, { t: t, showAdminRole: inviteModal?.showAdminRole, showLegacyClusterRoles: showLegacyClusterRoles, permissionsReworkEnabled: permissionsReworkEnabled, learnMoreUrl: inviteModal?.learnMoreUrl, onInviteUser: async ({ email, roles }) => {
559
+ })] })] }) })), _jsx(C4InviteUserToOrganizationModal, { t: t, showAdminRole: inviteModal?.showAdminRole, showLegacyClusterRoles: showLegacyClusterRoles, permissionsReworkEnabled: permissionsReworkEnabled, environmentsEnabled: environmentsEnabled, learnMoreUrl: inviteModal?.learnMoreUrl, onInviteUser: async ({ email, roles }) => {
560
560
  await onInviteUser(email, roles);
561
561
  }, ref: (instance) => {
562
562
  inviteModalRef.current = instance ?? undefined;
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
2
  import type { C4UserDetailsPageProps } from './c4-user-details-page.types.js';
3
- export declare const C4UserDetailsPage: (({ orgId, userEmail, externalLinks, onNavigate, permissionsReworkEnabled, }: C4UserDetailsPageProps) => React.ReactElement) & {
3
+ export declare const C4UserDetailsPage: (({ orgId, userEmail, externalLinks, onNavigate, permissionsReworkEnabled, environmentsEnabled, }: C4UserDetailsPageProps) => React.ReactElement) & {
4
4
  displayName: string;
5
5
  };
@@ -29,7 +29,7 @@ function sendNavigate(onNavigate, event) {
29
29
  function resolveLinks(links) {
30
30
  return getC4UserDetailsExternalLinks(links);
31
31
  }
32
- export const C4UserDetailsPage = observer(({ orgId, userEmail, externalLinks, onNavigate, permissionsReworkEnabled = false, }) => {
32
+ export const C4UserDetailsPage = observer(({ orgId, userEmail, externalLinks, onNavigate, permissionsReworkEnabled = false, environmentsEnabled = false, }) => {
33
33
  const runtime = useC4ConsoleRuntime();
34
34
  const data = useC4ConsoleData();
35
35
  const authz = useC4ConsoleAuthz({ orgId });
@@ -397,7 +397,9 @@ export const C4UserDetailsPage = observer(({ orgId, userEmail, externalLinks, on
397
397
  return next;
398
398
  });
399
399
  } }), _jsx("span", { className: 'cds--label', style: { marginLeft: '27px' }, children: enriched.description })] }, `role-primary-${role}`));
400
- }), _jsxs("div", { style: { margin: '16px 0' }, children: [_jsx(C4InlineNotification, { lowContrast: true, kind: 'info', hideCloseButton: true, title: '', subtitle: safeTranslate(t, 'users:changeOrgRoles.notification.title', 'Starting with version 8.8, user access to clusters is managed independently.') }), _jsxs("p", { style: { paddingTop: '4px' }, children: [_jsx(Link, { href: 'https://docs.camunda.io/', onClick: (e) => {
400
+ }), _jsxs("div", { style: { margin: '16px 0' }, children: [_jsx(C4InlineNotification, { lowContrast: true, kind: 'info', hideCloseButton: true, title: '', subtitle: environmentsEnabled
401
+ ? safeTranslate(t, 'users:changeOrgRoles.notification.titleEnvironments', 'Starting with version 8.8, user access to environments is managed independently.')
402
+ : safeTranslate(t, 'users:changeOrgRoles.notification.title', 'Starting with version 8.8, user access to clusters is managed independently.') }), _jsxs("p", { style: { paddingTop: '4px' }, children: [_jsx(Link, { href: 'https://docs.camunda.io/', onClick: (e) => {
401
403
  if (!onNavigate) {
402
404
  return;
403
405
  }
@@ -479,6 +481,7 @@ export const C4UserDetailsPage = observer(({ orgId, userEmail, externalLinks, on
479
481
  data,
480
482
  editableRoles.more,
481
483
  editableRoles.primary,
484
+ environmentsEnabled,
482
485
  isAssignableBlockedByVisibility,
483
486
  isAuthorizedResourcesReady,
484
487
  links.identityAuthorizationsDocsUrl,
@@ -27,4 +27,9 @@ export interface C4UserDetailsPageProps {
27
27
  onNavigate?: (event: C4UserDetailsNavigateEvent) => void;
28
28
  /** See `C4ManagementAppProps.permissionsReworkEnabled` (camunda-hub#25467). */
29
29
  permissionsReworkEnabled?: boolean;
30
+ /**
31
+ * True when the organization uses environments. See
32
+ * `C4ManagementAppProps.environmentsEnabled`. Defaults to false.
33
+ */
34
+ environmentsEnabled?: boolean;
30
35
  }