@camunda/ccma-saas-frontend 0.15.1 → 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 (129) 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-list/c4-cluster-list.js +4 -10
  12. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +1 -4
  13. package/lib/esm/components/c4-cluster-overview/applications.d.ts +16 -0
  14. package/lib/esm/components/c4-cluster-overview/applications.js +130 -17
  15. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +34 -1
  16. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +31 -0
  17. package/lib/esm/components/c4-cluster-overview/cluster-details.js +11 -9
  18. package/lib/esm/components/c4-cluster-overview/cluster-load.d.ts +4 -3
  19. package/lib/esm/components/c4-cluster-overview/cluster-load.js +17 -13
  20. package/lib/esm/components/c4-cluster-overview/ds-section.d.ts +23 -0
  21. package/lib/esm/components/c4-cluster-overview/ds-section.js +19 -0
  22. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.d.ts +33 -0
  23. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.js +34 -0
  24. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +7 -1
  25. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.d.ts +6 -1
  26. package/lib/esm/components/c4-cluster-settings/elements/settings-tile.js +5 -2
  27. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +4 -5
  28. package/lib/esm/components/c4-create-cluster/c4-create-cluster-tile-grid.js +40 -15
  29. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +24 -4
  30. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +12 -0
  31. package/lib/esm/components/c4-create-cluster-api-client-modal/c4-create-cluster-api-client-modal.js +2 -1
  32. package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.d.ts +11 -0
  33. package/lib/esm/components/c4-create-cluster-api-client-modal/scopes-description-text.js +16 -0
  34. package/lib/esm/components/c4-inline-notification/c4-inline-notification.js +4 -1
  35. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.js +6 -2
  36. package/lib/esm/components/c4-invite-user-to-organization-modal/c4-invite-user-to-organization-modal.types.d.ts +6 -0
  37. package/lib/esm/components/c4-job-dashboard-details-page/c4-job-dashboard-details-page.mocks.js +1 -1
  38. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-error-table.js +1 -0
  39. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-piechart.js +1 -1
  40. package/lib/esm/components/c4-job-dashboard-details-page/elements/c4-job-dashboard-time-chart.js +13 -6
  41. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.js +24 -5
  42. package/lib/esm/components/c4-job-dashboard-entry-point/c4-job-dashboard-entry-point.types.d.ts +4 -4
  43. package/lib/esm/components/c4-job-dashboard-overview-page/c4-job-dashboard-overview.mocks.js +1 -1
  44. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.d.ts +1 -1
  45. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-ds-colors.js +3 -1
  46. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.d.ts +7 -1
  47. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-error-handler.js +8 -4
  48. package/lib/esm/components/c4-job-dashboard-shared/c4-job-dashboard-time-range-dropdown.js +6 -1
  49. package/lib/esm/components/c4-management-settings/c4-management-settings.js +58 -42
  50. package/lib/esm/components/c4-multi-step-modal/c4-multi-step-modal.js +4 -0
  51. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.js +11 -10
  52. package/lib/esm/components/c4-old-dashboard/c4-old-dashboard.types.d.ts +4 -0
  53. package/lib/esm/components/c4-pricing-card/c4-pricing-card.js +9 -1
  54. package/lib/esm/components/c4-sm-cluster-details/details.js +2 -8
  55. package/lib/esm/components/c4-tabs/c4-tabs.js +6 -1
  56. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +3 -3
  57. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +2 -8
  58. package/lib/esm/externalUrls.const.d.ts +1 -1
  59. package/lib/esm/externalUrls.const.js +1 -2
  60. package/lib/esm/i18n/en/modals/billing.json +2 -2
  61. package/lib/esm/i18n/en/modals/clusterclients.json +6 -6
  62. package/lib/esm/i18n/en/modals/invitations.json +1 -0
  63. package/lib/esm/i18n/en/modals/users.json +1 -0
  64. package/lib/esm/i18n/en/pages/clusterdetails.json +4 -1
  65. package/lib/esm/i18n/en/pages/createcluster.json +5 -0
  66. package/lib/esm/i18n/en/pages/dashboard.json +7 -5
  67. package/lib/esm/i18n/en/pages/orgmanagement.json +4 -0
  68. package/lib/esm/index.d.ts +1 -1
  69. package/lib/esm/index.js +1 -1
  70. package/lib/esm/runtime/c4-console-events-context.d.ts +5 -1
  71. package/lib/esm/runtime/c4-console-events-context.js +16 -2
  72. package/lib/esm/runtime/c4-console-runtime-context.d.ts +7 -6
  73. package/lib/esm/runtime/c4-console-runtime-context.js +29 -12
  74. package/lib/esm/runtime/c4-console-runtime.types.d.ts +7 -7
  75. package/lib/esm/runtime/c4-user-notifications-context.js +6 -2
  76. package/lib/esm/runtime/c4-user-notifications-context.types.d.ts +5 -1
  77. package/lib/esm/runtime/use-hub-api-naming.d.ts +8 -11
  78. package/lib/esm/runtime/use-hub-api-naming.js +9 -12
  79. package/lib/esm/runtime/use-is-qa-user.d.ts +23 -0
  80. package/lib/esm/runtime/use-is-qa-user.js +64 -0
  81. package/lib/esm/ui/c4-cluster-tag.d.ts +11 -0
  82. package/lib/esm/ui/c4-cluster-tag.js +39 -0
  83. package/lib/esm/ui/ds-compact-code-block.d.ts +15 -0
  84. package/lib/esm/ui/ds-compact-code-block.js +33 -0
  85. package/lib/esm/ui/index.d.ts +13 -3
  86. package/lib/esm/ui/index.js +14 -7
  87. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +21 -6
  88. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +4 -2
  89. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.d.ts +1 -1
  90. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +31 -12
  91. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +6 -1
  92. package/lib/esm/widgets/cluster-details/cluster-region-code.d.ts +8 -0
  93. package/lib/esm/widgets/cluster-details/cluster-region-code.js +17 -0
  94. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-byom-clients-tab.js +44 -6
  95. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +6 -4
  96. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +2 -14
  97. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.d.ts +7 -0
  98. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +23 -11
  99. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +11 -15
  100. package/lib/esm/widgets/cluster-details/upgrade-gate.d.ts +23 -0
  101. package/lib/esm/widgets/cluster-details/upgrade-gate.js +36 -0
  102. package/lib/esm/widgets/cluster-details/use-upgrade-gate.d.ts +24 -0
  103. package/lib/esm/widgets/cluster-details/use-upgrade-gate.js +73 -0
  104. package/lib/esm/widgets/clusters/c4-clusters-page.js +0 -4
  105. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +4 -1
  106. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +44 -17
  107. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +0 -3
  108. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +12 -11
  109. package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +2 -3
  110. package/lib/esm/widgets/group-details/c4-group-details-page.d.ts +1 -1
  111. package/lib/esm/widgets/group-details/c4-group-details-page.js +10 -3
  112. package/lib/esm/widgets/group-details/c4-group-details-page.types.d.ts +5 -0
  113. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  114. package/lib/esm/widgets/management/c4-management-app.js +34 -36
  115. package/lib/esm/widgets/management/c4-management-app.types.d.ts +10 -9
  116. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.d.ts +0 -1
  117. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -2
  118. package/lib/esm/widgets/management/tabs/c4-management-pricing-tab.js +1 -1
  119. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +2 -2
  120. package/lib/esm/widgets/management/tabs/c4-management-users-tab.d.ts +3 -1
  121. package/lib/esm/widgets/management/tabs/c4-management-users-tab.js +2 -2
  122. package/lib/esm/widgets/user-details/c4-user-details-page.d.ts +1 -1
  123. package/lib/esm/widgets/user-details/c4-user-details-page.js +5 -2
  124. package/lib/esm/widgets/user-details/c4-user-details-page.types.d.ts +5 -0
  125. package/package.json +23 -23
  126. package/lib/esm/runtime/cluster-duplication.d.ts +0 -10
  127. package/lib/esm/runtime/cluster-duplication.js +0 -15
  128. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.d.ts +0 -13
  129. package/lib/esm/widgets/management/tabs/c4-management-groups-tab.js +0 -26
