@camunda/ccma-saas-frontend 0.15.1 → 0.16.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 (50) hide show
  1. package/lib/esm/components/c4-cluster-list/c4-cluster-list.js +4 -10
  2. package/lib/esm/components/c4-cluster-list/c4-cluster-list.types.d.ts +1 -4
  3. package/lib/esm/components/c4-cluster-overview/applications.js +91 -16
  4. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.d.ts +31 -1
  5. package/lib/esm/components/c4-cluster-overview/c4-cluster-overview.js +28 -0
  6. package/lib/esm/components/c4-cluster-overview/cluster-details.js +2 -8
  7. package/lib/esm/components/c4-cluster-overview/cluster-load.js +3 -2
  8. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.d.ts +33 -0
  9. package/lib/esm/components/c4-cluster-overview/ds-status-icon-text.js +34 -0
  10. package/lib/esm/components/c4-console-dashboard/c4-console-dashboard.js +6 -5
  11. package/lib/esm/components/c4-sm-cluster-details/details.js +2 -8
  12. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +3 -3
  13. package/lib/esm/components/c4-usage-metrics-per-cluster/c4-usage-metrics-per-cluster.js +2 -8
  14. package/lib/esm/index.d.ts +1 -1
  15. package/lib/esm/index.js +1 -1
  16. package/lib/esm/runtime/c4-console-events-context.d.ts +5 -1
  17. package/lib/esm/runtime/c4-console-events-context.js +16 -2
  18. package/lib/esm/runtime/c4-console-runtime-context.d.ts +7 -6
  19. package/lib/esm/runtime/c4-console-runtime-context.js +29 -12
  20. package/lib/esm/runtime/c4-console-runtime.types.d.ts +7 -7
  21. package/lib/esm/runtime/c4-user-notifications-context.js +6 -2
  22. package/lib/esm/runtime/c4-user-notifications-context.types.d.ts +5 -1
  23. package/lib/esm/runtime/use-hub-api-naming.d.ts +8 -11
  24. package/lib/esm/runtime/use-hub-api-naming.js +9 -12
  25. package/lib/esm/runtime/use-is-qa-user.d.ts +23 -0
  26. package/lib/esm/runtime/use-is-qa-user.js +64 -0
  27. package/lib/esm/ui/c4-cluster-tag.d.ts +11 -0
  28. package/lib/esm/ui/c4-cluster-tag.js +39 -0
  29. package/lib/esm/ui/index.js +8 -7
  30. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +0 -3
  31. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +3 -4
  32. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +1 -1
  33. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-hot-backups-tab.js +2 -14
  34. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-overview-tab.js +3 -3
  35. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +0 -5
  36. package/lib/esm/widgets/clusters/c4-clusters-page.js +0 -4
  37. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.d.ts +1 -1
  38. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +6 -16
  39. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.types.d.ts +0 -3
  40. package/lib/esm/widgets/dashboard/c4-dashboard-app.js +5 -6
  41. package/lib/esm/widgets/dashboard/c4-dashboard-app.types.d.ts +2 -3
  42. package/lib/esm/widgets/management/c4-management-app.d.ts +1 -1
  43. package/lib/esm/widgets/management/c4-management-app.js +19 -33
  44. package/lib/esm/widgets/management/c4-management-app.types.d.ts +4 -9
  45. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.d.ts +0 -1
  46. package/lib/esm/widgets/management/tabs/c4-management-billing-tab.js +1 -2
  47. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +2 -2
  48. package/package.json +19 -19
  49. package/lib/esm/runtime/cluster-duplication.d.ts +0 -10
  50. package/lib/esm/runtime/cluster-duplication.js +0 -15
