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: address review comments

Vikrant Gupta512fcda33d3b
diff --git a/frontend/src/container/GridCardLayout/GridCard/index.tsx b/frontend/src/container/GridCardLayout/GridCard/index.tsx
index 0616f20bdb..cf8d106224 100644
--- a/frontend/src/container/GridCardLayout/GridCard/index.tsx
+++ b/frontend/src/container/GridCardLayout/GridCard/index.tsx
@@ -1,6 +1,5 @@
import { QueryParams } from 'constants/query';
import { PANEL_TYPES } from 'constants/queryBuilder';
-import dayjs from 'dayjs';
import { useGetQueryRange } from 'hooks/queryBuilder/useGetQueryRange';
import { useStepInterval } from 'hooks/queryBuilder/useStepInterval';
import { useIsDarkMode } from 'hooks/useDarkMode';
@@ -79,14 +78,10 @@ function GridCardGraph({
const endTime = searchParams.get(QueryParams.endTime);
if (startTime && endTime && startTime !== endTime) {
- console.log(startTime, endTime);
- const startDate = dayjs(new Date(parseInt(getTimeString(startTime), 10)));
- const endDate = dayjs(new Date(parseInt(getTimeString(endTime), 10)));
-
dispatch(
UpdateTimeInterval('custom', [
- startDate.toDate().getTime() || 0,
- endDate.toDate().getTime() || 0,
+ parseInt(getTimeString(startTime), 10),
+ parseInt(getTimeString(endTime), 10),
]),
);
}
diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraphs.tsx b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraphs.tsx
index c91636dd0c..f4a8ed1b22 100644
--- a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraphs.tsx
+++ b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraphs.tsx
@@ -1,7 +1,6 @@
import { QueryParams } from 'constants/query';
import GridPanelSwitch from 'container/GridPanelSwitch';
import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';
-import dayjs from 'dayjs';
import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';
import { useIsDarkMode } from 'hooks/useDarkMode';
import { useResizeObserver } from 'hooks/useDimensions';
@@ -94,14 +93,10 @@ function WidgetGraph({
const endTime = searchParams.get(QueryParams.endTime);
if (startTime && endTime && startTime !== endTime) {
- console.log(startTime, endTime);
- const startDate = dayjs(new Date(parseInt(getTimeString(startTime), 10)));
- const endDate = dayjs(new Date(parseInt(getTimeString(endTime), 10)));
-
dispatch(
UpdateTimeInterval('custom', [
- startDate.toDate().getTime() || 0,
- endDate.toDate().getTime() || 0,
+ parseInt(getTimeString(startTime), 10),
+ parseInt(getTimeString(endTime), 10),
]),
);
}