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.

Use API status for loading

“himanshu”2a039150a824
diff --git a/frontend/src/components/metrics/ServicesTable.tsx b/frontend/src/components/metrics/ServicesTable.tsx
index d2b4cf75db..de5b6b8908 100644
--- a/frontend/src/components/metrics/ServicesTable.tsx
+++ b/frontend/src/components/metrics/ServicesTable.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect } from "react";
+import React, { useEffect, useState } from "react";
import { useLocation } from "react-router-dom";
import { NavLink } from "react-router-dom";
import { Spin, Table } from "antd";
@@ -80,16 +80,19 @@ const columns = [
const _ServicesTable = (props: ServicesTableProps) => {
const search = useLocation().search;
const time_interval = new URLSearchParams(search).get("time");
-
+ const [dataFetched, setDataFetched] = useState(false)
useEffect(() => {
/*
@Note - Change this from action to thunk
*/
- props.getServicesList(props.globalTime);
+ props.getServicesList(props.globalTime).then(()=>{
+ setDataFetched(true)
+ }).catch((e:string)=>{
+ alert(e)
+ });
}, [props.globalTime]);
- const isDataAvailable = props.servicesList.length > 1;
- if(!isDataAvailable){
+ if(!dataFetched){
return (
<TableLoadingWrapper>
<Spin/>