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.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
chore: some tsc fix
Palash guptaac70240b7285
diff --git a/frontend/src/components/NotFound/NotFound.test.tsx b/frontend/src/components/NotFound/NotFound.test.tsxindex e00ecc939f..c8aab78ef7 100644--- a/frontend/src/components/NotFound/NotFound.test.tsx+++ b/frontend/src/components/NotFound/NotFound.test.tsx@@ -1,3 +1,4 @@+import { expect } from '@jest/globals';import { render } from '@testing-library/react';import React from 'react';import { MemoryRouter } from 'react-router-dom';diff --git a/frontend/src/components/Styled/types.ts b/frontend/src/components/Styled/types.tsindex fb829fb394..4a02884334 100644--- a/frontend/src/components/Styled/types.ts+++ b/frontend/src/components/Styled/types.ts@@ -1,5 +1,5 @@import { FlattenSimpleInterpolation } from 'styled-components';export interface IStyledClass {- styledclass?: FlattenSimpleInterpolation[];+ styledclass: FlattenSimpleInterpolation[];}diff --git a/frontend/src/container/GantChart/SpanLength/index.tsx b/frontend/src/container/GantChart/SpanLength/index.tsxindex 4ee15a9332..4e27e6e624 100644--- a/frontend/src/container/GantChart/SpanLength/index.tsx+++ b/frontend/src/container/GantChart/SpanLength/index.tsx@@ -33,7 +33,7 @@ function SpanLength(props: SpanLengthProps): JSX.Element {leftOffset={leftOffset}width={width}/>- <SpanText leftOffset={leftOffset}>{`${toFixed(+ <SpanText isDarkMode={isDarkMode} leftOffset={leftOffset}>{`${toFixed(resolveTimeFromInterval(inMsCount, intervalUnit),2,)} ${intervalUnit.name}`}</SpanText>diff --git a/frontend/src/container/ListOfDashboard/index.tsx b/frontend/src/container/ListOfDashboard/index.tsxindex 8828d748f2..492da5c846 100644--- a/frontend/src/container/ListOfDashboard/index.tsx+++ b/frontend/src/container/ListOfDashboard/index.tsx@@ -157,7 +157,7 @@ function ListOfAllDashboard(): JSX.Element {<TextToolTip{...{text: `More details on how to create dashboards`,- url: 'https://signoz.io/docs/userguide/metrics-dashboard',+ url: 'https://signoz.io/docs/userguide/dashboards',}}/>diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/Query.tsx b/frontend/src/container/NewWidget/LeftContainer/QuerySection/Query.tsxindex 42b22fe206..97aa24d180 100644--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/Query.tsx+++ b/frontend/src/container/NewWidget/LeftContainer/QuerySection/Query.tsx@@ -2,8 +2,8 @@ import { Button, Divider } from 'antd';import Input from 'components/Input';import TextToolTip from 'components/TextToolTip';import { timePreferance } from 'container/NewWidget/RightContainer/timeItems';-import React, { useCallback, useState } from 'react';-import { connect } from 'react-redux';+import React, { useCallback, useMemo, useState } from 'react';+import { connect, useSelector } from 'react-redux';import { useLocation } from 'react-router-dom';import { bindActionCreators, Dispatch } from 'redux';import { ThunkDispatch } from 'redux-thunk';@@ -12,8 +12,11 @@ import {UpdateQuery,UpdateQueryProps,} from 'store/actions/dashboard/updateQuery';+import { AppState } from 'store/reducers';import AppActions from 'types/actions';import { DeleteQueryProps } from 'types/actions/dashboard';+import { Widgets } from 'types/api/dashboard/getAll';+import DashboardReducer from 'types/reducer/dashboards';import {ButtonContainer,@@ -32,10 +35,27 @@ function Query({const [promqlQuery, setPromqlQuery] = useState(preQuery);const [legendFormat, setLegendFormat] = useState(preLegend);const { search } = useLocation();+ const { dashboards } = useSelector<AppState, DashboardReducer>(+ (state) => state.dashboards,+ );++ const [selectedDashboards] = dashboards;+ const { widgets } = selectedDashboards.data;const query = new URLSearchParams(search);const widgetId = query.get('widgetId') || '';+ const urlQuery = useMemo(() => {+ return new URLSearchParams(search);+ }, [search]);++ const getWidget = useCallback(() => {+ const widgetId = urlQuery.get('widgetId');+ return widgets?.find((e) => e.id === widgetId);+ }, [widgets, urlQuery]);++ const selectedWidget = getWidget() as Widgets;+const onChangeHandler = useCallback((setFunc: React.Dispatch<React.SetStateAction<string>>, value: string) => {setFunc(value);@@ -49,6 +69,7 @@ function Query({legend: legendFormat,query: promqlQuery,widgetId,+ yAxisUnit: selectedWidget.yAxisUnit,});};diff --git a/frontend/src/container/Trace/Graph/index.tsx b/frontend/src/container/Trace/Graph/index.tsxindex 01630d4711..179ff792de 100644--- a/frontend/src/container/Trace/Graph/index.tsx+++ b/frontend/src/container/Trace/Graph/index.tsx@@ -43,7 +43,7 @@ function TraceGraph(): JSX.Element {}return (- <Container ref={ref}>+ <Container ref={ref as never}><Graphanimate={false}data={ChartData}diff --git a/frontend/src/hooks/useFetch.ts b/frontend/src/hooks/useFetch.tsindex f996627e86..7d67ff2a34 100644--- a/frontend/src/hooks/useFetch.ts+++ b/frontend/src/hooks/useFetch.ts@@ -56,7 +56,7 @@ function useFetch<PayloadProps, FunctionParams>(loading: false,success: false,error: true,- errorMessage: error,+ errorMessage: error as string,});}return (): void => {diff --git a/frontend/src/lib/__tests__/getStep.test.ts b/frontend/src/lib/__tests__/getStep.test.tsindex 638c21cf4e..399f0cfbc6 100644--- a/frontend/src/lib/__tests__/getStep.test.ts+++ b/frontend/src/lib/__tests__/getStep.test.ts@@ -1,3 +1,4 @@+import { expect } from '@jest/globals';import dayjs from 'dayjs';import getStep, { DefaultStepSize } from 'lib/getStep';diff --git a/frontend/src/pages/DashboardWidget/index.tsx b/frontend/src/pages/DashboardWidget/index.tsxindex e4eedd4b24..7e9f4e8f73 100644--- a/frontend/src/pages/DashboardWidget/index.tsx+++ b/frontend/src/pages/DashboardWidget/index.tsx@@ -74,7 +74,12 @@ function DashboardWidget({ getDashboard }: NewDashboardProps): JSX.Element {);}- return <NewWidget selectedGraph={selectedGraph} />;+ return (+ <NewWidget+ yAxisUnit={selectedWidget.yAxisUnit}+ selectedGraph={selectedGraph}+ />+ );}export interface DashboardWidgetPageParams {