@camunda/ccma-saas-frontend 0.6.0 → 0.7.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 (40) hide show
  1. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.d.ts +1 -1
  2. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.js +4 -2
  3. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.mocks.js +1 -1
  4. package/lib/esm/components/c4-cluster-settings/c4-cluster-settings.types.d.ts +4 -0
  5. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider-modal.js +15 -5
  6. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.d.ts +12 -1
  7. package/lib/esm/components/c4-cluster-settings/elements/external-identity-provider.js +9 -3
  8. package/lib/esm/components/c4-cluster-settings/elements/session-settings.d.ts +13 -0
  9. package/lib/esm/components/c4-cluster-settings/elements/session-settings.js +69 -0
  10. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.js +19 -1
  11. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.mocks.js +2 -1
  12. package/lib/esm/components/c4-create-alert-modal/c4-create-alert-modal.types.d.ts +1 -0
  13. package/lib/esm/components/c4-create-console-api-client-modal/c4-create-console-api-client-modal.js +12 -0
  14. package/lib/esm/components/c4-create-ip-whitelist-modal/c4-create-ip-whitelist-modal.js +7 -2
  15. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.d.ts +1 -1
  16. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.js +3 -3
  17. package/lib/esm/components/c4-delete-organization-modal/c4-delete-organization-modal.types.d.ts +7 -0
  18. package/lib/esm/components/c4-navigation/c4-navigation.js +17 -9
  19. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.d.ts +7 -1
  20. package/lib/esm/components/c4-usage-history/elements/usage-history-charts.js +2 -2
  21. package/lib/esm/i18n/en/modals/apiclients.json +4 -1
  22. package/lib/esm/i18n/en/pages/clusterdetails.json +2 -2
  23. package/lib/esm/i18n/en/pages/orgmanagement.json +9 -1
  24. package/lib/esm/utils/http-error-message.d.ts +14 -0
  25. package/lib/esm/utils/http-error-message.js +35 -0
  26. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.d.ts +3 -0
  27. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.js +148 -32
  28. package/lib/esm/widgets/cluster-details/c4-cluster-details-app.types.d.ts +3 -0
  29. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.js +18 -0
  30. package/lib/esm/widgets/cluster-details/c4-cluster-details-page.types.d.ts +5 -0
  31. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-alerts-tab.d.ts +1 -0
  32. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-encryption-tab.js +1 -1
  33. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.d.ts +1 -1
  34. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-ip-whitelist-tab.js +15 -3
  35. package/lib/esm/widgets/cluster-details/tabs/c4-cluster-details-settings-tab.js +107 -18
  36. package/lib/esm/widgets/management/c4-management-app.js +366 -42
  37. package/lib/esm/widgets/management/tabs/c4-management-api-tab.js +21 -0
  38. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.d.ts +30 -1
  39. package/lib/esm/widgets/management/tabs/c4-management-usage-tab.js +34 -14
  40. package/package.json +4 -4
@@ -5,6 +5,13 @@ export interface UsageHistoryEntryPerCluster {
5
5
  processInstances: number;
6
6
  decisionInstances: number;
7
7
  taskUsers: number;
8
+ /**
9
+ * This cluster's peak active tenants in the period, or `undefined` when HDP
10
+ * has no reading for it. The clusters of a period do not add up to the
11
+ * period's org figure: each is its own peak, and two clusters can peak on
12
+ * different days.
13
+ */
14
+ tenants?: number;
8
15
  clusterId: string;
9
16
  clusterName: string;
10
17
  }
@@ -13,6 +20,13 @@ export interface UsageHistoryEntry extends RowBaseProps {
13
20
  decisionInstances: number;
14
21
  taskUsers: number;
15
22
  generalUsers: number;
23
+ /**
24
+ * Peak active tenants inside the period — a gauge, so a peak rather than the
25
+ * sum the neighbouring metrics are. `undefined` when HDP holds no reading for
26
+ * the period at all (tenant history is capped at ~1 year, so older periods
27
+ * have none); rendered as "-" so an unknown period isn't read as "no tenants".
28
+ */
29
+ tenants?: number;
16
30
  period: string;
17
31
  perCluster: UsageHistoryEntryPerCluster[];
18
32
  }
@@ -24,6 +38,7 @@ export interface C4ManagementUsageTabText {
24
38
  processInstances: string;
25
39
  decisionInstances: string;
26
40
  taskUsers: string;
41
+ tenants: string;
27
42
  };
