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.

chore: update alert details error state (#8246)

Amlan Kumar Nandyd3c76ae8be52
diff --git a/frontend/public/locales/en/alerts.json b/frontend/public/locales/en/alerts.json
index 6adeb7382b..e49ab3bc7c 100644
--- a/frontend/public/locales/en/alerts.json
+++ b/frontend/public/locales/en/alerts.json
@@ -129,5 +129,6 @@
"text_num_points": "data points in each result group",
"text_alert_frequency": "Run alert every",
"text_for": "minutes",
- "selected_query_placeholder": "Select query"
+ "selected_query_placeholder": "Select query",
+ "alert_rule_not_found": "Alert Rule not found"
}
diff --git a/frontend/src/pages/AlertDetails/AlertDetails.styles.scss b/frontend/src/pages/AlertDetails/AlertDetails.styles.scss
index 62eeb96ae0..f43d253451 100644
--- a/frontend/src/pages/AlertDetails/AlertDetails.styles.scss
+++ b/frontend/src/pages/AlertDetails/AlertDetails.styles.scss
@@ -38,6 +38,21 @@
}
}
+.alert-empty-card {
+ margin-top: 50px;
+ .ant-empty-description {
+ color: var(--text-vanilla-400);
+ }
+}
+
+.lightMode {
+ .alert-empty-card {
+ .ant-empty-description {
+ color: var(--text-ink-400);
+ }
+ }
+}
+
.alert-details {
margin-top: 10px;
.divider {
diff --git a/frontend/src/pages/AlertDetails/AlertDetails.tsx b/frontend/src/pages/AlertDetails/AlertDetails.tsx
index 29bb8df2f9..95ba7fcb2a 100644
--- a/frontend/src/pages/AlertDetails/AlertDetails.tsx
+++ b/frontend/src/pages/AlertDetails/AlertDetails.tsx
@@ -1,9 +1,8 @@
import './AlertDetails.styles.scss';
-import { Breadcrumb, Button, Divider } from 'antd';
+import { Breadcrumb, Button, Divider, Empty } from 'antd';
import logEvent from 'api/common/logEvent';
import { Filters } from 'components/AlertDetailsFilters/Filters';
-import NotFound from 'components/NotFound';
import RouteTab from 'components/RouteTab';
import Spinner from 'components/Spinner';
import ROUTES from 'constants/routes';
@@ -70,6 +69,7 @@ BreadCrumbItem.defaultProps = {
function AlertDetails(): JSX.Element {
const { pathname } = useLocation();
const { routes } = useRouteTabUtils();
+ const { t } = useTranslation(['alerts']);
const {
isLoading,
@@ -90,7 +90,11 @@ function AlertDetails(): JSX.Element {
!isValidRuleId ||
(alertDetailsResponse && alertDetailsResponse.statusCode !== 200)
) {
- return <NotFound />;
+ return (
+ <div className="alert-empty-card">
+ <Empty description={t('alert_rule_not_found')} />
+ </div>
+ );
}
const handleTabChange = (route: string): void => {