mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-30 22:32:01 +08:00
Merge pull request #1118 from palash-signoz/application-metrics-error-handling
fix: error is now handled and displayed as antd notification message in /application
This commit is contained in:
commit
ffd5621f09
@ -1,3 +1,4 @@
|
||||
import { notification } from 'antd';
|
||||
import getLocalStorageKey from 'api/browser/localstorage/get';
|
||||
import Spinner from 'components/Spinner';
|
||||
import { SKIP_ONBOARDING } from 'constants/onboarding';
|
||||
@ -20,10 +21,20 @@ function Metrics({ getService }: MetricsProps): JSX.Element {
|
||||
AppState,
|
||||
GlobalReducer
|
||||
>((state) => state.globalTime);
|
||||
const { services, resourceAttributeQueries } = useSelector<
|
||||
AppState,
|
||||
MetricReducer
|
||||
>((state) => state.metrics);
|
||||
const {
|
||||
services,
|
||||
resourceAttributeQueries,
|
||||
error,
|
||||
errorMessage,
|
||||
} = useSelector<AppState, MetricReducer>((state) => state.metrics);
|
||||
|
||||
useEffect(() => {
|
||||
if (error) {
|
||||
notification.error({
|
||||
message: errorMessage,
|
||||
});
|
||||
}
|
||||
}, [error, errorMessage]);
|
||||
|
||||
const selectedTags = useMemo(
|
||||
() =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user