@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.
- package/lib/esm/assetUrls.d.ts +19 -0
- package/lib/esm/assetUrls.js +41 -0
- package/lib/esm/assets/ai.svg +14 -0
- package/lib/esm/assets/alerts.svg +5 -0
- package/lib/esm/assets/auditlogs.svg +9 -0
- package/lib/esm/assets/backup.svg +3 -0
- package/lib/esm/assets/clientApi.svg +10 -0
- package/lib/esm/assets/cluster.svg +4 -0
- package/lib/esm/assets/connectorSecret.svg +3 -0
- package/lib/esm/assets/consoleAPI.svg +3 -0
- package/lib/esm/assets/error.svg +11 -0
- package/lib/esm/assets/fatalError.svg +5 -0
- package/lib/esm/assets/ipwhitelist.svg +3 -0
- package/lib/esm/assets/monitoring.svg +6 -0
- package/lib/esm/assets/operatePreview.jpg +0 -0
- package/lib/esm/assets/optimizePreview.jpg +0 -0
- package/lib/esm/assets/secureConnectivity.svg +11 -0
- package/lib/esm/assets/tasklistPreview.jpg +0 -0
- package/lib/esm/assets/upgrade.svg +4 -0
- package/lib/esm/components/c4-ai-usage/c4-ai-usage.js +2 -1
- package/lib/esm/components/c4-audit-log/c4-audit-log.js +2 -1
- package/lib/esm/components/c4-cluster-byom-clients/c4-cluster-byom-clients.js +3 -2
- package/lib/esm/components/c4-cluster-details-activity/c4-cluster-details-activity.js +2 -1
- package/lib/esm/components/c4-cluster-details-alerts/c4-cluster-details-alerts.js +3 -2
- package/lib/esm/components/c4-cluster-details-clients/c4-cluster-details-clients.js +3 -2
- package/lib/esm/components/c4-cluster-details-connector-secrets/c4-cluster-details-connector-secrets.js +3 -2
- package/lib/esm/components/c4-cluster-details-hot-backups/c4-cluster-details-hot-backups.js +5 -4
- package/lib/esm/components/c4-cluster-details-ip-whitelist/c4-cluster-details-ip-whitelist.js +2 -1
- package/lib/esm/components/c4-cluster-details-secure-connectivity/c4-cluster-details-secure-connectivity.js +10 -2
- package/lib/esm/components/c4-clusters-empty-state/c4-clusters-empty-state.js +4 -3
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.js +21 -7
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.spec.js +116 -0
- package/lib/esm/components/c4-create-cluster/c4-create-cluster.types.d.ts +2 -1
- package/lib/esm/components/c4-management-api/c4-management-api.js +2 -1
- package/lib/esm/components/c4-management-settings/c4-management-settings.js +2 -1
- package/lib/esm/i18n/en/modals/clusterclients.json +3 -0
- package/lib/esm/i18n/en/pages/clusterdetails.json +4 -0
- package/lib/esm/i18n/en/pages/createcluster.json +2 -1
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +6 -6
- package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +1 -1
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.js +3 -3
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-clients-tab.spec.js +19 -0
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.js +33 -41
- package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-secure-connectivity-tab.spec.js +64 -0
- package/lib/esm/widgets/connector-management/c4-connector-management.shared.js +2 -1
- package/lib/esm/widgets/create-cluster/c4-create-cluster-page.js +4 -1
- package/lib/esm/widgets/management/c4-management-app.js +26 -23
- 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,
|
|
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 [
|
|
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
|
|
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:
|
|
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,
|
|
1238
|
+
}, [billingClusters, org]);
|
|
1236
1239
|
const billingTabProps = useMemo(() => {
|
|
1237
1240
|
return {
|
|
1238
1241
|
billingIsEnterprise,
|