28
43
  groupBy: {
29
44
  heading: string;
@@ -35,6 +50,7 @@ export interface C4ManagementUsageTabText {
35
50
  processInstances: string;
36
51
  decisionInstances: string;
37
52
  taskUsers: string;
53
+ tenants: string;
38
54
  };
39
55
  }
40
56
  export interface C4ManagementUsageTabProps {
@@ -46,5 +62,18 @@ export interface C4ManagementUsageTabProps {
46
62
  charts?: UsageHistoryChartsProps;
47
63
  text: C4ManagementUsageTabText;
48
64
  isLicensingModel2025?: boolean;
65
+ /**
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.
69
+ */
70
+ showTenants?: boolean;
71
+ /**
72
+ * Why the tab has no data, when a read failed. Without it an empty table and a
73
+ * column of "-" claim the org used nothing, which is a different statement
74
+ * from "we could not find out" — and the most common cause is a permission
75
+ * the viewer does not have rather than an outage.
76
+ */
77
+ error?: string;
49
78
  }
50
- export declare const C4ManagementUsageTab: ({ loading, groupBy, onGroupByChange, perClusterAvailable, history, charts, text, isLicensingModel2025, }: C4ManagementUsageTabProps) => JSX.Element;
79
+ export declare const C4ManagementUsageTab: ({ loading, groupBy, onGroupByChange, perClusterAvailable, history, charts, text, isLicensingModel2025, showTenants, error, }: C4ManagementUsageTabProps) => JSX.Element;
@@ -1,15 +1,15 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { C4DataTable } from '../../../components/c4-data-table/c4-data-table.js';
3
3
  import { C4DataTableSkeleton } from '../../../components/c4-data-table/c4-data-table-skeleton.js';
4
4
  import { C4StructuredListBody, C4StructuredListCell, C4StructuredListHead, C4StructuredListRow, C4StructuredListWrapper, } from '../../../components/c4-structured-list/c4-structured-list.js';
5
5
  import { C4UsageHistory } from '../../../components/c4-usage-history/c4-usage-history.js';
6
6
  import { useC4DesignSystem } from '../../../runtime/c4-console-runtime-context.js';
7
7
  import { Stack } from '../../../ui/index.js';
8
- function ExpandedRow({ clusters, text, isLicensingModel2025, }) {
9
- const headerRow = (_jsxs(C4StructuredListRow, { head: true, children: [_jsx(C4StructuredListCell, { head: true, children: text.perCluster.clusterName }), _jsx(C4StructuredListCell, { head: true, children: text.perCluster.processInstances }), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { head: true, children: text.perCluster.decisionInstances })), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { head: true, children: text.perCluster.taskUsers }))] }));
10
- return (_jsxs(C4StructuredListWrapper, { children: [_jsx(C4StructuredListHead, { children: headerRow }), _jsx(C4StructuredListBody, { children: clusters.map((cluster) => (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, children: cluster.clusterName }), _jsx(C4StructuredListCell, { children: cluster.processInstances }), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { children: cluster.decisionInstances })), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { children: cluster.taskUsers }))] }, cluster.clusterId))) })] }));
8
+ function ExpandedRow({ clusters, text, isLicensingModel2025, showTenants, }) {
9
+ const headerRow = (_jsxs(C4StructuredListRow, { head: true, children: [_jsx(C4StructuredListCell, { head: true, children: text.perCluster.clusterName }), _jsx(C4StructuredListCell, { head: true, children: text.perCluster.processInstances }), showTenants && (_jsx(C4StructuredListCell, { head: true, children: text.perCluster.tenants })), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { head: true, children: text.perCluster.decisionInstances })), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { head: true, children: text.perCluster.taskUsers }))] }));
10
+ return (_jsxs(C4StructuredListWrapper, { children: [_jsx(C4StructuredListHead, { children: headerRow }), _jsx(C4StructuredListBody, { children: clusters.map((cluster) => (_jsxs(C4StructuredListRow, { children: [_jsx(C4StructuredListCell, { noWrap: true, children: cluster.clusterName }), _jsx(C4StructuredListCell, { children: cluster.processInstances }), showTenants && (_jsx(C4StructuredListCell, { children: cluster.tenants ?? '-' })), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { children: cluster.decisionInstances })), !isLicensingModel2025 && (_jsx(C4StructuredListCell, { children: cluster.taskUsers }))] }, cluster.clusterId))) })] }));
11
11
  }
