Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: sorter is updated for sorting in alerts page (#2818)

Palash Gupta9091b9b82cf9
diff --git a/frontend/src/container/ListAlertRules/ListAlert.tsx b/frontend/src/container/ListAlertRules/ListAlert.tsx
index 1633689747..41e69c718b 100644
--- a/frontend/src/container/ListAlertRules/ListAlert.tsx
+++ b/frontend/src/container/ListAlertRules/ListAlert.tsx
@@ -100,9 +100,12 @@ function ListAlert({ allAlertRules, refetch }: ListAlertProps): JSX.Element {
dataIndex: 'alert',
width: 100,
key: 'name',
- sorter: (a, b): number =>
- (a.alert ? a.alert.charCodeAt(0) : 1000) -
- (b.alert ? b.alert.charCodeAt(0) : 1000),
+ sorter: (alertA, alertB): number => {
+ if (alertA.alert && alertB.alert) {
+ return alertA.alert.localeCompare(alertB.alert);
+ }
+ return 0;
+ },
render: (value, record): JSX.Element => (
<Typography.Link onClick={(): void => onEditHandler(record)}>
{value}