Skip to content

Commit 6bbc463

Browse files
authored
fix(monitoring): per bot count (#1844)
1 parent b9589a8 commit 6bbc463

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/ui-admin/src/health/monitoring/BotHealth.tsx

+9-5
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ const BotHealth: FC<Props> = props => {
8484
columns: [
8585
{
8686
Header: 'Status',
87+
id: `status-${key}`,
8788
Cell: cell => {
88-
switch (_.get(cell.original, `data[${key}].status`)) {
89+
switch (_.get(cell.original.data[`${key}`], 'status')) {
8990
default:
9091
return 'N/A'
9192
case 'unhealthy':
@@ -99,25 +100,28 @@ const BotHealth: FC<Props> = props => {
99100
Filter: filterStatus,
100101
filterable: true,
101102
width: 100,
102-
accessor: `data[${key}].status`
103+
accessor: row => _.get(row.data[`${key}`], 'status', 0)
103104
},
104105
{
105106
Header: 'Critical',
107+
id: `critical-${key}`,
106108
width: 60,
107109
className: 'center',
108-
accessor: `data[${key}].criticalCount`
110+
accessor: row => _.get(row.data[`${key}`], 'criticalCount', 0)
109111
},
110112
{
111113
Header: 'Errors',
114+
id: `error-${key}`,
112115
width: 60,
113116
className: 'center',
114-
accessor: `data[${key}].errorCount`
117+
accessor: row => _.get(row.data[`${key}`], 'errorCount', 0)
115118
},
116119
{
117120
Header: 'Warnings',
121+
id: `warning-${key}`,
118122
width: 60,
119123
className: 'center',
120-
accessor: `data[${key}].warningCount`
124+
accessor: row => _.get(row.data[`${key}`], 'warningCount', 0)
121125
}
122126
]
123127
}

0 commit comments

Comments
 (0)