@camunda/ccma-saas-frontend 0.0.35 → 0.0.36

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/assetUrls.d.ts +19 -0
  2. package/lib/esm/assetUrls.js +41 -0
  3. package/lib/esm/assets/ai.svg +14 -0
  4. package/lib/esm/assets/alerts.svg +5 -0
  5. package/lib/esm/assets/auditlogs.svg +9 -0
  6. package/lib/esm/assets/backup.svg +3 -0
  7. package/lib/esm/assets/clientApi.svg +10 -0
  8. package/lib/esm/assets/cluster.svg +4 -0
  9. package/lib/esm/assets/connectorSecret.svg +3 -0
  10. package/lib/esm/assets/consoleAPI.svg +3 -0
  11. package/lib/esm/assets/error.svg +11 -0
  12. package/lib/esm/assets/fatalError.svg +5 -0
  13. package/lib/esm/assets/ipwhitelist.svg +3 -0
  14. package/lib/esm/assets/monitoring.svg +6 -0
  15. package/lib/esm/assets/operatePreview.jpg +0 -0
  16. package/lib/esm/assets/optimizePreview.jpg +0 -0
  17. package/lib/esm/assets/secureConnectivity.svg +11 -0
  18. package/lib/esm/assets/tasklistPreview.jpg +0 -0
  19. package/lib/esm/assets/upgrade.svg +4 -0
  20. package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +2 -1
  21. package/lib/esm/components/c4-audit-log/c4-audit-log.js +2 -1
  22. package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +3 -2
  23. package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
  24. package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +3 -2
  25. package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +3 -2
  26. package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +3 -2
  27. package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +5 -4
  28. package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +2 -1
  29. package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +10 -2
  30. package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +4 -3
  31. package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +21 -7
  32. package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.js +116 -0
  33. package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +2 -1
  34. package/lib/esm/components/c4-management-api/c4-management-api.js +2 -1
  35. package/lib/esm/components/c4-management-settings/c4-management-settings.js +2 -1
  36. package/lib/esm/i18n/en/modals/clusterclients.json +3 -0
  37. package/lib/esm/i18n/en/pages/clusterdetails.json +4 -0
  38. package/lib/esm/i18n/en/pages/createcluster.json +2 -1
  39. package/lib/esm/index.d.ts +1 -0
  40. package/lib/esm/index.js +1 -0
  41. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +6 -6
  42. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +1 -1
  43. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +3 -3
  44. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.js +19 -0
  45. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +33 -41
  46. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.spec.js +64 -0
  47. package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +2 -1
  48. package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +4 -1
  49. package/lib/esm/widgets/management/c4-management-app.js +26 -23
  50. package/package.json +1 -1
@@ -204,6 +204,7 @@ function buildCreateClusterTranslations(t) {
204
204
  generationTitle: translate('createcluster:form.generation.title', 'Channel'),
205
205
  olderGenerationsLabel: translate('createcluster:form.generation.olderGenerationsLabel', 'View older generations'),
206
206
  olderGenerationsHelperText: translate('createcluster:form.generation.olderGenerationsHelperText', 'These are older generations that are used in your organization.'),
207
+ orgUnlockedGenerationsHelperText: translate('createcluster:form.generation.orgUnlockedGenerationsHelperText', 'These are older generations that have been unlocked for your organization.'),
207
208
  autoUpdateTitle: translate('createcluster:form.autoUpdate.title', 'Automatic cluster patch updates'),
208
209
  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.'),
209
210
  autoUpdateDescriptionIfDisabled: translate('createcluster:form.autoUpdate.descriptionIfDisabled', 'Only available for generations in the stable channel.'),
@@ -499,7 +500,8 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
499
500
  ]);
500
501
  const rawClassification = getString(generation, 'classification');
501
502
  const classification = rawClassification === 'channel' ||
502
- rawClassification === 'existingCluster'
503
+ rawClassification === 'existingCluster' ||
504
+ rawClassification === 'orgUnlocked'
503
505
  ? rawClassification
504
506
  : undefined;
