Added lag column to the kafka plugin

Signed-off-by: ebarrios <esteban.barrios@trivago.com>
This commit is contained in:
ebarrios
2021-03-05 16:54:13 +01:00
parent 98387ac6b5
commit 8f72318fec
2 changed files with 16 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kafka': patch
---
Added lag column in the plugin main table
@@ -57,6 +57,17 @@ const generatedColumns: TableColumn[] = [
return <>{row.groupOffset ?? ''}</>;
},
},
{
title: 'Lag',
field: 'lag',
render: (row: Partial<TopicPartitionInfo>) => {
let lag = undefined;
if (row.topicOffset && row.groupOffset) {
lag = +topicOffset - +groupOffset;
}
return <>{lag ?? ''}</>;
},
},
];
type Props = {