12
- export const C4ManagementUsageTab = ({ loading, groupBy, onGroupByChange, perClusterAvailable, history, charts, text, isLicensingModel2025 = false, }) => {
12
+ export const C4ManagementUsageTab = ({ loading, groupBy, onGroupByChange, perClusterAvailable, history, charts, text, isLicensingModel2025 = false, showTenants = false, error, }) => {
13
13
  const designSystem = useC4DesignSystem();
14
14
  const headers = [
15
15
  {
@@ -22,6 +22,26 @@ export const C4ManagementUsageTab = ({ loading, groupBy, onGroupByChange, perClu
22
22
  key: 'processInstances',
23
23
  sorting: (a, b) => a.processInstances - b.processInstances,
24
24
  },
25
+ // Tenants is org-scoped, so it is a table column but never a per-cluster
26
+ // one (see ExpandedRow). A period HDP has no reading for sorts below 0 so
27
+ // the "-" rows group together instead of mixing in with real zeroes.
28
+ ...(showTenants
29
+ ? [
30
+ {
31
+ label: text.headers.tenants,
32
+ key: 'tenants',
33
+ sorting: (a, b) => (a.tenants ?? -1) - (b.tenants ?? -1),
34
+ type: {
35
+ type: 'wrapper',
36
+ options: {
37
+ wrapperOptions: {
38
+ wrapper: (row) => (_jsx(_Fragment, { children: row.tenants ?? '-' })),
39
+ },
40
+ },
41
+ },
42
+ },
43
+ ]
44
+ : []),
25
45
  ...(isLicensingModel2025
26
46
  ? []
27
47
  : [
@@ -60,18 +80,18 @@ export const C4ManagementUsageTab = ({ loading, groupBy, onGroupByChange, perClu
60
80
  const hasPerCluster = perClusterAvailable && (item.perCluster?.length ?? 0) > 0;
61
81
  return {
62
82
  ...item,
63
- expansion: hasPerCluster ? (_jsx(ExpandedRow, { clusters: item.perCluster, text: text, isLicensingModel2025: isLicensingModel2025 })) : null,
83
+ expansion: hasPerCluster ? (_jsx(ExpandedRow, { clusters: item.perCluster, text: text, isLicensingModel2025: isLicensingModel2025, showTenants: showTenants })) : null,
64
84
  };
65
85
  }), toolbar: toolbar, title: undefined }, `usage-history-${groupBy}`) }));
66
86
  return (_jsx("div", { style: {
67
87
  width: '100%',
68
88
  overflowX: designSystem === 'ds' ? 'visible' : 'auto',
69
- }, children: _jsx(Stack, { gap: 8, children: _jsx(C4UsageHistory, { title: '', description: '', descriptionTooltip: '', loading: loading, data: {
70
- titles: {
71
- table: text.tableTabTitle,
72
- charts: text.chartsTabTitle,
73
- },
74
- component: tableComponent,
75
- charts,
76
- } }) }) }));
89
+ }, children: _jsxs(Stack, { gap: 8, children: [error ? (_jsx("p", { style: { color: 'var(--cds-text-error)' }, children: error })) : null, _jsx(C4UsageHistory, { title: '', description: '', descriptionTooltip: '', loading: loading, data: {
90
+ titles: {
91
+ table: text.tableTabTitle,
92
+ charts: text.chartsTabTitle,
93
+ },
94
+ component: tableComponent,
95
+ charts,
96
+ } })] }) }));
77
97
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-saas-frontend",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
@@ -46,7 +46,7 @@
46
46
  "@camunda/c4-connectors": "1.10.3",
47
47
  "@playwright/test": "1.62.0",
48
48
  "@camunda/c4-identity": "0.0.45",
49
- "@camunda/design-system": "0.40.0",
49
+ "@camunda/design-system": "0.46.1",
50
50
  "@carbon/charts": "1.27.17",
51
51
  "@carbon/charts-react": "1.27.16",
52
52
  "@carbon/layout": "11.55.0",
@@ -101,8 +101,8 @@
101
101
  "mobx": "6.16.1",
102
102
  "mobx-react-lite": "4.1.1",
103
103
  "mobx-state-tree": "7.3.1",
104
- "@camunda/ccma-api": "0.5.1",
105
- "@camunda/ccma-shared-types": "0.5.1"
104
+ "@camunda/ccma-api": "0.5.2",
105
+ "@camunda/ccma-shared-types": "0.6.0"
106
106
  },
107
107
  "scripts": {
108
108
  "clean": "rimraf lib/",