@@ -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) {
@@ -87,6 +87,6 @@ export declare function buildCreateClusterTranslations(t: ((key: string, options
87
87
  stageSleep8h: string;
88
88
  stageSleepInactivity: string;
89
89
  };
90
- export declare const C4CreateClusterPage: (({ orgId, afterCreateModalUrl, talkToAnExpertUrl, externalLinks, onNavigate, duplicateOfClusterId, }: C4CreateClusterPageProps) => React.ReactElement) & {
90
+ export declare const C4CreateClusterPage: (({ orgId, afterCreateModalUrl, talkToAnExpertUrl, externalLinks, onNavigate, duplicateOfClusterId: sourceClusterId, }: C4CreateClusterPageProps) => React.ReactElement) & {
91
91
  displayName: string;
92
92
  };
@@ -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';
@@ -283,17 +282,10 @@ export function buildCreateClusterTranslations(t) {
283
282
  stageSleepInactivity: translate('clusterdetails:settings.tags.sleepInactivity', 'Auto-pauses after inactivity'),
284
283
  };
285
284
  }
286
- export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkToAnExpertUrl, externalLinks, onNavigate, duplicateOfClusterId, }) => {
285
+ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkToAnExpertUrl, externalLinks, onNavigate, duplicateOfClusterId: sourceClusterId, }) => {
287
286
  const runtime = useC4ConsoleRuntime();
288
287
  const data = useC4ConsoleData();
289
288
  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
289
  const resolvedTalkToAnExpertUrl = useMemo(() => talkToAnExpertUrl ??
298
290
  getC4TalkToAnExpertUrl({
299
291
  email: runtime.user?.email,
@@ -384,12 +376,10 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
384
376
  const clustersCache = data.clusters[orgId];
385
377
  const rawClusters = (clustersCache?.data ?? []);
386
378
  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.
379
+ // The read of the source cluster starts in an effect, thus after the first
380
+ // render. The form seeds its fields on its first render alone, so it must
381
+ // not open before the source cluster is there. Either the cluster arrives,
382
+ // or the read fails and `apiError` replaces the form.
393
383
  const sourceClusterPending = Boolean(sourceClusterId) && !sourceCluster;
394
384
  const loading = clustersLoading ||
395
385
  creationParametersLoading ||
@@ -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
@@ -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 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, 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, tenantsValueMetricEnabled = false, hdpValueMetricsFor2025Enabled = false, permissionsReworkEnabled = false, urls, onNeedsReload, }) => {
549
+ export const C4ManagementApp = observer(({ orgId, embedded = 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();
@@ -1135,11 +1135,6 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1135
1135
  ]);
1136
1136
  const isLicensingModel2025 = useMemo(() => isLicensingModel2025Prop ??
1137
1137
  getNestedValue(org, ['metadata', 'licensingModel']) === '2025', [isLicensingModel2025Prop, org]);
1138
- // Same two gates the billing tab applies, so a 2025 org reads the same
1139
- // numbers from the same source on both tabs: PI/DI/TU from HDP instead of
1140
- // the console-scraped metrics, and the org-scoped tenant gauge.
1141
- const usageFromHdp = hdpValueMetricsFor2025Enabled && isLicensingModel2025;
1142
- const usageTenantsEnabled = tenantsValueMetricEnabled && isLicensingModel2025;
1143
1138
  /**
1144
1139
  * Why the usage reads failed, in words a reader can act on.
1145
1140
  *
@@ -1167,8 +1162,9 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1167
1162
  : (data.getClusters(orgId) ?? []);
1168
1163
  // Settled rather than all: the tenant gauge and the PI/DI/TU history are
1169
1164
  // independent reads, and one of them failing must not blank the other.
1165
+ // A 2025 org reads both from HDP, the same source as the billing tab.
1170
1166
  const [monthlyResult, perDayResult, hdpUsageResult, tenantsResult] = await Promise.allSettled([
1171
- usageFromHdp
1167
+ isLicensingModel2025
1172
1168
  ? Promise.resolve([])
1173
1169
  : ConsoleValueMetricsService.getValueMetrics({
1174
1170
  config: apiConfig,
@@ -1177,7 +1173,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1177
1173
  days: 0,
1178
1174
  },
1179
1175
  }),
1180
- usageFromHdp
1176
+ isLicensingModel2025
1181
1177
  ? Promise.resolve([])
1182
1178
  : ConsoleValueMetricsService.getValueMetricsPerDays({
1183
1179
  config: apiConfig,
@@ -1188,7 +1184,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1188
1184
  }),
1189
1185
  // No date bounds: the table goes back to the org's first period, and
1190
1186
  // the endpoint returns the org's whole history when unbounded.
1191
- usageFromHdp
1187
+ isLicensingModel2025
1192
1188
  ? HdpService.getUsageMetrics({
1193
1189
  config: apiConfig,
1194
1190
  params: { orgId },
@@ -1197,7 +1193,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1197
1193
  // Per-cluster variant: the usage table breaks each period down by
1198
1194
  // cluster, and this returns the org totals for the period column in
1199
1195
  // the same response — one HDP read for both halves.
1200
- usageTenantsEnabled
1196
+ isLicensingModel2025
1201
1197
  ? HdpService.getTenantUsagePerCluster({
1202
1198
  config: apiConfig,
1203
1199
  params: { orgId, days: MAX_TENANT_USAGE_DAYS },
@@ -1247,7 +1243,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1247
1243
  finally {
1248
1244
  setUsageLoading(false);
1249
1245
  }
1250
- }, [apiConfig, orgId, usageFromHdp, usageTenantsEnabled, usageErrorMessage]);
1246
+ }, [apiConfig, orgId, isLicensingModel2025, usageErrorMessage]);
1251
1247
  const loadBilling = useCallback(async () => {
1252
1248
  const loadId = billingLoadIdRef.current + 1;
1253
1249
  billingLoadIdRef.current = loadId;
@@ -1302,13 +1298,13 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1302
1298
  config: apiConfig,
1303
1299
  params: { orgId },
1304
1300
  }),
1305
- tenantsValueMetricEnabled && isLicensingModel2025
1301
+ isLicensingModel2025
1306
1302
  ? HdpService.getTenantUsage({
1307
1303
  config: apiConfig,
1308
1304
  params: { orgId, days: MAX_TENANT_USAGE_DAYS },
1309
1305
  })
1310
1306
  : Promise.resolve([]),
1311
- hdpValueMetricsFor2025Enabled && isLicensingModel2025
1307
+ isLicensingModel2025
1312
1308
  ? HdpService.getUsageMetrics({
1313
1309
  config: apiConfig,
1314
1310
  params: { orgId },
@@ -1349,13 +1345,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1349
1345
  finally {
1350
1346
  setBillingLoading(false);
1351
1347
  }
1352
- }, [
1353
- apiConfig,
1354
- orgId,
1355
- tenantsValueMetricEnabled,
1356
- isLicensingModel2025,
1357
- hdpValueMetricsFor2025Enabled,
1358
- ]);
1348
+ }, [apiConfig, orgId, isLicensingModel2025]);
1359
1349
  const enterpriseDevOnly = useMemo(() => getNestedBoolean(org, ['metadata', 'enterpriseDevOnly']), [org]);
1360
1350
  const billingIsEnterprise = useMemo(() => orgHasSalesPlanType(org, 'enterprise'), [org]);
1361
1351
  const billingGeneralData = useMemo(() => {
@@ -1450,7 +1440,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1450
1440
  // org totals rather than summed. Shared with the two internal tools so all
1451
1441
  // three surfaces report the same number for the same org.
1452
1442
  const tenantPeak = peakWithinTerm(billingTenantUsage, billingEnterprisePeriod);
1453
- if (hdpValueMetricsFor2025Enabled && isLicensingModel2025) {
1443
+ if (isLicensingModel2025) {
1454
1444
  return billingHdpUsageMetrics
1455
1445
  .filter((entry) => entry.date.ts >= periodStartDayMs &&
1456
1446
  entry.date.ts <= periodEndDayMs)
@@ -1491,7 +1481,6 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1491
1481
  billingMetricsMonthly,
1492
1482
  billingTenantUsage,
1493
1483
  billingHdpUsageMetrics,
1494
- hdpValueMetricsFor2025Enabled,
1495
1484
  isLicensingModel2025,
1496
1485
  ]);
1497
1486
  const billingClusterReservations = useMemo(() => {
@@ -1556,7 +1545,6 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1556
1545
  billingClusterReservations,
1557
1546
  enterpriseDevOnly,
1558
1547
  isLicensingModel2025,
1559
- tenantsValueMetricEnabled,
1560
1548
  membersCount: members.length,
1561
1549
  changeTab,
1562
1550
  onUpdateUsageAlert: async (alertId, threshold, enabled) => {
@@ -1597,7 +1585,6 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1597
1585
  billingUsageAlerts,
1598
1586
  enterpriseDevOnly,
1599
1587
  isLicensingModel2025,
1600
- tenantsValueMetricEnabled,
1601
1588
  changeTab,
1602
1589
  members.length,
1603
1590
  t,
@@ -1626,7 +1613,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1626
1613
  * usage metric) and the usage table has no column for it either.
1627
1614
  */
1628
1615
  const usagePerDayEntries = useMemo(() => {
1629
- if (!usageFromHdp) {
1616
+ if (!isLicensingModel2025) {
1630
1617
  return usageMetricsPerDay;
1631
1618
  }
1632
1619
  return usageHdpMetrics.map((entry) => ({
@@ -1637,13 +1624,13 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1637
1624
  decisionInstances: entry.di,
1638
1625
  taskUsers: entry.tu,
1639
1626
  }));
1640
- }, [orgId, usageFromHdp, usageHdpMetrics, usageMetricsPerDay]);
1627
+ }, [orgId, isLicensingModel2025, usageHdpMetrics, usageMetricsPerDay]);
1641
1628
  /**
1642
1629
  * Monthly (already period-bucketed) metrics, which only the console source
1643
1630
  * has. Empty on the HDP path so the aggregation falls through to the daily
1644
1631
  * series above rather than mixing two sources in one table.
1645
1632
  */
1646
- const usageMonthlyEntries = useMemo(() => (usageFromHdp ? [] : usageMetricsMonthly), [usageFromHdp, usageMetricsMonthly]);
1633
+ const usageMonthlyEntries = useMemo(() => (isLicensingModel2025 ? [] : usageMetricsMonthly), [isLicensingModel2025, usageMetricsMonthly]);
1647
1634
  const usageCharts = useMemo(() => {
1648
1635
  const orgName = typeof org?.name === 'string' ? org.name : orgId;
1649
1636
  const theme = themeNameToClassName(c3Profile.resolvedTheme);
@@ -1723,7 +1710,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1723
1710
  // Tenants is reported for the org, not per cluster, so it is a single
1724
1711
  // series (no top-N capping) and is keyed on the org rather than on a
1725
1712
  // cluster name.
1726
- tenants: usageTenantsEnabled
1713
+ tenants: isLicensingModel2025
1727
1714
  ? {
1728
1715
  title: safeTranslate(t, 'orgmanagement:tabs.usage.tenants', 'Tenants'),
1729
1716
  theme,
@@ -1747,7 +1734,6 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1747
1734
  orgId,
1748
1735
  t,
1749
1736
  usagePerDayEntries,
1750
- usageTenantsEnabled,
1751
1737
  usageTenantUsage,
1752
1738
  ]);
1753
1739
  const usageHistory = useMemo(() => {
@@ -1761,7 +1747,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1761
1747
  * the current period's figure matches across the two tabs.
1762
1748
  */
1763
1749
  const tenantsForPeriod = (periodStart, periodEnd) => {
1764
- if (!usageTenantsEnabled) {
1750
+ if (!isLicensingModel2025) {
1765
1751
  return undefined;
1766
1752
  }
1767
1753
  const from = toUtcDayStartMs(periodStart);
@@ -1781,7 +1767,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
1781
1767
  */
1782
1768
  const tenantsPerClusterForPeriod = (periodStart, periodEnd) => {
1783
1769
  const peaks = new Map();
1784
- if (!usageTenantsEnabled) {
1770
+ if (!isLicensingModel2025) {
1785
1771
  return peaks;
1786
1772
  }
1787
1773
  const from = toUtcDayStartMs(periodStart);
@@ -2029,7 +2015,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
2029
2015
  usageGroupBy,
2030
2016
  usageMonthlyEntries,
2031
2017
  usagePerDayEntries,
2032
- usageTenantsEnabled,
2018
+ isLicensingModel2025,
2033
2019
  usageTenantUsage,
2034
2020
  usageTenantPerCluster,
2035
2021
  ]);
@@ -3170,7 +3156,7 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, desiredTabId
3170
3156
  visible: usageVisible,
3171
3157
  component: (_jsx(C4ManagementUsageTab, { loading: usageLoading, groupBy: usageGroupBy, onGroupByChange: (next) => {
3172
3158
  setUsageGroupBy(next);
3173
- }, perClusterAvailable: true, history: usageHistory, charts: usageCharts, isLicensingModel2025: isLicensingModel2025, showTenants: usageTenantsEnabled, error: usageError, text: {
3159
+ }, perClusterAvailable: true, history: usageHistory, charts: usageCharts, isLicensingModel2025: isLicensingModel2025, showTenants: isLicensingModel2025, error: usageError, text: {
3174
3160
  tableTabTitle: safeTranslate(t, 'orgmanagement:tabs.billing.billingHistory.table.tabTitle', 'Table'),
3175
3161
  chartsTabTitle: safeTranslate(t, 'orgmanagement:tabs.billing.billingHistory.charts.tabTitle', 'Charts'),
3176
3162
  headers: {
@@ -68,18 +68,13 @@ export interface C4ManagementAppProps {
68
68
  */
69
69
  isLicensingModel2025?: boolean;
70
70
  /**
71
- * Whether the tenants value metric is enabled.
72
- * When true (and the org is on the 2025 model with an included tenants
73
- * value set), a Tenants usage card is shown on the billing tab, sourced
74
- * from HDP. This should be computed by the host app, gated behind the
75
- * feature flag.
71
+ * @deprecated The widget ignores this prop. The Tenants card is always on: it
72
+ * shows for an org on the 2025 model that has an included tenants value.
76
73
  */
77
74
  tenantsValueMetricEnabled?: boolean;
78
75
  /**
79
- * Whether PI/DI/TU for the current billing period should be sourced from HDP
80
- * instead of the console-scraped monthly metrics. Only takes effect for orgs
81
- * on the 2025 licensing model. This should be computed by the host app,
82
- * gated behind the feature flag.
76
+ * @deprecated The widget ignores this prop. An org on the 2025 model always
77
+ * reads PI, DI and TU of the current billing period from HDP.
83
78
  */
84
79
  hdpValueMetricsFor2025Enabled?: boolean;
85
80
  /** Aligned org-role model active (camunda-hub#25467). */
@@ -42,7 +42,6 @@ export interface C4ManagementBillingTabProps {
42
42
  onCreateUsageAlert: (metric: UsageAlertMetric, threshold: number, enabled: boolean) => Promise<void>;
43
43
  t?: Translate;
44
44
  isLicensingModel2025?: boolean;
45
- tenantsValueMetricEnabled?: boolean;
46
45
  }
47
46
  export declare const C4ManagementBillingTab: (props: C4ManagementBillingTabProps) => JSX.Element;
48
47
  export {};
@@ -135,8 +135,7 @@ export const C4ManagementBillingTab = (props) => {
135
135
  }, currentUsageMetrics: {
136
136
  title: (_jsx(_Fragment, { children: safeTranslate(props.t, 'orgmanagement:tabs.billing.metrics.title', 'Current usage') })),
137
137
  description: `${formatDate(props.billingEnterprisePeriod.periodStart)} - ${formatDate(props.billingEnterprisePeriod.periodEnd)}`,
138
- order: props.tenantsValueMetricEnabled &&
139
- props.isLicensingModel2025 &&
138
+ order: props.isLicensingModel2025 &&
140
139
  props.billingIncludedMetrics.tenants !== undefined
141
140
  ? ['gu', 'pi', 'tenants']
142
141
  : props.isLicensingModel2025
@@ -64,8 +64,8 @@ export interface C4ManagementUsageTabProps {
64
64
  isLicensingModel2025?: boolean;
65
65
  /**
66
66
  * Show the tenants column. Tenants is a 2025-licensing value metric sourced
67
- * from HDP, so the host gates it on the feature flag plus the licensing model
68
- * — the same gate the billing tab's tenants card uses.
67
+ * from HDP, so the host gates it on the licensing model — the same gate the
68
+ * billing tab's tenants card uses.
69
69
  */
70
70
  showTenants?: boolean;
71
71
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-saas-frontend",
3
- "version": "0.15.1",
3
+ "version": "0.16.0",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
@@ -47,36 +47,36 @@
47
47
  "@playwright/test": "1.63.0",
48
48
  "@camunda/c4-identity": "0.0.45",
49
49
  "@camunda/camunda-composite-components": "0.25.4",
50
- "@camunda/design-system": "0.62.0",
51
- "@carbon/charts": "1.27.18",
52
- "@carbon/charts-react": "1.27.18",
53
- "@carbon/layout": "11.58.0",
50
+ "@camunda/design-system": "0.66.0",
51
+ "@carbon/charts": "1.27.20",
52
+ "@carbon/charts-react": "1.27.20",
53
+ "@carbon/layout": "11.60.0",
54
54
  "@carbon/motion": "^11.46.0",
55
- "@carbon/react": "1.115.0",
56
- "@carbon/styles": "^1.107.0",
55
+ "@carbon/react": "1.117.0",
56
+ "@carbon/styles": "^1.116.0",
57
57
  "@carbon/themes": "^11.74.0",
58
- "@carbon/type": "11.66.0",
58
+ "@carbon/type": "11.68.0",
59
59
  "recharts": "3.10.1",
60
60
  "@chromatic-com/storybook": "5.3.1",
61
61
  "@mdx-js/react": "3.1.1",
62
- "@storybook/addon-docs": "10.6.0",
63
- "@storybook/addon-links": "10.6.0",
64
- "@storybook/react": "10.6.0",
65
- "@storybook/react-vite": "10.6.0",
62
+ "@storybook/addon-docs": "10.6.1",
63
+ "@storybook/addon-links": "10.6.1",
64
+ "@storybook/react": "10.6.1",
65
+ "@storybook/react-vite": "10.6.1",
66
66
  "@testing-library/jest-dom": "7.0.1",
67
67
  "@testing-library/react": "16.3.3",
68
68
  "@testing-library/user-event": "14.6.7",
69
69
  "eslint-import-resolver-typescript": "4.4.5",
70
70
  "eslint-plugin-react": "7.37.5",
71
71
  "eslint-plugin-react-hooks": "7.1.1",
72
- "eslint-plugin-storybook": "10.6.0",
73
- "jsdom": "30.0.1",
74
- "lucide-react": "1.42.0",
72
+ "eslint-plugin-storybook": "10.6.1",
73
+ "jsdom": "30.1.1",
74
+ "lucide-react": "1.49.0",
75
75
  "react": "19.2.8",
76
76
  "react-dom": "19.2.8",
77
77
  "react-is": "19.2.8",
78
78
  "rimraf": "6.1.3",
79
- "storybook": "10.6.0",
79
+ "storybook": "10.6.1",
80
80
  "styled-components": "6.5.3"
81
81
  },
82
82
  "peerDependencies": {
@@ -96,10 +96,10 @@
96
96
  "react-markdown": "^8.0.7 || ^10.0.0"
97
97
  },
98
98
  "dependencies": {
99
- "@camunda/ccma-api": "3.1.0",
100
- "@camunda/ccma-shared-types": "5.0.0",
99
+ "@camunda/ccma-api": "4.0.0",
100
+ "@camunda/ccma-shared-types": "6.0.0",
101
101
  "@pactsafe/pactsafe-react-sdk": "2.15.0",
102
- "cron-parser": "5.10.0",
102
+ "cron-parser": "5.10.1",
103
103
  "mobx": "6.16.1",
104
104
  "mobx-react-lite": "4.1.1",
105
105
  "mobx-state-tree": "7.4.0"
@@ -1,10 +0,0 @@
1
- /**
2
- * The flag that offers a duplicate of a cluster. The create page and every menu
3
- * that opens it read this flag, thus one name holds the dot path.
4
- *
5
- * console-backend answers 501 for the same flag, on
6
- * `POST /orgs/:orgId/clusters/:clusterId/duplicate`. A host that does not know
7
- * the flag reads it as off (see `useC4FeatureFlag`), thus no menu shows the
8
- * entry and the create page makes a normal cluster.
9
- */
10
- export declare const CLUSTER_DUPLICATION_FLAG = "console.clusterDuplication";
@@ -1,15 +0,0 @@
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
- * The flag that offers a duplicate of a cluster. The create page and every menu
8
- * that opens it read this flag, thus one name holds the dot path.
9
- *
10
- * console-backend answers 501 for the same flag, on
11
- * `POST /orgs/:orgId/clusters/:clusterId/duplicate`. A host that does not know
12
- * the flag reads it as off (see `useC4FeatureFlag`), thus no menu shows the
13
- * entry and the create page makes a normal cluster.
14
- */
15
- export const CLUSTER_DUPLICATION_FLAG = 'console.clusterDuplication';