Fixed table sort bug in NewRelicComponent

Signed-off-by: Joshua Grime <joshgrime@gmail.com>
This commit is contained in:
Joshua Grime
2023-09-04 14:10:12 +01:00
parent 59ac5abf8b
commit 55cb7061e0
2 changed files with 11 additions and 6 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-newrelic': patch
---
Fixed bug in NewRelicComponent component where table would not sort correctly for numerical values.
@@ -25,9 +25,9 @@ import { useApi } from '@backstage/core-plugin-api';
export const NewRelicAPMTable = ({ applications }: NewRelicApplications) => {
const columns: TableColumn[] = [
{ title: 'Application', field: 'name' },
{ title: 'Response Time', field: 'responseTime' },
{ title: 'Throughput', field: 'throughput' },
{ title: 'Error Rate', field: 'errorRate' },
{ title: 'Response Time (ms)', field: 'responseTime' },
{ title: 'Throughput (rpm)', field: 'throughput' },
{ title: 'Error Rate (%)', field: 'errorRate' },
{ title: 'Instance Count', field: 'instanceCount' },
{ title: 'Apdex', field: 'apdexScore' },
];
@@ -43,9 +43,9 @@ export const NewRelicAPMTable = ({ applications }: NewRelicApplications) => {
return {
name,
responseTime: `${responseTime} ms`,
throughput: `${throughput} rpm`,
errorRate: `${errorRate}%`,
responseTime,
throughput,
errorRate,
instanceCount,
apdexScore,
};