@camunda/ccma-saas-frontend 0.18.3 → 0.18.5

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.
@@ -77,8 +77,14 @@ function toUsageChartPoints(entries, clusterNames, orgName) {
77
77
  ? (clusterNames.get(entry.clusterId) ?? entry.clusterId)
78
78
  : orgName;
79
79
  const date = new Date(timestamp).toISOString().substring(0, 10);
80
- pi.push({ date, group, value: entry.processInstances });
81
- di.push({ date, group, value: entry.decisionInstances });
80
+ // A negative day is a source glitch. A point there draws a dip below 0,
81
+ // so skip it and let the line join the days around it.
82
+ if (entry.processInstances >= 0) {
83
+ pi.push({ date, group, value: entry.processInstances });
84
+ }
85
+ if (entry.decisionInstances >= 0) {
86
+ di.push({ date, group, value: entry.decisionInstances });
87
+ }
82
88
  if (timestamp > latestTimestamp) {
83
89
  latestTimestamp = timestamp;
84
90
  latestTaskUsers = 0;
@@ -1658,21 +1658,29 @@ export const C4ManagementApp = observer(({ orgId, embedded = false, environments
1658
1658
  const group = typeof clusterId === 'string'
1659
1659
  ? (clusterIdToName.get(clusterId) ?? clusterId)
1660
1660
  : orgName;
1661
- pi.push({
1662
- date: item.isoDate,
1663
- group,
1664
- value: item.entry.processInstances,
1665
- });
1666
- di.push({
1667
- date: item.isoDate,
1668
- group,
1669
- value: item.entry.decisionInstances,
1670
- });
1671
- tu.push({
1672
- date: item.isoDate,
1673
- group,
1674
- value: item.entry.taskUsers,
1675
- });
1661
+ // A negative day is a source glitch. Skip it so the chart does not
1662
+ // dip below 0.
1663
+ if (item.entry.processInstances >= 0) {
1664
+ pi.push({
1665
+ date: item.isoDate,
1666
+ group,
1667
+ value: item.entry.processInstances,
1668
+ });
1669
+ }
1670
+ if (item.entry.decisionInstances >= 0) {
1671
+ di.push({
1672
+ date: item.isoDate,
1673
+ group,
1674
+ value: item.entry.decisionInstances,
1675
+ });
1676
+ }
1677
+ if (item.entry.taskUsers >= 0) {
1678
+ tu.push({
1679
+ date: item.isoDate,
1680
+ group,
1681
+ value: item.entry.taskUsers,
1682
+ });
1683
+ }
1676
1684
  }
1677
1685
  const otherLabelFor = (otherClusterCount) => safeTranslate(t, 'orgmanagement:tabs.billing.usageTracking.usageHistory.charts.otherClusters', `Other (${otherClusterCount} cluster${otherClusterCount === 1 ? '' : 's'})`, { count: otherClusterCount });
1678
1686
  // Cap each chart's series to the top-N clusters (+ an aggregated "Other"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/ccma-saas-frontend",
3
- "version": "0.18.3",
3
+ "version": "0.18.5",
4
4
  "description": "Camunda Composite Components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
@@ -96,8 +96,8 @@
96
96
  "react-markdown": "^8.0.7 || ^10.0.0"
97
97
  },
98
98
  "dependencies": {
99
- "@camunda/ccma-api": "5.4.0",
100
- "@camunda/ccma-shared-types": "7.5.0",
99
+ "@camunda/ccma-api": "5.4.1",
100
+ "@camunda/ccma-shared-types": "7.6.0",
101
101
  "@pactsafe/pactsafe-react-sdk": "2.15.0",
102
102
  "cron-parser": "5.10.1",
103
103
  "mobx": "6.16.1",