@@ -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, }) => {
@@ -730,18 +730,13 @@ export const C4ClusterDetailsSettingsTab = (props) => {
730
730
  props.cluster?.hasOptimize !== false &&
731
731
  checkClusterVersion(OPTIMIZE_FILTERING_MIN_VERSION));
732
732
  }, [props.cluster?.hasOptimize, checkClusterVersion]);
733
- const isAppIntegrationsFeatureEnabled = runtime.featureFlags?.isEnabled?.('console.appIntegrations') ?? false;
734
733
  const shouldShowAppIntegrations = useMemo(() => {
735
- if (!isAppIntegrationsFeatureEnabled) {
736
- return false;
737
- }
738
734
  // Shared with the console-backend update guard — see
739
735
  // isAppIntegrationsVersionSupported for the version rule itself.
740
736
  return isAppIntegrationsVersionSupported(props.cluster?.generation?.versions ?? {});
741
737
  }, [
742
738
  props.cluster?.generation?.versions?.zeebe,
743
739
  props.cluster?.generation?.versions?.connectorBridge,
744
- isAppIntegrationsFeatureEnabled,
745
740
  ]);
746
741
  // Optimize data filters feed the generated spec, so a change restarts the
747
742
  // cluster. The toggle/save actions are awaited by the child panel, so route