505
507
  return {
@@ -729,6 +731,7 @@ export const C4CreateClusterPage = observer(({ orgId, afterCreateModalUrl, talkT
729
731
  channels: channelsWithGenerations,
730
732
  olderGenerationsLabel: translations.olderGenerationsLabel,
731
733
  olderGenerationsHelperText: translations.olderGenerationsHelperText,
734
+ orgUnlockedGenerationsHelperText: translations.orgUnlockedGenerationsHelperText,
732
735
  },
733
736
  autoUpdate: {
734
737
  title: translations.autoUpdateTitle,
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
6
6
  */
7
7
  import { C4GroupsList, C4IdentityContextProvider } from '@camunda/c4-identity';
8
8
  import { useC3Profile } from '@camunda/camunda-composite-components';
9
- import { AuditLoggerService, ConsoleAdminService, ConsoleApiClientsService, ConsoleValueMetricsService, EarlyAccessFeaturesService, HttpError, OrganizationMembersService, OrgsService, UsageAlertsService, } from '@camunda/ccma-api';
9
+ import { AuditLoggerService, ConsoleApiClientsService, ConsoleValueMetricsService, EarlyAccessFeaturesService, HttpError, OrganizationMembersService, OrgsService, UsageAlertsService, } from '@camunda/ccma-api';
10
10
  import { checkVersion, getDisplayedSalesPlan, getRevisitedSalesPlanName, OrganizationRole, SseEntity, VersionCheckOperator, } from '@camunda/ccma-shared-types';
11
11
  import { Link, Stack } from '@carbon/react';
12
12
  import { observer } from 'mobx-react-lite';
@@ -868,7 +868,6 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
868
868
  const [billingLoading, setBillingLoading] = useState(false);
869
869
  const [billingError, setBillingError] = useState(undefined);
870
870
  const [billingClusters, setBillingClusters] = useState([]);
871
- const [billingPlanTypes, setBillingPlanTypes] = useState([]);
872
871
  const [billingMetricsMonthly, setBillingMetricsMonthly] = useState([]);
873
872
  const [billingUsageAlerts, setBillingUsageAlerts] = useState([]);
874
873
  const [apiClients, setApiClients] = useState([]);
@@ -1042,13 +1041,7 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
1042
1041
  const clusters = data.clusters[orgId]?.error
1043
1042
  ? []
1044
1043
  : (data.getClusters(orgId) ?? []);
1045
- const [planTypes, monthly, alerts] = await Promise.all([
1046
- ConsoleAdminService.getAllClusterPlanTypes({
1047
- config: apiConfig,
1048
- params: {
1049
- headers: {},
1050
- },
1051
- }),
1044
+ const [monthlyResult, alertsResult] = await Promise.allSettled([
1052
1045
  ConsoleValueMetricsService.getValueMetrics({
1053
1046
  config: apiConfig,
1054
1047
  params: {
@@ -1062,14 +1055,21 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
1062
1055
  }),
1063
1056
  ]);
1064
1057
  const normalizedClusters = (clusters ?? []).filter((item) => Boolean(item) && typeof item === 'object');
1058
+ const monthly = monthlyResult.status === 'fulfilled' ? monthlyResult.value : [];
1059
+ const alerts = alertsResult.status === 'fulfilled' ? alertsResult.value : undefined;
1060
+ const loadErrors = [monthlyResult, alertsResult].filter((result) => result.status === 'rejected');
1065
1061
  setBillingClusters(normalizedClusters);
1066
- setBillingPlanTypes(planTypes ?? []);
1067
1062
  setBillingMetricsMonthly(monthly ?? []);
1068
1063
  setBillingUsageAlerts(alerts?.usageAlerts ?? []);
1064
+ if (loadErrors.length > 0) {
1065
+ const firstError = loadErrors[0]?.reason;
1066
+ setBillingError(firstError instanceof Error
1067
+ ? firstError.message
1068
+ : 'Could not load some billing data');
1069
+ }
1069
1070
  }
1070
1071
  catch (error) {
1071
1072
  setBillingClusters([]);
1072
- setBillingPlanTypes([]);
1073
1073
  setBillingMetricsMonthly([]);
1074
1074
  setBillingUsageAlerts([]);
1075
1075
  setBillingError(error instanceof Error ? error.message : 'Could not load billing');
@@ -1078,15 +1078,6 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
1078
1078
  setBillingLoading(false);
1079
1079
  }
1080
1080
  }, [apiConfig, orgId]);
1081
- const clusterPlanTypeByUuid = useMemo(() => {
1082
- const map = new Map();
1083
- for (const planType of billingPlanTypes) {
1084
- if (planType?.uuid) {
1085
- map.set(planType.uuid, planType);
1086
- }
1087
- }
1088
- return map;
1089
- }, [billingPlanTypes]);
1090
1081
  const enterpriseDevOnly = useMemo(() => getNestedBoolean(org, ['metadata', 'enterpriseDevOnly']), [org]);
1091
1082
  const isLicensingModel2025 = useMemo(() => isLicensingModel2025Prop ??
1092
1083
  getNestedValue(org, ['metadata', 'licensingModel']) === '2025', [isLicensingModel2025Prop, org]);
@@ -1210,10 +1201,22 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
1210
1201
  if (!reservedMap) {
1211
1202
  return [];
1212
1203
  }
1204
+ const clusterPlanTypeNames = new Map();
1205
+ for (const cluster of billingClusters) {
1206
+ const planTypeObj = getRecord(cluster, 'planType');
1207
+ const planTypeUuid = planTypeObj?.uuid;
1208
+ const planTypeName = planTypeObj?.name;
1209
+ if (typeof planTypeUuid === 'string' &&
1210
+ planTypeUuid.length > 0 &&
1211
+ typeof planTypeName === 'string' &&
1212
+ planTypeName.length > 0) {
1213
+ clusterPlanTypeNames.set(planTypeUuid, planTypeName);
1214
+ }
1215
+ }
1213
1216
  return Object.keys(reservedMap)
1214
1217
  .map((clusterPlanTypeId) => {
1215
1218
  const reserved = getNumber(reservedMap[clusterPlanTypeId]);
1216
- const planType = clusterPlanTypeByUuid.get(clusterPlanTypeId);
1219
+ const planTypeName = clusterPlanTypeNames.get(clusterPlanTypeId);
1217
1220
  const matchingClusters = billingClusters.filter((cluster) => {
1218
1221
  const planTypeObj = getRecord(cluster, 'planType');
1219
1222
  return planTypeObj?.uuid === clusterPlanTypeId;
@@ -1225,14 +1228,14 @@ export const C4ManagementApp = observer(({ orgId, desiredTabId, onTabChange, onN
1225
1228
  }, 0);
1226
1229
  return {
1227
1230
  id: clusterPlanTypeId,
1228
- name: planType?.name ?? '-',
1231
+ name: planTypeName ?? '-',
1229
1232
  used,
1230
1233
  clusters: clustersCount,
1231
1234
  reserved,
1232
1235
  };
1233
1236
  })
1234
1237
  .filter((row) => row.reserved > 0);
1235
- }, [billingClusters, clusterPlanTypeByUuid, org]);
1238
+ }, [billingClusters, org]);
1236
1239
  const billingTabProps = useMemo(() => {
1237
1240
  return {
1238
1241
  billingIsEnterprise,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-saas-frontend",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"