@@ -947,17 +942,18 @@ export const C4ClusterDetailsSettingsTab = (props) => {
947
942
  subtitle: "This cluster hasn't finished provisioning for secret storage. Save any other cluster setting, then try again.",
948
943
  }
949
944
  : undefined,
950
- // BYOIDP (camunda-operator#5760): the secret now reaches the cluster via
951
- // a cloud secret manager + ESO sync, which is eventually consistent
952
- // rather than synchronous. Surface the operator's condition instead of
953
- // assuming the write completed the moment the modal closed. The
954
- // condition clears when the operator either drops it or flips its
955
- // status to 'False', so treat present-and-not-False as pending (the
956
- // 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.
957
953
  statusText: !props.cluster.externalIdpConfig
958
954
  ? 'Not configured'
959
- : props.cluster.status?.conditions?.some((condition) => condition.type === 'OidcProvidersPending' &&
960
- condition.status !== 'False')
955
+ : props.cluster.status?.conditions?.some((condition) => condition.type === 'OidcProvidersReady' &&
956
+ condition.status === 'False')
961
957
  ? `Pending: ${props.cluster.externalIdpConfig.clientName} (secret sync in progress)`
962
958
  : `Configured: ${props.cluster.externalIdpConfig.clientName}`,
963
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
+ }
@@ -13,7 +13,6 @@ import { hasAvailableClusterReservation, isDeveloperBlockedFromClusterCreate, us
13
13
  import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
14
14
  import { useC4ConsoleRuntime, useC4FeatureFlag, } from '../../runtime/c4-console-runtime-context.js';
15
15
  import { CLUSTER_CREATION_BLOCKED_FLAG } from '../../runtime/cluster-creation-blocked.js';
16
- import { CLUSTER_DUPLICATION_FLAG } from '../../runtime/cluster-duplication.js';
17
16
  import { toApiConfig } from '../../runtime/to-api-config.js';
18
17
  import { Checkbox, Modal, Stack, TextInput } from '../../ui/index.js';
19
18
  import { useSelectFamily } from '../../ui/families.js';
@@ -227,7 +226,6 @@ export const C4ClustersPage = observer(({ orgId, scope = 'cluster', gettingStart
227
226
  const resolvedGettingStartedHref = useMemo(() => getC4ClustersGettingStartedHref(gettingStartedHref), [gettingStartedHref]);
228
227
  const runtime = useC4ConsoleRuntime();
229
228
  const clusterCreationBlocked = useC4FeatureFlag(CLUSTER_CREATION_BLOCKED_FLAG);
230
- const clusterDuplicationEnabled = useC4FeatureFlag(CLUSTER_DUPLICATION_FLAG);
231
229
  const data = useC4ConsoleData();
232
230
  const authz = useC4ConsoleAuthz({ orgId });
233
231
  const isOrgAdmin = useMemo(() => {
@@ -565,7 +563,6 @@ export const C4ClustersPage = observer(({ orgId, scope = 'cluster', gettingStart
565
563
  // and reaches no form that cannot be sent.
566
564
  canDuplicateCluster: (clustersVisibility?.canCreate ?? false) &&
567
565
  !developerBlockedFromClusterCreate &&
568
- clusterDuplicationEnabled &&
569
566
  !clusterCreationBlocked &&
570
567
  (reservationAvailable || (clustersVisibility?.canDelete ?? false)),
571
568
  // The flag disables the button and keeps it visible. `canCreateCluster`
@@ -580,7 +577,6 @@ export const C4ClustersPage = observer(({ orgId, scope = 'cluster', gettingStart
580
577
  orgFailoverLimitEnabled,
581
578
  permissionsOverride,
582
579
  clusterCreationBlocked,
583
- clusterDuplicationEnabled,
584
580
  ]);
585
581
  const resolvedTranslations = useMemo(() => {
586
582
  if (translations) {
@@ -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;
@@ -87,6 +90,6 @@ export declare function buildCreateClusterTranslations(t: ((key: string, options
87
90
  stageSleep8h: string;
88
91
  stageSleepInactivity: string;
89
92
  };
90
- export declare const C4CreateClusterPage: (({ orgId, afterCreateModalUrl, talkToAnExpertUrl, externalLinks, onNavigate, duplicateOfClusterId, }: C4CreateClusterPageProps) => React.ReactElement) & {
93
+ export declare const C4CreateClusterPage: (({ orgId, afterCreateModalUrl, talkToAnExpertUrl, externalLinks, onNavigate, duplicateOfClusterId: sourceClusterId, }: C4CreateClusterPageProps) => React.ReactElement) & {
91
94
  displayName: string;
92
95
  };
@@ -14,8 +14,7 @@ import { getC4CreateClusterExternalLinks, getC4TalkToAnExpertUrl, } from '../../
14
14
  import { addC4ConsoleNotification } from '../../notifications/c4-console-notifications-handle.js';
15
15
  import { useC4ConsoleAuthz } from '../../runtime/c4-console-authz.js';
16
16
  import { useC4ConsoleData } from '../../runtime/c4-console-data-context.js';
17
- import { useC4ConsoleRuntime, useC4FeatureFlag, } from '../../runtime/c4-console-runtime-context.js';
18
- import { CLUSTER_DUPLICATION_FLAG } from '../../runtime/cluster-duplication.js';
17
+ import { useC4ConsoleRuntime } from '../../runtime/c4-console-runtime-context.js';
19
18
  import { toApiConfig } from '../../runtime/to-api-config.js';
20
19
  import { Link, Stack } from '../../ui/index.js';
21
20
  import { safeTranslate } from '../../utils/safe-translate.js';
@@ -227,6 +226,9 @@ export function buildCreateClusterTranslations(t) {
227
226
  olderGenerationsLabel: translate('createcluster:form.generation.olderGenerationsLabel', 'View older generations'),
228
227
  olderGenerationsHelperText: translate('createcluster:form.generation.olderGenerationsHelperText', 'These are older generations that are used in your organization.'),
229
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.'),
230
232
  autoUpdateTitle: translate('createcluster:form.autoUpdate.title', 'Automatic cluster patch updates'),
231
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.'),
232
234
  autoUpdateDescriptionIfDisabled: translate('createcluster:form.autoUpdate.descriptionIfDisabled', 'Only available for generations in the stable channel.'),
@@ -283,17 +285,10 @@ export function buildCreateClusterTranslations(t) {
283
285
  stageSleepInactivity: translate('clusterdetails:settings.tags.sleepInactivity', 'Auto-pauses after inactivity'),
284
286
  };
285
287
  }
286
- export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkToAnExpertUrl, externalLinks, onNavigate, duplicateOfClusterId, }) => {
288
+ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkToAnExpertUrl, externalLinks, onNavigate, duplicateOfClusterId: sourceClusterId, }) => {
287
289
  const runtime = useC4ConsoleRuntime();
288
290
  const data = useC4ConsoleData();
289
291
  const authz = useC4ConsoleAuthz({ orgId });
290
- const duplicationEnabled = useC4FeatureFlag(CLUSTER_DUPLICATION_FLAG);
291
- // The flags arrive with a request, thus this is false on the first render
292
- // and true on the render after. Every read below goes through this value,
293
- // so the page makes a normal cluster while the answer is not there.
294
- const sourceClusterId = duplicationEnabled
295
- ? duplicateOfClusterId
296
- : undefined;
297
292
  const resolvedTalkToAnExpertUrl = useMemo(() => talkToAnExpertUrl ??
298
293
  getC4TalkToAnExpertUrl({
299
294
  email: runtime.user?.email,
@@ -384,12 +379,10 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
384
379
  const clustersCache = data.clusters[orgId];
385
380
  const rawClusters = (clustersCache?.data ?? []);
386
381
  const clustersLoading = clustersCache?.isLoading ?? false;
387
- // The feature flag arrives with a request, thus `sourceClusterId` becomes
388
- // set one render after the page opens, and the read of the source cluster
389
- // starts one render after that. The form seeds its fields on its first
390
- // render alone, so it must not open before the source cluster is there.
391
- // Either the cluster arrives, or the read fails and `apiError` replaces the
392
- // form.
382
+ // The read of the source cluster starts in an effect, thus after the first
383
+ // render. The form seeds its fields on its first render alone, so it must
384
+ // not open before the source cluster is there. Either the cluster arrives,
385
+ // or the read fails and `apiError` replaces the form.
393
386
  const sourceClusterPending = Boolean(sourceClusterId) && !sourceCluster;
394
387
  const loading = clustersLoading ||
395
388
  creationParametersLoading ||
@@ -519,6 +512,21 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
519
512
  creationParameters,
520
513
  usageByPlanTypeUuid,
521
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]);
522
530
  const regions = useMemo(() => {
523
531
  const rawRegions = getPathUnknown(creationParameters, ['regions']);
524
532
  if (!Array.isArray(rawRegions)) {
@@ -684,6 +692,14 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
684
692
  }
685
693
  return channelsWithGenerations.find((channel) => channel.generations.some((generation) => generation.uuid === generationUuid))?.uuid;
686
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]);
687
703
  const initialValues = useMemo(() => {
688
704
  if (!sourceCluster) {
689
705
  return undefined;
@@ -696,6 +712,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
696
712
  name: duplicateName,
697
713
  description: getString(sourceCluster, 'description'),
698
714
  clusterPlanType: getPathString(sourceCluster, ['planType', 'uuid']),
715
+ clusterPlan: sourceUnlockedClusterPlan,
699
716
  channel: sourceChannelUuid,
700
717
  generation: getPathString(sourceCluster, ['generation', 'uuid']),
701
718
  region: getString(sourceCluster, 'k8sContextUuid'),
@@ -714,7 +731,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
714
731
  ]),
715
732
  identityBackendChecksEnabled: getBoolean(sourceCluster, 'identityBackendChecksEnabled'),
716
733
  };
717
- }, [sourceChannelUuid, sourceCluster]);
734
+ }, [sourceChannelUuid, sourceCluster, sourceUnlockedClusterPlan]);
718
735
  /**
719
736
  * True when the plan type of the source cluster has no reservation left.
720
737
  * Counted without the exclusion that `usageByPlanTypeUuid` applies, thus
@@ -783,6 +800,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
783
800
  const body = {
784
801
  name: params.name,
785
802
  planTypeId: params.clusterPlanType,
803
+ ...(params.clusterPlan && { clusterPlanId: params.clusterPlan }),
786
804
  channelId: params.channel,
787
805
  generationId: params.generation,
788
806
  k8sContextId: params.region,
@@ -924,6 +942,14 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
924
942
  title: translations.planTypeTitle,
925
943
  options: planTypes,
926
944
  },
945
+ ...(unlockedClusterPlans.length > 0 && {
946
+ clusterPlan: {
947
+ title: translations.clusterPlanTitle,
948
+ defaultLabel: translations.clusterPlanDefaultLabel,
949
+ description: translations.clusterPlanDescription,
950
+ options: unlockedClusterPlans,
951
+ },
952
+ }),
927
953
  region: {
928
954
  title: translations.regionTitle,
929
955
  backupRegionTitle: translations.backupRegionTitle,
@@ -1054,6 +1080,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
1054
1080
  loading,
1055
1081
  translations,
1056
1082
  planTypes,
1083
+ unlockedClusterPlans,
1057
1084
  initialValues,
1058
1085
  duplicate,
1059
1086
  dualRegionBackups,
@@ -32,9 +32,6 @@ export interface C4CreateClusterPageProps {
32
32
  * The cluster to copy. Give it and the page fills the form with the settings
33
33
  * of that cluster, and sends the form to the duplicate endpoint. Omit it and
34
34
  * the page is the normal create page.
35
- *
36
- * The `console.clusterDuplication` flag gates this. While the flag is off,
37
- * the page drops the id and makes a normal cluster.
38
35
  */
39
36
  duplicateOfClusterId?: string;
40
37
  }
@@ -99,7 +99,7 @@ function toUsageChartPoints(entries, clusterNames, orgName) {
99
99
  * - Quick links
100
100
  */
101
101
  export const C4DashboardApp = observer((props) => {
102
- const { orgId, t, onNavigate, urls, billing, embedded = false, hdpValueMetricsFor2025Enabled = false, isLicensingModel2025: isLicensingModel2025Prop, theme = 'white', } = props;
102
+ const { orgId, t, onNavigate, urls, billing, embedded = false, isLicensingModel2025: isLicensingModel2025Prop, theme = 'white', } = props;
103
103
  const authz = useC4ConsoleAuthz({ orgId });
104
104
  const data = useC4ConsoleData();
105
105
  const runtime = useC4ConsoleRuntime();
@@ -188,9 +188,6 @@ export const C4DashboardApp = observer((props) => {
188
188
  const [usage, setUsage] = useState();
189
189
  const usagePerDay = usage?.orgId === orgId ? usage.entries : [];
190
190
  const isLicensingModel2025 = isLicensingModel2025Prop ?? orgInfo?.metadata?.licensingModel === '2025';
191
- // The same gate `C4ManagementApp` applies, so a 2025 org's dashboard and
192
- // usage tab read the same numbers from the same source.
193
- const usageFromHdp = hdpValueMetricsFor2025Enabled && isLicensingModel2025;
194
191
  // The licensing model selects the usage source, and it comes from orgInfo,
195
192
  // which is not loaded on the first render. Wait for it: without this gate a
196
193
  // 2025 org reads the console source first, and then reads HDP again when
@@ -212,7 +209,9 @@ export const C4DashboardApp = observer((props) => {
212
209
  let cancelled = false;
213
210
  const load = async () => {
214
211
  try {
215
- const entries = usageFromHdp
212
+ // `C4ManagementApp` reads a 2025 org from HDP too, so the dashboard
213
+ // and the usage tab show the same numbers.
214
+ const entries = isLicensingModel2025
216
215
  ? (await HdpService.getUsageMetrics({
217
216
  config: apiConfig,
218
217
  params: { orgId, queryRange: `${USAGE_DAYS}-d` },
@@ -249,7 +248,7 @@ export const C4DashboardApp = observer((props) => {
249
248
  hostProvidesBilling,
250
249
  licensingModelKnown,
251
250
  orgId,
252
- usageFromHdp,
251
+ isLicensingModel2025,
253
252
  ]);
254
253
  // Read during render (not inside the memo below) so that MobX keeps
255
254
  // tracking it: a memo whose dependencies did not change returns its cached
@@ -469,10 +468,11 @@ export const C4DashboardApp = observer((props) => {
469
468
  }, texts: {
470
469
  welcome: {
471
470
  title: safeTranslate(t, 'dashboard:welcome.title', 'Welcome'),
472
- text: safeTranslate(t, 'dashboard:welcome.text', ''),
473
- item1: safeTranslate(t, 'dashboard:welcome.item1', ''),
474
- item2: safeTranslate(t, 'dashboard:welcome.item2', ''),
475
- 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.'),
476
476
  cta: safeTranslate(t, 'dashboard:welcome.cta', 'Model a process'),
477
477
  gsg: safeTranslate(t, 'dashboard:welcome.gsg', 'Getting Started Guide'),
478
478
  watchADemo: safeTranslate(t, 'dashboard:welcome.watchADemo', 'Watch a demo'),
@@ -480,7 +480,8 @@ export const C4DashboardApp = observer((props) => {
480
480
  users: {
481
481
  title: safeTranslate(t, 'dashboard:users.title', 'Users'),
482
482
  viewAll: safeTranslate(t, 'dashboard:users.viewAll', 'View all'),
483
- 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'),
484
485
  text: safeTranslate(t, 'dashboard:users.text', ''),
485
486
  user: safeTranslate(t, 'dashboard:users.user', 'User'),
486
487
  users: safeTranslate(t, 'dashboard:users.users', 'Users'),
@@ -46,9 +46,8 @@ export interface C4DashboardAppProps {
46
46
  };
47
47
  };
48
48
  /**
49
- * Set when the host reads 2025-model usage from HDP. Mirrors the same prop on
50
- * `C4ManagementApp`, so both surfaces read a 2025 org's numbers from one
51
- * source. Only used when the host passes no `billing` prop.
49
+ * @deprecated The widget ignores this prop. An org on the 2025 model always
50
+ * reads its usage from HDP, the same source as `C4ManagementApp`.
52
51
  */
53
52
  hdpValueMetricsFor2025Enabled?: boolean;
54
53
  /**
@@ -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, tenantsValueMetricEnabled, hdpValueMetricsFor2025Enabled, 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
  };