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(dashboard): retire the V1 panel editor and its widget route (#12648)
Abhi kumar618031ddaaa7
diff --git a/frontend/.oxlintrc.json b/frontend/.oxlintrc.jsonindex 6a5facf29e..5f32f0716e 100644--- a/frontend/.oxlintrc.json+++ b/frontend/.oxlintrc.json@@ -565,12 +565,12 @@}},{- // Root V2 pages own the dashboard fetch lifecycle; useDashboardFetchRequired wraps it.+ // Root dashboard pages own the fetch lifecycle; useDashboardFetchRequired wraps it.// Everywhere else must use useDashboardFetchRequired()."files": [- "src/pages/DashboardPageV2/DashboardPageV2.tsx",- "src/pages/DashboardPageV2/PanelEditorPage/PanelEditorPage.tsx",- "src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardFetchRequired.ts"+ "src/pages/DashboardPage/DashboardPage.tsx",+ "src/pages/DashboardPage/PanelEditorPage/PanelEditorPage.tsx",+ "src/pages/DashboardPage/DashboardContainer/hooks/useDashboardFetchRequired.ts"],"rules": {"signoz/no-dashboard-fetch-outside-root": "off"diff --git a/frontend/src/AppRoutes/pageComponents.ts b/frontend/src/AppRoutes/pageComponents.tsindex d7d2a3a2e4..76108a6d60 100644--- a/frontend/src/AppRoutes/pageComponents.ts+++ b/frontend/src/AppRoutes/pageComponents.ts@@ -94,23 +94,18 @@ export const OnboardingV2 = Loadable(export const DashboardsListPage = Loadable(() =>import(- /* webpackChunkName: "DashboardsListPage" */ 'pages/DashboardsListPageV2'+ /* webpackChunkName: "DashboardsListPage" */ 'pages/DashboardsListPage'),);export const DashboardPage = Loadable(- () => import(/* webpackChunkName: "DashboardPage" */ 'pages/DashboardPageV2'),-);--export const DashboardWidget = Loadable(- () =>- import(/* webpackChunkName: "DashboardWidgetPage" */ 'pages/DashboardWidget'),+ () => import(/* webpackChunkName: "DashboardPage" */ 'pages/DashboardPage'),);export const DashboardPanelEditorPage = Loadable(() =>import(- /* webpackChunkName: "DashboardPanelEditorPage" */ 'pages/DashboardPageV2/PanelEditorPage/PanelEditorPage'+ /* webpackChunkName: "DashboardPanelEditorPage" */ 'pages/DashboardPage/PanelEditorPage/PanelEditorPage'),);diff --git a/frontend/src/AppRoutes/routes.ts b/frontend/src/AppRoutes/routes.tsindex 6a73a38372..dde868e89c 100644--- a/frontend/src/AppRoutes/routes.ts+++ b/frontend/src/AppRoutes/routes.ts@@ -13,7 +13,6 @@ import {DashboardPage,DashboardPanelEditorPage,DashboardsListPage,- DashboardWidget,EditRulesPage,ErrorDetails,ForgotPassword,@@ -183,13 +182,6 @@ const routes: AppRoutes[] = [isPrivate: false,key: 'PUBLIC_DASHBOARD',},- {- path: ROUTES.DASHBOARD_WIDGET,- exact: true,- component: DashboardWidget,- isPrivate: true,- key: 'DASHBOARD_WIDGET',- },{path: ROUTES.DASHBOARD_PANEL_EDITOR,exact: true,diff --git a/frontend/src/api/dashboard/public/getPublicDashboardData.ts b/frontend/src/api/dashboard/public/getPublicDashboardData.tsdeleted file mode 100644index 06408cbdfd..0000000000--- a/frontend/src/api/dashboard/public/getPublicDashboardData.ts+++ /dev/null@@ -1,27 +0,0 @@-import axios from 'api';-import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';-import { AxiosError } from 'axios';-import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';-import { GetPublicDashboardDataProps, PayloadProps,PublicDashboardDataProps } from 'types/api/dashboard/public/get';--/**- * @deprecated Use the generated `useGetPublicDashboardData` hook (or `getPublicDashboardData` fetcher) from- * `api/generated/services/dashboard` instead. This hand-written client targets the- * same endpoint and will be removed once call sites migrate.- *- * Part of https://github.com/SigNoz/engineering-pod/issues/5289, add a comment or update when removing this method.- */-const getPublicDashboardData = async (props: GetPublicDashboardDataProps): Promise<SuccessResponseV2<PublicDashboardDataProps>> => {- try {- const response = await axios.get<PayloadProps>(`/public/dashboards/${props.id}`);-- return {- httpStatusCode: response.status,- data: response.data.data,- };- } catch (error) {- ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);- }-};--export default getPublicDashboardData;diff --git a/frontend/src/api/dashboard/public/getPublicDashboardWidgetData.ts b/frontend/src/api/dashboard/public/getPublicDashboardWidgetData.tsdeleted file mode 100644index d961d95047..0000000000--- a/frontend/src/api/dashboard/public/getPublicDashboardWidgetData.ts+++ /dev/null@@ -1,34 +0,0 @@-import axios from 'api';-import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';-import { MetricRangePayloadV5 } from 'api/v5/v5';-import { AxiosError } from 'axios';-import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';-import { GetPublicDashboardWidgetDataProps } from 'types/api/dashboard/public/getWidgetData';---/**- * @deprecated Use the generated `useGetPublicDashboardWidgetQueryRange` hook (or `getPublicDashboardWidgetQueryRange` fetcher) from- * `api/generated/services/dashboard` instead. This hand-written client targets the- * same endpoint and will be removed once call sites migrate.- *- * Part of https://github.com/SigNoz/engineering-pod/issues/5289, add a comment or update when removing this method.- */-const getPublicDashboardWidgetData = async (props: GetPublicDashboardWidgetDataProps): Promise<SuccessResponseV2<MetricRangePayloadV5>> => {- try {- const response = await axios.get(`/public/dashboards/${props.id}/widgets/${props.index}/query_range`, {- params: {- startTime: props.startTime,- endTime: props.endTime,- },- });-- return {- httpStatusCode: response.status,- data: response.data,- };- } catch (error) {- ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);- }-};--export default getPublicDashboardWidgetData;diff --git a/frontend/src/api/v1/dashboards/id/get.ts b/frontend/src/api/v1/dashboards/id/get.tsdeleted file mode 100644index dfde573342..0000000000--- a/frontend/src/api/v1/dashboards/id/get.ts+++ /dev/null@@ -1,20 +0,0 @@-import axios from 'api';-import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';-import { AxiosError } from 'axios';-import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';-import { PayloadProps, Props } from 'types/api/dashboard/get';-import { Dashboard } from 'types/api/dashboard/getAll';--const get = async (props: Props): Promise<SuccessResponseV2<Dashboard>> => {- try {- const response = await axios.get<PayloadProps>(`/dashboards/${props.id}`);- return {- httpStatusCode: response.status,- data: response.data.data,- };- } catch (error) {- ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);- }-};--export default get;diff --git a/frontend/src/api/v1/dashboards/id/update.ts b/frontend/src/api/v1/dashboards/id/update.tsdeleted file mode 100644index 82e98039bc..0000000000--- a/frontend/src/api/v1/dashboards/id/update.ts+++ /dev/null@@ -1,23 +0,0 @@-import axios from 'api';-import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';-import { AxiosError } from 'axios';-import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';-import { Dashboard } from 'types/api/dashboard/getAll';-import { PayloadProps, Props } from 'types/api/dashboard/update';--const update = async (props: Props): Promise<SuccessResponseV2<Dashboard>> => {- try {- const response = await axios.put<PayloadProps>(`/dashboards/${props.id}`, {- ...props.data,- });-- return {- httpStatusCode: response.status,- data: response.data.data,- };- } catch (error) {- ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);- }-};--export default update;diff --git a/frontend/src/components/CeleryTask/CeleryTaskDetail/CeleryTaskDetail.tsx b/frontend/src/components/CeleryTask/CeleryTaskDetail/CeleryTaskDetail.tsxindex 50eafacd3b..bfaea9ba4a 100644--- a/frontend/src/components/CeleryTask/CeleryTaskDetail/CeleryTaskDetail.tsx+++ b/frontend/src/components/CeleryTask/CeleryTaskDetail/CeleryTaskDetail.tsx@@ -8,7 +8,7 @@ import { PANEL_TYPES } from 'constants/queryBuilder';import dayjs from 'dayjs';import { useIsDarkMode } from 'hooks/useDarkMode';import { X } from '@signozhq/icons';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { DataSource } from 'types/common/queryBuilder';diff --git a/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskBar.tsx b/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskBar.tsxindex 2fadb0f482..f826368a01 100644--- a/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskBar.tsx+++ b/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskBar.tsx@@ -5,16 +5,16 @@ import { useHistory, useLocation } from 'react-router-dom';import { Color } from '@signozhq/design-tokens';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { ViewMenuAction } from 'container/GridCardLayout/config';-import GridCard from 'container/GridCardLayout/GridCard';-import { Card } from 'container/GridCardLayout/styles';+import { ViewMenuAction } from 'container/WidgetCard/config';+import GridCard from 'container/WidgetCard/Card';+import { Card } from 'container/WidgetCard/styles';import { useIsDarkMode } from 'hooks/useDarkMode';import useUrlQuery from 'hooks/useUrlQuery';import { isEmpty } from 'lodash-es';import { getStartAndEndTimesInMilliseconds } from 'pages/MessagingQueues/MessagingQueuesUtils';import { UpdateTimeInterval } from 'store/actions';import { AppState } from 'store/reducers';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { GlobalReducer } from 'types/reducer/globalTime';import { CaptureDataProps } from '../CeleryTaskDetail/CeleryTaskDetail';diff --git a/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraph.tsx b/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraph.tsxindex 655180f3dc..41bd6539da 100644--- a/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraph.tsx+++ b/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraph.tsx@@ -5,15 +5,15 @@ import { useHistory, useLocation } from 'react-router-dom';import { ENTITY_VERSION_V4 } from 'constants/app';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { ViewMenuAction } from 'container/GridCardLayout/config';-import GridCard from 'container/GridCardLayout/GridCard';-import { Card } from 'container/GridCardLayout/styles';+import { ViewMenuAction } from 'container/WidgetCard/config';+import GridCard from 'container/WidgetCard/Card';+import { Card } from 'container/WidgetCard/styles';import { useIsDarkMode } from 'hooks/useDarkMode';import useUrlQuery from 'hooks/useUrlQuery';import { RowData } from 'lib/query/createTableColumnsFromQuery';import { getStartAndEndTimesInMilliseconds } from 'pages/MessagingQueues/MessagingQueuesUtils';import { UpdateTimeInterval } from 'store/actions';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { CaptureDataProps } from '../CeleryTaskDetail/CeleryTaskDetail';diff --git a/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraphGrid.tsx b/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraphGrid.tsxindex 8855c661d9..a70bc36157 100644--- a/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraphGrid.tsx+++ b/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraphGrid.tsx@@ -4,7 +4,7 @@ import { useSelector } from 'react-redux';import { Card } from 'antd';import { Typography } from '@signozhq/ui/typography';import logEvent from 'api/common/logEvent';-import { CardContainer } from 'container/GridCardLayout/styles';+import { CardContainer } from 'container/WidgetCard/styles';import { useIsDarkMode } from 'hooks/useDarkMode';import { ChevronDown, ChevronUp } from '@signozhq/icons';import { AppState } from 'store/reducers';diff --git a/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraphUtils.ts b/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraphUtils.tsindex 26f1d0630f..8bbdf89821 100644--- a/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraphUtils.ts+++ b/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskGraphUtils.ts@@ -1,7 +1,7 @@import { PANEL_TYPES } from 'constants/queryBuilder';import { getWidgetQueryBuilder } from 'container/MetricsApplication/MetricsApplication.factory';import { getWidgetQuery } from 'pages/MessagingQueues/MQDetails/MetricPage/MetricPageUtil';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';import { DataSource, ReduceOperators } from 'types/common/queryBuilder';import { v4 as uuidv4 } from 'uuid';diff --git a/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskLatencyGraph.tsx b/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskLatencyGraph.tsxindex 373d1493cc..a1030da5ed 100644--- a/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskLatencyGraph.tsx+++ b/frontend/src/components/CeleryTask/CeleryTaskGraph/CeleryTaskLatencyGraph.tsx@@ -6,9 +6,9 @@ import { Col, Row } from 'antd';import logEvent from 'api/common/logEvent';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { ViewMenuAction } from 'container/GridCardLayout/config';-import GridCard from 'container/GridCardLayout/GridCard';-import { Card } from 'container/GridCardLayout/styles';+import { ViewMenuAction } from 'container/WidgetCard/config';+import GridCard from 'container/WidgetCard/Card';+import { Card } from 'container/WidgetCard/styles';import { Button } from 'container/MetricsApplication/Tabs/styles';import { useGraphClickHandler } from 'container/MetricsApplication/Tabs/util';import { useIsDarkMode } from 'hooks/useDarkMode';diff --git a/frontend/src/components/CeleryTask/CeleryTaskGraph/useGetValueFromWidget.ts b/frontend/src/components/CeleryTask/CeleryTaskGraph/useGetValueFromWidget.tsindex c5f7023f72..9890c083ec 100644--- a/frontend/src/components/CeleryTask/CeleryTaskGraph/useGetValueFromWidget.ts+++ b/frontend/src/components/CeleryTask/CeleryTaskGraph/useGetValueFromWidget.ts@@ -8,7 +8,7 @@ import { GetMetricQueryRange } from 'lib/dashboard/getQueryResults';import { getQueryPayloadFromWidgetsData } from 'pages/Celery/CeleryOverview/CeleryOverviewUtils';import { AppState } from 'store/reducers';import { SuccessResponse } from 'types/api';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { GlobalReducer } from 'types/reducer/globalTime';diff --git a/frontend/src/components/CeleryTask/CeleryUtils.ts b/frontend/src/components/CeleryTask/CeleryUtils.tsindex fcea636689..d8d2c0e79b 100644--- a/frontend/src/components/CeleryTask/CeleryUtils.ts+++ b/frontend/src/components/CeleryTask/CeleryUtils.ts@@ -1,7 +1,7 @@import { QueryParams } from 'constants/query';import { History, Location } from 'history';import getRenderer from 'lib/uPlotLib/utils/getRenderer';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';import { TagFilterItem } from 'types/api/queryBuilder/queryBuilderData';import { v4 as uuidv4 } from 'uuid';diff --git a/frontend/src/components/CeleryTask/useNavigateToExplorer.ts b/frontend/src/components/CeleryTask/useNavigateToExplorer.tsindex f441542052..bb88b5855c 100644--- a/frontend/src/components/CeleryTask/useNavigateToExplorer.ts+++ b/frontend/src/components/CeleryTask/useNavigateToExplorer.ts@@ -4,10 +4,9 @@ import { useSelector } from 'react-redux';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';import ROUTES from 'constants/routes';-import useUpdatedQuery from 'container/GridCardLayout/useResolveQuery';+import useUpdatedQuery from 'container/WidgetCard/hooks/useResolveQuery';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { useNotifications } from 'hooks/useNotifications';-import { useDashboardStore } from 'providers/Dashboard/store/useDashboardStore';import { AppState } from 'store/reducers';import { Query, TagFilterItem } from 'types/api/queryBuilder/queryBuilderData';import { DataSource, MetricAggregateOperator } from 'types/common/queryBuilder';@@ -80,7 +79,6 @@ export function useNavigateToExplorer(): ();const { getUpdatedQuery } = useUpdatedQuery();- const { dashboardData } = useDashboardStore();const { notifications } = useNotifications();return useCallback(@@ -112,7 +110,6 @@ export function useNavigateToExplorer(): (panelTypes: PANEL_TYPES.TIME_SERIES,timePreferance: 'GLOBAL_TIME',},- dashboardData,}).then((query) => {preparedQuery = query;@@ -136,13 +133,6 @@ export function useNavigateToExplorer(): (window.open(withBasePath(newExplorerPath), sameTab ? '_self' : '_blank');},- [- prepareQuery,- minTime,- maxTime,- getUpdatedQuery,- dashboardData,- notifications,- ],+ [prepareQuery, minTime, maxTime, getUpdatedQuery, notifications],);}diff --git a/frontend/src/components/Graph/index.tsx b/frontend/src/components/Graph/index.tsxindex 11a0d76cc8..36741eebfd 100644--- a/frontend/src/components/Graph/index.tsx+++ b/frontend/src/components/Graph/index.tsx@@ -28,7 +28,7 @@ import {} from 'chart.js';import annotationPlugin from 'chartjs-plugin-annotation';import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';-import { generateGridTitle } from 'container/GridPanelSwitch/utils';+import { generateGridTitle } from 'utils/generateGridTitle';import dayjs from 'dayjs';import { useIsDarkMode } from 'hooks/useDarkMode';import isEqual from 'lodash-es/isEqual';diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/PlotTag.tsx b/frontend/src/components/PlotTag/PlotTag.tsxsimilarity index 89%rename from frontend/src/container/NewWidget/LeftContainer/WidgetGraph/PlotTag.tsxrename to frontend/src/components/PlotTag/PlotTag.tsxindex da18fa27b6..31e79409a3 100644--- a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/PlotTag.tsx+++ b/frontend/src/components/PlotTag/PlotTag.tsx@@ -2,7 +2,7 @@ import { PANEL_TYPES } from 'constants/queryBuilder';import { Spline } from '@signozhq/icons';import { EQueryType } from 'types/common/dashboard';-import QueryTypeTag from '../QueryTypeTag';+import QueryTypeTag from 'components/QueryTypeTag/QueryTypeTag';interface IPlotTagProps {queryType: EQueryType;diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/QuerySearch.contextSuggestions.test.tsx b/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/QuerySearch.contextSuggestions.test.tsxindex b854db8593..1271e49e2b 100644--- a/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/QuerySearch.contextSuggestions.test.tsx+++ b/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/QuerySearch.contextSuggestions.test.tsx@@ -17,12 +17,6 @@ jest.mock('hooks/useDarkMode', () => ({useIsDarkMode: (): boolean => false,}));-jest.mock('providers/Dashboard/store/useDashboardStore', () => ({- useDashboardStore: (): { dashboardData: undefined } => ({- dashboardData: undefined,- }),-}));-// Shrink the suggestion-fetch debounce (300ms in prod) so these integration// tests aren't paced by it; coalescing semantics stay intact.jest.mock('../QuerySearch/constants', () => ({diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/QuerySearch.test.tsx b/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/QuerySearch.test.tsxindex f75f3201f6..de4604d3ce 100644--- a/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/QuerySearch.test.tsx+++ b/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/QuerySearch.test.tsx@@ -21,12 +21,6 @@ jest.mock('hooks/useDarkMode', () => ({useIsDarkMode: (): boolean => false,}));-jest.mock('providers/Dashboard/store/useDashboardStore', () => ({- useDashboardStore: (): { dashboardData: undefined } => ({- dashboardData: undefined,- }),-}));-jest.mock('hooks/queryBuilder/useQueryBuilder', () => {const handleRunQuery = jest.fn();return {@@ -152,15 +146,16 @@ describe('QuerySearch (Integration with Real CodeMirror)', () => {/>,);- // Wait for debounced API call (300ms debounce + some buffer)- await waitFor(() => expect(mockedGetKeysOnMount).toHaveBeenCalled(), {- timeout: 2000,- });-- const lastArgs = mockedGetKeysOnMount.mock.calls[- mockedGetKeysOnMount.mock.calls.length - 1- ]?.[0] as { signal: unknown; searchText: string };- expect(lastArgs).toMatchObject({ signal: DataSource.LOGS, searchText: '' });+ // Wait for the mount fetch specifically. A debounced fetch from an earlier test+ // can still land after mockClear(), so waiting on "any call" would let this+ // assert against that one instead and make the result order-dependent.+ await waitFor(+ () =>+ expect(mockedGetKeysOnMount).toHaveBeenCalledWith(+ expect.objectContaining({ signal: DataSource.LOGS, searchText: '' }),+ ),+ { timeout: 2000 },+ );});it('calls provided onRun on Mod-Enter', async () => {diff --git a/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/RecentSearches.test.tsx b/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/RecentSearches.test.tsxindex f7b85f0c59..6532b396bf 100644--- a/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/RecentSearches.test.tsx+++ b/frontend/src/components/QueryBuilderV2/QueryV2/__tests__/RecentSearches.test.tsx@@ -31,12 +31,6 @@ jest.mock('hooks/useDarkMode', () => ({useIsDarkMode: (): boolean => false,}));-jest.mock('providers/Dashboard/store/useDashboardStore', () => ({- useDashboardStore: (): { dashboardData: undefined } => ({- dashboardData: undefined,- }),-}));-jest.mock('api/querySuggestions/getKeySuggestions', () => ({getKeySuggestions: jest.fn().mockResolvedValue({data: { data: { keys: {} } },diff --git a/frontend/src/container/NewWidget/LeftContainer/QueryTypeTag.tsx b/frontend/src/components/QueryTypeTag/QueryTypeTag.tsxsimilarity index 100%rename from frontend/src/container/NewWidget/LeftContainer/QueryTypeTag.tsxrename to frontend/src/components/QueryTypeTag/QueryTypeTag.tsxdiff --git a/frontend/src/components/TimePreferenceDropDown/config.tsx b/frontend/src/components/TimePreferenceDropDown/config.tsxindex 0d7dbbed26..d32e8a8fdd 100644--- a/frontend/src/components/TimePreferenceDropDown/config.tsx+++ b/frontend/src/components/TimePreferenceDropDown/config.tsx@@ -1,5 +1,5 @@import { Typography } from '@signozhq/ui/typography';-import { timeItems } from 'container/NewWidget/RightContainer/timeItems';+import { timeItems } from 'constants/timePreference';export const menuItems = timeItems.map((item) => ({key: item.enum,diff --git a/frontend/src/components/TimePreferenceDropDown/index.tsx b/frontend/src/components/TimePreferenceDropDown/index.tsxindex 04f3680fb6..95817c0a00 100644--- a/frontend/src/components/TimePreferenceDropDown/index.tsx+++ b/frontend/src/components/TimePreferenceDropDown/index.tsx@@ -6,7 +6,7 @@ import { Typography } from '@signozhq/ui/typography';import TimeItems, {timePreferance,timePreferenceType,-} from 'container/NewWidget/RightContainer/timeItems';+} from 'constants/timePreference';import { menuItems } from './config';diff --git a/frontend/src/components/ValueGraph/index.tsx b/frontend/src/components/ValueGraph/index.tsxindex 42849e8443..d9c9f7a545 100644--- a/frontend/src/components/ValueGraph/index.tsx+++ b/frontend/src/components/ValueGraph/index.tsx@@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next';import { Tooltip } from 'antd';import { Typography } from '@signozhq/ui/typography';import { CircleAlert } from '@signozhq/icons';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import { ThresholdProps } from 'types/api/widgets/threshold';import { getBackgroundColorAndThresholdCheck } from './utils';diff --git a/frontend/src/components/ValueGraph/utils.ts b/frontend/src/components/ValueGraph/utils.tsindex ca7087dd07..a92d5a477b 100644--- a/frontend/src/components/ValueGraph/utils.ts+++ b/frontend/src/components/ValueGraph/utils.ts@@ -1,5 +1,5 @@-import { evaluateThresholdWithConvertedValue } from 'container/GridTableComponent/utils';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import { evaluateThresholdWithConvertedValue } from 'container/WidgetCard/Panels/TablePanel/utils';+import { ThresholdProps } from 'types/api/widgets/threshold';function doesValueSatisfyThreshold(rawValue: number,diff --git a/frontend/src/container/NewWidget/RightContainer/alertFomatCategories.ts b/frontend/src/constants/formats/alertFormatCategories.tssimilarity index 100%rename from frontend/src/container/NewWidget/RightContainer/alertFomatCategories.tsrename to frontend/src/constants/formats/alertFormatCategories.tsdiff --git a/frontend/src/container/NewWidget/RightContainer/dataFormatCategories.ts b/frontend/src/constants/formats/dataFormatCategories.tssimilarity index 100%rename from frontend/src/container/NewWidget/RightContainer/dataFormatCategories.tsrename to frontend/src/constants/formats/dataFormatCategories.tsdiff --git a/frontend/src/container/NewWidget/RightContainer/types.ts b/frontend/src/constants/formats/types.tssimilarity index 100%rename from frontend/src/container/NewWidget/RightContainer/types.tsrename to frontend/src/constants/formats/types.tsdiff --git a/frontend/src/constants/panelTypes.ts b/frontend/src/constants/panelTypes.tsindex 8892f0fcbe..410ca93d03 100644--- a/frontend/src/constants/panelTypes.ts+++ b/frontend/src/constants/panelTypes.ts@@ -1,6 +1,6 @@import Uplot from 'components/Uplot';-import GridTableComponent from 'container/GridTableComponent';-import GridValueComponent from 'container/GridValueComponent';+import GridTableComponent from 'container/WidgetCard/Panels/TablePanel';+import GridValueComponent from 'container/WidgetCard/Panels/ValuePanel';import LogsPanelComponent from 'container/LogsPanelTable/LogsPanelComponent';import TracesTableComponent from 'container/TracesTableComponent/TracesTableComponent';import { DataSource } from 'types/common/queryBuilder';diff --git a/frontend/src/constants/routes.ts b/frontend/src/constants/routes.tsindex b908d9c9f9..f342f48457 100644--- a/frontend/src/constants/routes.ts+++ b/frontend/src/constants/routes.ts@@ -16,7 +16,6 @@ const ROUTES = {APPLICATION: '/services',ALL_DASHBOARD: '/dashboard',DASHBOARD: '/dashboard/:dashboardId',- DASHBOARD_WIDGET: '/dashboard/:dashboardId/:widgetId',DASHBOARD_PANEL_EDITOR: '/dashboard/:dashboardId/panel/:panelId',EDIT_ALERTS: '/alerts/edit',LIST_ALL_ALERT: '/alerts',diff --git a/frontend/src/container/NewWidget/RightContainer/timeItems.ts b/frontend/src/constants/timePreference.tssimilarity index 100%rename from frontend/src/container/NewWidget/RightContainer/timeItems.tsrename to frontend/src/constants/timePreference.tsdiff --git a/frontend/src/container/AIAssistant/getAutoContexts.ts b/frontend/src/container/AIAssistant/getAutoContexts.tsindex 273e4008f7..eada7b8884 100644--- a/frontend/src/container/AIAssistant/getAutoContexts.ts+++ b/frontend/src/container/AIAssistant/getAutoContexts.ts@@ -2,7 +2,7 @@ import type { MessageContext } from 'api/ai-assistant/chat';import { QueryParams } from 'constants/query';import ROUTES from 'constants/routes';import { AlertListTabs } from 'pages/AlertList/types';-import { NEW_PANEL_ID } from 'pages/DashboardPageV2/DashboardContainer/PanelEditor/newPanelRoute';+import { NEW_PANEL_ID } from 'pages/DashboardPage/DashboardContainer/PanelEditor/newPanelRoute';import { matchPath } from 'react-router-dom';/**diff --git a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/AllEndPoints.tsx b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/AllEndPoints.tsxindex 31dd79ff81..a82f0720bb 100644--- a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/AllEndPoints.tsx+++ b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/AllEndPoints.tsx@@ -6,7 +6,7 @@ import {getAllEndpointsWidgetData,getGroupByFiltersFromGroupByValues,} from 'container/ApiMonitoring/utils';-import GridCard from 'container/GridCardLayout/GridCard';+import GridCard from 'container/WidgetCard/Card';import QueryBuilderSearchV2 from 'container/QueryBuilder/filters/QueryBuilderSearchV2/QueryBuilderSearchV2';import { useGetAggregateKeys } from 'hooks/queryBuilder/useGetAggregateKeys';import { isEqual } from 'lodash-es';diff --git a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/MetricOverTimeGraph.tsx b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/MetricOverTimeGraph.tsxindex 0d50a3488c..105ae8d015 100644--- a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/MetricOverTimeGraph.tsx+++ b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/MetricOverTimeGraph.tsx@@ -1,7 +1,7 @@import { Card } from 'antd';import { ENTITY_VERSION_V5 } from 'constants/app';-import GridCard from 'container/GridCardLayout/GridCard';-import { Widgets } from 'types/api/dashboard/getAll';+import GridCard from 'container/WidgetCard/Card';+import { Widgets } from 'types/api/widgets/widget';function MetricOverTimeGraph({widget,diff --git a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/StatusCodeBarCharts.tsx b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/StatusCodeBarCharts.tsxindex f1ad86aea2..3362cba566 100644--- a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/StatusCodeBarCharts.tsx+++ b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/StatusCodeBarCharts.tsx@@ -11,10 +11,10 @@ import {getStatusCodeBarChartWidgetData,statusCodeWidgetInfo,} from 'container/ApiMonitoring/utils';-import BarChart from 'container/DashboardContainer/visualization/charts/BarChart/BarChart';-import { handleGraphClick } from 'container/GridCardLayout/GridCard/utils';-import { useGraphClickToShowButton } from 'container/GridCardLayout/useGraphClickToShowButton';-import useNavigateToExplorerPages from 'container/GridCardLayout/useNavigateToExplorerPages';+import BarChart from 'lib/visualization/charts/BarChart/BarChart';+import { handleGraphClick } from 'container/WidgetCard/Card/utils';+import { useGraphClickToShowButton } from 'container/WidgetCard/hooks/useGraphClickToShowButton';+import useNavigateToExplorerPages from 'container/WidgetCard/hooks/useNavigateToExplorerPages';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { useIsDarkMode } from 'hooks/useDarkMode';import { useResizeObserver } from 'hooks/useDimensions';@@ -23,7 +23,7 @@ import { getUPlotChartData } from 'lib/uPlotLib/utils/getUplotChartData';import { LegendPosition } from 'lib/uPlotV2/components/types';import { useTimezone } from 'providers/Timezone';import { SuccessResponse } from 'types/api';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { IBuilderQuery } from 'types/api/queryBuilder/queryBuilderData';import ErrorState from './ErrorState';diff --git a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/utils.ts b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/utils.tsindex 85043eb5d0..1ef025e585 100644--- a/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/utils.ts+++ b/frontend/src/container/ApiMonitoring/Explorer/Domains/DomainDetails/components/utils.ts@@ -1,7 +1,7 @@import { ExecStats } from 'api/v5/v5';import { Timezone } from 'components/CustomTimePicker/timezoneUtils';import { PANEL_TYPES } from 'constants/queryBuilder';-import { buildBaseConfig } from 'container/DashboardContainer/visualization/panels/utils/baseConfigBuilder';+import { buildBaseConfig } from 'lib/visualization/panels/utils/baseConfigBuilder';import { getLegend } from 'lib/dashboard/getQueryResults';import getLabelName from 'lib/getLabelName';import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';diff --git a/frontend/src/container/ApiMonitoring/__tests__/AllEndPoints.test.tsx b/frontend/src/container/ApiMonitoring/__tests__/AllEndPoints.test.tsxindex 843bee0c10..3d2f3fb55d 100644--- a/frontend/src/container/ApiMonitoring/__tests__/AllEndPoints.test.tsx+++ b/frontend/src/container/ApiMonitoring/__tests__/AllEndPoints.test.tsx@@ -17,7 +17,7 @@ jest.mock('container/ApiMonitoring/utils', () => ({getGroupByFiltersFromGroupByValues: jest.fn(),}));-jest.mock('container/GridCardLayout/GridCard', () => ({+jest.mock('container/WidgetCard/Card', () => ({__esModule: true,default: jest.fn().mockImplementation(({ customOnRowClick }) => (<div data-testid="grid-card-mock">diff --git a/frontend/src/container/ApiMonitoring/__tests__/StatusCodeBarCharts.test.tsx b/frontend/src/container/ApiMonitoring/__tests__/StatusCodeBarCharts.test.tsxindex 238d549d85..4430651af7 100644--- a/frontend/src/container/ApiMonitoring/__tests__/StatusCodeBarCharts.test.tsx+++ b/frontend/src/container/ApiMonitoring/__tests__/StatusCodeBarCharts.test.tsx@@ -21,15 +21,12 @@ interface MockQueryResult {}// Mocks-jest.mock(- 'container/DashboardContainer/visualization/charts/BarChart/BarChart',- () => ({- __esModule: true,- default: jest- .fn()- .mockImplementation(() => <div data-testid="bar-chart-mock" />),- }),-);+jest.mock('lib/visualization/charts/BarChart/BarChart', () => ({+ __esModule: true,+ default: jest+ .fn()+ .mockImplementation(() => <div data-testid="bar-chart-mock" />),+}));jest.mock('components/CeleryTask/useGetGraphCustomSeries', () => ({useGetGraphCustomSeries: (): { getCustomSeries: jest.Mock } => ({@@ -43,7 +40,7 @@ jest.mock('components/CeleryTask/useNavigateToExplorer', () => ({}),}));-jest.mock('container/GridCardLayout/useGraphClickToShowButton', () => ({+jest.mock('container/WidgetCard/hooks/useGraphClickToShowButton', () => ({useGraphClickToShowButton: (): {componentClick: boolean;htmlRef: HTMLElement | null;@@ -53,7 +50,7 @@ jest.mock('container/GridCardLayout/useGraphClickToShowButton', () => ({}),}));-jest.mock('container/GridCardLayout/useNavigateToExplorerPages', () => ({+jest.mock('container/WidgetCard/hooks/useNavigateToExplorerPages', () => ({__esModule: true,default: (): { navigateToExplorerPages: jest.Mock } => ({navigateToExplorerPages: jest.fn(),diff --git a/frontend/src/container/ApiMonitoring/utils.tsx b/frontend/src/container/ApiMonitoring/utils.tsxindex 80cd36606c..a440202c4e 100644--- a/frontend/src/container/ApiMonitoring/utils.tsx+++ b/frontend/src/container/ApiMonitoring/utils.tsx@@ -10,7 +10,7 @@ import {} from 'components/QuickFilters/types';import { PANEL_TYPES } from 'constants/queryBuilder';import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';-import { GraphClickMetaData } from 'container/GridCardLayout/useNavigateToExplorerPages';+import { GraphClickMetaData } from 'container/WidgetCard/hooks/useNavigateToExplorerPages';import { getWidgetQueryBuilder } from 'container/MetricsApplication/MetricsApplication.factory';import { convertNanoToMilliseconds } from 'container/MetricsExplorer/Summary/utils';import dayjs from 'dayjs';@@ -18,7 +18,7 @@ import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';import { cloneDeep } from 'lodash-es';import { ArrowUpDown, ChevronDown, ChevronRight, Info } from '@signozhq/icons';import { getWidgetQuery } from 'pages/MessagingQueues/MQDetails/MetricPage/MetricPageUtil';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import {BaseAutocompleteData,diff --git a/frontend/src/container/BillingContainer/BillingUsageGraph/BillingUsageGraph.tsx b/frontend/src/container/BillingContainer/BillingUsageGraph/BillingUsageGraph.tsxindex b6d51fcfb2..0562692746 100644--- a/frontend/src/container/BillingContainer/BillingUsageGraph/BillingUsageGraph.tsx+++ b/frontend/src/container/BillingContainer/BillingUsageGraph/BillingUsageGraph.tsx@@ -1,7 +1,7 @@import { useCallback, useMemo, useRef } from 'react';import { Card, Flex } from 'antd';import { Typography } from '@signozhq/ui/typography';-import BarChart from 'container/DashboardContainer/visualization/charts/BarChart/BarChart';+import BarChart from 'lib/visualization/charts/BarChart/BarChart';import { useIsDarkMode } from 'hooks/useDarkMode';import { useResizeObserver } from 'hooks/useDimensions';import { prepareChartData } from 'lib/uPlotV2/utils/dataUtils';diff --git a/frontend/src/container/BillingContainer/BillingUsageGraph/prepareBillingBarConfig.ts b/frontend/src/container/BillingContainer/BillingUsageGraph/prepareBillingBarConfig.tsindex bbb60284a8..4c0c8a3ba6 100644--- a/frontend/src/container/BillingContainer/BillingUsageGraph/prepareBillingBarConfig.ts+++ b/frontend/src/container/BillingContainer/BillingUsageGraph/prepareBillingBarConfig.ts@@ -1,7 +1,7 @@import { Color } from '@signozhq/design-tokens';import type { Timezone } from 'components/CustomTimePicker/timezoneUtils';import { PANEL_TYPES } from 'constants/queryBuilder';-import { buildBaseConfig } from 'container/DashboardContainer/visualization/panels/utils/baseConfigBuilder';+import { buildBaseConfig } from 'lib/visualization/panels/utils/baseConfigBuilder';import { DrawStyle } from 'lib/uPlotV2/config/types';import type { UPlotConfigBuilder } from 'lib/uPlotV2/config/UPlotConfigBuilder';import type { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';diff --git a/frontend/src/container/CreateAlertV2/AlertCondition/__tests__/AlertThreshold.test.tsx b/frontend/src/container/CreateAlertV2/AlertCondition/__tests__/AlertThreshold.test.tsxindex e296c55cc5..31ba457f75 100644--- a/frontend/src/container/CreateAlertV2/AlertCondition/__tests__/AlertThreshold.test.tsx+++ b/frontend/src/container/CreateAlertV2/AlertCondition/__tests__/AlertThreshold.test.tsx@@ -98,7 +98,7 @@ jest.mock('api/channels/getAll', () => ({}));// Mock alert format categories-jest.mock('container/NewWidget/RightContainer/alertFomatCategories', () => ({+jest.mock('constants/formats/alertFormatCategories', () => ({getCategoryByOptionId: jest.fn(() => ({ name: 'bytes' })),getCategorySelectOptionByName: jest.fn(() => [{ label: 'Bytes', value: 'bytes' },diff --git a/frontend/src/container/CreateAlertV2/QuerySection/ChartPreview/ChartPreview.tsx b/frontend/src/container/CreateAlertV2/QuerySection/ChartPreview/ChartPreview.tsxindex a9766fde74..80701fecde 100644--- a/frontend/src/container/CreateAlertV2/QuerySection/ChartPreview/ChartPreview.tsx+++ b/frontend/src/container/CreateAlertV2/QuerySection/ChartPreview/ChartPreview.tsx@@ -8,7 +8,7 @@ import { PANEL_TYPES } from 'constants/queryBuilder';import { QueryParams } from 'constants/query';import { useCreateAlertState } from 'container/CreateAlertV2/context';import ChartPreviewComponent from 'container/FormAlertRules/ChartPreview';-import PlotTag from 'container/NewWidget/LeftContainer/WidgetGraph/PlotTag';+import PlotTag from 'components/PlotTag/PlotTag';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import useGetYAxisUnit from 'hooks/useGetYAxisUnit';import { AppState } from 'store/reducers';diff --git a/frontend/src/container/CreateAlertV2/QuerySection/__tests__/ChartPreview.test.tsx b/frontend/src/container/CreateAlertV2/QuerySection/__tests__/ChartPreview.test.tsxindex edf4b09daa..0e0784d0b9 100644--- a/frontend/src/container/CreateAlertV2/QuerySection/__tests__/ChartPreview.test.tsx+++ b/frontend/src/container/CreateAlertV2/QuerySection/__tests__/ChartPreview.test.tsx@@ -44,7 +44,7 @@ jest.mock(},);jest.mock(- 'container/NewWidget/LeftContainer/WidgetGraph/PlotTag',+ 'components/PlotTag/PlotTag',() =>function MockPlotTag(props: any): JSX.Element {return (diff --git a/frontend/src/container/ExplorerOptions/__tests__/ExplorerOptionWrapper.test.tsx b/frontend/src/container/ExplorerOptions/__tests__/ExplorerOptionWrapper.test.tsxindex fe6d759753..e4e377872d 100644--- a/frontend/src/container/ExplorerOptions/__tests__/ExplorerOptionWrapper.test.tsx+++ b/frontend/src/container/ExplorerOptions/__tests__/ExplorerOptionWrapper.test.tsx@@ -2,7 +2,6 @@ import { useHistory } from 'react-router-dom';import { PANEL_TYPES } from 'constants/queryBuilder';import { MOCK_QUERY } from 'container/QueryTable/Drilldown/__tests__/mockTableData';import { ExportDashboard } from 'hooks/dashboard/useExportDashboards';-import { useUpdateDashboard } from 'hooks/dashboard/useUpdateDashboard';import { rest, server } from 'mocks-server/server';import {defaultFeatureFlags,@@ -13,15 +12,11 @@ import {} from 'tests/test-utils';import { Query } from 'types/api/queryBuilder/queryBuilderData';import { DataSource } from 'types/common/queryBuilder';-import { generateExportToDashboardLink } from 'utils/dashboard/generateExportToDashboardLink';-import { v4 } from 'uuid';+import { buildExportPanelLink } from 'pages/DashboardPage/DashboardContainer/PanelEditor/newPanelRoute';import ExplorerOptionWrapper from '../ExplorerOptionWrapper';import { getExplorerToolBarVisibility } from '../utils';-// Mock dependencies-jest.mock('hooks/dashboard/useUpdateDashboard');-jest.mock('react-router-dom', () => ({...jest.requireActual('react-router-dom'),useHistory: jest.fn(),@@ -40,7 +35,6 @@ const mockGetExplorerToolBarVisibility = jest.mocked(getExplorerToolBarVisibility,);-const mockUseUpdateDashboard = jest.mocked(useUpdateDashboard);const mockUseHistory = jest.mocked(useHistory);// Mock data@@ -143,17 +137,6 @@ describe('ExplorerOptionWrapper', () => {beforeEach(() => {jest.clearAllMocks();mockGetExplorerToolBarVisibility.mockReturnValue(true);- // Mock useUpdateDashboard to return a mutation object- mockUseUpdateDashboard.mockReturnValue({- mutate: jest.fn(),- mutateAsync: jest.fn(),- isLoading: false,- isError: false,- isSuccess: false,- data: undefined,- error: null,- reset: jest.fn(),- } as unknown as ReturnType<typeof useUpdateDashboard>);});it('should navigate to alert creation page when "Create an Alert" is clicked in logs-explorer', async () => {@@ -291,34 +274,27 @@ describe('ExplorerOptionWrapper', () => {});});- it('should test actual handleExport function with generateExportToDashboardLink and verify useUpdateDashboard is NOT called', async () => {+ it('should navigate to the panel editor via the export link without writing the dashboard', async () => {const user = userEvent.setup({ pointerEventsCheck: 0 });// Mock the safeNavigate functionconst mockSafeNavigate = jest.fn();- // Get the mock mutate function to track calls- const mockMutate = mockUseUpdateDashboard().mutate as jest.MockedFunction<- (...args: unknown[]) => void- >;-const panelTypeParam = PANEL_TYPES.TIME_SERIES;- const widgetId = v4();const query = mockQuery;// Create a real handleExport function similar to LogsExplorerViews- // This should NOT call useUpdateDashboard (as per PR #8029)+ // Export navigates only; it must not write the dashboard (PR #8029).const handleExport = (dashboard: ExportDashboard | null): void => {if (!dashboard) {return;}- // Call the actual generateExportToDashboardLink function (not mocked)- const dashboardEditView = generateExportToDashboardLink({+ // Call the real link builder (not mocked)+ const dashboardEditView = buildExportPanelLink({query,panelType: panelTypeParam,dashboardId: dashboard.id,- widgetId,});// Simulate navigation@@ -379,15 +355,13 @@ describe('ExplorerOptionWrapper', () => {// Wait for the handleExport function to be called and navigation to occurawait waitFor(() => {expect(mockSafeNavigate).toHaveBeenCalledTimes(1);+ // V2 panel-editor link: compositeQuery is double-encoded (see newPanelRoute).expect(mockSafeNavigate).toHaveBeenCalledWith(- `/dashboard/${TEST_DASHBOARD_ID}/new?graphType=${panelTypeParam}&widgetId=${widgetId}&compositeQuery=${encodeURIComponent(- JSON.stringify(query),+ `/dashboard/${TEST_DASHBOARD_ID}/panel/new?panelKind=signoz%2FTimeSeriesPanel&compositeQuery=${encodeURIComponent(+ encodeURIComponent(JSON.stringify(query)),)}`,);});-- // Assert that useUpdateDashboard was NOT called (as per PR #8029)- expect(mockMutate).not.toHaveBeenCalled();});});diff --git a/frontend/src/container/FormAlertRules/ChQuerySection/ChQuerySection.tsx b/frontend/src/container/FormAlertRules/ChQuerySection/ChQuerySection.tsxindex 6a3d6a2023..adaecda665 100644--- a/frontend/src/container/FormAlertRules/ChQuerySection/ChQuerySection.tsx+++ b/frontend/src/container/FormAlertRules/ChQuerySection/ChQuerySection.tsx@@ -1,10 +1,10 @@import { Callout } from '@signozhq/ui/callout';-import ClickHouseQueryBuilder from 'container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/query';+import ClickHouseQueryBuilder from 'container/QueryBuilder/rawQueryEditors/ClickHouse/query';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { AlertTypes } from 'types/api/alerts/alertTypes';import DOCLINKS from 'utils/docLinks';-import 'container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/ClickHouse.styles.scss';+import 'container/QueryBuilder/rawQueryEditors/ClickHouse/ClickHouse.styles.scss';const ALERT_TYPE_DOC_LINK: Partial<Record<AlertTypes, string>> = {[AlertTypes.LOGS_BASED_ALERT]: DOCLINKS.QUERY_CLICKHOUSE_LOGS,diff --git a/frontend/src/container/FormAlertRules/ChartPreview/ChartContent.tsx b/frontend/src/container/FormAlertRules/ChartPreview/ChartContent.tsxindex 2bad02ab2f..38bd4f3433 100644--- a/frontend/src/container/FormAlertRules/ChartPreview/ChartContent.tsx+++ b/frontend/src/container/FormAlertRules/ChartPreview/ChartContent.tsx@@ -1,9 +1,9 @@import { useMemo } from 'react';import { Timezone } from 'components/CustomTimePicker/timezoneUtils';import { PANEL_TYPES } from 'constants/queryBuilder';-import BarChart from 'container/DashboardContainer/visualization/charts/BarChart/BarChart';-import TimeSeries from 'container/DashboardContainer/visualization/charts/TimeSeries/TimeSeries';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import BarChart from 'lib/visualization/charts/BarChart/BarChart';+import TimeSeries from 'lib/visualization/charts/TimeSeries/TimeSeries';+import { ThresholdProps } from 'types/api/widgets/threshold';import { LegendPosition } from 'lib/uPlotV2/components/types';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { Query } from 'types/api/queryBuilder/queryBuilderData';diff --git a/frontend/src/container/FormAlertRules/ChartPreview/config.ts b/frontend/src/container/FormAlertRules/ChartPreview/config.tsindex 94001bbd8c..1d57f4b5fb 100644--- a/frontend/src/container/FormAlertRules/ChartPreview/config.ts+++ b/frontend/src/container/FormAlertRules/ChartPreview/config.ts@@ -4,7 +4,7 @@ import {MiscellaneousFormats,ThroughputFormats,TimeFormats,-} from 'container/NewWidget/RightContainer/types';+} from 'constants/formats/types';export const dataFormatConfig: Record<DataFormats, number> = {[DataFormats.BytesIEC]: 1,diff --git a/frontend/src/container/FormAlertRules/ChartPreview/index.tsx b/frontend/src/container/FormAlertRules/ChartPreview/index.tsxindex 8725096ca4..389dc32a01 100644--- a/frontend/src/container/FormAlertRules/ChartPreview/index.tsx+++ b/frontend/src/container/FormAlertRules/ChartPreview/index.tsx@@ -15,9 +15,9 @@ import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';import AnomalyAlertEvaluationView from 'container/AnomalyAlertEvaluationView';import { INITIAL_CRITICAL_THRESHOLD } from 'container/CreateAlertV2/context/constants';import { Threshold } from 'container/CreateAlertV2/context/types';-import { populateMultipleResults } from 'container/NewWidget/LeftContainer/WidgetGraph/util';-import { getFormatNameByOptionId } from 'container/NewWidget/RightContainer/alertFomatCategories';-import { timePreferenceType } from 'container/NewWidget/RightContainer/timeItems';+import { populateMultipleResults } from 'lib/query/populateMultipleResults';+import { getFormatNameByOptionId } from 'constants/formats/alertFormatCategories';+import { timePreferenceType } from 'constants/timePreference';import {CustomTimeType,Time,diff --git a/frontend/src/container/FormAlertRules/ChartPreview/utils.test.ts b/frontend/src/container/FormAlertRules/ChartPreview/utils.test.tsindex e81b57b933..dfc279e87e 100644--- a/frontend/src/container/FormAlertRules/ChartPreview/utils.test.ts+++ b/frontend/src/container/FormAlertRules/ChartPreview/utils.test.ts@@ -1,4 +1,4 @@-import { DataFormats } from 'container/NewWidget/RightContainer/types';+import { DataFormats } from 'constants/formats/types';import { covertIntoDataFormats } from './utils';diff --git a/frontend/src/container/FormAlertRules/ChartPreview/utils.ts b/frontend/src/container/FormAlertRules/ChartPreview/utils.tsindex 9eec933b3c..8d7fa1b4c1 100644--- a/frontend/src/container/FormAlertRules/ChartPreview/utils.ts+++ b/frontend/src/container/FormAlertRules/ChartPreview/utils.ts@@ -3,9 +3,9 @@ import { ExecStats } from 'api/v5/v5';import { Timezone } from 'components/CustomTimePicker/timezoneUtils';import { PANEL_TYPES } from 'constants/queryBuilder';import { Threshold } from 'container/CreateAlertV2/context/types';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import { buildBaseConfig } from 'container/DashboardContainer/visualization/panels/utils/baseConfigBuilder';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import { PanelMode } from 'lib/visualization/panels/types';+import { buildBaseConfig } from 'lib/visualization/panels/utils/baseConfigBuilder';+import { ThresholdProps } from 'types/api/widgets/threshold';import {BooleanFormats,DataFormats,@@ -13,7 +13,7 @@ import {MiscellaneousFormats,ThroughputFormats,TimeFormats,-} from 'container/NewWidget/RightContainer/types';+} from 'constants/formats/types';import { TFunction } from 'i18next';import { getLegend } from 'lib/dashboard/getQueryResults';import getLabelName from 'lib/getLabelName';diff --git a/frontend/src/container/FormAlertRules/PromqlSection.tsx b/frontend/src/container/FormAlertRules/PromqlSection.tsxindex 91aab81400..8a26b69967 100644--- a/frontend/src/container/FormAlertRules/PromqlSection.tsx+++ b/frontend/src/container/FormAlertRules/PromqlSection.tsx@@ -1,4 +1,4 @@-import PromQLQueryBuilder from 'container/NewWidget/LeftContainer/QuerySection/QueryBuilder/promQL/query';+import PromQLQueryBuilder from 'container/QueryBuilder/rawQueryEditors/PromQL/query';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';function PromqlSection(): JSX.Element {diff --git a/frontend/src/container/FormAlertRules/index.tsx b/frontend/src/container/FormAlertRules/index.tsxindex 81a066ee49..f46ac57aa2 100644--- a/frontend/src/container/FormAlertRules/index.tsx+++ b/frontend/src/container/FormAlertRules/index.tsx@@ -26,8 +26,8 @@ import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';import ROUTES from 'constants/routes';-import QueryTypeTag from 'container/NewWidget/LeftContainer/QueryTypeTag';-import PlotTag from 'container/NewWidget/LeftContainer/WidgetGraph/PlotTag';+import QueryTypeTag from 'components/QueryTypeTag/QueryTypeTag';+import PlotTag from 'components/PlotTag/PlotTag';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { useShareBuilderUrl } from 'hooks/queryBuilder/useShareBuilderUrl';import useGetYAxisUnit from 'hooks/useGetYAxisUnit';diff --git a/frontend/src/container/FormAlertRules/usePrefillAlertConditions.ts b/frontend/src/container/FormAlertRules/usePrefillAlertConditions.tsindex 3e3a2ae665..ac1f0f802c 100644--- a/frontend/src/container/FormAlertRules/usePrefillAlertConditions.ts+++ b/frontend/src/container/FormAlertRules/usePrefillAlertConditions.ts@@ -1,6 +1,6 @@import { useMemo } from 'react';import { useLocation } from 'react-router-dom-v5-compat';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import { ThresholdProps } from 'types/api/widgets/threshold';import { Query } from 'types/api/queryBuilder/queryBuilderData';const THRESHOLD_COLORS_SORTING_ORDER = ['Red', 'Orange', 'Green', 'Blue'];diff --git a/frontend/src/container/GridPanelSwitch/index.tsx b/frontend/src/container/GridPanelSwitch/index.tsxdeleted file mode 100644index a76f496c2a..0000000000--- a/frontend/src/container/GridPanelSwitch/index.tsx+++ /dev/null@@ -1,77 +0,0 @@-import { FC, forwardRef, memo, useMemo } from 'react';-import { ToggleGraphProps } from 'components/Graph/types';-import { getComponentForPanelType } from 'constants/panelTypes';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { GRID_TABLE_CONFIG } from 'container/GridTableComponent/config';--import { GridPanelSwitchProps, PropsTypePropsMap } from './types';--const GridPanelSwitch = forwardRef<- ToggleGraphProps | undefined,- GridPanelSwitchProps->(- (- {- panelType,- data,- yAxisUnit,- panelData,- query,- options,- thresholds,- dataSource,- },- ref,- ): JSX.Element | null => {- const currentProps: PropsTypePropsMap = useMemo(() => {- const result: PropsTypePropsMap = {- [PANEL_TYPES.TIME_SERIES]: {- data,- options,- ref,- },- [PANEL_TYPES.VALUE]: {- data,- yAxisUnit,- thresholds,- },- [PANEL_TYPES.TABLE]: {- ...GRID_TABLE_CONFIG,- data: panelData,- query,- thresholds,- sticky: true,- },- [PANEL_TYPES.LIST]: null,- [PANEL_TYPES.PIE]: null,- [PANEL_TYPES.TRACE]: null,- [PANEL_TYPES.BAR]: {- data,- options,- ref,- },- [PANEL_TYPES.HISTOGRAM]: null,- [PANEL_TYPES.EMPTY_WIDGET]: null,- };-- return result;- }, [data, options, ref, yAxisUnit, thresholds, panelData, query]);-- const Component = getComponentForPanelType(panelType, dataSource) as FC<- PropsTypePropsMap[typeof panelType]- >;- const componentProps = useMemo(- () => currentProps[panelType],- [panelType, currentProps],- );-- if (!Component || !componentProps) {- return null;- }- return <Component {...componentProps} />;- },-);--GridPanelSwitch.displayName = 'GridPanelSwitch';--export default memo(GridPanelSwitch);diff --git a/frontend/src/container/GridPanelSwitch/types.ts b/frontend/src/container/GridPanelSwitch/types.tsdeleted file mode 100644index c47f235ae4..0000000000--- a/frontend/src/container/GridPanelSwitch/types.ts+++ /dev/null@@ -1,48 +0,0 @@-import { ForwardedRef } from 'react';-import { StaticLineProps, ToggleGraphProps } from 'components/Graph/types';-import { UplotProps } from 'components/Uplot/Uplot';-import { GridTableComponentProps } from 'container/GridTableComponent/types';-import { GridValueComponentProps } from 'container/GridValueComponent/types';-import { timePreferance } from 'container/NewWidget/RightContainer/timeItems';-import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';-import { Widgets } from 'types/api/dashboard/getAll';-import { Query } from 'types/api/queryBuilder/queryBuilderData';-import { QueryDataV3 } from 'types/api/widgets/getQuery';-import { DataSource } from 'types/common/queryBuilder';-import uPlot from 'uplot';--import { PANEL_TYPES } from '../../constants/queryBuilder';--export type GridPanelSwitchProps = {- panelType: PANEL_TYPES;- data: uPlot.AlignedData;- options: uPlot.Options;- onClickHandler?: OnClickPluginOpts['onClick'];- name: string;- yAxisUnit?: string;- staticLine?: StaticLineProps;- onDragSelect?: (start: number, end: number) => void;- panelData: QueryDataV3[];- query: Query;- thresholds?: Widgets['thresholds'];- dataSource?: DataSource;- selectedLogFields?: Widgets['selectedLogFields'];- selectedTracesFields?: Widgets['selectedTracesFields'];- selectedTime?: timePreferance;-};--export type PropsTypePropsMap = {- [PANEL_TYPES.TIME_SERIES]: UplotProps & {- ref: ForwardedRef<ToggleGraphProps | undefined>;- };- [PANEL_TYPES.VALUE]: GridValueComponentProps;- [PANEL_TYPES.TABLE]: GridTableComponentProps;- [PANEL_TYPES.TRACE]: null;- [PANEL_TYPES.PIE]: null;- [PANEL_TYPES.LIST]: null;- [PANEL_TYPES.BAR]: UplotProps & {- ref: ForwardedRef<ToggleGraphProps | undefined>;- };- [PANEL_TYPES.HISTOGRAM]: null;- [PANEL_TYPES.EMPTY_WIDGET]: null;-};diff --git a/frontend/src/container/InfraMonitoringK8sV2/EntityDetailsUtils/EntityMetrics/EntityMetrics.tsx b/frontend/src/container/InfraMonitoringK8sV2/EntityDetailsUtils/EntityMetrics/EntityMetrics.tsxindex 73883975d1..0494bc4789 100644--- a/frontend/src/container/InfraMonitoringK8sV2/EntityDetailsUtils/EntityMetrics/EntityMetrics.tsx+++ b/frontend/src/container/InfraMonitoringK8sV2/EntityDetailsUtils/EntityMetrics/EntityMetrics.tsx@@ -4,7 +4,7 @@ import { Skeleton } from 'antd';import cx from 'classnames';import { InfraMonitoringEvents } from 'constants/events';import { PANEL_TYPES } from 'constants/queryBuilder';-import TimeSeries from 'container/DashboardContainer/visualization/charts/TimeSeries/TimeSeries';+import TimeSeries from 'lib/visualization/charts/TimeSeries/TimeSeries';import {IRenderTooltipFooterArgs,LegendPosition,diff --git a/frontend/src/container/InfraMonitoringK8sV2/EntityDetailsUtils/EntityMetrics/__tests__/EntityMetrics.test.tsx b/frontend/src/container/InfraMonitoringK8sV2/EntityDetailsUtils/EntityMetrics/__tests__/EntityMetrics.test.tsxindex 32b120d4ee..c3f96501c7 100644--- a/frontend/src/container/InfraMonitoringK8sV2/EntityDetailsUtils/EntityMetrics/__tests__/EntityMetrics.test.tsx+++ b/frontend/src/container/InfraMonitoringK8sV2/EntityDetailsUtils/EntityMetrics/__tests__/EntityMetrics.test.tsx@@ -50,15 +50,12 @@ jest.mock('../../EntityDateTimeSelector/useEntityDetailsTime', () => ({}),}));-jest.mock(- 'container/DashboardContainer/visualization/charts/TimeSeries/TimeSeries',- () => ({- __esModule: true,- default: (): JSX.Element => (- <div data-testid="uplot-chart">TimeSeries Chart</div>- ),- }),-);+jest.mock('lib/visualization/charts/TimeSeries/TimeSeries', () => ({+ __esModule: true,+ default: (): JSX.Element => (+ <div data-testid="uplot-chart">TimeSeries Chart</div>+ ),+}));jest.mock('providers/Timezone', () => ({useTimezone: (): { timezone: { value: string } } => ({diff --git a/frontend/src/container/LLMObservability/Overview/Overview.tsx b/frontend/src/container/LLMObservability/Overview/Overview.tsxindex 9a9e8deb35..d4073ce1d4 100644--- a/frontend/src/container/LLMObservability/Overview/Overview.tsx+++ b/frontend/src/container/LLMObservability/Overview/Overview.tsx@@ -1,4 +1,4 @@-import DashboardContainer from 'pages/DashboardPageV2/DashboardContainer';+import DashboardContainer from 'pages/DashboardPage/DashboardContainer';import { useSeededDashboardV2 } from './hooks/useSeededDashboardV2';import styles from './Overview.module.scss';diff --git a/frontend/src/container/LLMObservability/__tests__/LLMObservability.test.tsx b/frontend/src/container/LLMObservability/__tests__/LLMObservability.test.tsxindex 34d1c58e3f..f419cc03dd 100644--- a/frontend/src/container/LLMObservability/__tests__/LLMObservability.test.tsx+++ b/frontend/src/container/LLMObservability/__tests__/LLMObservability.test.tsx@@ -13,7 +13,7 @@ import LLMObservability from '../LLMObservability';// The Overview tab renders the full V2 DashboardContainer (toolbar + date picker// call useNavigationType, which needs a data router this integration test doesn't// set up). These cases assert tab routing, not dashboard rendering, so stub it.-jest.mock('pages/DashboardPageV2/DashboardContainer', () => ({+jest.mock('pages/DashboardPage/DashboardContainer', () => ({__esModule: true,default: (): JSX.Element => <div data-testid="llm-overview-dashboard" />,}));diff --git a/frontend/src/container/LogExplorerQuerySection/LogExplorerQuerySection.test.tsx b/frontend/src/container/LogExplorerQuerySection/LogExplorerQuerySection.test.tsxindex 181408bad1..5b36be47ee 100644--- a/frontend/src/container/LogExplorerQuerySection/LogExplorerQuerySection.test.tsx+++ b/frontend/src/container/LogExplorerQuerySection/LogExplorerQuerySection.test.tsx@@ -92,12 +92,6 @@ jest.mock('hooks/useDarkMode', () => ({useIsDarkMode: (): boolean => false,}));-jest.mock('providers/Dashboard/store/useDashboardStore', () => ({- useDashboardStore: (): { dashboardData: undefined } => ({- dashboardData: undefined,- }),-}));-jest.mock('api/querySuggestions/getKeySuggestions', () => ({getKeySuggestions: jest.fn().mockResolvedValue({data: {diff --git a/frontend/src/container/LogsExplorerChart/index.tsx b/frontend/src/container/LogsExplorerChart/index.tsxindex 756ae2be20..d171fe6c83 100644--- a/frontend/src/container/LogsExplorerChart/index.tsx+++ b/frontend/src/container/LogsExplorerChart/index.tsx@@ -4,7 +4,7 @@ import { useDispatch, useSelector } from 'react-redux';import { useLocation } from 'react-router-dom';import Spinner from 'components/Spinner';import { QueryParams } from 'constants/query';-import BarChart from 'container/DashboardContainer/visualization/charts/BarChart/BarChart';+import BarChart from 'lib/visualization/charts/BarChart/BarChart';import { useResizeObserver } from 'hooks/useDimensions';import { useSafeNavigate } from 'hooks/useSafeNavigate';import useUrlQuery from 'hooks/useUrlQuery';diff --git a/frontend/src/container/LogsExplorerChart/useLogsExplorerChartConfig.ts b/frontend/src/container/LogsExplorerChart/useLogsExplorerChartConfig.tsindex 3ecb6b3a4d..c1fc491c94 100644--- a/frontend/src/container/LogsExplorerChart/useLogsExplorerChartConfig.ts+++ b/frontend/src/container/LogsExplorerChart/useLogsExplorerChartConfig.ts@@ -1,7 +1,7 @@import { useMemo } from 'react';import { PANEL_TYPES } from 'constants/queryBuilder';import { themeColors } from 'constants/theme';-import { buildBaseConfig } from 'container/DashboardContainer/visualization/panels/utils/baseConfigBuilder';+import { buildBaseConfig } from 'lib/visualization/panels/utils/baseConfigBuilder';import { useIsDarkMode } from 'hooks/useDarkMode';import getLabelName from 'lib/getLabelName';import { colors } from 'lib/getRandomColor';diff --git a/frontend/src/container/LogsPanelTable/LogsPanelComponent.tsx b/frontend/src/container/LogsPanelTable/LogsPanelComponent.tsxindex 3d6a32a3c7..3ce4bfabe5 100644--- a/frontend/src/container/LogsPanelTable/LogsPanelComponent.tsx+++ b/frontend/src/container/LogsPanelTable/LogsPanelComponent.tsx@@ -22,7 +22,7 @@ import { FlatLogData } from 'lib/logs/flatLogData';import { RowData } from 'lib/query/createTableColumnsFromQuery';import { useTimezone } from 'providers/Timezone';import { SuccessResponse } from 'types/api';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { getLogPanelColumnsList } from './utils';diff --git a/frontend/src/container/LogsPanelTable/__tests__/LogsPanelComponent.test.tsx b/frontend/src/container/LogsPanelTable/__tests__/LogsPanelComponent.test.tsxdeleted file mode 100644index 407a552b97..0000000000--- a/frontend/src/container/LogsPanelTable/__tests__/LogsPanelComponent.test.tsx+++ /dev/null@@ -1,179 +0,0 @@-import { I18nextProvider } from 'react-i18next';-import { ENVIRONMENT } from 'constants/env';-import { PANEL_TYPES } from 'constants/queryBuilder';-import NewWidget from 'container/NewWidget';-import { logsPaginationQueryRangeSuccessResponse } from 'mocks-server/__mockdata__/logs_query_range';-import { server } from 'mocks-server/server';-import { rest } from 'msw';-import { PreferenceContextProvider } from 'providers/preferences/context/PreferenceContextProvider';-import i18n from 'ReactI18';-import { act, fireEvent, render, screen, waitFor } from 'tests/test-utils';-import { QueryRangePayload } from 'types/api/metrics/getQueryRange';-import { IBuilderQuery } from 'types/api/queryBuilder/queryBuilderData';--// Constants-const QUERY_RANGE_URL = `${ENVIRONMENT.baseURL}/api/v3/query_range`;-const MOCK_SEARCH_PARAMS =- '?graphType=list&widgetId=36a7b342-c642-4b92-abe4-cb833a244786&compositeQuery=%7B%22id%22%3A%22b325ac88-5e75-4117-a38c-1a2a7caf8115%22%2C%22builder%22%3A%7B%22queryData%22%3A%5B%7B%22dataSource%22%3A%22logs%22%2C%22queryName%22%3A%22A%22%2C%22aggregateOperator%22%3A%22noop%22%2C%22aggregateAttribute%22%3A%7B%22id%22%3A%22------%22%2C%22dataType%22%3A%22%22%2C%22key%22%3A%22%22%2C%22isColumn%22%3Afalse%2C%22type%22%3A%22%22%2C%22isJSON%22%3Afalse%7D%2C%22timeAggregation%22%3A%22rate%22%2C%22spaceAggregation%22%3A%22sum%22%2C%22functions%22%3A%5B%5D%2C%22filters%22%3A%7B%22items%22%3A%5B%5D%2C%22op%22%3A%22AND%22%7D%2C%22expression%22%3A%22A%22%2C%22disabled%22%3Afalse%2C%22stepInterval%22%3A60%2C%22having%22%3A%5B%5D%2C%22limit%22%3Anull%2C%22orderBy%22%3A%5B%7B%22columnName%22%3A%22timestamp%22%2C%22order%22%3A%22desc%22%7D%5D%2C%22groupBy%22%3A%5B%5D%2C%22legend%22%3A%22%22%2C%22reduceTo%22%3A%22avg%22%2C%22offset%22%3A0%2C%22pageSize%22%3A100%7D%5D%2C%22queryFormulas%22%3A%5B%5D%7D%2C%22clickhouse_sql%22%3A%5B%7B%22name%22%3A%22A%22%2C%22legend%22%3A%22%22%2C%22disabled%22%3Afalse%2C%22query%22%3A%22%22%7D%5D%2C%22promql%22%3A%5B%7B%22name%22%3A%22A%22%2C%22query%22%3A%22%22%2C%22legend%22%3A%22%22%2C%22disabled%22%3Afalse%7D%5D%2C%22queryType%22%3A%22builder%22%7D&relativeTime=30m&options=%7B%22selectColumns%22%3A%5B%5D%2C%22maxLines%22%3A2%2C%22format%22%3A%22list%22%2C%22fontSize%22%3A%22small%22%7D';--// Mocks--jest.mock('components/OverlayScrollbar/OverlayScrollbar', () => ({- __esModule: true,- default: ({ children }: { children: React.ReactNode }): JSX.Element => (- <div>{children}</div>- ),-}));--jest.mock('react-router-dom', () => ({- ...jest.requireActual('react-router-dom'),- useLocation: (): { pathname: string; search: string } => ({- pathname: '',- search: MOCK_SEARCH_PARAMS,- }),-}));--jest.mock('hooks/useSafeNavigate', () => ({- useSafeNavigate: (): { safeNavigate: jest.Mock } => ({- safeNavigate: jest.fn(),- }),-}));--jest.mock('container/TopNav/DateTimeSelectionV2/index.tsx', () => ({- __esModule: true,- default: (): JSX.Element => <div>MockDateTimeSelection</div>,-}));--// Helpers-const getBuilderQuery = (payload: QueryRangePayload): IBuilderQuery =>- payload.compositeQuery.builderQueries?.A as IBuilderQuery;--const assertTimeRangeConsistency = (- payload: QueryRangePayload,- initialTimeRange: { start: number; end: number },-): void => {- expect(payload.start).toBe(initialTimeRange.start);- expect(payload.end).toBe(initialTimeRange.end);-};--jest.setTimeout(20000);--Object.defineProperty(globalThis, 'matchMedia', {- writable: true,- value: jest.fn().mockImplementation((query) => ({- matches: true,- media: query,- addListener: (listener: (params: { matches: boolean }) => void): void => {- listener({ matches: true });- },- removeListener: jest.fn(),- })),-});--describe('LogsPanelComponent', () => {- let capturedQueryRangePayloads: QueryRangePayload[] = [];-- beforeEach(() => {- capturedQueryRangePayloads = [];- server.use(- rest.post(QUERY_RANGE_URL, async (req, res, ctx) => {- const payload = await req.json();- capturedQueryRangePayloads.push(payload);-- const queryData = getBuilderQuery(payload);- return res(- ctx.status(200),- ctx.json(- logsPaginationQueryRangeSuccessResponse({- offset: queryData?.offset ?? 0,- pageSize: 10,- }),- ),- );- }),- );- });-- const renderComponent = async (): Promise<void> => {- render(- <I18nextProvider i18n={i18n}>- <PreferenceContextProvider>- <NewWidget- dashboardId=""- dashboardData={undefined}- selectedGraph={PANEL_TYPES.LIST}- />- </PreferenceContextProvider>- </I18nextProvider>,- );-- await waitFor(() => {- expect(screen.queryByText('No data')).not.toBeInTheDocument();- });- };-- it.skip('should handle pagination flows correctly', async () => {- await renderComponent();- const initialTimeRange = {- start: capturedQueryRangePayloads[0].start,- end: capturedQueryRangePayloads[0].end,- };-- act(() => {- fireEvent.click(screen.getByRole('button', { name: /next/i }));- });- await waitFor(() => {- expect(capturedQueryRangePayloads).toHaveLength(2);- });-- const firstPayload = capturedQueryRangePayloads[0];- const secondPayload = capturedQueryRangePayloads[1];-- const firstQueryData = getBuilderQuery(firstPayload);- const secondQueryData = getBuilderQuery(secondPayload);-- expect(firstQueryData.offset).toBe(0);- expect(secondQueryData.offset).toBe(10);- assertTimeRangeConsistency(secondPayload, initialTimeRange);- const idFilter = secondQueryData.filters?.items?.find(- (item) => item?.key?.key === 'id',- );- expect(idFilter).toBeUndefined();-- const secondOrderByTimestamp = secondQueryData.orderBy?.find(- (item) => item.columnName === 'timestamp',- );- const secondOrderById = secondQueryData.orderBy?.find(- (item) => item.columnName === 'id',- );- expect(secondOrderByTimestamp).toBeDefined();- expect(secondOrderById).toBeDefined();- expect(secondOrderById?.order).toBe(secondOrderByTimestamp?.order);-- act(() => {- fireEvent.click(screen.getByRole('button', { name: /previous/i }));- });- await waitFor(() => {- expect(capturedQueryRangePayloads).toHaveLength(3);- });-- const thirdPayload = capturedQueryRangePayloads[2];- const thirdQueryData = getBuilderQuery(thirdPayload);- expect(thirdQueryData.offset).toBe(0);- assertTimeRangeConsistency(thirdPayload, initialTimeRange);- const thirdIdFilter = thirdQueryData.filters?.items?.find(- (item) => item?.key?.key === 'id',- );- expect(thirdIdFilter).toBeUndefined();-- const thirdOrderByTimestamp = thirdQueryData.orderBy?.find(- (item) => item.columnName === 'timestamp',- );- const thirdOrderById = thirdQueryData.orderBy?.find(- (item) => item.columnName === 'id',- );- expect(thirdOrderByTimestamp).toBeDefined();- expect(thirdOrderById).toBeDefined();- expect(thirdOrderById?.order).toBe(thirdOrderByTimestamp?.order);- });-});diff --git a/frontend/src/container/LogsPanelTable/utils.tsx b/frontend/src/container/LogsPanelTable/utils.tsxindex 540d0fbf4b..ca5d8ada84 100644--- a/frontend/src/container/LogsPanelTable/utils.tsx+++ b/frontend/src/container/LogsPanelTable/utils.tsx@@ -3,7 +3,7 @@ import { TableColumnsType as ColumnsType } from 'antd';import { Typography } from '@signozhq/ui/typography';import { TimestampInput } from 'hooks/useTimezoneFormatter/useTimezoneFormatter';import { RowData } from 'lib/query/createTableColumnsFromQuery';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { IField } from 'types/api/logs/fields';export const getLogPanelColumnsList = (diff --git a/frontend/src/container/MeterExplorer/Breakdown/BreakDown.tsx b/frontend/src/container/MeterExplorer/Breakdown/BreakDown.tsxindex 98b7c4e6f7..69c053c575 100644--- a/frontend/src/container/MeterExplorer/Breakdown/BreakDown.tsx+++ b/frontend/src/container/MeterExplorer/Breakdown/BreakDown.tsx@@ -9,8 +9,8 @@ import setLocalStorageApi from 'api/browser/localstorage/set';import { LOCALSTORAGE } from 'constants/localStorage';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import GridCard from 'container/GridCardLayout/GridCard';-import { Card, CardContainer } from 'container/GridCardLayout/styles';+import GridCard from 'container/WidgetCard/Card';+import { Card, CardContainer } from 'container/WidgetCard/styles';import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';import dayjs from 'dayjs';import { useIsDarkMode } from 'hooks/useDarkMode';@@ -18,7 +18,7 @@ import { useGetTenantLicense } from 'hooks/useGetTenantLicense';import useUrlQuery from 'hooks/useUrlQuery';import { UpdateTimeInterval } from 'store/actions';import { AppState } from 'store/reducers';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { GlobalReducer } from 'types/reducer/globalTime';import { v4 as uuid } from 'uuid';diff --git a/frontend/src/container/MeterExplorer/Breakdown/graphs.ts b/frontend/src/container/MeterExplorer/Breakdown/graphs.tsindex e00df49fb0..99781ce941 100644--- a/frontend/src/container/MeterExplorer/Breakdown/graphs.ts+++ b/frontend/src/container/MeterExplorer/Breakdown/graphs.ts@@ -1,6 +1,6 @@import { PANEL_TYPES } from 'constants/queryBuilder';import { GetWidgetQueryBuilderProps } from 'container/MetricsApplication/types';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';import {IBuilderFormula,diff --git a/frontend/src/container/MeterExplorer/Explorer/Explorer.tsx b/frontend/src/container/MeterExplorer/Explorer/Explorer.tsxindex 1b6382ba73..f93be2dfa9 100644--- a/frontend/src/container/MeterExplorer/Explorer/Explorer.tsx+++ b/frontend/src/container/MeterExplorer/Explorer/Explorer.tsx@@ -14,6 +14,7 @@ import RightToolbarActions from 'container/QueryBuilder/components/ToolbarActionimport { QueryBuilderProps } from 'container/QueryBuilder/QueryBuilder.interfaces';import DateTimeSelector from 'container/TopNav/DateTimeSelectionV2';import { ExportDashboard } from 'hooks/dashboard/useExportDashboards';+import { useGetExportToDashboardLink } from 'hooks/dashboard/useGetExportToDashboardLink';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { useShareBuilderUrl } from 'hooks/queryBuilder/useShareBuilderUrl';import { useSafeNavigate } from 'hooks/useSafeNavigate';@@ -21,7 +22,6 @@ import { Filter } from '@signozhq/icons';import ErrorBoundaryFallback from 'pages/ErrorBoundaryFallback/ErrorBoundaryFallback';import { Query } from 'types/api/queryBuilder/queryBuilderData';import { DataSource } from 'types/common/queryBuilder';-import { generateExportToDashboardLink } from 'utils/dashboard/generateExportToDashboardLink';import { v4 as uuid } from 'uuid';import { MeterExplorerEventKeys, MeterExplorerEvents } from '../events';@@ -38,6 +38,7 @@ function Explorer(): JSX.Element {currentQuery,} = useQueryBuilder();const { safeNavigate } = useSafeNavigate();+ const getExportToDashboardLink = useGetExportToDashboardLink();const queryClient = useQueryClient();const [isLoadingQueries, setIsLoadingQueries] = useState(false);const [isCancelled, setIsCancelled] = useState(false);@@ -91,16 +92,18 @@ function Explorer(): JSX.Element {const widgetId = uuid();- const dashboardEditView = generateExportToDashboardLink({+ const dashboardEditView = getExportToDashboardLink({query: queryToExport || exportDefaultQuery,panelType: PANEL_TYPES.BAR,dashboardId: dashboard.id,widgetId,});- safeNavigate(dashboardEditView);+ if (dashboardEditView) {+ safeNavigate(dashboardEditView);+ }},- [exportDefaultQuery, safeNavigate],+ [exportDefaultQuery, safeNavigate, getExportToDashboardLink],);const splitedQueries = useMemo(diff --git a/frontend/src/container/MeterExplorer/Explorer/TimeSeries.tsx b/frontend/src/container/MeterExplorer/Explorer/TimeSeries.tsxindex 14a4683add..22aeb24cf2 100644--- a/frontend/src/container/MeterExplorer/Explorer/TimeSeries.tsx+++ b/frontend/src/container/MeterExplorer/Explorer/TimeSeries.tsx@@ -2,7 +2,7 @@ import { useMemo, useRef } from 'react';// eslint-disable-next-line no-restricted-importsimport { useSelector } from 'react-redux';import QueryCancelledPlaceholder from 'components/QueryCancelledPlaceholder';-import BarChart from 'container/DashboardContainer/visualization/charts/BarChart/BarChart';+import BarChart from 'lib/visualization/charts/BarChart/BarChart';import { BuilderUnitsFilter } from 'container/QueryBuilder/filters/BuilderUnitsFilter';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { useIsDarkMode } from 'hooks/useDarkMode';diff --git a/frontend/src/container/MetricsApplication/MetricsApplication.factory.ts b/frontend/src/container/MetricsApplication/MetricsApplication.factory.tsindex 0157acfeac..d415f7ef16 100644--- a/frontend/src/container/MetricsApplication/MetricsApplication.factory.ts+++ b/frontend/src/container/MetricsApplication/MetricsApplication.factory.ts@@ -1,4 +1,4 @@-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { v4 } from 'uuid';import { GetWidgetQueryBuilderProps } from './types';diff --git a/frontend/src/container/MetricsApplication/Tabs/DBCall.tsx b/frontend/src/container/MetricsApplication/Tabs/DBCall.tsxindex d4d16cf864..a9750049b2 100644--- a/frontend/src/container/MetricsApplication/Tabs/DBCall.tsx+++ b/frontend/src/container/MetricsApplication/Tabs/DBCall.tsx@@ -7,7 +7,7 @@ import logEvent from 'api/common/logEvent';import { ENTITY_VERSION_V4 } from 'constants/app';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import Graph from 'container/GridCardLayout/GridCard';+import Graph from 'container/WidgetCard/Card';import {databaseCallsAvgDuration,databaseCallsRPS,diff --git a/frontend/src/container/MetricsApplication/Tabs/External.tsx b/frontend/src/container/MetricsApplication/Tabs/External.tsxindex bc6a945916..39cb918ccc 100644--- a/frontend/src/container/MetricsApplication/Tabs/External.tsx+++ b/frontend/src/container/MetricsApplication/Tabs/External.tsx@@ -7,7 +7,7 @@ import logEvent from 'api/common/logEvent';import { ENTITY_VERSION_V4 } from 'constants/app';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import Graph from 'container/GridCardLayout/GridCard';+import Graph from 'container/WidgetCard/Card';import {externalCallDuration,externalCallDurationByAddress,diff --git a/frontend/src/container/MetricsApplication/Tabs/Overview/ApDex/ApDexMetrics.tsx b/frontend/src/container/MetricsApplication/Tabs/Overview/ApDex/ApDexMetrics.tsxindex d1a08ccbb6..05a66bc191 100644--- a/frontend/src/container/MetricsApplication/Tabs/Overview/ApDex/ApDexMetrics.tsx+++ b/frontend/src/container/MetricsApplication/Tabs/Overview/ApDex/ApDexMetrics.tsx@@ -10,8 +10,8 @@ import {} from 'constants/apDex';import { ENTITY_VERSION_V4 } from 'constants/app';import { PANEL_TYPES } from 'constants/queryBuilder';-import Graph from 'container/GridCardLayout/GridCard';-import DisplayThreshold from 'container/GridCardLayout/WidgetHeader/DisplayThreshold';+import Graph from 'container/WidgetCard/Card';+import DisplayThreshold from 'container/WidgetCard/Header/DisplayThreshold';import {GraphTitle,SERVICE_CHART_ID,diff --git a/frontend/src/container/MetricsApplication/Tabs/Overview/ServiceOverview.tsx b/frontend/src/container/MetricsApplication/Tabs/Overview/ServiceOverview.tsxindex d851f9db65..457df8f51d 100644--- a/frontend/src/container/MetricsApplication/Tabs/Overview/ServiceOverview.tsx+++ b/frontend/src/container/MetricsApplication/Tabs/Overview/ServiceOverview.tsx@@ -3,7 +3,7 @@ import { useParams } from 'react-router-dom';import { ENTITY_VERSION_V4 } from 'constants/app';import { FeatureKeys } from 'constants/features';import { PANEL_TYPES } from 'constants/queryBuilder';-import Graph from 'container/GridCardLayout/GridCard';+import Graph from 'container/WidgetCard/Card';import {GraphTitle,SERVICE_CHART_ID,diff --git a/frontend/src/container/MetricsApplication/Tabs/Overview/TopLevelOperations.tsx b/frontend/src/container/MetricsApplication/Tabs/Overview/TopLevelOperations.tsxindex 580dcb73d5..f44053a79a 100644--- a/frontend/src/container/MetricsApplication/Tabs/Overview/TopLevelOperations.tsx+++ b/frontend/src/container/MetricsApplication/Tabs/Overview/TopLevelOperations.tsx@@ -2,11 +2,11 @@ import { Typography } from '@signozhq/ui/typography';import axios from 'axios';import { SOMETHING_WENT_WRONG } from 'constants/api';import { ENTITY_VERSION_V4 } from 'constants/app';-import Graph from 'container/GridCardLayout/GridCard';+import Graph from 'container/WidgetCard/Card';import { SERVICE_DETAIL_DRILLDOWN_ENABLED } from 'container/MetricsApplication/constant';import { Card, GraphContainer } from 'container/MetricsApplication/styles';import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';function TopLevelOperation({name,diff --git a/frontend/src/container/MetricsApplication/constant.ts b/frontend/src/container/MetricsApplication/constant.tsindex d65ba5c93b..5ace345e1c 100644--- a/frontend/src/container/MetricsApplication/constant.ts+++ b/frontend/src/container/MetricsApplication/constant.ts@@ -1,5 +1,5 @@import { DownloadOptions } from 'container/Download/Download.types';-import { MenuItemKeys } from 'container/GridCardLayout/WidgetHeader/contants';+import { MenuItemKeys } from 'container/WidgetCard/Header/contants';import {MetricAggregateOperator,TracesAggregatorOperator,diff --git a/frontend/src/container/MetricsApplication/types.ts b/frontend/src/container/MetricsApplication/types.tsindex cc802cb9c7..787b54b072 100644--- a/frontend/src/container/MetricsApplication/types.ts+++ b/frontend/src/container/MetricsApplication/types.ts@@ -1,5 +1,5 @@import { ReactNode } from 'react';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { Query, TagFilterItem } from 'types/api/queryBuilder/queryBuilderData';import { IServiceName } from './Tabs/types';diff --git a/frontend/src/container/MetricsExplorer/Explorer/__tests__/Explorer.test.tsx b/frontend/src/container/MetricsExplorer/Explorer/__tests__/Explorer.test.tsxindex b721b3df09..72aaefe0d9 100644--- a/frontend/src/container/MetricsExplorer/Explorer/__tests__/Explorer.test.tsx+++ b/frontend/src/container/MetricsExplorer/Explorer/__tests__/Explorer.test.tsx@@ -10,7 +10,6 @@ import {} from 'api/generated/services/sigNoz.schemas';import { initialQueriesMap } from 'constants/queryBuilder';import * as useOptionsMenuHooks from 'container/OptionsMenu';-import * as useUpdateDashboardHooks from 'hooks/dashboard/useUpdateDashboard';import * as useQueryBuilderHooks from 'hooks/queryBuilder/useQueryBuilder';import * as useHandleExplorerTabChangeHooks from 'hooks/useHandleExplorerTabChange';import * as appContextHooks from 'providers/App/App';@@ -95,10 +94,6 @@ jest.mock('react-redux', () => ({}),}));-jest.spyOn(useUpdateDashboardHooks, 'useUpdateDashboard').mockReturnValue({- mutate: jest.fn(),- isLoading: false,-} as any);jest.spyOn(useOptionsMenuHooks, 'useOptionsMenu').mockReturnValue({options: {selectColumns: [],diff --git a/frontend/src/container/MetricsExplorer/VolumeControl/components/VolumeControlChart/VolumeControlChart.tsx b/frontend/src/container/MetricsExplorer/VolumeControl/components/VolumeControlChart/VolumeControlChart.tsxindex 4fe3fe4168..ffe0b55a98 100644--- a/frontend/src/container/MetricsExplorer/VolumeControl/components/VolumeControlChart/VolumeControlChart.tsx+++ b/frontend/src/container/MetricsExplorer/VolumeControl/components/VolumeControlChart/VolumeControlChart.tsx@@ -3,8 +3,8 @@ import { Typography } from '@signozhq/ui/typography';import { Spin } from 'antd';import { useGetMetricReductionRuleTimeseries } from 'api/generated/services/metrics';import { PANEL_TYPES } from 'constants/queryBuilder';-import BarChart from 'container/DashboardContainer/visualization/charts/BarChart/BarChart';-import { buildBaseConfig } from 'container/DashboardContainer/visualization/panels/utils/baseConfigBuilder';+import BarChart from 'lib/visualization/charts/BarChart/BarChart';+import { buildBaseConfig } from 'lib/visualization/panels/utils/baseConfigBuilder';import { useIsDarkMode } from 'hooks/useDarkMode';import { useResizeObserver } from 'hooks/useDimensions';import { LegendPosition } from 'lib/uPlotV2/components/types';diff --git a/frontend/src/container/NewWidget/LeftContainer/ExplorerAttributeColumns.tsx b/frontend/src/container/NewWidget/LeftContainer/ExplorerAttributeColumns.tsxdeleted file mode 100644index 9707a8660f..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/ExplorerAttributeColumns.tsx+++ /dev/null@@ -1,65 +0,0 @@-import { Empty } from 'antd';-import { Checkbox } from '@signozhq/ui/checkbox';-import { AxiosResponse } from 'axios';-import Spinner from 'components/Spinner';-import { EXCLUDED_COLUMNS } from 'container/OptionsMenu/constants';-import { QueryKeySuggestionsResponseProps } from 'types/api/querySuggestions/types';-import { DataSource } from 'types/common/queryBuilder';--type ExplorerAttributeColumnsProps = {- isLoading: boolean;- data: AxiosResponse<QueryKeySuggestionsResponseProps> | undefined;- searchText: string;- isAttributeKeySelected: (key: string) => boolean;- handleCheckboxChange: (key: string) => void;- dataSource: DataSource;-};--function ExplorerAttributeColumns({- isLoading,- data,- searchText,- isAttributeKeySelected,- handleCheckboxChange,- dataSource,-}: ExplorerAttributeColumnsProps): JSX.Element {- if (isLoading) {- return (- <div className="attribute-columns">- <Spinner size="large" tip="Loading..." height="2vh" />- </div>- );- }-- const filteredAttributeKeys =- Object.values(data?.data?.data?.keys || {})- ?.flat()- ?.filter(- (attributeKey) =>- attributeKey.name.toLowerCase().includes(searchText.toLowerCase()) &&- !EXCLUDED_COLUMNS[dataSource].includes(attributeKey.name),- ) || [];- if (filteredAttributeKeys.length === 0) {- return (- <div className="attribute-columns">- <Empty description="No columns found" />- </div>- );- }-- return (- <div className="attribute-columns">- {filteredAttributeKeys.map((attributeKey: any) => (- <Checkbox- value={isAttributeKeySelected(attributeKey.name)}- onChange={(): void => handleCheckboxChange(attributeKey.name)}- key={attributeKey.name}- >- {attributeKey.name}- </Checkbox>- ))}- </div>- );-}--export default ExplorerAttributeColumns;diff --git a/frontend/src/container/NewWidget/LeftContainer/ExplorerColumnsRenderer.styles.scss b/frontend/src/container/NewWidget/LeftContainer/ExplorerColumnsRenderer.styles.scssdeleted file mode 100644index ccdfab9b46..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/ExplorerColumnsRenderer.styles.scss+++ /dev/null@@ -1,136 +0,0 @@-.explorer-columns-renderer {- margin-top: 10px;- margin-bottom: 30px;-- .title {- display: flex;- align-items: center;- gap: 4px;- padding-left: 16px;- }-- .ant-typography {- color: var(rgba(255, 255, 255, 0.85));- font-family: 'Inter';- font-size: 13px;- font-style: normal;- font-weight: 400;- line-height: 22px;- letter-spacing: 0.5px;- }-- &__divider {- --divider-color: var(--l1-border);- --divider-margin: 8px 0;- }-- .explorer-columns-contents {- display: flex;- justify-content: space-between;- align-items: center;- padding-left: 16px;- padding-right: 8px;-- .explorer-columns {- display: flex;- align-items: center;- gap: 12px;- overflow-x: scroll;- min-width: 90%;-- .explorer-columns-list {- display: flex !important;- }-- .explorer-column-card {- display: flex;- align-items: center;- justify-content: space-between;- padding: 4px;- min-width: 200px;- border-radius: 2px;- border: 1px solid- var(- --colorBorder,- color-mix(in srgb, var(--bg-robin-300) 12%, transparent)- );- background: var(--l1-border);- cursor: unset;-- .explorer-column-title {- display: flex;- align-items: center;- gap: 8px;- font-family: Inter;- font-size: 12px;- cursor: grab;- }-- .lucide-trash2 {- cursor: pointer !important;- }- }- }-- .explorer-columns::-webkit-scrollbar {- height: 0px; /* Height of the scrollbar */- }-- .action-btn {- display: flex;- align-items: center;- justify-content: center;- width: 32px;- height: 32px;- padding: 0px 16px;- border-radius: 2px;- background: var(--bg-robin-400);- }- }-}--.explorer-columns-search {- border: 1px solid color-mix(in srgb, var(--bg-robin-300) 12%, transparent);- border-radius: 6px;- padding: 0px;- background: var(--l1-background);- > input {- height: 32px;- padding: 0 6px;- }-}--.explorer-columns-dropdown {- height: 200px;- background-color: var(--l1-border);- overflow: hidden !important;-- padding: 4px;- .ant-checkbox-wrapper {- padding: 2px 8px !important;- }-- .attribute-columns {- display: flex;- flex-direction: column;- height: 160px;- overflow: scroll;- }-- .attribute-columns::-webkit-scrollbar {- width: 3px; /* Width of the scrollbar */- }-- .attribute-columns::-webkit-scrollbar-track {- background: var(--l1-border); /* Color of the track */- }-- .attribute-columns::-webkit-scrollbar-thumb {- background: var(--l2-foreground); /* Color of the thumb */- border-radius: 4px; /* Roundness of the thumb */- }-- .attribute-columns::-webkit-scrollbar-thumb:hover {- background: var(--l1-border); /* Color of the thumb on hover */- }-}diff --git a/frontend/src/container/NewWidget/LeftContainer/ExplorerColumnsRenderer.tsx b/frontend/src/container/NewWidget/LeftContainer/ExplorerColumnsRenderer.tsxdeleted file mode 100644index fde2b6c747..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/ExplorerColumnsRenderer.tsx+++ /dev/null@@ -1,347 +0,0 @@-/* eslint-disable sonarjs/cognitive-complexity */-import { useEffect, useState } from 'react';-import {- DragDropContext,- Draggable,- Droppable,- DropResult,-} from 'react-beautiful-dnd';-import { Color } from '@signozhq/design-tokens';-import { Input } from '@signozhq/ui/input';-import { Button, Tooltip } from 'antd';-import {- DropdownMenu,- DropdownMenuContent,- DropdownMenuTrigger,-} from '@signozhq/ui/dropdown-menu';-import { Divider } from '@signozhq/ui/divider';-import { Typography } from '@signozhq/ui/typography';-import { FieldDataType } from 'api/v5/v5';-import { SOMETHING_WENT_WRONG } from 'constants/api';-import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { useGetQueryKeySuggestions } from 'hooks/querySuggestions/useGetQueryKeySuggestions';-import { useIsDarkMode } from 'hooks/useDarkMode';-import useDebouncedFn from 'hooks/useDebouncedFunction';-import {- CircleAlert,- CirclePlus,- GripVertical,- Search,- Trash2,-} from '@signozhq/icons';-import { DataSource } from 'types/common/queryBuilder';--import { WidgetGraphProps } from '../types';-import ExplorerAttributeColumns from './ExplorerAttributeColumns';--import './ExplorerColumnsRenderer.styles.scss';--type LogColumnsRendererProps = {- setSelectedLogFields: WidgetGraphProps['setSelectedLogFields'];- selectedLogFields: WidgetGraphProps['selectedLogFields'];- selectedTracesFields: WidgetGraphProps['selectedTracesFields'];- setSelectedTracesFields: WidgetGraphProps['setSelectedTracesFields'];-};--function ExplorerColumnsRenderer({- selectedLogFields,- setSelectedLogFields,- selectedTracesFields,- setSelectedTracesFields,-}: LogColumnsRendererProps): JSX.Element {- const { currentQuery } = useQueryBuilder();- const [searchText, setSearchText] = useState<string>('');- const [querySearchText, setQuerySearchText] = useState<string>('');- const [open, setOpen] = useState<boolean>(false);-- const initialDataSource = currentQuery.builder.queryData[0].dataSource;-- // const { data, isLoading, isError } = useGetAggregateKeys(- // {- // aggregateAttribute: '',- // dataSource: currentQuery.builder.queryData[0].dataSource,- // aggregateOperator: currentQuery.builder.queryData[0].aggregateOperator,- // searchText: querySearchText,- // tagType: '',- // },- // {- // queryKey: [- // currentQuery.builder.queryData[0].dataSource,- // currentQuery.builder.queryData[0].aggregateOperator,- // querySearchText,- // ],- // },- // );-- const { data, isLoading, isError } = useGetQueryKeySuggestions(- {- searchText: querySearchText,- signal: currentQuery.builder.queryData[0].dataSource,- },- {- queryKey: [- currentQuery.builder.queryData[0].dataSource,- currentQuery.builder.queryData[0].aggregateOperator,- querySearchText,- ],- },- );-- const isAttributeKeySelected = (key: string): boolean => {- if (initialDataSource === DataSource.LOGS && selectedLogFields) {- return selectedLogFields.some((field) => field.name === key);- }- if (initialDataSource === DataSource.TRACES && selectedTracesFields) {- return selectedTracesFields.some((field) => field.name === key);- }- return false;- };-- const handleCheckboxChange = (key: string): void => {- if (- initialDataSource === DataSource.LOGS &&- setSelectedLogFields !== undefined- ) {- if (selectedLogFields) {- if (isAttributeKeySelected(key)) {- setSelectedLogFields(- selectedLogFields.filter((field) => field.name !== key),- );- } else {- setSelectedLogFields([- ...selectedLogFields,- { dataType: 'string', name: key, type: '' },- ]);- }- } else {- setSelectedLogFields([{ dataType: 'string', name: key, type: '' }]);- }- } else if (- initialDataSource === DataSource.TRACES &&- setSelectedTracesFields !== undefined- ) {- const selectedField = Object.values(data?.data?.data?.keys || {})- ?.flat()- ?.find((attributeKey) => attributeKey.name === key);-- if (selectedTracesFields) {- if (isAttributeKeySelected(key)) {- setSelectedTracesFields(- selectedTracesFields.filter((field) => field.name !== key),- );- } else if (selectedField) {- setSelectedTracesFields([- ...selectedTracesFields,- {- ...selectedField,- fieldDataType: selectedField.fieldDataType as FieldDataType,- },- ]);- }- } else if (selectedField) {- setSelectedTracesFields([- {- ...selectedField,- fieldDataType: selectedField.fieldDataType as FieldDataType,- },- ]);- }- }- setOpen(false);- };-- const debouncedSetQuerySearchText = useDebouncedFn((value) => {- setQuerySearchText(value as string);- }, 400);-- useEffect(- () => (): void => {- debouncedSetQuerySearchText.cancel();- },- [debouncedSetQuerySearchText],- );-- const handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>): void => {- setSearchText(e.target.value);- debouncedSetQuerySearchText(e.target.value);- };-- const handleOpenChange = (nextOpen: boolean): void => {- setOpen(nextOpen);- if (nextOpen) {- setSearchText('');- }- };-- const removeSelectedLogField = (name: string): void => {- if (- initialDataSource === DataSource.LOGS &&- setSelectedLogFields &&- selectedLogFields- ) {- setSelectedLogFields(- selectedLogFields.filter((field) => field.name !== name),- );- }- if (- initialDataSource === DataSource.TRACES &&- setSelectedTracesFields &&- selectedTracesFields- ) {- setSelectedTracesFields(- selectedTracesFields.filter((field) => field.name !== name),- );- }- };-- const onDragEnd = (result: DropResult): void => {- if (!result.destination) {- return;- }-- if (- initialDataSource === DataSource.LOGS &&- selectedLogFields &&- setSelectedLogFields- ) {- const items = [...selectedLogFields];- const [reorderedItem] = items.splice(result.source.index, 1);- items.splice(result.destination.index, 0, reorderedItem);-- setSelectedLogFields(items);- }- if (- initialDataSource === DataSource.TRACES &&- selectedTracesFields &&- setSelectedTracesFields- ) {- const items = [...selectedTracesFields];- const [reorderedItem] = items.splice(result.source.index, 1);- items.splice(result.destination.index, 0, reorderedItem);-- setSelectedTracesFields(items);- }- };-- const isDarkMode = useIsDarkMode();-- return (- <div className="explorer-columns-renderer">- <div className="title">- <Typography.Text>Columns</Typography.Text>- {isError && (- <Tooltip title={SOMETHING_WENT_WRONG}>- <CircleAlert size={16} data-testid="alert-circle-icon" />- </Tooltip>- )}- </div>- <Divider className="explorer-columns-renderer__divider" />- {!isError && (- <div className="explorer-columns-contents">- <DragDropContext onDragEnd={onDragEnd}>- <Droppable droppableId="drag-drop-list" direction="horizontal">- {(provided): JSX.Element => (- <div- className="explorer-columns"- {...provided.droppableProps}- ref={provided.innerRef}- >- {initialDataSource === DataSource.LOGS &&- selectedLogFields &&- selectedLogFields.map((field, index) => (- // eslint-disable-next-line react/no-array-index-key- <Draggable key={index} draggableId={index.toString()} index={index}>- {(dragProvided): JSX.Element => (- <div- className="explorer-column-card"- ref={dragProvided.innerRef}- {...dragProvided.draggableProps}- {...dragProvided.dragHandleProps}- >- <div className="explorer-column-title">- <GripVertical size={12} color="#5A5A5A" />- {field.name}- </div>- <Trash2- size={12}- color="red"- onClick={(): void => removeSelectedLogField(field.name)}- data-testid="trash-icon"- />- </div>- )}- </Draggable>- ))}- {initialDataSource === DataSource.TRACES &&- selectedTracesFields &&- selectedTracesFields.map((field, index) => (- // eslint-disable-next-line react/no-array-index-key- <Draggable key={index} draggableId={index.toString()} index={index}>- {(dragProvided): JSX.Element => (- <div- className="explorer-column-card"- ref={dragProvided.innerRef}- {...dragProvided.draggableProps}- {...dragProvided.dragHandleProps}- >- <div className="explorer-column-title">- <GripVertical size={12} color="#5A5A5A" />- {field?.name || (field as any)?.key}- </div>- <Trash2- size={12}- color="red"- onClick={(): void =>- removeSelectedLogField(field?.name || (field as any)?.key)- }- data-testid="trash-icon"- />- </div>- )}- </Draggable>- ))}- </div>- )}- </Droppable>- </DragDropContext>- <div>- <DropdownMenu open={open} onOpenChange={handleOpenChange}>- <DropdownMenuTrigger asChild>- <Button- className="action-btn"- data-testid="add-columns-button"- icon={- <CirclePlus- size={16}- color={isDarkMode ? Color.BG_INK_400 : Color.BG_VANILLA_100}- />- }- />- </DropdownMenuTrigger>- <DropdownMenuContent side="top" className="explorer-columns-dropdown">- <Input- type="text"- placeholder="Search"- className="explorer-columns-search"- value={searchText}- onChange={handleSearchChange}- prefix={<Search size={16} style={{ padding: '6px' }} />}- />- <ExplorerAttributeColumns- isLoading={isLoading}- data={data}- searchText={searchText}- isAttributeKeySelected={isAttributeKeySelected}- handleCheckboxChange={handleCheckboxChange}- dataSource={initialDataSource}- />- </DropdownMenuContent>- </DropdownMenu>- </div>- </div>- )}- </div>- );-}--export default ExplorerColumnsRenderer;diff --git a/frontend/src/container/NewWidget/LeftContainer/LeftContainer.styles.scss b/frontend/src/container/NewWidget/LeftContainer/LeftContainer.styles.scssdeleted file mode 100644index d87e0e8b10..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/LeftContainer.styles.scss+++ /dev/null@@ -1,9 +0,0 @@-.query-section-left-container {- border: none;- border-top: 1px solid var(--l1-border);- background: var(--l1-background);-- .ant-card-body {- padding: 0px;- }-}diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QuerySection.styles.scss b/frontend/src/container/NewWidget/LeftContainer/QuerySection/QuerySection.styles.scssdeleted file mode 100644index 376eb3b498..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QuerySection.styles.scss+++ /dev/null@@ -1,76 +0,0 @@-.dashboard-navigation {- // Meant to fix the query builder colors- --input-background: var(--l2-background);- --input-hover-background: var(--l2-background);- --input-focus-background: var(--l2-background);- --input-border-color: var(--l2-border);- --input-hover-border-color: var(--internal-ant-border-color-hover);- --input-focus-border-color: var(--internal-ant-border-color-hover);-- .run-query-dashboard-btn {- min-width: 180px;- }- .ant-tabs-tab {- border: none !important;- margin-left: 0px !important;- padding: 0px !important;-- .nav-btns {- display: flex;- align-items: center;- justify-content: center;- gap: 4px;- color: var(--l1-foreground);- font-family: Inter;- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 18px; /* 150% */- letter-spacing: -0.06px;- padding: 7px 23px;-- .prom-ql-icon {- height: 14px;- width: 14px;- color: var(--l2-foreground);- }- }- .ant-btn-default {- border-color: transparent;- box-shadow: none;- }- }- .ant-tabs-tab-active {- .nav-btns {- background: var(--l1-border) !important;- }- }-- .ant-tabs-nav {- margin: 0px;-- .ant-tabs-nav-wrap {- padding: 8px 16px;- }-- .ant-tabs-extra-content {- padding-right: 8px;- }- }- .ant-tabs-nav::before {- border-bottom: none !important;- }- .ant-tabs-nav-list {- border-radius: 2px;- border: 1px solid var(--l1-border);- background: var(--l2-background);- box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);- }- .ant-tabs-tab + .ant-tabs-tab {- border-left: 1px solid var(--l1-border) !important;- }- .stage-run-query {- display: flex;- align-items: center;- }-}diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsx b/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsxdeleted file mode 100644index ad500ece09..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/index.tsx+++ /dev/null@@ -1,203 +0,0 @@-import { useCallback, useEffect, useMemo } from 'react';-import { Color } from '@signozhq/design-tokens';-import { Button, Tabs } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import logEvent from 'api/common/logEvent';-import PromQLIcon from 'assets/Dashboard/PromQl';-import { QueryBuilderV2 } from 'components/QueryBuilderV2/QueryBuilderV2';-import TextToolTip from 'components/TextToolTip';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { QBShortcuts } from 'constants/shortcuts/QBShortcuts';-import { PANEL_TYPE_TO_QUERY_TYPES } from 'container/NewWidget/utils';-import RunQueryBtn from 'container/QueryBuilder/components/RunQueryBtn/RunQueryBtn';-import { QueryBuilderProps } from 'container/QueryBuilder/QueryBuilder.interfaces';-import { useKeyboardHotkeys } from 'hooks/hotkeys/useKeyboardHotkeys';-import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { useShareBuilderUrl } from 'hooks/queryBuilder/useShareBuilderUrl';-import { useIsDarkMode } from 'hooks/useDarkMode';-import { Atom, Terminal } from '@signozhq/icons';-import { Widgets } from 'types/api/dashboard/getAll';-import { EQueryType } from 'types/common/dashboard';--import ClickHouseQueryContainer from './QueryBuilder/ClickHouse';-import PromQLQueryContainer from './QueryBuilder/promQL';--import './QuerySection.styles.scss';-function QuerySection({- selectedGraph,- isLoadingQueries,- handleCancelQuery,- selectedWidget,- dashboardVersion,- dashboardId,- dashboardName,- isNewPanel,-}: QueryProps): JSX.Element {- const {- currentQuery,- handleRunQuery: handleRunQueryFromQueryBuilder,- redirectWithQueryBuilderData,- } = useQueryBuilder();- const { registerShortcut, deregisterShortcut } = useKeyboardHotkeys();-- const isDarkMode = useIsDarkMode();-- const { query } = selectedWidget;-- useShareBuilderUrl({ defaultValue: query });-- const handleQueryCategoryChange = useCallback(- (qCategory: string): void => {- const currentQueryType = qCategory as EQueryType;- redirectWithQueryBuilderData({- ...currentQuery,- queryType: currentQueryType,- });- },- [currentQuery, redirectWithQueryBuilderData],- );-- const handleRunQuery = (): void => {- logEvent('Panel Edit: Stage and run query', {- dataSource: currentQuery.builder?.queryData?.[0]?.dataSource,- panelType: selectedWidget.panelTypes,- queryType: currentQuery.queryType,- widgetId: selectedWidget.id,- dashboardId,- dashboardName,- isNewPanel,- });- handleRunQueryFromQueryBuilder();- };-- const filterConfigs: QueryBuilderProps['filterConfigs'] = useMemo(() => {- const config: QueryBuilderProps['filterConfigs'] = {- stepInterval: { isHidden: false, isDisabled: false },- };-- return config;- }, []);-- const queryComponents = useMemo(- (): QueryBuilderProps['queryComponents'] => ({}),- [],- );-- const items = useMemo(() => {- const supportedQueryTypes = PANEL_TYPE_TO_QUERY_TYPES[selectedGraph] || [];-- const queryTypeComponents = {- [EQueryType.QUERY_BUILDER]: {- icon: <Atom size={14} />,- label: 'Query Builder',- component: (- <div className="query-builder-v2-container">- <QueryBuilderV2- panelType={selectedGraph}- filterConfigs={filterConfigs}- showTraceOperator={selectedGraph !== PANEL_TYPES.LIST}- version={dashboardVersion || 'v3'}- isListViewPanel={selectedGraph === PANEL_TYPES.LIST}- queryComponents={queryComponents}- signalSourceChangeEnabled- savePreviousQuery- />- </div>- ),- },- [EQueryType.CLICKHOUSE]: {- icon: <Terminal size={14} />,- label: 'ClickHouse Query',- component: <ClickHouseQueryContainer />,- },- [EQueryType.PROM]: {- icon: (- <PromQLIcon- fillColor={isDarkMode ? Color.BG_VANILLA_200 : Color.BG_INK_300}- />- ),- label: 'PromQL',- component: <PromQLQueryContainer />,- },- };-- return supportedQueryTypes.map((queryType) => ({- key: queryType,- label: (- <Button className="nav-btns">- {queryTypeComponents[queryType].icon}- <Typography>{queryTypeComponents[queryType].label}</Typography>- </Button>- ),- tab: <Typography>{queryTypeComponents[queryType].label}</Typography>,- children: queryTypeComponents[queryType].component,- }));- }, [- queryComponents,- selectedGraph,- filterConfigs,- dashboardVersion,- isDarkMode,- ]);-- useEffect(() => {- registerShortcut(QBShortcuts.StageAndRunQuery, handleRunQuery);-- return (): void => {- deregisterShortcut(QBShortcuts.StageAndRunQuery);- };- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [handleRunQuery]);-- useEffect(() => {- // switch to query builder if query type is not supported- if (- (selectedGraph === PANEL_TYPES.TABLE || selectedGraph === PANEL_TYPES.PIE) &&- currentQuery.queryType === EQueryType.PROM- ) {- handleQueryCategoryChange(EQueryType.QUERY_BUILDER);- }- }, [currentQuery, handleQueryCategoryChange, selectedGraph]);-- return (- <div className="dashboard-navigation">- <Tabs- type="card"- style={{ width: '100%' }}- defaultActiveKey={- selectedGraph !== PANEL_TYPES.EMPTY_WIDGET- ? currentQuery.queryType- : currentQuery.builder.queryData[0].dataSource- }- activeKey={currentQuery.queryType}- onChange={handleQueryCategoryChange}- tabBarExtraContent={- <span style={{ display: 'flex', gap: '1rem', alignItems: 'center' }}>- <TextToolTip text="This will temporarily save the current query and graph state. This will persist across tab change" />- <RunQueryBtn- className="run-query-dashboard-btn"- label="Stage & Run Query"- onStageRunQuery={handleRunQuery}- isLoadingQueries={isLoadingQueries}- handleCancelQuery={handleCancelQuery}- />- </span>- }- items={items}- />- </div>- );-}--interface QueryProps {- selectedGraph: PANEL_TYPES;- isLoadingQueries: boolean;- handleCancelQuery: () => void;- selectedWidget: Widgets;- dashboardVersion?: string;- dashboardId?: string;- dashboardName?: string;- isNewPanel?: boolean;-}--export default QuerySection;diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/styles.ts b/frontend/src/container/NewWidget/LeftContainer/QuerySection/styles.tsdeleted file mode 100644index 3d97d169d8..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/styles.ts+++ /dev/null@@ -1,43 +0,0 @@-import { Button } from 'antd';-import styled from 'styled-components';--export const InputContainer = styled.div`- width: 50%;-`;--export const Container = styled.div`- margin-top: 1rem;- display: flex;- flex-direction: column;-`;--export const QueryButton = styled(Button)`- &&& {- display: flex;- align-items: center;- }-`;--export const QueryWrapper = styled.div`- width: 100%;- margin: 0;- padding: 0.5rem 0;- display: flex;- flex-direction: column;-`;--export const QueryBuilderWrapper = styled.div<{ isDarkMode: boolean }>`- background: ${({ isDarkMode }): string => (isDarkMode ? '#000' : '#efefef')};-`;--export const ButtonContainer = styled.div`- &&& {- display: flex;- align-items: center;- flex-direction: column;-- > button {- margin-bottom: 1rem;- }- }-`;diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraph.styles.scss b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraph.styles.scssdeleted file mode 100644index 60cecb3293..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraph.styles.scss+++ /dev/null@@ -1,34 +0,0 @@-.widget-graph {- border: none;- background-color: unset;- background-image: radial-gradient(var(--l1-border) 1px, transparent 0);- background-size: 20px 20px;- padding: 16px;-- .header {- display: flex;- align-items: center;- justify-content: space-between;-- .header-left {- display: flex;- align-items: center;- gap: 8px;- }-- .plot-tag {- display: inline-flex;- padding: 4px 4px 4px 6px;- align-items: center;- gap: 6px;- border-radius: 4px;- background: var(--l3-background);- backdrop-filter: blur(6px);- width: fit-content;- }- }-- .header:has(.date-time-selector:only-child) {- justify-content: end;- }-}diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraphContainer.tsx b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraphContainer.tsxdeleted file mode 100644index 4a18c9d37f..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraphContainer.tsx+++ /dev/null@@ -1,72 +0,0 @@-import { Card } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import ErrorInPlace from 'components/ErrorInPlace/ErrorInPlace';-import Spinner from 'components/Spinner';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { WidgetGraphContainerProps } from 'container/NewWidget/types';-import APIError from 'types/api/error';-import { getSortedSeriesData } from 'utils/getSortedSeriesData';--import { NotFoundContainer } from './styles';-import { populateMultipleResults } from './util';-import WidgetGraph from './WidgetGraphs';--function WidgetGraphContainer({- selectedGraph,- queryResponse,- setRequestData,- selectedWidget,- isLoadingPanelData,- enableDrillDown = false,-}: WidgetGraphContainerProps): JSX.Element {- if (queryResponse.data && selectedGraph === PANEL_TYPES.BAR) {- const sortedSeriesData = getSortedSeriesData(- queryResponse.data?.payload.data.result,- );- queryResponse.data.payload.data.result = sortedSeriesData;- }-- if (queryResponse.data && selectedGraph === PANEL_TYPES.PIE) {- const transformedData = populateMultipleResults(queryResponse?.data);- queryResponse.data = transformedData;- }-- if (selectedWidget === undefined) {- return <Card>Invalid widget</Card>;- }-- if (queryResponse?.error) {- return (- <NotFoundContainer>- <ErrorInPlace error={queryResponse.error as APIError} />- </NotFoundContainer>- );- }- if (queryResponse.isLoading && selectedGraph !== PANEL_TYPES.LIST) {- return <Spinner size="large" tip="Loading..." />;- }-- if (isLoadingPanelData) {- return <Spinner size="large" tip="Loading..." />;- }-- if (queryResponse.isIdle) {- return (- <NotFoundContainer>- <Typography>No Data</Typography>- </NotFoundContainer>- );- }-- return (- <WidgetGraph- selectedWidget={selectedWidget}- queryResponse={queryResponse}- setRequestData={setRequestData}- selectedGraph={selectedGraph}- enableDrillDown={enableDrillDown}- />- );-}--export default WidgetGraphContainer;diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraphs.tsx b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraphs.tsxdeleted file mode 100644index 124c5608c7..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/WidgetGraphs.tsx+++ /dev/null@@ -1,214 +0,0 @@-import {- Dispatch,- SetStateAction,- useCallback,- useEffect,- useRef,- useState,-} from 'react';-import { UseQueryResult } from 'react-query';-// eslint-disable-next-line no-restricted-imports-import { useDispatch } from 'react-redux';-import { useLocation } from 'react-router-dom';-import { useNavigateToExplorer } from 'components/CeleryTask/useNavigateToExplorer';-import { ToggleGraphProps } from 'components/Graph/types';-import { QueryParams } from 'constants/query';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import { handleGraphClick } from 'container/GridCardLayout/GridCard/utils';-import { useGraphClickToShowButton } from 'container/GridCardLayout/useGraphClickToShowButton';-import useNavigateToExplorerPages from 'container/GridCardLayout/useNavigateToExplorerPages';-import PanelWrapper from 'container/PanelWrapper/PanelWrapper';-import { CustomTimeType } from 'container/TopNav/DateTimeSelectionV2/types';-import { useIsDarkMode } from 'hooks/useDarkMode';-import { useNotifications } from 'hooks/useNotifications';-import { useSafeNavigate } from 'hooks/useSafeNavigate';-import useUrlQuery from 'hooks/useUrlQuery';-import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';-import GetMinMax from 'lib/getMinMax';-import getTimeString from 'lib/getTimeString';-import { UpdateTimeInterval } from 'store/actions';-import { Widgets } from 'types/api/dashboard/getAll';-import { MetricQueryRangeSuccessResponse } from 'types/api/metrics/getQueryRange';-import { DataSource } from 'types/common/queryBuilder';--function WidgetGraph({- selectedWidget,- queryResponse,- setRequestData,- selectedGraph,- enableDrillDown = false,-}: WidgetGraphProps): JSX.Element {- const graphRef = useRef<HTMLDivElement>(null);- const lineChartRef = useRef<ToggleGraphProps>();- const dispatch = useDispatch();- const urlQuery = useUrlQuery();- const location = useLocation();- const { safeNavigate } = useSafeNavigate();-- // Add legend state management similar to dashboard components- const [graphVisibility, setGraphVisibility] = useState<boolean[]>(- Array((queryResponse.data?.payload?.data?.result?.length || 0) + 1).fill(- true,- ),- );-- // Initialize graph visibility when data changes- useEffect(() => {- if (queryResponse.data?.payload?.data?.result) {- setGraphVisibility(- Array(queryResponse.data.payload.data.result.length + 1).fill(true),- );- }- }, [queryResponse.data?.payload?.data?.result]);-- // Apply graph visibility when lineChartRef is available- useEffect(() => {- if (!lineChartRef.current) {- return;- }-- graphVisibility.forEach((state, index) => {- lineChartRef.current?.toggleGraph(index, state);- });- }, [graphVisibility]);-- const handleBackNavigation = (): void => {- const searchParams = new URLSearchParams(window.location.search);- const startTime = searchParams.get(QueryParams.startTime);- const endTime = searchParams.get(QueryParams.endTime);- const relativeTime = searchParams.get(- QueryParams.relativeTime,- ) as CustomTimeType;-- if (relativeTime) {- dispatch(UpdateTimeInterval(relativeTime));- } else if (startTime && endTime && startTime !== endTime) {- dispatch(- UpdateTimeInterval('custom', [- parseInt(getTimeString(startTime), 10),- parseInt(getTimeString(endTime), 10),- ]),- );- }- };-- const onDragSelect = useCallback(- (start: number, end: number): void => {- const startTimestamp = Math.trunc(start);- const endTimestamp = Math.trunc(end);-- if (startTimestamp !== endTimestamp) {- dispatch(UpdateTimeInterval('custom', [startTimestamp, endTimestamp]));- }-- const { maxTime, minTime } = GetMinMax('custom', [- startTimestamp,- endTimestamp,- ]);-- urlQuery.set(QueryParams.startTime, minTime.toString());- urlQuery.set(QueryParams.endTime, maxTime.toString());- const generatedUrl = `${location.pathname}?${urlQuery.toString()}`;- safeNavigate(generatedUrl);- },- [dispatch, location.pathname, safeNavigate, urlQuery],- );-- useEffect(() => {- window.addEventListener('popstate', handleBackNavigation);-- return (): void => {- window.removeEventListener('popstate', handleBackNavigation);- };- // eslint-disable-next-line react-hooks/exhaustive-deps- }, []);-- const isDarkMode = useIsDarkMode();-- // context redirection to explorer pages- const graphClick = useGraphClickToShowButton({- graphRef,- isButtonEnabled: (selectedWidget?.query?.builder?.queryData &&- Array.isArray(selectedWidget.query.builder.queryData)- ? selectedWidget.query.builder.queryData- : []- ).some(- (q) =>- q.dataSource === DataSource.TRACES || q.dataSource === DataSource.LOGS,- ),- buttonClassName: 'view-onclick-show-button',- });-- const navigateToExplorer = useNavigateToExplorer();- const navigateToExplorerPages = useNavigateToExplorerPages();- const { notifications } = useNotifications();-- const graphClickHandler = (- xValue: number,- yValue: number,- mouseX: number,- mouseY: number,- metric?: { [key: string]: string },- queryData?: { queryName: string; inFocusOrNot: boolean },- ): void => {- handleGraphClick({- xValue,- yValue,- mouseX,- mouseY,- metric,- queryData,- widget: selectedWidget,- navigateToExplorerPages,- navigateToExplorer,- notifications,- graphClick,- });- };-- return (- <div- ref={graphRef}- style={{- height: '100%',- width: '100%',- marginTop: '16px',- borderRadius: '3px',- border: isDarkMode- ? '1px solid var(--bg-slate-500)'- : '1px solid var(--bg-vanilla-300)',- background: isDarkMode- ? 'linear-gradient(0deg, rgba(171, 189, 255, 0.00) 0%, rgba(171, 189, 255, 0.00) 100%), #0B0C0E'- : 'var(--bg-vanilla-100)',- }}- >- <PanelWrapper- panelMode={PanelMode.DASHBOARD_EDIT}- widget={selectedWidget}- queryResponse={queryResponse}- setRequestData={setRequestData}- onDragSelect={onDragSelect}- selectedGraph={selectedGraph}- onClickHandler={graphClickHandler}- graphVisibility={graphVisibility}- setGraphVisibility={setGraphVisibility}- enableDrillDown={enableDrillDown}- />- </div>- );-}--interface WidgetGraphProps {- selectedWidget: Widgets;- queryResponse: UseQueryResult<MetricQueryRangeSuccessResponse, Error>;- setRequestData: Dispatch<SetStateAction<GetQueryResultsProps>>;- selectedGraph: PANEL_TYPES;- enableDrillDown?: boolean;-}--export default WidgetGraph;--WidgetGraph.defaultProps = {- enableDrillDown: false,-};diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsx b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsxdeleted file mode 100644index c14e3d096e..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsx+++ /dev/null@@ -1,73 +0,0 @@-import { memo } from 'react';-import { SolidInfoCircle } from '@signozhq/icons';-import QueryCancelledPlaceholder from 'components/QueryCancelledPlaceholder';-import WarningPopover from 'components/WarningPopover/WarningPopover';-import { Card } from 'container/GridCardLayout/styles';-import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';-import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { useIsDarkMode } from 'hooks/useDarkMode';-import { isEmpty } from 'lodash-es';-import { Warning } from 'types/api';--import { WidgetGraphContainerProps } from '../../types';-import PlotTag from './PlotTag';-import { AlertIconContainer, Container } from './styles';-import WidgetGraphComponent from './WidgetGraphContainer';--import './WidgetGraph.styles.scss';--function WidgetGraph({- selectedGraph,- queryResponse,- setRequestData,- selectedWidget,- isLoadingPanelData,- enableDrillDown = false,- isCancelled = false,-}: WidgetGraphContainerProps): JSX.Element {- const { currentQuery } = useQueryBuilder();-- const isDarkMode = useIsDarkMode();-- if (selectedWidget === undefined) {- return (- <Card $panelType={selectedGraph} isDarkMode={isDarkMode}>- Invalid widget- </Card>- );- }-- return (- <Container $panelType={selectedGraph} className="widget-graph">- <div className="header">- <div className="header-left">- <PlotTag queryType={currentQuery.queryType} panelType={selectedGraph} />- {!isEmpty(queryResponse.data?.warning) && (- <WarningPopover warningData={queryResponse.data?.warning as Warning} />- )}- </div>- <DateTimeSelectionV2 showAutoRefresh={false} hideShareModal />- </div>- {!isCancelled && queryResponse.error && (- <AlertIconContainer color="red" title={queryResponse.error.message}>- <SolidInfoCircle size="md" />- </AlertIconContainer>- )}-- {isCancelled ? (- <QueryCancelledPlaceholder subText='Click "Run Query" to reload the chart.' />- ) : (- <WidgetGraphComponent- isLoadingPanelData={isLoadingPanelData}- selectedGraph={selectedGraph}- queryResponse={queryResponse}- setRequestData={setRequestData}- selectedWidget={selectedWidget}- enableDrillDown={enableDrillDown}- />- )}- </Container>- );-}--export default memo(WidgetGraph);diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/styles.ts b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/styles.tsdeleted file mode 100644index e671187eac..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/styles.ts+++ /dev/null@@ -1,42 +0,0 @@-import { Card, Tooltip } from 'antd';-import { PANEL_TYPES } from 'constants/queryBuilder';-import styled from 'styled-components';--interface Props {- $panelType: PANEL_TYPES;-}--export const Container = styled(Card)<Props>`- &&& {- position: relative;- }-- .ant-card-body {- height: 60vh;- display: flex;- flex-direction: column;- padding: 0px;- }-`;--export const AlertIconContainer = styled(Tooltip)`- position: absolute;- top: 10px;- left: 10px;-`;--export const NotFoundContainer = styled.div`- display: flex;- justify-content: center;- align-items: center;- min-height: 47vh;-`;--export const PlotTagWrapperStyled = styled.div<Props>`- margin-left: 2rem;- margin-top: ${({ $panelType }): string =>- $panelType === PANEL_TYPES.TABLE ? '1rem' : '0'};-- margin-bottom: ${({ $panelType }): string =>- $panelType === PANEL_TYPES.TABLE ? '1rem' : '0'};-`;diff --git a/frontend/src/container/NewWidget/LeftContainer/__test__/ExplorerColumnsRenderer.test.tsx b/frontend/src/container/NewWidget/LeftContainer/__test__/ExplorerColumnsRenderer.test.tsxdeleted file mode 100644index 1b0589fdae..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/__test__/ExplorerColumnsRenderer.test.tsx+++ /dev/null@@ -1,505 +0,0 @@-import React from 'react';-import { DropResult } from 'react-beautiful-dnd';-import { QueryClient, QueryClientProvider } from 'react-query';-import { render, screen, waitFor } from '@testing-library/react';-import userEvent from '@testing-library/user-event';-import { TelemetryFieldKey } from 'api/v5/v5';-import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { useGetQueryKeySuggestions } from 'hooks/querySuggestions/useGetQueryKeySuggestions';-import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';-import { DataSource } from 'types/common/queryBuilder';--import ExplorerColumnsRenderer from '../ExplorerColumnsRenderer';--// Mock hooks-jest.mock('hooks/queryBuilder/useQueryBuilder');-jest.mock('hooks/querySuggestions/useGetQueryKeySuggestions');--// Mock react-beautiful-dnd-let onDragEndMock: ((result: DropResult) => void) | undefined;--jest.mock('react-beautiful-dnd', () => ({- DragDropContext: jest.fn(- ({- children,- onDragEnd,- }: {- children: React.ReactNode;- onDragEnd: (result: any) => void;- }) => {- onDragEndMock = onDragEnd;- return children;- },- ),- Droppable: jest.fn(- ({ children }: { children: (provided: any) => React.ReactNode }) =>- children({- draggableProps: { style: {} },- innerRef: jest.fn(),- placeholder: null,- }),- ),- Draggable: jest.fn(- ({ children }: { children: (provided: any) => React.ReactNode }) =>- children({- draggableProps: { style: {} },- innerRef: jest.fn(),- dragHandleProps: {},- }),- ),-}));--// Create a wrapper component with QueryClient-const createWrapper = (): React.FC<{ children: React.ReactNode }> => {- const queryClient = new QueryClient({- defaultOptions: {- queries: {- retry: false,- },- },- });-- function Wrapper({ children }: { children: React.ReactNode }): JSX.Element {- return (- <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>- );- }-- return Wrapper;-};--describe('ExplorerColumnsRenderer', () => {- const mockSetSelectedLogFields = jest.fn();- const mockSetSelectedTracesFields = jest.fn();- const Wrapper = createWrapper();-- beforeEach(() => {- jest.clearAllMocks();- // Reset mock implementations for useQueryBuilder and useGetQueryKeySuggestions before each test- // to ensure a clean state for each test case unless explicitly overridden.- (useQueryBuilder as jest.Mock).mockReturnValue({- currentQuery: {- builder: {- queryData: [- {- dataSource: DataSource.LOGS,- aggregateOperator: 'count',- },- ],- },- },- });- (useGetQueryKeySuggestions as jest.Mock).mockReturnValue({- data: {- data: {- data: {- keys: {- attributeKeys: [- { name: 'attribute1', dataType: 'string', type: '' },- { name: 'attribute2', dataType: 'string', type: '' },- { name: 'another_attribute', dataType: 'string', type: '' },- ],- },- },- },- },- isLoading: false,- isError: false,- });- });-- it('renders correctly with default props and displays "Columns" title', () => {- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- expect(screen.getByText('Columns')).toBeInTheDocument();- expect(screen.getByTestId('add-columns-button')).toBeInTheDocument();- });-- it('displays error message when data fetching fails', () => {- (useGetQueryKeySuggestions as jest.Mock).mockReturnValueOnce({- data: undefined,- isLoading: false,- isError: true,- });-- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- expect(screen.getByTestId('alert-circle-icon')).toBeInTheDocument();- });-- it('opens and closes the dropdown', async () => {- const user = userEvent.setup({ pointerEventsCheck: 0 });- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- const addButton = screen.getByTestId('add-columns-button');- await user.click(addButton);-- expect(screen.getByPlaceholderText('Search')).toBeInTheDocument();- expect(screen.getByText('attribute1')).toBeInTheDocument();-- await user.click(addButton);- await waitFor(() => {- expect(screen.queryByRole('menu')).not.toBeInTheDocument();- });- });-- it('filters attribute keys based on search text', async () => {- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- await userEvent.click(screen.getByTestId('add-columns-button'));-- const searchInput = screen.getByPlaceholderText('Search');- await userEvent.type(searchInput, 'another');-- await waitFor(() => {- expect(screen.queryByText('attribute1')).not.toBeInTheDocument();- expect(screen.getByText('another_attribute')).toBeInTheDocument();- });-- await userEvent.clear(searchInput);- await userEvent.type(searchInput, 'attribute');-- await waitFor(() => {- expect(screen.getByText('attribute1')).toBeInTheDocument();- expect(screen.getByText('attribute2')).toBeInTheDocument();- expect(screen.getByText('another_attribute')).toBeInTheDocument();- });- });-- describe('Log Data Source', () => {- it('adds a log field when checkbox is checked', async () => {- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- await userEvent.click(screen.getByTestId('add-columns-button'));- const checkbox = screen.getByLabelText('attribute1');- await userEvent.click(checkbox);-- expect(mockSetSelectedLogFields).toHaveBeenCalledWith([- { dataType: 'string', name: 'attribute1', type: '' },- ]);- });-- it('removes a log field when checkbox is unchecked', async () => {- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[{ dataType: 'string', name: 'attribute1', type: '' }]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- await userEvent.click(screen.getByTestId('add-columns-button'));- const checkbox = screen.getByLabelText('attribute1');- await userEvent.click(checkbox);-- expect(mockSetSelectedLogFields).toHaveBeenCalledWith([]);- });-- it('removes a log field using the trash icon', async () => {- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[{ dataType: 'string', name: 'attribute1', type: '' }]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- expect(screen.getByText('attribute1')).toBeInTheDocument();- const trashIcon = screen.getByTestId('trash-icon');- await userEvent.click(trashIcon);-- expect(mockSetSelectedLogFields).toHaveBeenCalledWith([]);- });-- it('reorders log fields on drag and drop', () => {- const initialSelectedFields = [- { dataType: 'string', name: 'field1', type: '' },- { dataType: 'string', name: 'field2', type: '' },- ];-- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={initialSelectedFields}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- const field1Element = screen.getByText('field1');- const dragDropContext = field1Element.closest('.explorer-columns');-- if (dragDropContext && onDragEndMock) {- // Simulate onDragEnd directly- onDragEndMock({- source: { index: 0, droppableId: 'drag-drop-list' },- destination: { index: 1, droppableId: 'drag-drop-list' },- draggableId: '0',- type: 'DEFAULT',- reason: 'DROP',- combine: undefined,- mode: 'FLUID',- });-- expect(mockSetSelectedLogFields).toHaveBeenCalledWith([- { dataType: 'string', name: 'field2', type: '' },- { dataType: 'string', name: 'field1', type: '' },- ]);- } else {- fail('DragDropContext or onDragEndMock not found');- }- });- });-- describe('Trace Data Source', () => {- beforeEach(() => {- (useQueryBuilder as jest.Mock).mockReturnValue({- currentQuery: {- builder: {- queryData: [- {- dataSource: DataSource.TRACES,- aggregateOperator: 'count',- },- ],- },- },- });-- (useGetQueryKeySuggestions as jest.Mock).mockReturnValue({- data: {- data: {- data: {- keys: {- attributeKeys: [- { name: 'trace_attribute1', dataType: 'string', type: 'tag' },- { name: 'trace_attribute2', dataType: 'string', type: 'tag' },- ],- },- },- },- },- isLoading: false,- isError: false,- });- });-- it('adds a trace field when checkbox is checked', async () => {- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- await userEvent.click(screen.getByTestId('add-columns-button'));- const checkbox = screen.getByLabelText('trace_attribute1');- await userEvent.click(checkbox);-- expect(mockSetSelectedTracesFields).toHaveBeenCalledWith([- { name: 'trace_attribute1', dataType: 'string', type: 'tag' },- ]);- });-- it('removes a trace field when checkbox is unchecked', async () => {- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[- {- name: 'trace_attribute1',- fieldDataType: DataTypes.String,- fieldContext: '',- },- ]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- await userEvent.click(screen.getByTestId('add-columns-button'));- const checkbox = screen.getByLabelText('trace_attribute1');- await userEvent.click(checkbox);-- expect(mockSetSelectedTracesFields).toHaveBeenCalledWith([]);- });-- it('removes a trace field using the trash icon', async () => {- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[- {- name: 'trace_attribute1',- fieldDataType: DataTypes.String,- fieldContext: '',- },- ]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- expect(screen.getByText('trace_attribute1')).toBeInTheDocument();- const trashIcon = screen.getByTestId('trash-icon');- await userEvent.click(trashIcon);-- expect(mockSetSelectedTracesFields).toHaveBeenCalledWith([]);- });-- it('reorders trace fields on drag and drop', () => {- const initialSelectedFields = [- { name: 'trace_field1', fieldDataType: 'string', fieldContext: 'tag' },- { name: 'trace_field2', fieldDataType: 'string', fieldContext: 'tag' },- ];-- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={initialSelectedFields as TelemetryFieldKey[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- const traceField1Element = screen.getByText('trace_field1');- const dragDropContext = traceField1Element.closest('.explorer-columns');- if (dragDropContext && onDragEndMock) {- // Simulate onDragEnd directly- onDragEndMock({- source: { index: 0, droppableId: 'drag-drop-list' },- destination: { index: 1, droppableId: 'drag-drop-list' },- draggableId: '0',- type: 'DEFAULT',- reason: 'DROP',- combine: undefined,- mode: 'FLUID',- });-- expect(mockSetSelectedTracesFields).toHaveBeenCalledWith([- { name: 'trace_field2', fieldDataType: 'string', fieldContext: 'tag' },- { name: 'trace_field1', fieldDataType: 'string', fieldContext: 'tag' },- ]);- } else {- fail('DragDropContext or onDragEndMock not found');- }- });- });-- it('does not show isRoot or isEntryPoint in add column dropdown (traces, dashboard table panel)', async () => {- (useQueryBuilder as jest.Mock).mockReturnValue({- currentQuery: {- builder: {- queryData: [- {- dataSource: DataSource.TRACES,- aggregateOperator: 'count',- },- ],- },- },- });- (useGetQueryKeySuggestions as jest.Mock).mockReturnValue({- data: {- data: {- data: {- keys: {- attributeKeys: [- { name: 'isRoot', dataType: 'bool', type: '' },- { name: 'isEntryPoint', dataType: 'bool', type: '' },- { name: 'duration', dataType: 'number', type: '' },- { name: 'serviceName', dataType: 'string', type: '' },- ],- },- },- },- },- isLoading: false,- isError: false,- });-- render(- <Wrapper>- <ExplorerColumnsRenderer- selectedLogFields={[]}- setSelectedLogFields={mockSetSelectedLogFields}- selectedTracesFields={[]}- setSelectedTracesFields={mockSetSelectedTracesFields}- />- </Wrapper>,- );-- await userEvent.click(screen.getByTestId('add-columns-button'));-- // Visible columns should appear- expect(screen.getByText('duration')).toBeInTheDocument();- expect(screen.getByText('serviceName')).toBeInTheDocument();-- // Hidden columns should NOT appear- expect(screen.queryByText('isRoot')).not.toBeInTheDocument();- expect(screen.queryByText('isEntryPoint')).not.toBeInTheDocument();- });-});diff --git a/frontend/src/container/NewWidget/LeftContainer/index.tsx b/frontend/src/container/NewWidget/LeftContainer/index.tsxdeleted file mode 100644index b898d380cd..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/index.tsx+++ /dev/null@@ -1,115 +0,0 @@-import { memo, useCallback, useEffect, useMemo, useState } from 'react';-import { useQueryClient } from 'react-query';-// eslint-disable-next-line no-restricted-imports-import { useSelector } from 'react-redux';-import { ENTITY_VERSION_V5 } from 'constants/app';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';-import { useGetQueryRange } from 'hooks/queryBuilder/useGetQueryRange';-import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { AppState } from 'store/reducers';-import { GlobalReducer } from 'types/reducer/globalTime';--import { WidgetGraphProps } from '../types';-import ExplorerColumnsRenderer from './ExplorerColumnsRenderer';-import QuerySection from './QuerySection';-import { QueryContainer } from './styles';-import WidgetGraph from './WidgetGraph';--import './LeftContainer.styles.scss';--function LeftContainer({- selectedGraph,- selectedLogFields,- setSelectedLogFields,- selectedTracesFields,- setSelectedTracesFields,- selectedWidget,- requestData,- isLoadingPanelData,- setRequestData,- setQueryResponse,- enableDrillDown = false,- dashboardData,- isNewPanel = false,-}: WidgetGraphProps): JSX.Element {- const { stagedQuery } = useQueryBuilder();- const queryClient = useQueryClient();-- const {- selectedTime: globalSelectedInterval,- minTime,- maxTime,- } = useSelector<AppState, GlobalReducer>((state) => state.globalTime);- const queryRangeKey = useMemo(- () => [- REACT_QUERY_KEY.GET_QUERY_RANGE,- globalSelectedInterval,- requestData,- minTime,- maxTime,- ],- [globalSelectedInterval, requestData, minTime, maxTime],- );- const [isCancelled, setIsCancelled] = useState(false);-- const handleCancelQuery = useCallback(() => {- queryClient.cancelQueries(queryRangeKey);- setIsCancelled(true);- }, [queryClient, queryRangeKey]);-- const queryResponse = useGetQueryRange(requestData, ENTITY_VERSION_V5, {- enabled: !!stagedQuery,- queryKey: queryRangeKey,- keepPreviousData: true,- });-- useEffect(() => {- if (queryResponse.isFetching) {- setIsCancelled(false);- }- }, [queryResponse.isFetching]);-- // Update parent component with query response for legend colors- useEffect(() => {- if (setQueryResponse) {- setQueryResponse(queryResponse);- }- }, [queryResponse, setQueryResponse]);-- return (- <>- <WidgetGraph- selectedGraph={selectedGraph}- queryResponse={queryResponse}- setRequestData={setRequestData}- selectedWidget={selectedWidget}- isLoadingPanelData={isLoadingPanelData}- enableDrillDown={enableDrillDown}- isCancelled={isCancelled}- />- <QueryContainer className="query-section-left-container">- <QuerySection- selectedGraph={selectedGraph}- isLoadingQueries={queryResponse.isFetching}- handleCancelQuery={handleCancelQuery}- selectedWidget={selectedWidget}- dashboardVersion={ENTITY_VERSION_V5}- dashboardId={dashboardData?.id}- dashboardName={dashboardData?.data.title}- isNewPanel={isNewPanel}- />- {selectedGraph === PANEL_TYPES.LIST && (- <ExplorerColumnsRenderer- selectedLogFields={selectedLogFields}- setSelectedLogFields={setSelectedLogFields}- selectedTracesFields={selectedTracesFields}- setSelectedTracesFields={setSelectedTracesFields}- />- )}- </QueryContainer>- </>- );-}--export default memo(LeftContainer);diff --git a/frontend/src/container/NewWidget/LeftContainer/styles.ts b/frontend/src/container/NewWidget/LeftContainer/styles.tsdeleted file mode 100644index d7b3cc2f4f..0000000000--- a/frontend/src/container/NewWidget/LeftContainer/styles.ts+++ /dev/null@@ -1,8 +0,0 @@-import { Card } from 'antd';-import styled from 'styled-components';--export const QueryContainer = styled(Card)`- &&& {- min-height: 23.5%;- }-`;diff --git a/frontend/src/container/NewWidget/NewWidget.styles.scss b/frontend/src/container/NewWidget/NewWidget.styles.scssdeleted file mode 100644index 607d5c9623..0000000000--- a/frontend/src/container/NewWidget/NewWidget.styles.scss+++ /dev/null@@ -1,74 +0,0 @@-.facing-issue-btn-container {- display: grid;- grid-template-columns: 1fr max-content;-}--.edit-header {- display: flex;- height: 48px;- flex-shrink: 0;- border-bottom: 1px solid var(--l1-border);- background: var(--l1-background);- justify-content: space-between;- align-items: center;- padding: 0px 12px 0px 16px;-- .left-header {- display: flex;- gap: 16px;- align-items: center;-- .discard-icon {- color: var(--l1-foreground);- cursor: pointer;- }-- .configure-panel {- color: var(--l1-foreground);- font-family: Inter;- font-size: 14px;- font-style: normal;- font-weight: 400;- line-height: 20px; /* 142.857% */- letter-spacing: -0.07px;- border-left: 1px solid var(--l1-border);- padding-left: 16px;- }- }-- .right-header {- display: flex;- gap: 16px;- align-items: center;- }-}--.new-widget-container {- .resizable-panel-left-container {- overflow-x: hidden;- overflow-y: auto;- }-- .resizable-panel-right-container {- overflow-y: auto !important;- min-width: 350px;-- &::-webkit-scrollbar {- width: 0.3rem;- }- &::-webkit-scrollbar-thumb {- background: rgb(136, 136, 136);- border-radius: 0.625rem;- }- &::-webkit-scrollbar-track {- background: transparent;- }- }-- .widget-resizable-panel-group {- .widget-resizable-handle {- height: 100vh;- background: color-mix(in srgb, var(--l3-background) 20%, transparent);- }- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/ColumnUnitSelector/ColumnUnitSelector.styles.scss b/frontend/src/container/NewWidget/RightContainer/ColumnUnitSelector/ColumnUnitSelector.styles.scssdeleted file mode 100644index 857824dc44..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ColumnUnitSelector/ColumnUnitSelector.styles.scss+++ /dev/null@@ -1,40 +0,0 @@-.column-unit-selector {- display: flex;- flex-direction: column;- gap: 8px;-- .heading {- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 13px;- font-style: normal;- font-weight: 400;- line-height: 18px; /* 138.462% */- letter-spacing: 0.52px;- text-transform: uppercase;- }-- .y-axis-unit-selector {- flex-direction: row !important;- align-items: center;-- .heading {- width: 32px;- }- }-- .y-axis-unit-selector-v2 {- flex-direction: row !important;- align-items: center;- gap: 24px !important;-- .y-axis-unit-selector-component {- width: 100%;- }- }- &-content {- display: flex;- flex-direction: column;- gap: 12px;- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/ColumnUnitSelector/ColumnUnitSelector.tsx b/frontend/src/container/NewWidget/RightContainer/ColumnUnitSelector/ColumnUnitSelector.tsxdeleted file mode 100644index 1904dee009..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ColumnUnitSelector/ColumnUnitSelector.tsx+++ /dev/null@@ -1,100 +0,0 @@-import { Dispatch, SetStateAction, useCallback, useEffect } from 'react';-import { Typography } from '@signozhq/ui/typography';-import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { useGetQueryLabels } from 'hooks/useGetQueryLabels';-import { isEmpty } from 'lodash-es';-import { ColumnUnit } from 'types/api/dashboard/getAll';--import YAxisUnitSelectorV2 from '../DashboardYAxisUnitSelectorWrapper';--import './ColumnUnitSelector.styles.scss';--interface ColumnUnitSelectorProps {- columnUnits: ColumnUnit;- setColumnUnits: Dispatch<SetStateAction<ColumnUnit>>;- isNewDashboard: boolean;- 'data-testid'?: string;-}--export function ColumnUnitSelector(- props: ColumnUnitSelectorProps,-): JSX.Element {- const { currentQuery } = useQueryBuilder();- const { columnUnits, setColumnUnits, isNewDashboard } = props;-- const aggregationQueries = useGetQueryLabels(currentQuery);-- const handleColumnUnitSelect = useCallback(- (queryName: string, value: string): void => {- setColumnUnits((prev) => ({- ...prev,- [queryName]: value,- }));- },- [setColumnUnits],- );-- const getValues = (value: string): string => {- const currentValue = columnUnits[value];- if (currentValue) {- return currentValue;- }-- // if base query has value, return it- const baseQuery = value.split('.')[0];-- if (columnUnits[baseQuery]) {- return columnUnits[baseQuery];- }-- // if we have value as base query i.e. value = B, but the columnUnit have let say B.count(): 'h' then we need to return B.count()- // get the queryName B.count() from the columnUnits keys based on the B that we have (first match - 0th aggregationIndex)- const newQueryWithExpression = Object.keys(columnUnits).find(- (key) =>- key.startsWith(baseQuery) &&- !isEmpty(aggregationQueries.find((query) => query.value === key)),- );- if (newQueryWithExpression) {- return columnUnits[newQueryWithExpression];- }-- return '';- };-- useEffect(() => {- const newColumnUnits = aggregationQueries.reduce(- (acc, query) => {- acc[query.value] = getValues(query.value);- return acc;- },- {} as Record<string, string>,- );- setColumnUnits(newColumnUnits);- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [aggregationQueries]);-- return (- <section className="column-unit-selector">- <Typography.Text className="heading">Column Units</Typography.Text>- <div className="column-unit-selector-content">- {aggregationQueries.map(({ value, label }) => {- const baseQueryName = value.split('.')[0];- return (- <YAxisUnitSelectorV2- value={columnUnits[value] || ''}- onSelect={(unitValue: string): void =>- handleColumnUnitSelect(value, unitValue)- }- fieldLabel={label}- key={value}- data-testid={props['data-testid']}- selectedQueryName={baseQueryName}- // Update the column unit value automatically only in create mode- shouldUpdateYAxisUnit={isNewDashboard}- />- );- })}- </div>- </section>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/ColumnUnitSelector/__tests__/ColumnSelector.test.tsx b/frontend/src/container/NewWidget/RightContainer/ColumnUnitSelector/__tests__/ColumnSelector.test.tsxdeleted file mode 100644index a02c842b1b..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ColumnUnitSelector/__tests__/ColumnSelector.test.tsx+++ /dev/null@@ -1,115 +0,0 @@-import { useLocation } from 'react-router-dom';-import ROUTES from 'constants/routes';-import { QueryBuilderProvider } from 'providers/QueryBuilder';-import { render } from 'tests/test-utils';-import { Query } from 'types/api/queryBuilder/queryBuilderData';-import { ReduceOperators } from 'types/common/queryBuilder';--import { ColumnUnitSelector } from '../ColumnUnitSelector';--const compositeQueryParam = {- queryType: 'builder',- builder: {- queryData: [- {- dataSource: 'metrics',- queryName: 'A',- aggregateOperator: 'count',- aggregateAttribute: {- key: 'signoz_latency',- dataType: 'float64',- type: 'ExponentialHistogram',- id: 'signoz_latency--float64--ExponentialHistogram--true',- },- timeAggregation: '',- spaceAggregation: 'p90',- functions: [],- filters: {- items: [],- op: 'AND',- },- expression: 'A',- disabled: false,- stepInterval: 60,- having: [],- limit: null,- orderBy: [],- groupBy: [- {- key: 'service_name',- dataType: 'string',- type: 'tag',- id: 'service_name--string--tag--false',- },- ],- legend: '',- reduceTo: ReduceOperators.AVG,- },- ],- queryFormulas: [- {- queryName: 'F1',- expression: 'A * 10',- disabled: false,- legend: '',- },- ],- queryTraceOperator: [],- },- promql: [- {- name: 'A',- query: '',- legend: '',- disabled: false,- },- ],- clickhouse_sql: [- {- name: 'A',- legend: '',- disabled: false,- query: '',- },- ],- id: '12e1d311-cb47-4b76-af68-65d8e85c9e0d',- unit: '',-};--jest.mock('react-router-dom', () => ({- ...jest.requireActual('react-router-dom'),- useLocation: jest.fn(),- useRouteMatch: jest.fn(),-}));--jest.mock('hooks/queryBuilder/useGetCompositeQueryParam', () => ({- useGetCompositeQueryParam: (): Query => compositeQueryParam as Query,-}));--jest.mock('hooks/useSafeNavigate', () => ({- useSafeNavigate: (): any => ({- safeNavigate: jest.fn(),- }),-}));--describe('Column unit selector panel unit test', () => {- it('unit selectors should be rendered for queries and formula', () => {- const mockLocation = {- pathname: `${process.env.FRONTEND_API_ENDPOINT}/${ROUTES.DASHBOARD_WIDGET}/`,- };- (useLocation as jest.Mock).mockReturnValue(mockLocation);- const { getByText } = render(- <QueryBuilderProvider>- <ColumnUnitSelector- columnUnits={{}}- setColumnUnits={(): void => {}}- isNewDashboard={false}- />- ,- </QueryBuilderProvider>,- );-- expect(getByText('F1')).toBeInTheDocument();- expect(getByText('A')).toBeInTheDocument();- });-});diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/UpdateContextLinks.styles.scss b/frontend/src/container/NewWidget/RightContainer/ContextLinks/UpdateContextLinks.styles.scssdeleted file mode 100644index 65e9484668..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/UpdateContextLinks.styles.scss+++ /dev/null@@ -1,70 +0,0 @@-.context-link-form-container {- margin-top: 16px;- min-height: 500px;- display: flex;- flex-direction: column;- justify-content: space-between;-- .form-label {- margin-left: 4px;- }-- .add-url-parameter-btn {- display: flex;- align-items: center;- width: fit-content;- margin-top: 16px;- margin-left: 16px;- }-- .url-parameters-section {- margin-top: 16px;- margin-bottom: 16px;-- .parameter-header {- margin-bottom: 8px;-- strong {- color: var(--muted-foreground);- font-size: 14px;- }- }-- .parameter-row {- margin-bottom: 8px;- align-items: center;-- .ant-input {- border-radius: 4px;- }-- .delete-parameter-btn {- color: var(--l2-foreground);- padding: 4px;- height: 32px;- width: 32px;- display: flex;- align-items: center;- justify-content: center;-- &:hover {- color: var(--bg-cherry-400) !important;- border-color: var(--bg-cherry-400) !important;- }- }- }- }-- .params-container {- margin-left: 16px;- }-- .context-link-footer {- display: flex;- justify-content: flex-end;- gap: 8px;- margin-top: 24px;- padding-top: 16px;- border-top: 1px solid var(--l1-border);- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/UpdateContextLinks.tsx b/frontend/src/container/NewWidget/RightContainer/ContextLinks/UpdateContextLinks.tsxdeleted file mode 100644index f31a7a1168..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/UpdateContextLinks.tsx+++ /dev/null@@ -1,360 +0,0 @@-import { useEffect, useMemo, useState } from 'react';-// TODO(@signozhq/ui-input): migrate <Input> once @signozhq/ui Input-// supports the `spellCheck` prop on the URL input below.-import { Button, Col, Form, Input, Input as AntInput, Row } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import { CONTEXT_LINK_FIELDS } from 'container/NewWidget/RightContainer/ContextLinks/constants';-import {- getInitialValues,- getUrlParams,- transformContextVariables,- updateUrlWithParams,-} from 'container/NewWidget/RightContainer/ContextLinks/utils';-import useContextVariables from 'hooks/dashboard/useContextVariables';-import { Plus, Trash2 } from '@signozhq/icons';-import { ContextLinkProps, Widgets } from 'types/api/dashboard/getAll';-import { getBaseUrl } from 'utils/basePath';--import VariablesPopover from './VariablesPopover';--import './UpdateContextLinks.styles.scss';--const { TextArea } = AntInput;--interface UpdateContextLinksProps {- selectedContextLink: ContextLinkProps | null;- onSave: (newContextLink: ContextLinkProps) => void;- onCancel: () => void;- selectedWidget?: Widgets;-}--function UpdateContextLinks({- selectedContextLink,- onSave,- onCancel,- selectedWidget,-}: UpdateContextLinksProps): JSX.Element {- const [form] = Form.useForm();- // const label = Form.useWatch(CONTEXT_LINK_FIELDS.LABEL, form);- const url = Form.useWatch(CONTEXT_LINK_FIELDS.URL, form);-- const [params, setParams] = useState<- {- key: string;- value: string;- }[]- >([]);-- // Extract field variables from the widget's query (all groupBy fields from all queries)- const fieldVariables = useMemo(() => {- if (!selectedWidget?.query?.builder?.queryData) {- return {};- }-- const fieldVars: Record<string, string | number | boolean> = {};-- // Get all groupBy fields from all queries- selectedWidget.query.builder.queryData.forEach((queryData) => {- if (queryData.groupBy) {- queryData.groupBy.forEach((field) => {- if (field.key && !(field.key in fieldVars)) {- fieldVars[field.key] = ''; // Placeholder value- }- });- }- });-- return fieldVars;- }, [selectedWidget?.query]);-- // Use useContextVariables to get dashboard, global, and field variables- const { variables } = useContextVariables({- maxValues: 2,- customVariables: fieldVariables,- });-- // Transform variables into the format expected by VariablesPopover- const transformedVariables = useMemo(- () => transformContextVariables(variables),- [variables],- );-- // Function to get current domain- const getCurrentDomain = (): string => getBaseUrl();-- // Function to handle variable selection from dropdown- const handleVariableSelect = (- variableName: string,- cursorPosition?: number,- ): void => {- // Get current URL value from form- const currentValue = form.getFieldValue(CONTEXT_LINK_FIELDS.URL) || '';-- // Insert at cursor position if provided, otherwise append to end- const newValue =- cursorPosition !== undefined- ? currentValue.slice(0, cursorPosition) +- variableName +- currentValue.slice(cursorPosition)- : currentValue + variableName;-- // Update form value- form.setFieldValue(CONTEXT_LINK_FIELDS.URL, newValue);- };-- // Function to handle variable selection for parameter values- const handleParamChange = (- index: number,- field: 'key' | 'value',- value: string,- ): void => {- const newParams = [...params];- newParams[index][field] = value;- setParams(newParams);- const updatedUrl = updateUrlWithParams(url, newParams);- form.setFieldValue(CONTEXT_LINK_FIELDS.URL, updatedUrl);- };-- const handleParamVariableSelect = (- index: number,- variableName: string,- cursorPosition?: number,- ): void => {- // Get current parameter value- const currentValue = params[index].value;-- // Insert at cursor position if provided, otherwise append to end- const newValue =- cursorPosition !== undefined- ? currentValue.slice(0, cursorPosition) +- variableName +- currentValue.slice(cursorPosition)- : currentValue + variableName;-- // Update the parameter value- handleParamChange(index, 'value', newValue);- };-- useEffect(() => {- (window as unknown as Record<string, unknown>).form = form;- }, [form]);-- // Parse URL and update params when URL changes- useEffect(() => {- if (url) {- const urlParams = getUrlParams(url);- setParams(urlParams);- }- }, [url]);-- const handleSave = async (): Promise<void> => {- try {- // Validate form fields- await form.validateFields();- const newContextLink = {- id: form.getFieldValue(CONTEXT_LINK_FIELDS.ID),- label:- form.getFieldValue(CONTEXT_LINK_FIELDS.LABEL) ||- form.getFieldValue(CONTEXT_LINK_FIELDS.URL),- url: form.getFieldValue(CONTEXT_LINK_FIELDS.URL),- };- // If validation passes, call onSave- onSave(newContextLink);- } catch (error) {- // Form validation failed, don't call onSave- console.error('Form validation failed:', error);- }- };-- const handleAddUrlParameter = (): void => {- const isLastParamEmpty =- params.length > 0 &&- params[params.length - 1].key.trim() === '' &&- params[params.length - 1].value.trim() === '';- const canAddParam = params.length === 0 || !isLastParamEmpty;-- if (canAddParam) {- const newParams = [- ...params,- {- key: '',- value: '',- },- ];- setParams(newParams);- const updatedUrl = updateUrlWithParams(url, newParams);- form.setFieldValue(CONTEXT_LINK_FIELDS.URL, updatedUrl);- }- };-- const handleDeleteParameter = (index: number): void => {- const newParams = params.filter((_, i) => i !== index);- setParams(newParams);- const updatedUrl = updateUrlWithParams(url, newParams);- form.setFieldValue(CONTEXT_LINK_FIELDS.URL, updatedUrl);- };-- return (- <div className="context-link-form-container">- <div>- <Form- form={form}- name="contextLink"- initialValues={getInitialValues(selectedContextLink)}- // onFinish={() => {}}- >- {/* //label */}- <Typography.Text className="form-label">Label</Typography.Text>- <Form.Item- name={CONTEXT_LINK_FIELDS.LABEL}- rules={[{ required: false, message: 'Please input the label' }]}- >- <Input placeholder="View Traces details: {{_traceId}}" />- </Form.Item>- {/* //url */}- <Typography.Text className="form-label">- URL <span className="required-asterisk">*</span>- </Typography.Text>- <Form.Item- name={CONTEXT_LINK_FIELDS.URL}- // label="URL"- rules={[- { required: true, message: 'Please input the URL' },- {- pattern: /^(https?:\/\/|\/|{{.*}}\/)/,- message: 'URLs must start with http(s), /, or {{.*}}/',- },- ]}- >- {/* TODO: replace with AutoComplete with options for variables and- previously used URLs for better UX */}- <VariablesPopover- onVariableSelect={handleVariableSelect}- variables={transformedVariables}- >- {({ setIsOpen, setCursorPosition }): JSX.Element => (- <div className="url-input-trigger">- <Input- value={url}- onChange={(e): void => {- setCursorPosition(e.target.selectionStart || 0);- form.setFieldValue(CONTEXT_LINK_FIELDS.URL, e.target.value);- }}- onFocus={(): void => setIsOpen(true)}- onClick={(e): void =>- setCursorPosition((e.target as HTMLInputElement).selectionStart || 0)- }- onKeyUp={(e): void =>- setCursorPosition((e.target as HTMLInputElement).selectionStart || 0)- }- autoComplete="off"- autoCorrect="off"- autoCapitalize="off"- spellCheck="false"- className="url-input-field"- placeholder={`${getCurrentDomain()}/trace/{{_traceId}}`}- />- </div>- )}- </VariablesPopover>- </Form.Item>-- {/* Remove the separate variables section */}- </Form>-- <div className="params-container">- {/* URL Parameters Section */}- {params.length > 0 && (- <div className="url-parameters-section">- <Row gutter={[8, 8]} className="parameter-header">- <Col span={6}>Key</Col>- <Col span={16}>Value</Col>- <Col span={2}>{/* Empty column for spacing */}</Col>- </Row>-- {params.map((param, index) => (- // eslint-disable-next-line react/no-array-index-key- <Row gutter={[8, 8]} key={index} className="parameter-row">- <Col span={6}>- <Input- id={`param-key-${index}`}- placeholder="Key"- value={param.key}- onChange={(e): void =>- handleParamChange(index, 'key', e.target.value)- }- />- </Col>- <Col span={16}>- <VariablesPopover- onVariableSelect={(variableName, cursorPosition): void =>- handleParamVariableSelect(index, variableName, cursorPosition)- }- variables={transformedVariables}- >- {({ setIsOpen, setCursorPosition }): JSX.Element => (- <TextArea- rows={1}- placeholder="Value"- value={param.value}- onChange={(event): void => {- setCursorPosition(event.target.selectionStart || 0);- handleParamChange(index, 'value', event.target.value);- }}- onFocus={(): void => setIsOpen(true)}- onClick={(e): void =>- setCursorPosition(- (e.target as HTMLTextAreaElement).selectionStart || 0,- )- }- // eslint-disable-next-line sonarjs/no-identical-functions- onKeyUp={(e): void =>- setCursorPosition(- (e.target as HTMLTextAreaElement).selectionStart || 0,- )- }- />- )}- </VariablesPopover>- </Col>- <Col span={2}>- <Button- type="text"- icon={<Trash2 size={14} />}- onClick={(): void => handleDeleteParameter(index)}- className="delete-parameter-btn"- />- </Col>- </Row>- ))}- </div>- )}- </div>-- {/* Add URL parameter btn */}- <Button- type="primary"- className="add-url-parameter-btn"- icon={<Plus size={12} />}- onClick={handleAddUrlParameter}- >- Add URL parameter- </Button>- </div>-- {/* Footer with Cancel and Save buttons */}- <div className="context-link-footer">- <Button onClick={onCancel}>Cancel</Button>- <Button type="primary" onClick={handleSave}>- Save- </Button>- </div>- </div>- );-}--UpdateContextLinks.defaultProps = {- selectedWidget: undefined,-};--export default UpdateContextLinks;diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/VariablesPopover.styles.scss b/frontend/src/container/NewWidget/RightContainer/ContextLinks/VariablesPopover.styles.scssdeleted file mode 100644index b91c12f979..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/VariablesPopover.styles.scss+++ /dev/null@@ -1,74 +0,0 @@-.variables-popover-container {- .url-input-trigger {- width: 100%;-- .url-input-field {- width: 100%;- }- }-- .variables-popover-anchor-wrap {- width: 100%;- }-}--.variables-popover-content {- // antd Modal uses z-index ~1000; popover must sit above it.- z-index: 1100;- padding: 4px 0;- max-height: 300px;- overflow-y: auto;- overflow-x: hidden;- min-width: var(--radix-popover-trigger-width);-}--.variables-popover-empty {- padding: 8px 12px;- color: var(--l3-foreground, #999);- font-size: 12px;- font-style: italic;-}--.variables-popover-item {- all: unset;- display: block;- box-sizing: border-box;- width: 100%;- padding: 8px 12px;- cursor: pointer;- color: var(--l1-foreground);- font-size: 13px;- line-height: 1.4;- overflow: hidden;-- &:hover,- &:focus {- background-color: var(--l1-background-hover);- }-}--.variable-row {- display: flex;- align-items: center;- justify-content: space-between;- gap: 8px;- min-width: 0;-- .variable-name,- .variable-source {- min-width: 0;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;- }-- .variable-name {- flex: 1 1 auto;- }-- .variable-source {- color: #666;- font-size: 12px;- flex: 0 1 auto;- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/VariablesPopover.tsx b/frontend/src/container/NewWidget/RightContainer/ContextLinks/VariablesPopover.tsxdeleted file mode 100644index 2fae9315ad..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/VariablesPopover.tsx+++ /dev/null@@ -1,111 +0,0 @@-// Uses Popover (not DropdownMenu like the rest of the antd-dropdown migration):-// DropdownMenuTrigger preventDefaults pointerdown, breaking input focus and-// dismissing on every keystroke. PopoverAnchor is a passive positioning element.-import { ReactNode, useRef, useState } from 'react';-import { Popover, PopoverAnchor, PopoverContent } from '@signozhq/ui/popover';-import { Typography } from '@signozhq/ui/typography';--import './VariablesPopover.styles.scss';--interface VariablesPopoverProps {- onVariableSelect: (variableName: string, cursorPosition?: number) => void;- variables: VariableItem[];- children: (props: {- onVariableSelect: (variableName: string, cursorPosition?: number) => void;- isOpen: boolean;- setIsOpen: (open: boolean) => void;- cursorPosition: number | null;- setCursorPosition: (position: number | null) => void;- }) => ReactNode;-}--interface VariableItem {- name: string;- source: string;-}--function VariablesPopover({- onVariableSelect,- variables,- children,-}: VariablesPopoverProps): JSX.Element {- const [isOpen, setIsOpen] = useState(false);- const [cursorPosition, setCursorPosition] = useState<number | null>(null);- const anchorRef = useRef<HTMLDivElement>(null);-- const handleOpenChange = (open: boolean): void => {- // Accept "close" events from the popover (outside-click, Esc) but ignore- // opens — opening is driven by the input's onFocus in the consumer.- if (!open) {- setIsOpen(false);- }- };-- return (- <div className="variables-popover-container">- <Popover open={isOpen} onOpenChange={handleOpenChange} modal={false}>- <PopoverAnchor asChild>- <div className="variables-popover-anchor-wrap" ref={anchorRef}>- {children({- onVariableSelect,- isOpen,- setIsOpen,- cursorPosition,- setCursorPosition,- })}- </div>- </PopoverAnchor>- <PopoverContent- align="start"- sideOffset={4}- className="variables-popover-content"- onOpenAutoFocus={(e): void => e.preventDefault()}- onCloseAutoFocus={(e): void => e.preventDefault()}- onInteractOutside={(e): void => {- // Keep the popover open while interacting with the anchor (the input),- // otherwise typing/clicking the input would close it immediately.- const target = e.target as Node | null;- if (target && anchorRef.current?.contains(target)) {- e.preventDefault();- }- }}- onFocusOutside={(e): void => {- const target = e.target as Node | null;- if (target && anchorRef.current?.contains(target)) {- e.preventDefault();- }- }}- >- {variables.length === 0 ? (- <div className="variables-popover-empty">No variables available</div>- ) : (- variables.map((v) => (- <button- key={v.name}- type="button"- className="variables-popover-item"- onMouseDown={(e): void => {- // Prevent the input from losing focus when clicking an item.- e.preventDefault();- }}- onClick={(): void => {- onVariableSelect(`{{${v.name}}}`, cursorPosition || undefined);- setIsOpen(false);- }}- >- <div className="variable-row">- <Typography.Text className="variable-name">{`{{${v.name}}}`}</Typography.Text>- <Typography.Text className="variable-source">- {v.source}- </Typography.Text>- </div>- </button>- ))- )}- </PopoverContent>- </Popover>- </div>- );-}--export default VariablesPopover;diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/__test__/ContextLinks.test.tsx b/frontend/src/container/NewWidget/RightContainer/ContextLinks/__test__/ContextLinks.test.tsxdeleted file mode 100644index 981ad8ea17..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/__test__/ContextLinks.test.tsx+++ /dev/null@@ -1,630 +0,0 @@-// eslint-disable-next-line no-restricted-imports-import { Provider } from 'react-redux';-import { MemoryRouter } from 'react-router-dom';-import { fireEvent, render, screen, waitFor } from '@testing-library/react';-import store from 'store';-import { ContextLinksData } from 'types/api/dashboard/getAll';--import '@testing-library/jest-dom';--import ContextLinks from '../index';--// Mock data for testing-const MOCK_EMPTY_CONTEXT_LINKS: ContextLinksData = {- linksData: [],-};--const MOCK_CONTEXT_LINKS: ContextLinksData = {- linksData: [- {- id: '1',- label: 'Dashboard 1',- url: 'https://example.com/dashboard1',- },- {- id: '2',- label: 'External Tool',- url: 'https://external.com/tool',- },- {- id: '3',- label: 'Grafana',- url: 'https://grafana.example.com',- },- ],-};--// Test wrapper component-const renderWithProviders = (- component: React.ReactElement,-): ReturnType<typeof render> =>- render(- <Provider store={store}>- <MemoryRouter>{component}</MemoryRouter>- </Provider>,- );--describe('ContextLinks Component', () => {- describe('Component Rendering & Initial State', () => {- it('should render correctly with existing context links', () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Check that the add button is present- expect(- screen.getByRole('button', { name: /context link/i }),- ).toBeInTheDocument();-- // Check that all context link items are displayed- expect(screen.getByText('Dashboard 1')).toBeInTheDocument();- expect(screen.getByText('External Tool')).toBeInTheDocument();- expect(screen.getByText('Grafana')).toBeInTheDocument();-- // Check that URLs are displayed- expect(- screen.getByText('https://example.com/dashboard1'),- ).toBeInTheDocument();- expect(screen.getByText('https://external.com/tool')).toBeInTheDocument();- expect(screen.getByText('https://grafana.example.com')).toBeInTheDocument();- });-- it('should show "Context Link" add button', () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Check that the add button is present and has correct text- const addButton = screen.getByRole('button', { name: /context link/i });- expect(addButton).toBeInTheDocument();- expect(addButton).toHaveTextContent('Context Link');- expect(addButton).toHaveClass('add-context-link-button');- });- });-- describe('Add Context Link Functionality', () => {- it('should show "Add a context link" title in modal when adding new link', () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Click the add button to open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Check that modal content is displayed- expect(screen.getByText('Add a context link')).toBeInTheDocument();-- // Check that save and cancel buttons are present- expect(screen.getByRole('button', { name: /save/i })).toBeInTheDocument();- expect(screen.getByRole('button', { name: /cancel/i })).toBeInTheDocument();- });-- it('should call setContextLinks when saving new context link', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Click the add button to open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Fill in the form fields using placeholder text- const labelInput = screen.getByPlaceholderText(- 'View Traces details: {{_traceId}}',- );- fireEvent.change(labelInput, { target: { value: 'New Link' } });- const urlInput = screen.getByPlaceholderText(- 'http://localhost/trace/{{_traceId}}',- );- fireEvent.change(urlInput, { target: { value: 'https://example.com' } });-- // Click save button in modal- const saveButton = screen.getByRole('button', { name: /save/i });- fireEvent.click(saveButton);-- // Wait for the modal to close and state to update- await waitFor(() => {- expect(screen.queryByText('Add a context link')).not.toBeInTheDocument();- });-- // Verify that setContextLinks was called- expect(mockSetContextLinks).toHaveBeenCalledTimes(1);-- // setContextLinks is called with a function (state updater)- const setContextLinksCall = mockSetContextLinks.mock.calls[0][0];- expect(typeof setContextLinksCall).toBe('function');-- // Test the function by calling it with the current state- const result = setContextLinksCall(MOCK_EMPTY_CONTEXT_LINKS);- expect(result).toStrictEqual({- linksData: [- {- id: expect.any(String), // ID is generated dynamically- label: 'New Link',- url: 'https://example.com',- },- ],- });- });-- it('should close modal when cancel button is clicked', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Click the add button to open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Modal should be visible- expect(screen.getByText('Add a context link')).toBeInTheDocument();-- // Click cancel button- const cancelButton = screen.getByRole('button', { name: /cancel/i });- fireEvent.click(cancelButton);-- // Modal should be closed- await waitFor(() => {- expect(screen.queryByText('Add a context link')).not.toBeInTheDocument();- });- });-- it('should not call setContextLinks when cancel button is clicked', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Click the add button to open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Click cancel button- const cancelButton = screen.getByRole('button', { name: /cancel/i });- fireEvent.click(cancelButton);-- // Wait for modal to close- await waitFor(() => {- expect(screen.queryByText('Add a context link')).not.toBeInTheDocument();- });-- // Verify that setContextLinks was not called- expect(mockSetContextLinks).not.toHaveBeenCalled();- });-- it('should show form fields in the modal', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Click the add button to open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Check that form field labels are present- expect(screen.getByText('Label')).toBeInTheDocument();- expect(screen.getByText('URL')).toBeInTheDocument();-- // Check that form field inputs are present using placeholder text- const labelInput = screen.getByPlaceholderText(- 'View Traces details: {{_traceId}}',- );- const urlInput = screen.getByPlaceholderText(- 'http://localhost/trace/{{_traceId}}',- );- expect(labelInput.tagName).toBe('INPUT');- expect(urlInput.tagName).toBe('INPUT');- });-- it('should validate form fields before saving', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Click the add button to open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Try to save without filling required fields- const saveButton = screen.getByRole('button', { name: /save/i });- fireEvent.click(saveButton);-- // Form validation should prevent saving- await waitFor(() => {- expect(mockSetContextLinks).not.toHaveBeenCalled();- });-- // Modal should still be open- expect(screen.getByText('Add a context link')).toBeInTheDocument();- });-- it('should pre-populate form with existing data when editing a context link', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Find and click the edit button for the first context link using CSS class- const editButtons = document.querySelectorAll('.edit-context-link-btn');- expect(editButtons).toHaveLength(3); // Should have 3 edit buttons for 3 context links- fireEvent.click(editButtons[0]); // Click edit button for first link-- // Modal should open with "Edit context link" title- expect(screen.getByText('Edit context link')).toBeInTheDocument();-- // Form should be pre-populated with existing data from the first context link- const labelInput = screen.getByPlaceholderText(- 'View Traces details: {{_traceId}}',- );- const urlInput = screen.getByPlaceholderText(- 'http://localhost/trace/{{_traceId}}',- );-- // Check that the form is pre-populated with the first context link's data- expect(labelInput).toHaveAttribute('value', 'Dashboard 1');- expect(urlInput).toHaveAttribute('value', 'https://example.com/dashboard1');-- // Verify save and cancel buttons are present- expect(screen.getByRole('button', { name: /save/i })).toBeInTheDocument();- expect(screen.getByRole('button', { name: /cancel/i })).toBeInTheDocument();- });- });-- describe('URL and Query Parameter Functionality', () => {- it('should parse URL with query parameters and display them in parameter table', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Open modal to add new context link- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Type a URL with query parameters- const urlInput = screen.getByPlaceholderText(- 'http://localhost/trace/{{_traceId}}',- );- const testUrl =- 'https://example.com/api?param1=value1¶m2=value2¶m3=value3';- fireEvent.change(urlInput, { target: { value: testUrl } });-- // Wait for parameter parsing and display- await waitFor(() => {- expect(screen.getByText('Key')).toBeInTheDocument();- expect(screen.getByText('Value')).toBeInTheDocument();- });-- // Verify all parameters are displayed- expect(screen.getByDisplayValue('param1')).toBeInTheDocument();- expect(screen.getByDisplayValue('value1')).toBeInTheDocument();- expect(screen.getByDisplayValue('param2')).toBeInTheDocument();- expect(screen.getByDisplayValue('value2')).toBeInTheDocument();- expect(screen.getByDisplayValue('param3')).toBeInTheDocument();- expect(screen.getByDisplayValue('value3')).toBeInTheDocument();- });-- it('should add new URL parameter when "Add URL parameter" button is clicked', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Initially no parameters should be visible- expect(screen.queryByText('Key')).not.toBeInTheDocument();-- // Click "Add URL parameter" button- const addParamButton = screen.getByRole('button', {- name: /add url parameter/i,- });- fireEvent.click(addParamButton);-- // Parameter table should now be visible- await waitFor(() => {- expect(screen.getByText('Key')).toBeInTheDocument();- expect(screen.getByText('Value')).toBeInTheDocument();- });-- // Should have one empty parameter row- const keyInputs = screen.getAllByPlaceholderText('Key');- const valueInputs = screen.getAllByPlaceholderText('Value');- expect(keyInputs).toHaveLength(1);- expect(valueInputs).toHaveLength(1);- });-- it('should update URL when parameter values are changed', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Add a parameter- const addParamButton = screen.getByRole('button', {- name: /add url parameter/i,- });- fireEvent.click(addParamButton);-- // Fill in parameter key and value- const keyInput = screen.getByPlaceholderText('Key');- const valueInput = screen.getAllByPlaceholderText('Value')[0];-- fireEvent.change(keyInput, { target: { value: 'search' } });- fireEvent.change(valueInput, { target: { value: 'query' } });-- // URL should be updated with the parameter- const urlInput = screen.getByPlaceholderText(- 'http://localhost/trace/{{_traceId}}',- ) as HTMLInputElement;- expect(urlInput.value).toBe('?search=query');- });-- it('should delete URL parameter when delete button is clicked', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Add a parameter- const addParamButton = screen.getByRole('button', {- name: /add url parameter/i,- });- fireEvent.click(addParamButton);-- // Fill in parameter- const keyInput = screen.getByPlaceholderText('Key');- const valueInput = screen.getAllByPlaceholderText('Value')[0];- fireEvent.change(keyInput, { target: { value: 'test' } });- fireEvent.change(valueInput, { target: { value: 'value' } });-- // Verify parameter is added- expect(screen.getByDisplayValue('test')).toBeInTheDocument();-- // Click delete button for the parameter- const deleteButtons = screen.getAllByRole('button', { name: '' });- const deleteButton = deleteButtons.find((btn) =>- btn.className.includes('delete-parameter-btn'),- );- expect(deleteButton).toBeInTheDocument();- fireEvent.click(deleteButton!);-- // Parameter should be removed- await waitFor(() => {- expect(screen.queryByDisplayValue('test')).not.toBeInTheDocument();- });-- // URL should be cleaned up- const urlInput = screen.getByPlaceholderText(- 'http://localhost/trace/{{_traceId}}',- ) as HTMLInputElement;- expect(urlInput.value).toBe('');- });-- it('should handle multiple parameters and maintain URL synchronization', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Add first parameter- const addParamButton = screen.getByRole('button', {- name: /add url parameter/i,- });- fireEvent.click(addParamButton);-- // Fill first parameter- let keyInputs = screen.getAllByPlaceholderText('Key');- let valueInputs = screen.getAllByPlaceholderText('Value');- fireEvent.change(keyInputs[0], { target: { value: 'page' } });- fireEvent.change(valueInputs[0], { target: { value: '1' } });-- // Add second parameter- fireEvent.click(addParamButton);-- // Get updated inputs after adding second parameter- keyInputs = screen.getAllByPlaceholderText('Key');- valueInputs = screen.getAllByPlaceholderText('Value');-- // Fill second parameter- fireEvent.change(keyInputs[1], { target: { value: 'size' } });- fireEvent.change(valueInputs[1], { target: { value: '10' } });-- // URL should contain both parameters- const urlInput = screen.getByPlaceholderText(- 'http://localhost/trace/{{_traceId}}',- ) as HTMLInputElement;- expect(urlInput.value).toBe('?page=1&size=10');-- // Change first parameter value- fireEvent.change(valueInputs[0], { target: { value: '2' } });-- // URL should be updated- expect(urlInput.value).toBe('?page=2&size=10');- });-- it('should validate URL format and show appropriate error messages', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Try to save with invalid URL- const urlInput = screen.getByPlaceholderText(- 'http://localhost/trace/{{_traceId}}',- );- fireEvent.change(urlInput, { target: { value: 'invalid-url' } });-- // Try to save- const saveButton = screen.getByRole('button', { name: /save/i });- fireEvent.click(saveButton);-- // Should show validation error- await waitFor(() => {- expect(- screen.getByText('URLs must start with http(s), /, or {{.*}}/'),- ).toBeInTheDocument();- });-- // setContextLinks should not be called due to validation failure- expect(mockSetContextLinks).not.toHaveBeenCalled();- });-- it('should handle special characters in parameter keys and values correctly', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Add parameter with special characters- const addParamButton = screen.getByRole('button', {- name: /add url parameter/i,- });- fireEvent.click(addParamButton);-- // Fill parameter with special characters- const keyInput = screen.getByPlaceholderText('Key');- const valueInput = screen.getAllByPlaceholderText('Value')[0];-- fireEvent.change(keyInput, { target: { value: 'user@domain' } });- fireEvent.change(valueInput, { target: { value: 'John Doe & Co.' } });-- // URL should be properly encoded- const urlInput = screen.getByPlaceholderText(- 'http://localhost/trace/{{_traceId}}',- ) as HTMLInputElement;- expect(urlInput.value).toBe('?user%40domain=John%20Doe%20%26%20Co.');- });-- it('should support template variables in URL and parameters', async () => {- const mockSetContextLinks = jest.fn();-- renderWithProviders(- <ContextLinks- contextLinks={MOCK_EMPTY_CONTEXT_LINKS}- setContextLinks={mockSetContextLinks}- />,- );-- // Open modal- const addButton = screen.getByRole('button', { name: /context link/i });- fireEvent.click(addButton);-- // Type URL with template variable- const urlInput = screen.getByPlaceholderText(- 'http://localhost/trace/{{_traceId}}',- );- const testUrl =- 'https://example.com/trace/{{_traceId}}?service={{_serviceName}}';- fireEvent.change(urlInput, { target: { value: testUrl } });-- // Wait for parameter parsing- await waitFor(() => {- expect(screen.getByText('Key')).toBeInTheDocument();- });-- // Should parse template variable as parameter- expect(screen.getByDisplayValue('service')).toBeInTheDocument();- expect(screen.getByDisplayValue('{{_serviceName}}')).toBeInTheDocument();-- // URL should maintain template variables- expect((urlInput as HTMLInputElement).value).toBe(- 'https://example.com/trace/{{_traceId}}?service={{_serviceName}}',- );- });- });-});diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/__test__/utils.test.ts b/frontend/src/container/NewWidget/RightContainer/ContextLinks/__test__/utils.test.tsdeleted file mode 100644index 100e21b40e..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/__test__/utils.test.ts+++ /dev/null@@ -1,40 +0,0 @@-import { processContextLinks } from '../utils';--describe('processContextLinks', () => {- // Regression for #11325.- it('substitutes per-row groupBy values in the path and query params', () => {- const [link] = processContextLinks(- [- {- id: '1',- label: 'Open trace {{trace_id}}',- url: '/trace/{{trace_id}}?spanId={{span_id}}&levelUp=0&levelDown=0',- },- ],- { _trace_id: 'abc123', _span_id: 'def456' },- );-- expect(link.url).toBe('/trace/abc123?spanId=def456&levelUp=0&levelDown=0');- expect(link.label).toBe('Open trace abc123');- });-- it('resolves dashboard and global variables alongside row fields', () => {- const [link] = processContextLinks(- [- { id: '1', label: 'Logs', url: '/logs/{{service}}?ts={{timestamp_start}}' },- ],- { service: 'frontend', timestamp_start: '1720512000000', _service: 'redis' },- );-- expect(link.url).toBe('/logs/frontend?ts=1720512000000');- });-- it('leaves an unresolvable token in place', () => {- const [link] = processContextLinks(- [{ id: '1', label: 'Open', url: '/trace/{{trace_id}}' }],- {},- );-- expect(link.url).toBe('/trace/{{trace_id}}');- });-});diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/index.tsx b/frontend/src/container/NewWidget/RightContainer/ContextLinks/index.tsxdeleted file mode 100644index 09e19c32ff..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/index.tsx+++ /dev/null@@ -1,189 +0,0 @@-import { Dispatch, SetStateAction } from 'react';-import {- closestCenter,- DndContext,- DragEndEvent,- PointerSensor,- useSensor,- useSensors,-} from '@dnd-kit/core';-import {- arrayMove,- SortableContext,- useSortable,- verticalListSortingStrategy,-} from '@dnd-kit/sortable';-import { CSS } from '@dnd-kit/utilities';-import { Button, Modal } from 'antd';-import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';-import { GripVertical, Pencil, Plus, Trash2 } from '@signozhq/icons';-import {- ContextLinkProps,- ContextLinksData,- Widgets,-} from 'types/api/dashboard/getAll';--import UpdateContextLinks from './UpdateContextLinks';-import useContextLinkModal from './useContextLinkModal';--import './styles.scss';--function SortableContextLink({- contextLink,- onDelete,- onEdit,-}: {- contextLink: ContextLinkProps;- onDelete: (contextLink: ContextLinkProps) => void;- onEdit: (contextLink: ContextLinkProps) => void;-}): JSX.Element {- const { attributes, listeners, setNodeRef, transform, transition } =- useSortable({ id: contextLink.id });-- const style = {- transform: CSS.Transform.toString(transform),- transition,- };-- return (- <div- ref={setNodeRef}- style={style}- className="context-link-item drag-enabled"- >- <div {...attributes} {...listeners} className="drag-handle">- <div className="drag-handle-icon">- <GripVertical size={16} />- </div>- <div className="context-link-content">- <span className="context-link-label">{contextLink.label}</span>- <span className="context-link-url">{contextLink.url}</span>- </div>- </div>- <div className="context-link-actions">- <Button- className="edit-context-link-btn periscope-btn"- size="small"- icon={<Pencil size={12} />}- onClick={(): void => {- onEdit(contextLink);- }}- />- <Button- className="delete-context-link-btn periscope-btn"- size="small"- icon={<Trash2 size={12} />}- onClick={(): void => {- onDelete(contextLink);- }}- />- </div>- </div>- );-}--function ContextLinks({- contextLinks,- setContextLinks,- selectedWidget,-}: {- contextLinks: ContextLinksData;- setContextLinks: Dispatch<SetStateAction<ContextLinksData>>;- selectedWidget?: Widgets;-}): JSX.Element {- // Use the custom hook for modal functionality- const {- isModalOpen,- selectedContextLink,- handleEditContextLink,- handleAddContextLink,- handleCancelModal,- handleSaveContextLink,- } = useContextLinkModal({ setContextLinks });-- const sensors = useSensors(useSensor(PointerSensor));-- const handleDragEnd = (event: DragEndEvent): void => {- const { active, over } = event;-- if (over && active.id !== over.id) {- setContextLinks((prev) => {- const items = [...prev.linksData];- const oldIndex = items.findIndex((item) => item.id === active.id);- const newIndex = items.findIndex((item) => item.id === over.id);-- return {- ...prev,- linksData: arrayMove(items, oldIndex, newIndex),- };- });- }- };-- const handleDeleteContextLink = (contextLink: ContextLinkProps): void => {- setContextLinks((prev) => ({- ...prev,- linksData: prev.linksData.filter((link) => link.id !== contextLink.id),- }));- };-- return (- <div className="context-links-container">- <div className="context-links-list">- <Button- type="default"- className="add-context-link-button"- data-testid="add-context-link-cta"- icon={<Plus size={12} />}- style={{ width: '100%' }}- onClick={handleAddContextLink}- >- Add Context Link- </Button>- <OverlayScrollbar>- <DndContext- sensors={sensors}- collisionDetection={closestCenter}- onDragEnd={handleDragEnd}- >- <SortableContext- items={contextLinks.linksData.map((link) => link.id)}- strategy={verticalListSortingStrategy}- >- {contextLinks.linksData.map((contextLink) => (- <SortableContextLink- key={contextLink.id}- contextLink={contextLink}- onDelete={handleDeleteContextLink}- onEdit={handleEditContextLink}- />- ))}- </SortableContext>- </DndContext>- </OverlayScrollbar>- </div>-- <Modal- title={selectedContextLink ? 'Edit context link' : 'Add a context link'}- open={isModalOpen}- onCancel={handleCancelModal}- destroyOnClose- width={672}- footer={null}- >- <UpdateContextLinks- selectedContextLink={selectedContextLink}- onSave={handleSaveContextLink}- onCancel={handleCancelModal}- selectedWidget={selectedWidget}- />- </Modal>- </div>- );-}--ContextLinks.defaultProps = {- selectedWidget: undefined,-};--export default ContextLinks;diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/styles.scss b/frontend/src/container/NewWidget/RightContainer/ContextLinks/styles.scssdeleted file mode 100644index 6ab816557c..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/styles.scss+++ /dev/null@@ -1,113 +0,0 @@-.context-links-container {- display: flex;- flex-direction: column;- gap: 16px;-}--.context-links-text {- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 13px;- font-style: normal;- font-weight: 400;- line-height: 18px;- letter-spacing: 0.52px;- text-transform: uppercase;-}--.context-links-list {- display: flex;- flex-direction: column;- gap: 12px;- max-height: 300px;-}--.context-link-item {- display: flex;- align-items: center;- justify-content: space-between;- padding: 8px;- border-radius: 4px;- user-select: none;- transition: background-color 0.2s ease-in-out;- width: 100%;- min-width: 0;-- .drag-handle {- display: flex;- align-items: center;- gap: 8px;- flex-grow: 1;- cursor: grab;- min-width: 0;-- &:active {- cursor: grabbing;- }- }-- .drag-handle-icon {- flex-shrink: 0;- color: var(--l2-foreground);- }-- .context-link-content {- display: flex;- flex-direction: column;- gap: 2px;- flex-grow: 1;- min-width: 0;- overflow: hidden;- }-- .context-link-label {- color: var(--l1-foreground);- font-size: 12px;- font-weight: 500;- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;- }-- .context-link-url {- color: var(--l2-foreground);- font-size: 12px;- font-weight: 400;- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;- }-- .context-link-actions {- display: flex;- gap: 4px;- opacity: 0;- transition: opacity 0.2s ease-in-out;- flex-shrink: 0;- }-- .edit-context-link-btn,- .delete-context-link-btn {- padding: 6px 12px;- flex-shrink: 0;- }-- .delete-context-link-btn {- &:hover {- color: var(--bg-cherry-400) !important;- border-color: var(--bg-cherry-400) !important;- }- }-- &:hover {- background-color: var(--l1-border);-- .context-link-actions {- opacity: 1;- }- }-}--.add-context-link-button {- width: 100%;-}diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/useContextLinkModal.ts b/frontend/src/container/NewWidget/RightContainer/ContextLinks/useContextLinkModal.tsdeleted file mode 100644index 7278af5a58..0000000000--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/useContextLinkModal.ts+++ /dev/null@@ -1,63 +0,0 @@-import { Dispatch, SetStateAction, useState } from 'react';-import { ContextLinkProps, ContextLinksData } from 'types/api/dashboard/getAll';--interface ContextLinkModalProps {- isModalOpen: boolean;- selectedContextLink: ContextLinkProps | null;- handleEditContextLink: (contextLink: ContextLinkProps) => void;- handleAddContextLink: () => void;- handleCancelModal: () => void;- handleSaveContextLink: (newContextLink: ContextLinkProps) => void;-}--const useContextLinkModal = ({- setContextLinks,-}: {- setContextLinks: Dispatch<SetStateAction<ContextLinksData>>;-}): ContextLinkModalProps => {- const [isModalOpen, setIsModalOpen] = useState(false);- const [selectedContextLink, setSelectedContextLink] =- useState<ContextLinkProps | null>(null);-- const handleEditContextLink = (contextLink: ContextLinkProps): void => {- setSelectedContextLink(contextLink);- setIsModalOpen(true);- };-- const handleAddContextLink = (): void => {- setSelectedContextLink(null);- setIsModalOpen(true);- };-- const handleCancelModal = (): void => {- setIsModalOpen(false);- setSelectedContextLink(null);- };-- const handleSaveContextLink = (newContextLink: ContextLinkProps): void => {- setContextLinks((prev) => {- const links = [...prev.linksData];- const existing = links.filter((link) => link.id === newContextLink.id)[0];- if (existing) {- const idx = links.findIndex((link) => link.id === newContextLink.id);- links[idx] = { ...existing, ...newContextLink };- return { ...prev, linksData: links };- }- links.push(newContextLink);- return { ...prev, linksData: links };- });- setIsModalOpen(false);- setSelectedContextLink(null);- };-- return {- isModalOpen,- selectedContextLink,- handleEditContextLink,- handleAddContextLink,- handleCancelModal,- handleSaveContextLink,- };-};--export default useContextLinkModal;diff --git a/frontend/src/container/NewWidget/RightContainer/DashboardYAxisUnitSelectorWrapper.tsx b/frontend/src/container/NewWidget/RightContainer/DashboardYAxisUnitSelectorWrapper.tsxdeleted file mode 100644index 9588f2a42b..0000000000--- a/frontend/src/container/NewWidget/RightContainer/DashboardYAxisUnitSelectorWrapper.tsx+++ /dev/null@@ -1,56 +0,0 @@-import { Dispatch, SetStateAction, useEffect } from 'react';-import { Typography } from '@signozhq/ui/typography';-import YAxisUnitSelectorComponent from 'components/YAxisUnitSelector';-import { YAxisSource } from 'components/YAxisUnitSelector/types';-import useGetYAxisUnit from 'hooks/useGetYAxisUnit';--type OnSelectType = Dispatch<SetStateAction<string>> | ((val: string) => void);--/**- * Wrapper component for the y-axis unit selector for dashboards.- */-function DashboardYAxisUnitSelectorWrapper({- value,- onSelect,- fieldLabel,- shouldUpdateYAxisUnit,- selectedQueryName,- 'data-testid': dataTestId,-}: {- value: string;- onSelect: OnSelectType;- fieldLabel: string;- shouldUpdateYAxisUnit: boolean;- selectedQueryName?: string;- 'data-testid'?: string;-}): JSX.Element {- const { yAxisUnit: initialYAxisUnit, isLoading } =- useGetYAxisUnit(selectedQueryName);-- useEffect(() => {- if (shouldUpdateYAxisUnit) {- onSelect(initialYAxisUnit || '');- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [initialYAxisUnit, shouldUpdateYAxisUnit]);-- return (- <div className="y-axis-unit-selector-v2">- <Typography.Text className="heading">{fieldLabel}</Typography.Text>- <YAxisUnitSelectorComponent- value={value}- onChange={onSelect}- initialValue={initialYAxisUnit}- source={YAxisSource.DASHBOARDS}- loading={isLoading}- data-testid={dataTestId}- />- </div>- );-}--DashboardYAxisUnitSelectorWrapper.defaultProps = {- selectedQueryName: undefined,-};--export default DashboardYAxisUnitSelectorWrapper;diff --git a/frontend/src/container/NewWidget/RightContainer/LegendColors/LegendColors.styles.scss b/frontend/src/container/NewWidget/RightContainer/LegendColors/LegendColors.styles.scssdeleted file mode 100644index 924efdc828..0000000000--- a/frontend/src/container/NewWidget/RightContainer/LegendColors/LegendColors.styles.scss+++ /dev/null@@ -1,144 +0,0 @@-.legend-colors-container {- .legend-colors-collapse {- .ant-collapse-header {- padding: 8px 0 !important;- }-- .ant-collapse-content-box {- padding: 0 0 12px 0 !important;- }- }-- .legend-colors-content {- .legend-colors-header {- display: flex;- justify-content: flex-end;- margin-bottom: 8px;- }-- .legend-items {- display: flex;- flex-direction: column;- gap: 8px;- max-height: 200px;- overflow-y: auto;- padding-top: 4px;-- /* Webkit scrollbar styling */- &::-webkit-scrollbar {- width: 1px;- }-- &::-webkit-scrollbar-track {- background: transparent;- }-- &::-webkit-scrollbar-thumb {- background: var(--l1-border);- border-radius: 0.5px;- }-- &::-webkit-scrollbar-thumb:hover {- background: var(--l3-background);- }-- /* Firefox scrollbar styling */- scrollbar-width: thin;- scrollbar-color: var(--l1-border) transparent;- }-- .legend-item-wrapper {- .ant-color-picker-trigger {- width: 100%;- height: auto;- padding: 0;- border: none;- background: transparent;- box-shadow: none;-- &:hover {- border: none;- box-shadow: none;- }-- &:focus {- border: none;- box-shadow: none;- outline: none;- }- }- }-- .legend-item {- display: grid;- grid-template-columns: 1fr max-content;- gap: 12px;- align-items: center;- justify-content: center;- padding: 6px 8px;- border-radius: 4px;- transition: all 0.2s ease;- cursor: pointer;- width: 100%;- border: 1px solid transparent;-- &:hover {- background-color: var(--l1-border);- border-color: var(--l1-border);- transform: translateY(-1px);- }-- &:active {- transform: translateY(0);- }-- .legend-info {- display: flex;- align-items: center;- gap: 8px;- flex: 1;- min-width: 0;-- .legend-marker {- width: 12px;- height: 12px;- border-radius: 2px;- flex-shrink: 0;- }-- .legend-label-text {- flex: 1;- font-size: 12px;- min-width: 0;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;- display: block;- }- }-- .legend-actions {- display: flex;- align-items: center;- gap: 8px;- flex-shrink: 0;-- .reset-link {- font-size: 11px;- text-decoration: none;-- &:hover {- text-decoration: underline;- }- }- }- }- }-- .legend-colors-header {- display: flex;- align-items: center;- margin-bottom: 8px;- gap: 8px;- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/LegendColors/LegendColors.test.tsx b/frontend/src/container/NewWidget/RightContainer/LegendColors/LegendColors.test.tsxdeleted file mode 100644index d2ff31a367..0000000000--- a/frontend/src/container/NewWidget/RightContainer/LegendColors/LegendColors.test.tsx+++ /dev/null@@ -1,131 +0,0 @@-import { ColorPickerProps } from 'antd';-import type { Color } from 'antd/es/color-picker';-import { render, screen, userEvent } from 'tests/test-utils';--import LegendColors from './LegendColors';--jest.mock('hooks/queryBuilder/useQueryBuilder', () => ({- __esModule: true,- useQueryBuilder: (): { currentQuery: unknown } => ({- currentQuery: {- builder: {- queryData: [- {- queryName: 'A',- legend: '{service.name}',- },- ],- },- },- }),-}));--jest.mock('hooks/useDarkMode', () => ({- useIsDarkMode: (): boolean => false,-}));--jest.mock('antd', () => {- const actual = jest.requireActual('antd');- return {- ...actual,- ColorPicker: ({ onChange, children }: ColorPickerProps): JSX.Element => (- <button- type="button"- data-testid="legend-color-picker"- onClick={(): void =>- onChange!({ toHexString: (): string => '#ffffff' } as Color, '#ffffff')- }- >- {children}- </button>- ),- };-});--describe('LegendColors', () => {- it('renders legend colors panel and items', async () => {- const user = userEvent.setup();-- render(- <LegendColors- customLegendColors={{}}- setCustomLegendColors={jest.fn()}- queryResponse={undefined}- />,- );-- expect(screen.getByText('Legend Colors')).toBeInTheDocument();-- // Expand the collapse to reveal legend items- await user.click(- screen.getByRole('tab', {- name: /Legend Colors/i,- }),- );-- expect(screen.getByText('{service.name}')).toBeInTheDocument();- });-- it('calls setCustomLegendColors when color is changed', async () => {- const user = userEvent.setup();- const setCustomLegendColors = jest.fn();-- render(- <LegendColors- customLegendColors={{}}- setCustomLegendColors={setCustomLegendColors}- queryResponse={undefined}- />,- );-- // Expand to render the mocked ColorPicker button- await user.click(- screen.getByRole('tab', {- name: /Legend Colors/i,- }),- );-- const colorTrigger = screen.getByTestId('legend-color-picker');-- await user.click(colorTrigger);-- expect(setCustomLegendColors).toHaveBeenCalled();- });-- it('throttles rapid color changes', async () => {- jest.useFakeTimers();- const user = userEvent.setup({ advanceTimers: jest.advanceTimersByTime });- const setCustomLegendColors = jest.fn();-- render(- <LegendColors- customLegendColors={{}}- setCustomLegendColors={setCustomLegendColors}- queryResponse={undefined}- />,- );-- // Expand panel to render the mocked ColorPicker button- await user.click(- screen.getByRole('tab', {- name: /Legend Colors/i,- }),- );-- const colorTrigger = screen.getByTestId('legend-color-picker');-- // Fire multiple rapid changes- await user.click(colorTrigger);- await user.click(colorTrigger);- await user.click(colorTrigger);- await user.click(colorTrigger);-- // Flush pending throttled calls- jest.advanceTimersByTime(500);-- // Throttling should ensure we don't invoke the setter once per click- expect(setCustomLegendColors).toHaveBeenCalledTimes(2);-- jest.useRealTimers();- });-});diff --git a/frontend/src/container/NewWidget/RightContainer/LegendColors/LegendColors.tsx b/frontend/src/container/NewWidget/RightContainer/LegendColors/LegendColors.tsxdeleted file mode 100644index 1ca999aa38..0000000000--- a/frontend/src/container/NewWidget/RightContainer/LegendColors/LegendColors.tsx+++ /dev/null@@ -1,223 +0,0 @@-import {- Dispatch,- SetStateAction,- useEffect,- useMemo,- useRef,- useState,-} from 'react';-import { UseQueryResult } from 'react-query';-import { Button, Collapse, ColorPicker, Tooltip } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import { themeColors } from 'constants/theme';-import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { useIsDarkMode } from 'hooks/useDarkMode';-import { getLegend } from 'lib/dashboard/getQueryResults';-import getLabelName from 'lib/getLabelName';-import { generateColor } from 'lib/uPlotLib/utils/generateColor';-import throttle from 'lodash-es/throttle';-import { Palette } from '@signozhq/icons';-import { SuccessResponse } from 'types/api';-import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';--import './LegendColors.styles.scss';--// Component for legend text with conditional tooltip-function LegendText({ label }: { label: string }): JSX.Element {- const textRef = useRef<HTMLSpanElement>(null);- const [isOverflowing, setIsOverflowing] = useState(false);-- useEffect(() => {- const checkOverflow = (): void => {- if (textRef.current) {- const isTextOverflowing =- textRef.current.scrollWidth > textRef.current.clientWidth;- setIsOverflowing(isTextOverflowing);- }- };-- checkOverflow();- // Check on window resize- window.addEventListener('resize', checkOverflow);- return (): void => window.removeEventListener('resize', checkOverflow);- }, [label]);-- return (- <Tooltip title={label} open={isOverflowing ? undefined : false}>- <span ref={textRef} className="legend-label-text">- {label}- </span>- </Tooltip>- );-}--interface LegendColorsProps {- customLegendColors: Record<string, string>;- setCustomLegendColors: Dispatch<SetStateAction<Record<string, string>>>;- queryResponse?: UseQueryResult<- SuccessResponse<MetricRangePayloadProps, unknown>,- Error- >;-}--function LegendColors({- customLegendColors,- setCustomLegendColors,- queryResponse = null as any,-}: LegendColorsProps): JSX.Element {- const { currentQuery } = useQueryBuilder();- const isDarkMode = useIsDarkMode();-- // Get legend labels from query response or current query- const legendLabels = useMemo(() => {- if (queryResponse?.data?.payload?.data?.result) {- return queryResponse.data.payload.data.result.map((item: any) =>- getLegend(- item,- currentQuery,- getLabelName(item.metric || {}, item.queryName || '', item.legend || ''),- ),- );- }-- // Fallback to query data if no response available- return currentQuery.builder.queryData.map((query) =>- getLabelName({}, query.queryName || '', query.legend || ''),- );- }, [queryResponse, currentQuery]);-- // Get current or default color for a legend- const getColorForLegend = (label: string): string => {- if (customLegendColors[label]) {- return customLegendColors[label];- }- return generateColor(- label,- isDarkMode ? themeColors.chartcolors : themeColors.lightModeColor,- );- };-- // Handle color change (throttled to avoid excessive updates)- const handleColorChange = useMemo(- () =>- throttle((label: string, color: string): void => {- setCustomLegendColors((prev) => ({- ...prev,- [label]: color,- }));- }, 200), // 200ms is a good compromise between responsiveness and performance- [setCustomLegendColors],- );-- // Clean up throttled handler on unmount- useEffect(() => {- return (): void => {- handleColorChange.cancel();- };- }, [handleColorChange]);-- // Reset to default color- const resetToDefault = (label: string): void => {- setCustomLegendColors((prev) => {- const updated = { ...prev };- delete updated[label];- return updated;- });- };-- // Reset all colors to default- const resetAllColors = (): void => {- setCustomLegendColors({});- };-- const items = [- {- key: 'legend-colors',- label: (- <section className="legend-colors-header">- <Palette size={16} />- <Typography.Text className="typography">Legend Colors</Typography.Text>- </section>- ),- children: (- <div className="legend-colors-content">- {legendLabels.length === 0 ? (- <Typography.Text color="muted">- No legends available. Run a query to see legend options.- </Typography.Text>- ) : (- <>- <div className="legend-colors-header">- <Button- size="small"- type="text"- onClick={resetAllColors}- disabled={Object.keys(customLegendColors).length === 0}- >- Reset All- </Button>- </div>- <div className="legend-items">- {legendLabels.map((label: string) => (- <div key={label} className="legend-item-wrapper">- <ColorPicker- value={getColorForLegend(label)}- onChange={(color): void =>- handleColorChange(label, color.toHexString())- }- size="small"- showText={false}- trigger="click"- >- <div className="legend-item">- <div className="legend-info">- <div- className="legend-marker"- style={{ backgroundColor: getColorForLegend(label) }}- />- <LegendText label={label} />- </div>- {customLegendColors[label] && (- <div className="legend-actions">- <Typography.Link- className="reset-link"- onClick={(e): void => {- e.stopPropagation();- resetToDefault(label);- }}- >- Reset- </Typography.Link>- </div>- )}- </div>- </ColorPicker>- </div>- ))}- </div>- </>- )}- </div>- ),- },- ];-- return (- <div className="legend-colors-container">- <Collapse- items={items}- ghost- size="small"- expandIconPosition="end"- className="legend-colors-collapse"- accordion- />- </div>- );-}--LegendColors.defaultProps = {- queryResponse: null,-};--export default LegendColors;diff --git a/frontend/src/container/NewWidget/RightContainer/RightContainer.styles.scss b/frontend/src/container/NewWidget/RightContainer/RightContainer.styles.scssdeleted file mode 100644index 9b735ec73a..0000000000--- a/frontend/src/container/NewWidget/RightContainer/RightContainer.styles.scss+++ /dev/null@@ -1,224 +0,0 @@-.right-container {- display: flex;- flex-direction: column;- font-family: 'Space Mono';- padding-bottom: 48px;-- .panel-type-select {- width: 100%;- }-- .section-heading {- font-family: 'Space Mono';- color: var(--l2-foreground);- font-size: 13px;- font-style: normal;- font-weight: 400;- line-height: 18px; /* 138.462% */- letter-spacing: 0.52px;- text-transform: uppercase;- }-- .section-heading-small {- font-family: 'Space Mono';- color: var(--l2-foreground);- font-size: 12px;- font-style: normal;- font-weight: 400;- word-break: initial;- line-height: 16px; /* 133.333% */- letter-spacing: 0.48px;- }-- .header {- display: flex;- padding: 14px 14px 14px 12px;- align-items: center;- gap: 8px;-- .purple-dot {- width: 8px;- height: 8px;- border-radius: 2px;- background: var(--bg-robin-400);- }- .header-text {- color: var(--l2-foreground);- font-family: Inter;- font-size: 14px;- font-style: normal;- font-weight: 400;- line-height: 20px; /* 142.857% */- letter-spacing: -0.07px;- }- }- .control-container {- display: flex;- flex-direction: column;- gap: 8px;- }-- .panel-config {- display: flex;- flex-direction: column;-- .toggle-card {- display: flex;- flex-direction: row;- justify-content: space-between;- align-items: center;- padding: 12px;- border-radius: 2px;- border: 1px solid var(--l1-border);- background: var(--l2-background);- }-- .toggle-card-text-container {- display: flex;- flex-direction: column;- gap: 4px;- }-- .panel-type-select {- width: 100%;- .ant-select-selector {- display: flex;- height: 32px;- padding: 6px 6px 6px 8px;- align-items: center;- gap: 4px;- flex-shrink: 0;- border-radius: 2px;- border: 1px solid var(--l1-border);- background: var(--l2-background);- }- }-- .toggle-card-description {- color: var(--l2-foreground);- font-family: Inter;- font-size: 12px;- font-style: normal;- font-weight: 400;- opacity: 0.6;- line-height: 16px; /* 133.333% */- }-- .log-scale,- .decimal-precision-selector,- .legend-position {- justify-content: space-between;- }-- .y-axis-unit-selector,- .y-axis-unit-selector-v2 {- display: flex;- flex-direction: column;- gap: 8px;-- .heading {- @extend .section-heading;- }-- .input {- display: flex;- height: 32px;- padding: 6px 6px 6px 8px;- align-items: center;- gap: 4px;- align-self: stretch;- border-radius: 2px;- border: 1px solid var(--l1-border);- background: var(--l2-background);-- .ant-input {- background: var(--l2-background);- }- }- }-- .y-axis-unit-selector-v2 {- .y-axis-unit-selector-component {- .ant-select {- width: 100%;- border-radius: 2px;-- .ant-select-selector {- border: 1px solid var(--l1-border);- background: var(--l2-background);- }- }- }- }-- .soft-min-max {- display: flex;- align-items: center;- justify-content: space-between;- margin-top: 4px;- gap: 12px;-- .container {- display: flex;- height: 32px;- align-items: center;- width: 50%;- border-radius: 2px;- border: 1px solid var(--l1-border);- background: var(--l2-background);- box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);-- .text {- color: var(--l2-foreground);- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- letter-spacing: 0.48px;- text-transform: uppercase;- width: 60%;- padding: 8px;- }- .input {- width: 50%;- border: none;- border-left: 1px solid var(--l1-border);- }- }- }-- .stack-chart {- flex-direction: row;- justify-content: space-between;- }- }-- .context-links {- padding: 12px 12px 16px 12px;- border-bottom: 1px solid var(--l1-border);- }-- .thresholds-section {- padding: 12px 12px 16px 12px;- border-top: 1px solid var(--l1-border);- }-}--.select-option {- display: flex;- align-items: center;- gap: 6px;- .icon {- display: flex;- align-items: center;- }-- .display {- color: var(--l1-foreground);- font-family: Inter;- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/AlertsSection/AlertsSection.styles.scss b/frontend/src/container/NewWidget/RightContainer/SettingSections/AlertsSection/AlertsSection.styles.scssdeleted file mode 100644index e30b8e8702..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/AlertsSection/AlertsSection.styles.scss+++ /dev/null@@ -1,34 +0,0 @@-.alerts-section {- display: flex;- align-items: center;- justify-content: space-between;- padding: 12px;- min-height: 44px;- border-top: 1px solid var(--l1-border);- cursor: pointer;-- .alerts-section__left {- display: flex;- align-items: center;- gap: 8px;-- .alerts-section__bell-icon {- color: var(--l1-foreground);- }-- .alerts-section__text {- color: var(--l1-foreground);- font-family: 'Space Mono';- font-size: 13px;- font-style: normal;- font-weight: 400;- line-height: 18px; /* 138.462% */- letter-spacing: 0.52px;- text-transform: uppercase;- }- }-- .alerts-section__plus-icon {- color: var(--l1-foreground);- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/AlertsSection/AlertsSection.tsx b/frontend/src/container/NewWidget/RightContainer/SettingSections/AlertsSection/AlertsSection.tsxdeleted file mode 100644index fbfe8234f9..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/AlertsSection/AlertsSection.tsx+++ /dev/null@@ -1,23 +0,0 @@-import { Typography } from '@signozhq/ui/typography';-import { ConciergeBell, Plus, SquareArrowOutUpRight } from '@signozhq/icons';--import './AlertsSection.styles.scss';--interface AlertsSectionProps {- onCreateAlertsHandler: () => void;-}--export default function AlertsSection({- onCreateAlertsHandler,-}: AlertsSectionProps): JSX.Element {- return (- <section className="alerts-section" onClick={onCreateAlertsHandler}>- <div className="alerts-section__left">- <ConciergeBell size={14} className="alerts-section__bell-icon" />- <Typography.Text className="alerts-section__text">Alerts</Typography.Text>- <SquareArrowOutUpRight size={10} className="info-icon" />- </div>- <Plus size={14} className="alerts-section__plus-icon" />- </section>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/AxesSection/AxesSection.tsx b/frontend/src/container/NewWidget/RightContainer/SettingSections/AxesSection/AxesSection.tsxdeleted file mode 100644index 83da398c1f..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/AxesSection/AxesSection.tsx+++ /dev/null@@ -1,99 +0,0 @@-import { Dispatch, SetStateAction } from 'react';-import { InputNumber, Select } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import { Axis3D, ChartLine, Spline } from '@signozhq/icons';--import SettingsSection from '../../components/SettingsSection/SettingsSection';--enum LogScale {- LINEAR = 'linear',- LOGARITHMIC = 'logarithmic',-}--const { Option } = Select;--interface AxesSectionProps {- allowSoftMinMax: boolean;- allowLogScale: boolean;- softMin: number | null;- softMax: number | null;- setSoftMin: Dispatch<SetStateAction<number | null>>;- setSoftMax: Dispatch<SetStateAction<number | null>>;- isLogScale: boolean;- setIsLogScale: Dispatch<SetStateAction<boolean>>;-}--export default function AxesSection({- allowSoftMinMax,- allowLogScale,- softMin,- softMax,- setSoftMin,- setSoftMax,- isLogScale,- setIsLogScale,-}: AxesSectionProps): JSX.Element {- const softMinHandler = (value: number | null): void => {- setSoftMin(value);- };-- const softMaxHandler = (value: number | null): void => {- setSoftMax(value);- };-- return (- <SettingsSection title="Axes" icon={<Axis3D size={14} />}>- {allowSoftMinMax && (- <section className="soft-min-max">- <section className="container">- <Typography.Text className="text">Soft Min</Typography.Text>- <InputNumber- type="number"- value={softMin}- onChange={softMinHandler}- rootClassName="input"- />- </section>- <section className="container">- <Typography.Text className="text">Soft Max</Typography.Text>- <InputNumber- value={softMax}- type="number"- rootClassName="input"- onChange={softMaxHandler}- />- </section>- </section>- )}-- {allowLogScale && (- <section className="log-scale control-container">- <Typography.Text className="section-heading">Y Axis Scale</Typography.Text>- <Select- onChange={(value): void => setIsLogScale(value === LogScale.LOGARITHMIC)}- value={isLogScale ? LogScale.LOGARITHMIC : LogScale.LINEAR}- className="panel-type-select"- defaultValue={LogScale.LINEAR}- >- <Option value={LogScale.LINEAR}>- <div className="select-option">- <div className="icon">- <ChartLine size={16} />- </div>- <Typography.Text className="display">Linear</Typography.Text>- </div>- </Option>- <Option value={LogScale.LOGARITHMIC}>- <div className="select-option">- <div className="icon">- <Spline size={16} />- </div>- <Typography.Text className="display">Logarithmic</Typography.Text>- </div>- </Option>- </Select>- </section>- )}- </SettingsSection>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/ChartAppearanceSection/ChartAppearanceSection.tsx b/frontend/src/container/NewWidget/RightContainer/SettingSections/ChartAppearanceSection/ChartAppearanceSection.tsxdeleted file mode 100644index aa8ffb7a04..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/ChartAppearanceSection/ChartAppearanceSection.tsx+++ /dev/null@@ -1,88 +0,0 @@-import { Dispatch, SetStateAction } from 'react';-import { Switch } from '@signozhq/ui/switch';-import { Typography } from '@signozhq/ui/typography';-import {- FillMode,- LineInterpolation,- LineStyle,-} from 'lib/uPlotV2/config/types';-import { Paintbrush } from '@signozhq/icons';--import DisconnectValuesSelector from '../../components/DisconnectValuesSelector/DisconnectValuesSelector';-import FillModeSelector from '../../components/FillModeSelector/FillModeSelector';-import LineInterpolationSelector from '../../components/LineInterpolationSelector/LineInterpolationSelector';-import LineStyleSelector from '../../components/LineStyleSelector/LineStyleSelector';-import SettingsSection from '../../components/SettingsSection/SettingsSection';--interface ChartAppearanceSectionProps {- fillMode: FillMode;- setFillMode: Dispatch<SetStateAction<FillMode>>;- lineStyle: LineStyle;- setLineStyle: Dispatch<SetStateAction<LineStyle>>;- lineInterpolation: LineInterpolation;- setLineInterpolation: Dispatch<SetStateAction<LineInterpolation>>;- showPoints: boolean;- setShowPoints: Dispatch<SetStateAction<boolean>>;- spanGaps: boolean | number;- setSpanGaps: Dispatch<SetStateAction<boolean | number>>;- allowFillMode: boolean;- allowLineStyle: boolean;- allowLineInterpolation: boolean;- allowShowPoints: boolean;- allowSpanGaps: boolean;- stepInterval: number;-}--export default function ChartAppearanceSection({- fillMode,- setFillMode,- lineStyle,- setLineStyle,- lineInterpolation,- setLineInterpolation,- showPoints,- setShowPoints,- spanGaps,- setSpanGaps,- allowFillMode,- allowLineStyle,- allowLineInterpolation,- allowShowPoints,- allowSpanGaps,- stepInterval,-}: ChartAppearanceSectionProps): JSX.Element {- return (- <SettingsSection title="Chart Appearance" icon={<Paintbrush size={14} />}>- {allowFillMode && (- <FillModeSelector value={fillMode} onChange={setFillMode} />- )}- {allowLineStyle && (- <LineStyleSelector value={lineStyle} onChange={setLineStyle} />- )}- {allowLineInterpolation && (- <LineInterpolationSelector- value={lineInterpolation}- onChange={setLineInterpolation}- />- )}- {allowShowPoints && (- <section className="show-points toggle-card">- <div className="toggle-card-text-container">- <Typography.Text className="section-heading">Show points</Typography.Text>- <Typography.Text className="toggle-card-description">- Display individual data points on the chart- </Typography.Text>- </div>- <Switch value={showPoints} onChange={setShowPoints} />- </section>- )}- {allowSpanGaps && (- <DisconnectValuesSelector- value={spanGaps}- minValue={stepInterval}- onChange={setSpanGaps}- />- )}- </SettingsSection>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/ContextLinksSection/ContextLinksSection.styles.scss b/frontend/src/container/NewWidget/RightContainer/SettingSections/ContextLinksSection/ContextLinksSection.styles.scssdeleted file mode 100644index d6ae361451..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/ContextLinksSection/ContextLinksSection.styles.scss+++ /dev/null@@ -1,4 +0,0 @@-.context-links-section {- padding: 12px 12px 16px 12px;- border-bottom: 1px solid var(--l1-border);-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/ContextLinksSection/ContextLinksSection.tsx b/frontend/src/container/NewWidget/RightContainer/SettingSections/ContextLinksSection/ContextLinksSection.tsxdeleted file mode 100644index bc25f37d08..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/ContextLinksSection/ContextLinksSection.tsx+++ /dev/null@@ -1,36 +0,0 @@-import { Dispatch, SetStateAction } from 'react';-import { Link } from '@signozhq/icons';-import { ContextLinksData, Widgets } from 'types/api/dashboard/getAll';--import SettingsSection from '../../components/SettingsSection/SettingsSection';-import ContextLinks from '../../ContextLinks';--import './ContextLinksSection.styles.scss';--interface ContextLinksSectionProps {- contextLinks: ContextLinksData;- setContextLinks: Dispatch<SetStateAction<ContextLinksData>>;- selectedWidget?: Widgets;-}--export default function ContextLinksSection({- contextLinks,- setContextLinks,- selectedWidget,-}: ContextLinksSectionProps): JSX.Element {- return (- <SettingsSection- title="Context Links"- icon={<Link size={14} />}- defaultOpen={!!contextLinks.linksData.length}- >- <div className="context-links-section">- <ContextLinks- contextLinks={contextLinks}- setContextLinks={setContextLinks}- selectedWidget={selectedWidget}- />- </div>- </SettingsSection>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/FormattingUnitsSection/FormattingUnitsSection.tsx b/frontend/src/container/NewWidget/RightContainer/SettingSections/FormattingUnitsSection/FormattingUnitsSection.tsxdeleted file mode 100644index 9aa46877bb..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/FormattingUnitsSection/FormattingUnitsSection.tsx+++ /dev/null@@ -1,87 +0,0 @@-import { Dispatch, SetStateAction } from 'react';-import { Select } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import { PrecisionOption } from 'components/Graph/types';-import { PanelDisplay } from 'constants/queryBuilder';-import { SlidersHorizontal } from '@signozhq/icons';-import { ColumnUnit } from 'types/api/dashboard/getAll';--import { ColumnUnitSelector } from '../../ColumnUnitSelector/ColumnUnitSelector';-import SettingsSection from '../../components/SettingsSection/SettingsSection';-import DashboardYAxisUnitSelectorWrapper from '../../DashboardYAxisUnitSelectorWrapper';--interface FormattingUnitsSectionProps {- selectedPanelDisplay: PanelDisplay | '';- yAxisUnit: string;- setYAxisUnit: Dispatch<SetStateAction<string>>;- isNewDashboard: boolean;- decimalPrecision: PrecisionOption;- setDecimalPrecision: Dispatch<SetStateAction<PrecisionOption>>;- columnUnits: ColumnUnit;- setColumnUnits: Dispatch<SetStateAction<ColumnUnit>>;- allowYAxisUnit: boolean;- allowDecimalPrecision: boolean;- allowPanelColumnPreference: boolean;- decimapPrecisionOptions: { label: string; value: PrecisionOption }[];-}--export default function FormattingUnitsSection({- selectedPanelDisplay,- yAxisUnit,- setYAxisUnit,- isNewDashboard,- decimalPrecision,- setDecimalPrecision,- columnUnits,- setColumnUnits,- allowYAxisUnit,- allowDecimalPrecision,- allowPanelColumnPreference,- decimapPrecisionOptions,-}: FormattingUnitsSectionProps): JSX.Element {- return (- <SettingsSection- title="Formatting & Units"- icon={<SlidersHorizontal size={14} />}- >- {allowYAxisUnit && (- <DashboardYAxisUnitSelectorWrapper- onSelect={setYAxisUnit}- value={yAxisUnit || ''}- fieldLabel={- selectedPanelDisplay === PanelDisplay.VALUE ||- selectedPanelDisplay === PanelDisplay.PIE- ? 'Unit'- : 'Y Axis Unit'- }- shouldUpdateYAxisUnit={isNewDashboard}- />- )}-- {allowDecimalPrecision && (- <section className="decimal-precision-selector control-container">- <Typography.Text className="section-heading">- Decimal Precision- </Typography.Text>- <Select- options={decimapPrecisionOptions}- value={decimalPrecision}- className="panel-type-select"- data-testid="decimal-precision-selector"- defaultValue={decimapPrecisionOptions[0]?.value}- onChange={(val: PrecisionOption): void => setDecimalPrecision(val)}- />- </section>- )}-- {allowPanelColumnPreference && (- <ColumnUnitSelector- columnUnits={columnUnits}- setColumnUnits={setColumnUnits}- isNewDashboard={isNewDashboard}- data-testid="column-unit-selector"- />- )}- </SettingsSection>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/GeneralSettingsSection/GeneralSettingsSection.styles.scss b/frontend/src/container/NewWidget/RightContainer/SettingSections/GeneralSettingsSection/GeneralSettingsSection.styles.scssdeleted file mode 100644index a9b10f4495..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/GeneralSettingsSection/GeneralSettingsSection.styles.scss+++ /dev/null@@ -1,43 +0,0 @@-.general-settings__name-description {- padding: 0 0 4px 0;-- .general-settings__name-input {- display: flex;- padding: 6px 6px 6px 8px;- align-items: center;- gap: 4px;- flex: 1 0 0;- align-self: stretch;- border-radius: 2px;- border: 1px solid var(--l1-border);- background: var(--l2-background);- color: var(--l1-foreground);- font-family: Inter;- font-size: 14px;- font-style: normal;- font-weight: 400;- line-height: 18px; /* 128.571% */- letter-spacing: -0.07px;- }-- .general-settings__description-input {- border-style: unset;- .ant-input {- display: flex;- height: 80px;- padding: 6px 6px 6px 8px;- align-items: flex-start;- gap: 4px;- border-radius: 2px;- border: 1px solid var(--l1-border);- background: var(--l2-background);- color: var(--l1-foreground);- font-family: Inter;- font-size: 14px;- font-style: normal;- font-weight: 400;- line-height: 18px; /* 128.571% */- letter-spacing: -0.07px;- }- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/GeneralSettingsSection/GeneralSettingsSection.tsx b/frontend/src/container/NewWidget/RightContainer/SettingSections/GeneralSettingsSection/GeneralSettingsSection.tsxdeleted file mode 100644index fc67bd0f46..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/GeneralSettingsSection/GeneralSettingsSection.tsx+++ /dev/null@@ -1,159 +0,0 @@-import {- Dispatch,- SetStateAction,- useCallback,- useMemo,- useRef,- useState,-} from 'react';-import type { InputRef } from 'antd';-import { AutoComplete, Input } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import { popupContainer } from 'utils/selectPopupContainer';--import SettingsSection from '../../components/SettingsSection/SettingsSection';--import './GeneralSettingsSection.styles.scss';--const { TextArea } = Input;--interface VariableOption {- value: string;- label: string;-}--interface GeneralSettingsSectionProps {- title: string;- setTitle: Dispatch<SetStateAction<string>>;- description: string;- setDescription: Dispatch<SetStateAction<string>>;- dashboardVariables: Record<string, { name?: string }>;-}--export default function GeneralSettingsSection({- title,- setTitle,- description,- setDescription,- dashboardVariables,-}: GeneralSettingsSectionProps): JSX.Element {- const [inputValue, setInputValue] = useState(title);- const [autoCompleteOpen, setAutoCompleteOpen] = useState(false);- const [cursorPos, setCursorPos] = useState(0);- const inputRef = useRef<InputRef>(null);-- const onChangeHandler = (- setFunc: Dispatch<SetStateAction<string>>,- value: string,- ): void => {- setFunc(value);- };-- const dashboardVariableOptions = useMemo<VariableOption[]>(() => {- return Object.entries(dashboardVariables).map(([, value]) => ({- value: value.name || '',- label: value.name || '',- }));- }, [dashboardVariables]);-- const updateCursorAndDropdown = useCallback(- (value: string, pos: number): void => {- setCursorPos(pos);- const lastDollar = value.lastIndexOf('$', pos - 1);- setAutoCompleteOpen(lastDollar !== -1 && pos >= lastDollar + 1);- },- [],- );-- const onInputChange = useCallback(- (value: string): void => {- setInputValue(value);- onChangeHandler(setTitle, value);- setTimeout(() => {- const pos = inputRef.current?.input?.selectionStart ?? 0;- updateCursorAndDropdown(value, pos);- }, 0);- },- [setTitle, updateCursorAndDropdown],- );-- const onSelect = useCallback(- (selectedValue: string): void => {- const pos = cursorPos;- const value = inputValue;- const lastDollar = value.lastIndexOf('$', pos - 1);- const textBeforeDollar = value.substring(0, lastDollar);- const textAfterDollar = value.substring(lastDollar + 1);- const match = textAfterDollar.match(/^([a-zA-Z0-9_.]*)/);- const rest = textAfterDollar.substring(match ? match[1].length : 0);- const newValue = `${textBeforeDollar}$${selectedValue}${rest}`;- setInputValue(newValue);- onChangeHandler(setTitle, newValue);- setAutoCompleteOpen(false);- setTimeout(() => {- const newCursor = `${textBeforeDollar}$${selectedValue}`.length;- inputRef.current?.input?.setSelectionRange(newCursor, newCursor);- setCursorPos(newCursor);- }, 0);- },- [cursorPos, inputValue, setTitle],- );-- const filterOption = useCallback(- (currentInputValue: string, option?: VariableOption): boolean => {- const pos = cursorPos;- const value = currentInputValue;- const lastDollar = value.lastIndexOf('$', pos - 1);- if (lastDollar === -1) {- return false;- }- const afterDollar = value.substring(lastDollar + 1, pos).toLowerCase();- return option?.value.toLowerCase().startsWith(afterDollar) || false;- },- [cursorPos],- );-- const handleInputCursor = useCallback((): void => {- const pos = inputRef.current?.input?.selectionStart ?? 0;- updateCursorAndDropdown(inputValue, pos);- }, [inputValue, updateCursorAndDropdown]);-- return (- <SettingsSection title="General" defaultOpen icon={null}>- <section className="general-settings__name-description control-container">- <Typography.Text className="section-heading">Name</Typography.Text>- <AutoComplete- options={dashboardVariableOptions}- value={inputValue}- onChange={onInputChange}- onSelect={onSelect}- filterOption={filterOption}- getPopupContainer={popupContainer}- placeholder="Enter the panel name here..."- open={autoCompleteOpen}- >- <Input- rootClassName="general-settings__name-input"- ref={inputRef}- onSelect={handleInputCursor}- data-testid="panel-name-input"- onClick={handleInputCursor}- onBlur={(): void => setAutoCompleteOpen(false)}- />- </AutoComplete>- <Typography.Text className="section-heading">Description</Typography.Text>- <TextArea- placeholder="Enter the panel description here..."- bordered- allowClear- value={description}- data-testid="panel-description-input"- onChange={(event): void =>- onChangeHandler(setDescription, event.target.value)- }- rootClassName="general-settings__description-input"- />- </section>- </SettingsSection>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/HistogramBucketsSection/HistogramBucketsSection.styles.scss b/frontend/src/container/NewWidget/RightContainer/SettingSections/HistogramBucketsSection/HistogramBucketsSection.styles.scssdeleted file mode 100644index f4aeb4c264..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/HistogramBucketsSection/HistogramBucketsSection.styles.scss+++ /dev/null@@ -1,38 +0,0 @@-.histogram-settings__bucket-config {- .histogram-settings__bucket-size-label {- margin-top: 8px;- }-- .histogram-settings__bucket-input {- display: flex;- width: 100%;- height: 32px;- padding: 6px 6px 6px 8px;- align-items: center;- gap: 4px;- align-self: stretch;- border-radius: 2px;- border: 1px solid var(--l1-border);- background: var(--l2-background);-- .ant-input {- background: var(--l2-background);- }- }-- .histogram-settings__combine-hist {- display: flex;- justify-content: space-between;- margin-top: 8px;-- .histogram-settings__merge-label {- color: var(--l2-foreground);- font-size: 13px;- font-style: normal;- font-weight: 400;- line-height: 18px; /* 138.462% */- letter-spacing: 0.52px;- text-transform: uppercase;- }- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/HistogramBucketsSection/HistogramBucketsSection.tsx b/frontend/src/container/NewWidget/RightContainer/SettingSections/HistogramBucketsSection/HistogramBucketsSection.tsxdeleted file mode 100644index 2c79340a98..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/HistogramBucketsSection/HistogramBucketsSection.tsx+++ /dev/null@@ -1,72 +0,0 @@-import { Dispatch, SetStateAction } from 'react';-import { InputNumber } from 'antd';-import { Switch } from '@signozhq/ui/switch';-import { Typography } from '@signozhq/ui/typography';--import SettingsSection from '../../components/SettingsSection/SettingsSection';--import './HistogramBucketsSection.styles.scss';--interface HistogramBucketsSectionProps {- bucketCount: number;- setBucketCount: Dispatch<SetStateAction<number>>;- bucketWidth: number;- setBucketWidth: Dispatch<SetStateAction<number>>;- combineHistogram: boolean;- setCombineHistogram: Dispatch<SetStateAction<boolean>>;-}--export default function HistogramBucketsSection({- bucketCount,- setBucketCount,- bucketWidth,- setBucketWidth,- combineHistogram,- setCombineHistogram,-}: HistogramBucketsSectionProps): JSX.Element {- return (- <SettingsSection title="Histogram / Buckets">- <section className="histogram-settings__bucket-config control-container">- <Typography.Text className="section-heading">- Number of buckets- </Typography.Text>- <InputNumber- value={bucketCount || null}- type="number"- min={0}- rootClassName="bucket-input"- placeholder="Default: 30"- onChange={(val): void => {- setBucketCount(val || 0);- }}- />- <Typography.Text className="section-heading histogram-settings__bucket-size-label">- Bucket width- </Typography.Text>- <InputNumber- value={bucketWidth || null}- type="number"- precision={2}- placeholder="Default: Auto"- step={0.1}- min={0.0}- rootClassName="histogram-settings__bucket-input"- onChange={(val): void => {- setBucketWidth(val || 0);- }}- />- <section className="histogram-settings__combine-hist">- <Typography.Text className="section-heading">- <span className="histogram-settings__merge-label">- Merge all series into one- </span>- </Typography.Text>- <Switch- value={combineHistogram}- onChange={(checked): void => setCombineHistogram(checked)}- />- </section>- </section>- </SettingsSection>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/LegendSection/LegendSection.tsx b/frontend/src/container/NewWidget/RightContainer/SettingSections/LegendSection/LegendSection.tsxdeleted file mode 100644index 5aea6f562a..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/LegendSection/LegendSection.tsx+++ /dev/null@@ -1,73 +0,0 @@-import { Dispatch, SetStateAction } from 'react';-import type { UseQueryResult } from 'react-query';-import { Select } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import { Layers } from '@signozhq/icons';-import { SuccessResponse } from 'types/api';-import { LegendPosition } from 'types/api/dashboard/getAll';-import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';--import SettingsSection from '../../components/SettingsSection/SettingsSection';-import LegendColors from '../../LegendColors/LegendColors';--const { Option } = Select;--interface LegendSectionProps {- allowLegendPosition: boolean;- allowLegendColors: boolean;- legendPosition: LegendPosition;- setLegendPosition: Dispatch<SetStateAction<LegendPosition>>;- customLegendColors: Record<string, string>;- setCustomLegendColors: Dispatch<SetStateAction<Record<string, string>>>;- queryResponse?: UseQueryResult<- SuccessResponse<MetricRangePayloadProps, unknown>,- Error- >;-}--export default function LegendSection({- allowLegendPosition,- allowLegendColors,- legendPosition,- setLegendPosition,- customLegendColors,- setCustomLegendColors,- queryResponse,-}: LegendSectionProps): JSX.Element {- return (- <SettingsSection title="Legend" icon={<Layers size={14} />}>- {allowLegendPosition && (- <section className="legend-position control-container">- <Typography.Text className="section-heading">Position</Typography.Text>- <Select- onChange={(value: LegendPosition): void => setLegendPosition(value)}- value={legendPosition}- className="panel-type-select"- defaultValue={LegendPosition.BOTTOM}- >- <Option value={LegendPosition.BOTTOM}>- <div className="select-option">- <Typography.Text className="display">Bottom</Typography.Text>- </div>- </Option>- <Option value={LegendPosition.RIGHT}>- <div className="select-option">- <Typography.Text className="display">Right</Typography.Text>- </div>- </Option>- </Select>- </section>- )}-- {allowLegendColors && (- <section className="legend-colors">- <LegendColors- customLegendColors={customLegendColors}- setCustomLegendColors={setCustomLegendColors}- queryResponse={queryResponse}- />- </section>- )}- </SettingsSection>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/ThresholdsSection/ThresholdsSection.styles.scss b/frontend/src/container/NewWidget/RightContainer/SettingSections/ThresholdsSection/ThresholdsSection.styles.scssdeleted file mode 100644index c0c6df62a2..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/ThresholdsSection/ThresholdsSection.styles.scss+++ /dev/null@@ -1,4 +0,0 @@-.thresholds-section {- padding: 12px 12px 16px 12px;- border-top: 1px solid var(--l1-border);-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/ThresholdsSection/ThresholdsSection.tsx b/frontend/src/container/NewWidget/RightContainer/SettingSections/ThresholdsSection/ThresholdsSection.tsxdeleted file mode 100644index db7b4a0526..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/ThresholdsSection/ThresholdsSection.tsx+++ /dev/null@@ -1,42 +0,0 @@-import { Dispatch, SetStateAction } from 'react';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { Antenna } from '@signozhq/icons';-import { ColumnUnit } from 'types/api/dashboard/getAll';--import SettingsSection from '../../components/SettingsSection/SettingsSection';-import ThresholdSelector from '../../Threshold/ThresholdSelector';-import { ThresholdProps } from '../../Threshold/types';--import './ThresholdsSection.styles.scss';--interface ThresholdsSectionProps {- thresholds: ThresholdProps[];- setThresholds: Dispatch<SetStateAction<ThresholdProps[]>>;- yAxisUnit: string;- selectedGraph: PANEL_TYPES;- columnUnits: ColumnUnit;-}--export default function ThresholdsSection({- thresholds,- setThresholds,- yAxisUnit,- selectedGraph,- columnUnits,-}: ThresholdsSectionProps): JSX.Element {- return (- <SettingsSection- title="Thresholds"- icon={<Antenna size={14} />}- defaultOpen={!!thresholds.length}- >- <ThresholdSelector- thresholds={thresholds}- setThresholds={setThresholds}- yAxisUnit={yAxisUnit}- selectedGraph={selectedGraph}- columnUnits={columnUnits}- />- </SettingsSection>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/SettingSections/VisualizationSettingsSection/VisualizationSettingsSection.tsx b/frontend/src/container/NewWidget/RightContainer/SettingSections/VisualizationSettingsSection/VisualizationSettingsSection.tsxdeleted file mode 100644index f995ef0991..0000000000--- a/frontend/src/container/NewWidget/RightContainer/SettingSections/VisualizationSettingsSection/VisualizationSettingsSection.tsx+++ /dev/null@@ -1,130 +0,0 @@-import { Dispatch, SetStateAction, useEffect, useState } from 'react';-import { Select } from 'antd';-import { Switch } from '@signozhq/ui/switch';-import { Typography } from '@signozhq/ui/typography';-import TimePreference from 'components/TimePreferenceDropDown';-import { PANEL_TYPES } from 'constants/queryBuilder';-import {- ItemsProps,- PanelTypesWithData,-} from 'container/GridCardLayout/panelTypeItems';-import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { LayoutDashboard } from '@signozhq/icons';-import { DataSource } from 'types/common/queryBuilder';--import SettingsSection from '../../components/SettingsSection/SettingsSection';-import { timePreferance } from '../../timeItems';--const { Option } = Select;--interface VisualizationSettingsSectionProps {- selectedGraph: PANEL_TYPES;- setGraphHandler: (type: PANEL_TYPES) => void;- selectedTime: timePreferance;- setSelectedTime: Dispatch<SetStateAction<timePreferance>>;- stackedBarChart: boolean;- setStackedBarChart: Dispatch<SetStateAction<boolean>>;- isFillSpans: boolean;- setIsFillSpans: Dispatch<SetStateAction<boolean>>;- allowPanelTimePreference: boolean;- allowStackingBarChart: boolean;- allowFillSpans: boolean;-}--export default function VisualizationSettingsSection({- selectedGraph,- setGraphHandler,- selectedTime,- setSelectedTime,- stackedBarChart,- setStackedBarChart,- isFillSpans,- setIsFillSpans,- allowPanelTimePreference,- allowStackingBarChart,- allowFillSpans,-}: VisualizationSettingsSectionProps): JSX.Element {- const { currentQuery } = useQueryBuilder();- const [graphTypes, setGraphTypes] = useState<ItemsProps[]>(PanelTypesWithData);-- useEffect(() => {- const queryContainsMetricsDataSource = currentQuery.builder.queryData.some(- (query) => query.dataSource === DataSource.METRICS,- );-- if (queryContainsMetricsDataSource) {- setGraphTypes((prev) =>- prev.filter((graph) => graph.name !== PANEL_TYPES.LIST),- );- } else {- setGraphTypes(PanelTypesWithData);- }- }, [currentQuery]);-- return (- <SettingsSection- title="Visualization"- defaultOpen- icon={<LayoutDashboard size={14} />}- >- <section className="panel-type control-container">- <Typography.Text className="section-heading">Panel Type</Typography.Text>- <Select- onChange={setGraphHandler}- value={selectedGraph}- className="panel-type-select"- data-testid="panel-change-select"- data-stacking-state={stackedBarChart ? 'true' : 'false'}- >- {graphTypes.map((item) => (- <Option key={item.name} value={item.name}>- <div className="select-option">- <div className="icon">{item.icon}</div>- <Typography.Text className="display">{item.display}</Typography.Text>- </div>- </Option>- ))}- </Select>- </section>-- {allowPanelTimePreference && (- <section className="panel-time-preference control-container">- <Typography.Text className="section-heading">- Panel Time Preference- </Typography.Text>- <TimePreference- {...{- selectedTime,- setSelectedTime,- }}- />- </section>- )}-- {allowStackingBarChart && (- <section className="stack-chart control-container">- <Typography.Text className="section-heading">Stack series</Typography.Text>- <Switch- value={stackedBarChart}- onChange={(checked): void => setStackedBarChart(checked)}- />- </section>- )}-- {allowFillSpans && (- <section className="fill-gaps toggle-card">- <div className="toggle-card-text-container">- <Typography className="section-heading">Fill gaps</Typography>- <Typography.Text className="toggle-card-description">- Fill gaps in data with 0 for continuity- </Typography.Text>- </div>- <Switch- value={isFillSpans}- onChange={(checked): void => setIsFillSpans(checked)}- />- </section>- )}- </SettingsSection>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/ColorSelector.styles.scss b/frontend/src/container/NewWidget/RightContainer/Threshold/ColorSelector.styles.scssdeleted file mode 100644index cf9ea7a42a..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/ColorSelector.styles.scss+++ /dev/null@@ -1,17 +0,0 @@-.color-selector-space {- display: flex;- justify-content: space-between;- align-items: center;- width: 100%;-}--.color-selector-button {- border: none;- width: 100%;- background-color: var(--l1-background);-- .ant-btn {- box-shadow: none;- background-color: unset;- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/ColorSelector.tsx b/frontend/src/container/NewWidget/RightContainer/Threshold/ColorSelector.tsxdeleted file mode 100644index c608e87ba1..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/ColorSelector.tsx+++ /dev/null@@ -1,89 +0,0 @@-import { Dispatch, SetStateAction, useEffect, useState } from 'react';-import { ChevronDown } from '@signozhq/icons';-import { DropdownMenuSimple, type MenuItem } from '@signozhq/ui/dropdown-menu';-import { Button, ColorPicker, Space } from 'antd';-import type { Color } from 'antd/es/color-picker';-import useDebounce from 'hooks/useDebounce';--import CustomColor from './CustomColor';--import './ColorSelector.styles.scss';--function ColorSelector({- thresholdColor = 'Red',- setColor,-}: ColorSelectorProps): JSX.Element {- const [colorFromPicker, setColorFromPicker] = useState<string>('');-- const debounceColor = useDebounce(colorFromPicker);-- useEffect(() => {- if (debounceColor) {- setColor(debounceColor);- }- }, [debounceColor, setColor]);-- const handleColorChange = (_: Color, hex: string): void => {- setColorFromPicker(hex);- };-- const items: MenuItem[] = [- {- key: 'Red',- label: <CustomColor color="Red" />,- onClick: (): void => setColor('Red'),- },- {- key: 'Orange',- label: <CustomColor color="Orange" />,- onClick: (): void => setColor('Orange'),- },- {- key: 'Green',- label: <CustomColor color="Green" />,- onClick: (): void => setColor('Green'),- },- {- key: 'Blue',- label: <CustomColor color="Blue" />,- onClick: (): void => setColor('Blue'),- },- {- key: 'Custom Color',- label: (- <ColorPicker- trigger="hover"- onChange={handleColorChange}- placement="bottomLeft"- >- Custom Color- </ColorPicker>- ),- },- ];-- return (- <DropdownMenuSimple menu={{ items }}>- <Button- onClick={(e): void => e.preventDefault()}- className="color-selector-button"- >- <Space className="color-selector-space">- <CustomColor color={thresholdColor} />- <ChevronDown size="md" />- </Space>- </Button>- </DropdownMenuSimple>- );-}--interface ColorSelectorProps {- thresholdColor?: string;- setColor: Dispatch<SetStateAction<string>>;-}--ColorSelector.defaultProps = {- thresholdColor: undefined,-};--export default ColorSelector;diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/CustomColor.styles.scss b/frontend/src/container/NewWidget/RightContainer/Threshold/CustomColor.styles.scssdeleted file mode 100644index 3a055ab793..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/CustomColor.styles.scss+++ /dev/null@@ -1,20 +0,0 @@-.custom-color-container {- display: flex;- gap: 8px;- align-items: center;-- .custom-color-text {- color: var(--l1-foreground) !important;- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- }-- .custom-color-tag {- width: 12px;- height: 12px;- border-radius: 12px;- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/CustomColor.tsx b/frontend/src/container/NewWidget/RightContainer/Threshold/CustomColor.tsxdeleted file mode 100644index 4501379fb7..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/CustomColor.tsx+++ /dev/null@@ -1,16 +0,0 @@-import { Typography } from '@signozhq/ui/typography';--import { CustomColorProps } from './types';--import './CustomColor.styles.scss';--function CustomColor({ color }: CustomColorProps): JSX.Element {- return (- <div className="custom-color-container">- <div className="custom-color-tag" style={{ background: color }} />- <Typography.Text className={`custom-color-text`}>{color}</Typography.Text>- </div>- );-}--export default CustomColor;diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/ShowCaseValue.styles.scss b/frontend/src/container/NewWidget/RightContainer/Threshold/ShowCaseValue.styles.scssdeleted file mode 100644index ef8c4a3535..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/ShowCaseValue.styles.scss+++ /dev/null@@ -1,13 +0,0 @@-.show-case-container {- padding: 5px 15px;- display: inline-block;-}--.show-case-dark {- background-color: var(--l1-background);-}--.show-case-light {- background-color: var(--card);- border: 1px solid var(--l1-border);-}diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/ShowCaseValue.tsx b/frontend/src/container/NewWidget/RightContainer/Threshold/ShowCaseValue.tsxdeleted file mode 100644index 72d5996028..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/ShowCaseValue.tsx+++ /dev/null@@ -1,29 +0,0 @@-import cx from 'classnames';-import { useIsDarkMode } from 'hooks/useDarkMode';--import { ShowCaseValueProps } from './types';--import './ShowCaseValue.styles.scss';--function ShowCaseValue({- width,- value,- className = '',-}: ShowCaseValueProps): JSX.Element {- const isDarkMode = useIsDarkMode();- return (- <div- className={cx(- isDarkMode- ? `show-case-container show-case-dark`- : `show-case-container show-case-light`,- className,- )}- style={{ minWidth: width }}- >- {value}- </div>- );-}--export default ShowCaseValue;diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/Threshold.styles.scss b/frontend/src/container/NewWidget/RightContainer/Threshold/Threshold.styles.scssdeleted file mode 100644index 306e819668..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/Threshold.styles.scss+++ /dev/null@@ -1,322 +0,0 @@-.operator-input-root {- width: auto !important;- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- letter-spacing: 0.48px;-}-.threshold-container {- margin-top: 12px;-- .threshold-card-container {- display: flex;- position: relative;- flex-direction: column;- align-items: flex-start;- gap: 12px;- flex-shrink: 0;- padding: 12px;- border-radius: 2px;- border: 1px solid var(--l2-border);- background: var(--l2-background);-- .edit-action-btns {- position: absolute;- right: -8px;- top: -14px;- display: none;-- .ant-btn {- display: flex;- width: 24px;- height: 24px;- padding: 4px;- justify-content: center;- align-items: center;- gap: 10px;- flex-shrink: 0;- background: var(--l2-background);- }-- .ant-btn + .ant-btn {- border-left: 1px solid var(--l2-border);- }-- .edit-btn {- border-radius: 2px 0px 0px 2px;- }-- .delete-btn {- border-radius: 0px 2px 2px 0px;- }- }-- .time-series-alerts {- display: flex;- border-radius: 2px;- border: 1px solid var(--l2-border);- background: var(--l2-background);- box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);- width: 100%;- align-items: center;-- .label {- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- letter-spacing: 0.48px;- text-transform: uppercase;- width: 20%;- padding: 8px;- }-- .label-input {- height: 32px;- width: 80%;- flex-shrink: 0;- border-radius: 2px;- border-left: 1px solid var(--l2-border);- background: var(--l2-background);- box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);- color: var(--l1-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- padding: 8px;- }- }-- .value-table-alerts {- display: flex;- align-items: center;- gap: 10px;-- .operator-input {- .ant-select-selector {- background-color: var(--l3-background) !important;- min-width: 50px;- max-width: 150px;- color: var(--l1-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- }- }-- .typography {- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- letter-spacing: 0.48px;- }- .typography-preview {- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- letter-spacing: 0.48px;- background-color: var(--l3-background) !important;- max-width: 150px;- overflow-x: hidden;- text-overflow: ellipsis;- }- }- .threshold-units-selector {- display: flex;- border-radius: 2px 2px 0px 0px;- border: 1px solid var(--l2-border);- background: var(--l2-background);- box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);- height: 32px;- flex-shrink: 0;- width: 100%;-- .unit-input {- width: 50%;- border: none;- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- background: var(--l2-background);- }-- .unit-selection {- width: 50%;- border: none;- border-left: 1px solid var(--l2-border);- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */-- .ant-select {- width: 100%;- }-- .ant-select-selector {- border: none;- height: unset;- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- }- }-- .unit-selection-prev {- width: 50%;- border: none;- border-left: 1px solid var(--l2-border);- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- background: var(--l1-background);- }- }-- .thresholds-color-selector {- display: flex;- align-items: center;- border-radius: 0px 0px 2px 2px;- border: 1px solid var(--l2-border);- border-top: none;- background: var(--l1-background);- box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);- height: 32px;- flex-shrink: 0;- width: 100%;- margin-top: -12px;-- .color-selector {- width: 50%;- color: var(--l1-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- background: var(--l1-background);-- .ant-btn {- box-shadow: none;- height: auto;- }- }- .color-format {- width: 50%;- border: none;- border-left: 1px solid var(--l2-border);- color: var(--l1-foreground);- background: var(--l1-background);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */-- .ant-select-selector {- border: none;- height: unset;- color: var(--l2-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- background: var(--l1-background);- }- }-- .color-format-prev {- width: 50%;- border: none;- border-left: 1px solid var(--l2-border);- color: var(--l1-foreground);- font-family: 'Space Mono';- font-size: 12px;- font-style: normal;- font-weight: 400;- line-height: 16px; /* 133.333% */- background: var(--l1-background);- }- }-- .threshold-action-button {- display: flex;- align-items: center;- width: 100%;- gap: 12px;-- .discard-btn {- display: flex;- width: 50%;- align-items: center;- height: 34px;- padding: 4px 8px 4px 10px;- justify-content: center;- gap: 6px;- flex: 1 0 0;- border-radius: 2px;- border: 1px solid var(--l2-border);- background: var(--l2-background);- box-shadow: none;- }-- .save-changes {- display: flex;- width: 50%;- align-items: center;- height: 34px;- padding: 4px 8px 4px 10px;- justify-content: center;- gap: 6px;- flex: 1 0 0;- border-radius: 2px;- border: 1px solid var(--bg-robin-500);- background: var(--primary-background);- box-shadow: none;- }- }-- .invalid-unit {- color: var(--l2-foreground);- font-family: 'Giest Mono';- font-size: 11px;- font-style: normal;- font-weight: 400;- line-height: 16px;- letter-spacing: 0.48px;- }- }-- .threshold-card-container:hover {- .edit-action-btns {- display: flex;- }- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/Threshold.tsx b/frontend/src/container/NewWidget/RightContainer/Threshold/Threshold.tsxdeleted file mode 100644index 28d05772ff..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/Threshold.tsx+++ /dev/null@@ -1,422 +0,0 @@-/* eslint-disable sonarjs/cognitive-complexity */-import { useMemo, useRef, useState } from 'react';-import { useDrag, useDrop, XYCoord } from 'react-dnd';-import { Button, Input, InputNumber, Select, Space } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import YAxisUnitSelector from 'components/YAxisUnitSelector';-import { Y_AXIS_UNIT_NAMES } from 'components/YAxisUnitSelector/constants';-import { YAxisSource } from 'components/YAxisUnitSelector/types';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { unitOptions } from 'container/NewWidget/utils';-import { useIsDarkMode } from 'hooks/useDarkMode';-import { getColumnUnit } from 'lib/query/createTableColumnsFromQuery';-import { Check, Pencil, Trash2, X } from '@signozhq/icons';--import {- operatorOptions,- panelTypeVsDragAndDrop,- showAsOptions,-} from '../constants';-import { convertUnit } from '../dataFormatCategories';-import ColorSelector from './ColorSelector';-import CustomColor from './CustomColor';-import ShowCaseValue from './ShowCaseValue';-import { ThresholdProps } from './types';--import './Threshold.styles.scss';--const wrapStyle = {- flexWrap: 'wrap',- gap: '10px',-} as React.CSSProperties;--function Threshold({- index,- thresholdOperator = '>',- thresholdValue = 0,- isEditEnabled = false,- thresholdUnit = 'ms',- thresholdColor = 'Red',- thresholdFormat = 'Text',- thresholdDeleteHandler,- setThresholds,- keyIndex,- moveThreshold,- selectedGraph,- thresholdLabel = '',- tableOptions,- thresholdTableOptions = '',- columnUnits,- yAxisUnit,-}: ThresholdProps): JSX.Element {- const [isEditMode, setIsEditMode] = useState<boolean>(isEditEnabled);- const [operator, setOperator] = useState<string | number>(- thresholdOperator as string | number,- );- const [value, setValue] = useState<number>(thresholdValue);- const [unit, setUnit] = useState<string>(thresholdUnit);- const [color, setColor] = useState<string>(thresholdColor);- const [format, setFormat] =- useState<ThresholdProps['thresholdFormat']>(thresholdFormat);- const [label, setLabel] = useState<string>(thresholdLabel);- const [tableSelectedOption, setTableSelectedOption] = useState<string>(- thresholdTableOptions,- );-- const isDarkMode = useIsDarkMode();-- const saveHandler = (): void => {- setIsEditMode(false);- if (setThresholds === undefined) {- return;- }- setThresholds((prevThresholds) =>- prevThresholds.map((threshold) => {- if (threshold.index === index) {- return {- ...threshold,- isEditEnabled: false,- thresholdColor: color,- thresholdFormat: format,- thresholdOperator: operator as ThresholdProps['thresholdOperator'],- thresholdUnit: unit,- thresholdValue: value,- thresholdLabel: label,- thresholdTableOptions: tableSelectedOption,- };- }- return threshold;- }),- );- };-- const discardHandler = (): void => {- setIsEditMode(false);- setOperator(thresholdOperator);- setValue(thresholdValue);- setUnit(thresholdUnit);- setColor(thresholdColor);- setFormat(thresholdFormat);- setLabel(thresholdLabel);- setTableSelectedOption(thresholdTableOptions);- };- const editHandler = (): void => {- setIsEditMode(true);- };-- const handleOperatorChange = (value: string | number): void => {- setOperator(value);- };-- const handleValueChange = (value: number | null): void => {- if (value === null) {- return;- }- setValue(value);- };-- const handleUnitChange = (value: string): void => {- setUnit(value);- };-- const handlerFormatChange = (- value: ThresholdProps['thresholdFormat'],- ): void => {- setFormat(value);- };-- const handleTableOptionsChange = (value: string): void => {- setTableSelectedOption(value);- };-- const deleteHandler = (): void => {- if (thresholdDeleteHandler) {- thresholdDeleteHandler(index);- }- };-- const ref = useRef<HTMLDivElement>(null);- const [{ handlerId }, drop] = useDrop<- ThresholdProps,- void,- { handlerId: any }- >({- accept: 'Threshold',- collect(monitor) {- return {- handlerId: monitor.getHandlerId(),- };- },- hover(item: ThresholdProps, monitor) {- if (!ref.current) {- return;- }- const dragIndex = item.keyIndex;- const hoverIndex = keyIndex;-- if (dragIndex === hoverIndex) {- return;- }-- const hoverBoundingRect = ref.current?.getBoundingClientRect();-- const hoverMiddleY = (hoverBoundingRect.bottom - hoverBoundingRect.top) / 2;-- const clientOffset = monitor.getClientOffset();-- const hoverClientY = (clientOffset as XYCoord).y - hoverBoundingRect.top;-- if (dragIndex < hoverIndex && hoverClientY < hoverMiddleY) {- return;- }-- if (dragIndex > hoverIndex && hoverClientY > hoverMiddleY) {- return;- }-- moveThreshold(dragIndex, hoverIndex);- item.keyIndex = hoverIndex;- },- });-- const [{ isDragging }, drag] = useDrag({- type: 'Threshold',- item: () => ({ keyIndex }),- collect: (monitor) => ({- isDragging: monitor.isDragging(),- }),- });-- const opacity = isDragging ? 0 : 1;- drag(drop(ref));- const handleLabelChange = (- event: React.ChangeEvent<HTMLInputElement>,- ): void => {- setLabel(event.target.value);- };-- const allowDragAndDrop = panelTypeVsDragAndDrop[selectedGraph];-- const isInvalidUnitComparison = useMemo(() => {- const toUnitId =- selectedGraph === PANEL_TYPES.TABLE- ? getColumnUnit(tableSelectedOption, columnUnits || {})- : yAxisUnit;- return unit !== 'none' && convertUnit(value, unit, toUnitId) === null;- }, [selectedGraph, yAxisUnit, tableSelectedOption, columnUnits, unit, value]);-- const unitSelectCategories = useMemo(() => {- return unitOptions(- selectedGraph === PANEL_TYPES.TABLE- ? getColumnUnit(tableSelectedOption, columnUnits || {}) || ''- : yAxisUnit || '',- );- }, [selectedGraph, yAxisUnit, tableSelectedOption, columnUnits]);-- const unitLabel = useMemo(() => {- return Y_AXIS_UNIT_NAMES[unit as keyof typeof Y_AXIS_UNIT_NAMES];- }, [unit]);-- return (- <div- ref={allowDragAndDrop ? ref : null}- style={{ opacity }}- data-handler-id={handlerId}- className="threshold-container"- >- <div className="threshold-card-container">- {!isEditMode && (- <div className="edit-action-btns">- <Button- type="text"- icon={<Pencil size={14} />}- className="edit-btn"- onClick={editHandler}- />- <Button- type="text"- icon={<Trash2 size={14} />}- className="delete-btn"- onClick={deleteHandler}- />- </div>- )}- <div style={{ width: '100%' }}>- {selectedGraph === PANEL_TYPES.TIME_SERIES && (- <div className="time-series-alerts">- <Typography.Text className="label">Label</Typography.Text>- {isEditMode ? (- <Input- defaultValue={label}- onChange={handleLabelChange}- data-testid="threshold-label-input"- bordered={!isDarkMode}- className="label-input"- />- ) : (- <ShowCaseValue value={label || 'none'} className="label-input" />- )}- </div>- )}- {(selectedGraph === PANEL_TYPES.VALUE ||- selectedGraph === PANEL_TYPES.TABLE) && (- <div className="value-table-alerts">- <Typography.Text className="typography">- If value {selectedGraph === PANEL_TYPES.TABLE ? 'in' : 'is'}- </Typography.Text>- {isEditMode ? (- <div>- {selectedGraph === PANEL_TYPES.TABLE && (- <Space style={wrapStyle}>- <Select- defaultValue={tableSelectedOption}- options={tableOptions}- bordered={!isDarkMode}- showSearch- onChange={handleTableOptionsChange}- rootClassName="operator-input-root"- className="operator-input"- data-testid="table-operator-input-selector"- />- <Typography.Text className="typography">is</Typography.Text>- </Space>- )}- <Select- defaultValue={operator}- options={operatorOptions}- onChange={handleOperatorChange}- bordered={!isDarkMode}- style={{ marginLeft: '10px' }}- rootClassName="operator-input-root"- className="operator-input"- data-testid="operator-input-selector"- />- </div>- ) : (- <div>- {selectedGraph === PANEL_TYPES.TABLE && (- <Space>- <ShowCaseValue- value={tableSelectedOption}- className="typography-preview"- />- <Typography.Text- className="typography"- style={{ marginRight: '10px' }}- >- is- </Typography.Text>- </Space>- )}- <ShowCaseValue- width="50px"- value={operator}- className="typography-preview"- />- </div>- )}- </div>- )}- </div>- <div className="threshold-units-selector">- {isEditMode ? (- <InputNumber- defaultValue={value}- onChange={handleValueChange}- className="unit-input"- data-testid="threshold-value-input"- />- ) : (- <ShowCaseValue value={value} className="unit-input" />- )}- {isEditMode ? (- <YAxisUnitSelector- value={unit}- onChange={handleUnitChange}- placeholder="Select unit"- source={YAxisSource.DASHBOARDS}- initialValue={unit}- data-testid="threshold-unit-input"- categoriesOverride={unitSelectCategories}- containerClassName="unit-selection"- />- ) : (- <ShowCaseValue value={unitLabel} className="unit-selection-prev" />- )}- </div>- <div className="thresholds-color-selector">- {isEditMode ? (- <>- <div className="color-selector">- <ColorSelector setColor={setColor} thresholdColor={color} />- </div>- <Select- defaultValue={format}- options={showAsOptions}- onChange={handlerFormatChange}- data-testid="threshold-color-selector"- rootClassName="color-format"- />- </>- ) : (- <>- <ShowCaseValue- value={<CustomColor color={color} />}- className="color-selector"- />- <ShowCaseValue- width="100px"- value={format}- className="color-format-prev"- />- </>- )}- </div>- {isInvalidUnitComparison && (- <Typography.Text- className="invalid-unit"- data-testid="invalid-unit-comparison"- >- Threshold unit ({unit}) is not valid in comparison with the{' '}- {selectedGraph === PANEL_TYPES.TABLE ? 'column' : 'y-axis'} unit (- {selectedGraph === PANEL_TYPES.TABLE- ? getColumnUnit(tableSelectedOption, columnUnits || {}) || 'none'- : yAxisUnit || 'none'}- )- </Typography.Text>- )}- {isEditMode && (- <div className="threshold-action-button">- <Button- className="discard-btn"- icon={<X size={14} />}- onClick={discardHandler}- >- Discard- </Button>- <Button- className="save-changes"- icon={<Check size={14} />}- onClick={saveHandler}- >- Save Changes- </Button>- </div>- )}- </div>- </div>- );-}--Threshold.defaultProps = {- thresholdOperator: undefined,- thresholdValue: undefined,- thresholdUnit: undefined,- thresholdColor: undefined,- thresholdFormat: undefined,- thresholdLabel: undefined,- isEditEnabled: false,- thresholdDeleteHandler: undefined,-};--export default Threshold;diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/ThresholdSelector.styles.scss b/frontend/src/container/NewWidget/RightContainer/Threshold/ThresholdSelector.styles.scssdeleted file mode 100644index 3c6dcc6488..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/ThresholdSelector.styles.scss+++ /dev/null@@ -1,34 +0,0 @@-.threshold-selector-container {- padding-bottom: 80px;-- .threshold-select {- display: flex;- align-items: center;- justify-content: space-between;- cursor: pointer;-- .icon {- color: var(--l2-foreground);- cursor: pointer;- }-- .left-section {- display: flex;- align-items: center;- gap: 8px;-- .icon {- color: var(--l2-foreground);- }- .text {- color: var(--l2-foreground);- font-family: Inter;- font-size: 14px;- font-style: normal;- font-weight: 400;- line-height: 20px; /* 142.857% */- letter-spacing: 0.14px;- }- }- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/ThresholdSelector.tsx b/frontend/src/container/NewWidget/RightContainer/Threshold/ThresholdSelector.tsxdeleted file mode 100644index 154ec33210..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/ThresholdSelector.tsx+++ /dev/null@@ -1,108 +0,0 @@-import { useCallback } from 'react';-import { DndProvider } from 'react-dnd';-import { HTML5Backend } from 'react-dnd-html5-backend';-import { Button } from 'antd';-import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { useGetQueryLabels } from 'hooks/useGetQueryLabels';-import { Plus } from '@signozhq/icons';-import { v4 as uuid } from 'uuid';--import Threshold from './Threshold';-import { ThresholdSelectorProps } from './types';--import './ThresholdSelector.styles.scss';--function ThresholdSelector({- thresholds,- setThresholds,- yAxisUnit,- selectedGraph,- columnUnits,-}: ThresholdSelectorProps): JSX.Element {- const { currentQuery } = useQueryBuilder();-- const aggregationQueries = useGetQueryLabels(currentQuery);-- const moveThreshold = useCallback(- (dragIndex: number, hoverIndex: number) => {- setThresholds((prevCards) => {- const draggedCard = prevCards[dragIndex];- const remainingCards = prevCards.filter((_, index) => index !== dragIndex);- return [- ...remainingCards.slice(0, hoverIndex),- draggedCard,- ...remainingCards.slice(hoverIndex),- ];- });- },- [setThresholds],- );-- const addThresholdHandler = (): void => {- setThresholds([- {- index: uuid(),- isEditEnabled: true,- thresholdColor: 'Red',- thresholdFormat: 'Text',- thresholdOperator: '>',- thresholdUnit: yAxisUnit,- thresholdValue: 0,- moveThreshold,- keyIndex: thresholds.length,- selectedGraph,- thresholdTableOptions: aggregationQueries[0]?.value || '',- },- ...thresholds,- ]);- };-- const deleteThresholdHandler = (index: string): void => {- const newThresholds = thresholds.filter(- (threshold) => threshold.index !== index,- );- setThresholds(newThresholds);- };-- return (- <DndProvider backend={HTML5Backend}>- <div className="threshold-selector-container">- <div className="threshold-select" onClick={addThresholdHandler}>- <Button- type="default"- icon={<Plus size={14} />}- style={{ width: '100%' }}- data-testid="add-threshold-cta"- onClick={addThresholdHandler}- >- Add Threshold- </Button>- </div>- {thresholds.map((threshold, idx) => (- <Threshold- key={threshold.index}- index={threshold.index}- isEditEnabled={threshold.isEditEnabled}- thresholdColor={threshold.thresholdColor}- thresholdFormat={threshold.thresholdFormat}- thresholdOperator={threshold.thresholdOperator}- thresholdUnit={threshold.thresholdUnit}- thresholdValue={threshold.thresholdValue}- thresholdDeleteHandler={deleteThresholdHandler}- setThresholds={setThresholds}- keyIndex={idx}- moveThreshold={moveThreshold}- selectedGraph={selectedGraph}- thresholdLabel={threshold.thresholdLabel}- tableOptions={aggregationQueries}- thresholdTableOptions={threshold.thresholdTableOptions}- columnUnits={columnUnits}- yAxisUnit={yAxisUnit}- />- ))}- </div>- </DndProvider>- );-}--export default ThresholdSelector;diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/__tests__/Threshold.test.tsx b/frontend/src/container/NewWidget/RightContainer/Threshold/__tests__/Threshold.test.tsxdeleted file mode 100644index 016c3df0db..0000000000--- a/frontend/src/container/NewWidget/RightContainer/Threshold/__tests__/Threshold.test.tsx+++ /dev/null@@ -1,170 +0,0 @@-import { DndProvider } from 'react-dnd';-import { HTML5Backend } from 'react-dnd-html5-backend';-import { Y_AXIS_UNIT_NAMES } from 'components/YAxisUnitSelector/constants';-import { UniversalYAxisUnit } from 'components/YAxisUnitSelector/types';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { render, screen } from 'tests/test-utils';--import Threshold from '../Threshold';--// Mock the getColumnUnit function-jest.mock('lib/query/createTableColumnsFromQuery', () => ({- getColumnUnit: jest.fn(- (option: string, columnUnits: Record<string, string>) =>- columnUnits[option] || 'percent',- ),-}));--// Mock the unitOptions function to return YAxisCategory-shaped data-jest.mock('container/NewWidget/utils', () => ({- unitOptions: jest.fn(() => [- {- name: 'Mock Category',- units: [- {- id: UniversalYAxisUnit.NONE,- name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.NONE],- },- {- id: UniversalYAxisUnit.PERCENT,- name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.PERCENT],- },- {- id: UniversalYAxisUnit.MILLISECONDS,- name: Y_AXIS_UNIT_NAMES[UniversalYAxisUnit.MILLISECONDS],- },- ],- },- ]),-}));--const defaultProps = {- index: 'test-threshold-1',- keyIndex: 0,- thresholdOperator: '>' as const,- thresholdValue: 50,- thresholdUnit: UniversalYAxisUnit.NONE,- thresholdColor: 'Red',- thresholdFormat: 'Text' as const,- isEditEnabled: true,- selectedGraph: PANEL_TYPES.TABLE,- tableOptions: [- { value: 'cpu_usage', label: 'CPU Usage' },- { value: 'memory_usage', label: 'Memory Usage' },- ],- thresholdTableOptions: 'cpu_usage',- columnUnits: {- cpu_usage: UniversalYAxisUnit.PERCENT,- memory_usage: UniversalYAxisUnit.BYTES,- },- yAxisUnit: UniversalYAxisUnit.PERCENT,- moveThreshold: jest.fn(),-};--const renderThreshold = (props = {}): void => {- render(- <DndProvider backend={HTML5Backend}>- <Threshold {...{ ...defaultProps, ...props }} />- </DndProvider>,- );-};--describe('Threshold Component Unit Validation', () => {- it('should not show validation error when threshold unit is "none" regardless of column unit', () => {- // Act - Render component with "none" threshold unit- renderThreshold({- thresholdUnit: 'none',- thresholdValue: 50,- });-- // Assert - No validation error should be displayed- expect(- screen.queryByText(/Threshold unit.*is not valid in comparison/i),- ).not.toBeInTheDocument();- });-- it('should show validation error when threshold unit is not "none" and units are incompatible', () => {- // Act - Render component with incompatible units (ms vs percent)- renderThreshold({- thresholdUnit: UniversalYAxisUnit.MILLISECONDS,- thresholdValue: 50,- });-- const errorMessage = screen.getByTestId('invalid-unit-comparison');- // Assert - Validation error should be displayed- expect(errorMessage.textContent).toBe(- `Threshold unit (${UniversalYAxisUnit.MILLISECONDS}) is not valid in comparison with the column unit (${UniversalYAxisUnit.PERCENT})`,- );- });-- it('should not show validation error when threshold unit matches column unit', () => {- // Act - Render component with matching units- renderThreshold({- thresholdUnit: UniversalYAxisUnit.PERCENT,- thresholdValue: 50,- });-- // Assert - No validation error should be displayed- expect(- screen.queryByTestId('invalid-unit-comparison'),- ).not.toBeInTheDocument();- });-- it('should show validation error for time series graph when units are incompatible', () => {- // Act - Render component for time series with incompatible units- renderThreshold({- selectedGraph: PANEL_TYPES.TIME_SERIES,- thresholdUnit: UniversalYAxisUnit.MILLISECONDS,- thresholdValue: 100,- yAxisUnit: UniversalYAxisUnit.PERCENT,- });-- const errorMessage = screen.getByTestId('invalid-unit-comparison');- // Assert - Validation error should be displayed- expect(errorMessage.textContent).toBe(- `Threshold unit (${UniversalYAxisUnit.MILLISECONDS}) is not valid in comparison with the y-axis unit (${UniversalYAxisUnit.PERCENT})`,- );- });-- it('should not show validation error for time series graph when threshold unit is "none"', () => {- // Act - Render component for time series with "none" threshold unit- renderThreshold({- selectedGraph: PANEL_TYPES.TIME_SERIES,- thresholdUnit: 'none',- thresholdValue: 100,- yAxisUnit: UniversalYAxisUnit.PERCENT,- });- expect(- screen.queryByTestId('invalid-unit-comparison'),- ).not.toBeInTheDocument();- });-- it('should not show validation error when threshold unit is compatible with column unit', () => {- // Act - Render component with compatible units (both in same category - Time)- renderThreshold({- thresholdUnit: UniversalYAxisUnit.SECONDS,- thresholdValue: 100,- columnUnits: { cpu_usage: UniversalYAxisUnit.MILLISECONDS },- thresholdTableOptions: 'cpu_usage',- });- // Assert - No validation error should be displayed- expect(- screen.queryByTestId('invalid-unit-comparison'),- ).not.toBeInTheDocument();- });-- it('should show validation error when threshold unit is in different category than column unit', () => {- // Act - Render component with units from different categories- renderThreshold({- thresholdUnit: UniversalYAxisUnit.BYTES,- thresholdValue: 100,- yAxisUnit: UniversalYAxisUnit.PERCENT,- });-- const errorMessage = screen.getByTestId('invalid-unit-comparison');- // Assert - Validation error should be displayed- expect(errorMessage.textContent).toBe(- `Threshold unit (${UniversalYAxisUnit.BYTES}) is not valid in comparison with the column unit (${UniversalYAxisUnit.PERCENT})`,- );- });-});diff --git a/frontend/src/container/NewWidget/RightContainer/__tests__/DashboardYAxisUnitSelectorWrapper.test.tsx b/frontend/src/container/NewWidget/RightContainer/__tests__/DashboardYAxisUnitSelectorWrapper.test.tsxdeleted file mode 100644index 2010e6b4cd..0000000000--- a/frontend/src/container/NewWidget/RightContainer/__tests__/DashboardYAxisUnitSelectorWrapper.test.tsx+++ /dev/null@@ -1,79 +0,0 @@-import { render, screen } from '@testing-library/react';-import { UniversalYAxisUnit } from 'components/YAxisUnitSelector/types';-import * as getYAxisUnitHooks from 'hooks/useGetYAxisUnit';--import DashboardYAxisUnitSelectorWrapper from '../DashboardYAxisUnitSelectorWrapper';--describe('YAxisUnitSelectorV2', () => {- const mockUseGetYAxisUnit = jest.spyOn(getYAxisUnitHooks, 'default');- const onSelect = jest.fn();-- beforeEach(() => {- jest.clearAllMocks();- mockUseGetYAxisUnit.mockReturnValue({- yAxisUnit: UniversalYAxisUnit.BYTES,- isLoading: false,- isError: false,- });- });-- it('should render the selector with correct label and value', () => {- render(- <DashboardYAxisUnitSelectorWrapper- value={UniversalYAxisUnit.BYTES}- onSelect={onSelect}- fieldLabel="Bytes label"- shouldUpdateYAxisUnit={false}- />,- );-- expect(screen.getByText('Bytes label')).toBeInTheDocument();- expect(screen.getByText('Bytes (B)')).toBeInTheDocument();- });-- it('should call onSelect when showWarning is true and useGetYAxisUnit is called and provides the correct value', () => {- mockUseGetYAxisUnit.mockReturnValueOnce({- yAxisUnit: UniversalYAxisUnit.SECONDS,- isLoading: false,- isError: false,- });- render(- <DashboardYAxisUnitSelectorWrapper- value={UniversalYAxisUnit.BYTES}- onSelect={onSelect}- fieldLabel="Bytes label"- shouldUpdateYAxisUnit- />,- );- expect(onSelect).toHaveBeenCalledWith(UniversalYAxisUnit.SECONDS);- });-- it('should not call onSelect when showWarning is false', () => {- render(- <DashboardYAxisUnitSelectorWrapper- value={UniversalYAxisUnit.BYTES}- onSelect={onSelect}- fieldLabel="Bytes label"- shouldUpdateYAxisUnit={false}- />,- );- expect(onSelect).not.toHaveBeenCalled();- });-- it('should call onSelect when yAxisUnit is undefined even if showWarning is true', () => {- mockUseGetYAxisUnit.mockReturnValueOnce({- yAxisUnit: undefined,- isLoading: false,- isError: false,- });- render(- <DashboardYAxisUnitSelectorWrapper- value={UniversalYAxisUnit.BYTES}- onSelect={onSelect}- fieldLabel="Bytes label"- shouldUpdateYAxisUnit- />,- );- expect(onSelect).toHaveBeenCalledWith('');- });-});diff --git a/frontend/src/container/NewWidget/RightContainer/__tests__/RightContainer.test.tsx b/frontend/src/container/NewWidget/RightContainer/__tests__/RightContainer.test.tsxdeleted file mode 100644index 1353c09346..0000000000--- a/frontend/src/container/NewWidget/RightContainer/__tests__/RightContainer.test.tsx+++ /dev/null@@ -1,306 +0,0 @@-import React from 'react';-import { QueryClient, QueryClientProvider } from 'react-query';-// eslint-disable-next-line no-restricted-imports-import { Provider } from 'react-redux';-import { MemoryRouter } from 'react-router-dom';-import { render as rtlRender, screen } from '@testing-library/react';-import userEvent from '@testing-library/user-event';-import { PANEL_TYPES } from 'constants/queryBuilder';-import {- FillMode,- LineInterpolation,- LineStyle,-} from 'lib/uPlotV2/config/types';-import { AppContext } from 'providers/App/App';-import { IAppContext } from 'providers/App/types';-import { ErrorModalProvider } from 'providers/ErrorModalProvider';-import { QueryBuilderProvider } from 'providers/QueryBuilder';-import configureStore from 'redux-mock-store';-import thunk from 'redux-thunk';-import { LegendPosition, Widgets } from 'types/api/dashboard/getAll';-import { EQueryType } from 'types/common/dashboard';-import { ROLES } from 'types/roles';--import RightContainer, { RightContainerProps } from '../index';-import { timeItems, timePreferance, timePreferenceType } from '../timeItems';--const mockStore = configureStore([thunk]);-const createMockStore = (): ReturnType<typeof mockStore> =>- mockStore({- app: {- role: 'ADMIN',- user: {- userId: 'test-user-id',- email: '[email protected]',- name: 'TestUser',- },- isLoggedIn: true,- org: [],- },- globalTime: {- minTime: '2023-01-01T00:00:00Z',- maxTime: '2023-01-02T00:00:00Z',- },- });--const queryClient = new QueryClient({- defaultOptions: {- queries: {- refetchOnWindowFocus: false,- retry: false,- },- },-});--const createMockAppContext = (): Partial<IAppContext> => ({- user: {- accessJwt: '',- refreshJwt: '',- id: '',- email: '',- displayName: '',- createdAt: 0,- organization: '',- orgId: '',- role: 'ADMIN' as ROLES,- },-});--const mockWidget: Widgets = {- id: 'test-widget-id',- title: 'Test Widget',- description: 'Test Description',- panelTypes: PANEL_TYPES.TIME_SERIES,- query: {- builder: {- queryData: [],- queryFormulas: [],- queryTraceOperator: [],- },- promql: [],- clickhouse_sql: [],- id: 'query-id',- queryType: 'builder' as EQueryType,- },- timePreferance: 'GLOBAL_TIME' as timePreferenceType,- opacity: '',- nullZeroValues: '',- yAxisUnit: '',- fillSpans: false,- softMin: null,- softMax: null,- selectedLogFields: [],- selectedTracesFields: [],-};--const render = (ui: React.ReactElement): ReturnType<typeof rtlRender> =>- rtlRender(- <MemoryRouter>- <QueryClientProvider client={queryClient}>- <Provider store={createMockStore()}>- <AppContext.Provider value={createMockAppContext() as IAppContext}>- <ErrorModalProvider>- <QueryBuilderProvider>{ui}</QueryBuilderProvider>- </ErrorModalProvider>- </AppContext.Provider>- </Provider>- </QueryClientProvider>- </MemoryRouter>,- );--jest.mock('hooks/queryBuilder/useCreateAlerts', () => ({- __esModule: true,- default: jest.fn(() => jest.fn()),-}));--jest.mock('@signozhq/icons', () => {- const { createIconsMock } = jest.requireActual<- typeof import('test-mocks/createIconsMock')- >('test-mocks/createIconsMock');- return createIconsMock({- SquareArrowOutUpRight: (): JSX.Element => (- <svg data-testid="lucide-square-arrow-out-up-right" />- ),- });-});--describe('RightContainer - Alerts Section', () => {- const defaultProps: RightContainerProps = {- title: 'Test Widget',- setTitle: jest.fn(),- description: 'Test Description',- setDescription: jest.fn(),- opacity: '1',- setOpacity: jest.fn(),- selectedNullZeroValue: '',- setSelectedNullZeroValue: jest.fn(),- selectedGraph: PANEL_TYPES.TIME_SERIES,- setSelectedTime: jest.fn(),- selectedTime: timeItems[0] as timePreferance,- yAxisUnit: '',- stackedBarChart: false,- setStackedBarChart: jest.fn(),- bucketWidth: 0,- bucketCount: 0,- combineHistogram: false,- setCombineHistogram: jest.fn(),- setBucketWidth: jest.fn(),- setBucketCount: jest.fn(),- setYAxisUnit: jest.fn(),- decimalPrecision: 2 as const,- setDecimalPrecision: jest.fn(),- setGraphHandler: jest.fn(),- thresholds: [],- setThresholds: jest.fn(),- selectedWidget: mockWidget,- isFillSpans: false,- setIsFillSpans: jest.fn(),- softMin: null,- softMax: null,- columnUnits: {},- setColumnUnits: jest.fn(),- setSoftMin: jest.fn(),- setSoftMax: jest.fn(),- isLogScale: false,- setIsLogScale: jest.fn(),- legendPosition: LegendPosition.BOTTOM,- setLegendPosition: jest.fn(),- customLegendColors: {},- setCustomLegendColors: jest.fn(),- queryResponse: undefined,- contextLinks: { linksData: [] },- setContextLinks: jest.fn(),- enableDrillDown: false,- isNewDashboard: false,- lineInterpolation: LineInterpolation.Spline,- fillMode: FillMode.None,- lineStyle: LineStyle.Solid,- setLineInterpolation: jest.fn(),- setFillMode: jest.fn(),- setLineStyle: jest.fn(),- showPoints: false,- setShowPoints: jest.fn(),- spanGaps: false,- setSpanGaps: jest.fn(),- };-- beforeEach(() => {- jest.clearAllMocks();- });-- it('renders alerts section for TIME_SERIES panel type', () => {- render(<RightContainer {...defaultProps} />);-- const alertsSection = screen.getByText('Alerts').closest('section');- expect(alertsSection).toBeInTheDocument();- expect(alertsSection).toHaveClass('alerts-section');- });-- it('renders alerts section with correct text and SquareArrowOutUpRight icon', () => {- render(<RightContainer {...defaultProps} />);-- expect(- screen.getByTestId('lucide-square-arrow-out-up-right'),- ).toBeInTheDocument();- expect(screen.getByText('Alerts')).toBeInTheDocument();- });-- it('calls onCreateAlertsHandler when alerts section is clicked', async () => {- const mockCreateAlertsHandler = jest.fn();- const useCreateAlerts = jest.requireMock(- 'hooks/queryBuilder/useCreateAlerts',- ).default;- useCreateAlerts.mockReturnValue(mockCreateAlertsHandler);-- render(<RightContainer {...defaultProps} />);-- const alertsSection = screen.getByText('Alerts').closest('section');- expect(alertsSection).toBeInTheDocument();-- await userEvent.click(alertsSection as HTMLElement);-- expect(mockCreateAlertsHandler).toHaveBeenCalledTimes(1);- });-- it('passes correct parameters to useCreateAlerts hook', () => {- const useCreateAlerts = jest.requireMock(- 'hooks/queryBuilder/useCreateAlerts',- ).default;-- render(<RightContainer {...defaultProps} />);-- expect(useCreateAlerts).toHaveBeenCalledWith(mockWidget, 'panelView');- });-- it('renders alerts section for VALUE panel type', () => {- render(- <RightContainer- {...defaultProps}- selectedGraph={PANEL_TYPES.VALUE}- selectedWidget={{ ...mockWidget, panelTypes: PANEL_TYPES.VALUE }}- />,- );-- expect(screen.getByText('Alerts')).toBeInTheDocument();- });-- it('renders alerts section for BAR panel type', () => {- render(- <RightContainer- {...defaultProps}- selectedGraph={PANEL_TYPES.BAR}- selectedWidget={{ ...mockWidget, panelTypes: PANEL_TYPES.BAR }}- />,- );-- expect(screen.getByText('Alerts')).toBeInTheDocument();- });-- it('does not render alerts section for TABLE panel type', () => {- render(- <RightContainer- {...defaultProps}- selectedGraph={PANEL_TYPES.TABLE}- selectedWidget={{ ...mockWidget, panelTypes: PANEL_TYPES.TABLE }}- />,- );-- expect(screen.queryByText('Alerts')).not.toBeInTheDocument();- });-- it('does not render alerts section for LIST panel type', () => {- render(- <RightContainer- {...defaultProps}- selectedGraph={PANEL_TYPES.LIST}- selectedWidget={{ ...mockWidget, panelTypes: PANEL_TYPES.LIST }}- />,- );-- expect(screen.queryByText('Alerts')).not.toBeInTheDocument();- });-- it('does not render alerts section for PIE panel type', () => {- render(- <RightContainer- {...defaultProps}- selectedGraph={PANEL_TYPES.PIE}- selectedWidget={{ ...mockWidget, panelTypes: PANEL_TYPES.PIE }}- />,- );-- expect(screen.queryByText('Alerts')).not.toBeInTheDocument();- });-- it('does not render alerts section for HISTOGRAM panel type', () => {- render(- <RightContainer- {...defaultProps}- selectedGraph={PANEL_TYPES.HISTOGRAM}- selectedWidget={{ ...mockWidget, panelTypes: PANEL_TYPES.HISTOGRAM }}- />,- );-- expect(screen.queryByText('Alerts')).not.toBeInTheDocument();- });-});diff --git a/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesModeToggle.tsx b/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesModeToggle.tsxdeleted file mode 100644index 9a9f8f10c5..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesModeToggle.tsx+++ /dev/null@@ -1,44 +0,0 @@-import { ToggleGroupSimple } from '@signozhq/ui/toggle-group';-import { Typography } from '@signozhq/ui/typography';-import { DisconnectedValuesMode } from 'lib/uPlotV2/config/types';--interface DisconnectValuesModeToggleProps {- value: DisconnectedValuesMode;- onChange: (value: DisconnectedValuesMode) => void;-}--export default function DisconnectValuesModeToggle({- value,- onChange,-}: DisconnectValuesModeToggleProps): JSX.Element {- return (- <ToggleGroupSimple- type="single"- value={value}- size="lg"- onChange={(newValue: string): void => {- if (newValue) {- onChange(newValue as DisconnectedValuesMode);- }- }}- items={[- {- value: DisconnectedValuesMode.Never,- 'aria-label': 'Never',- label: (- <Typography.Text className="section-heading-small">Never</Typography.Text>- ),- },- {- value: DisconnectedValuesMode.Threshold,- 'aria-label': 'Threshold',- label: (- <Typography.Text className="section-heading-small">- Threshold- </Typography.Text>- ),- },- ]}- />- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesSelector.styles.scss b/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesSelector.styles.scssdeleted file mode 100644index c540a90dbd..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesSelector.styles.scss+++ /dev/null@@ -1,21 +0,0 @@-.disconnect-values-selector {- .disconnect-values-input-wrapper {- display: flex;- flex-direction: column;- gap: 16px;-- .disconnect-values-threshold-wrapper {- display: flex;- flex-direction: column;- gap: 8px;- .disconnect-values-threshold-input {- max-width: 160px;- height: auto;- .disconnect-values-threshold-prefix {- padding: 0 8px;- font-size: 20px;- }- }- }- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesSelector.tsx b/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesSelector.tsxdeleted file mode 100644index b3ac881a71..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesSelector.tsx+++ /dev/null@@ -1,91 +0,0 @@-import { useEffect, useState } from 'react';-import { Typography } from '@signozhq/ui/typography';-import { DisconnectedValuesMode } from 'lib/uPlotV2/config/types';--import DisconnectValuesModeToggle from './DisconnectValuesModeToggle';-import DisconnectValuesThresholdInput from './DisconnectValuesThresholdInput';--import './DisconnectValuesSelector.styles.scss';--const DEFAULT_THRESHOLD_SECONDS = 60;--interface DisconnectValuesSelectorProps {- value: boolean | number;- minValue: number;- onChange: (value: boolean | number) => void;-}--export default function DisconnectValuesSelector({- value,- minValue,- onChange,-}: DisconnectValuesSelectorProps): JSX.Element {- const [mode, setMode] = useState<DisconnectedValuesMode>(() => {- if (typeof value === 'number') {- return DisconnectedValuesMode.Threshold;- }- return DisconnectedValuesMode.Never;- });- const [thresholdSeconds, setThresholdSeconds] = useState<number>(- typeof value === 'number' ? value : (minValue ?? DEFAULT_THRESHOLD_SECONDS),- );-- useEffect(() => {- if (typeof value === 'boolean') {- setMode(DisconnectedValuesMode.Never);- } else if (typeof value === 'number') {- setMode(DisconnectedValuesMode.Threshold);- setThresholdSeconds(value);- }- }, [value]);-- useEffect(() => {- if (minValue !== undefined) {- setThresholdSeconds(minValue);- if (mode === DisconnectedValuesMode.Threshold) {- onChange(minValue);- }- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [minValue]);-- const handleModeChange = (newMode: DisconnectedValuesMode): void => {- setMode(newMode);- switch (newMode) {- case DisconnectedValuesMode.Never:- onChange(true);- break;- case DisconnectedValuesMode.Threshold:- onChange(thresholdSeconds);- break;- }- };-- const handleThresholdChange = (seconds: number): void => {- setThresholdSeconds(seconds);- onChange(seconds);- };-- return (- <section className="disconnect-values-selector control-container">- <Typography.Text className="section-heading">- Disconnect values- </Typography.Text>- <div className="disconnect-values-input-wrapper">- <DisconnectValuesModeToggle value={mode} onChange={handleModeChange} />- {mode === DisconnectedValuesMode.Threshold && (- <section className="control-container">- <Typography.Text className="section-heading">- Threshold Value- </Typography.Text>- <DisconnectValuesThresholdInput- value={thresholdSeconds}- minValue={minValue}- onChange={handleThresholdChange}- />- </section>- )}- </div>- </section>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesThresholdInput.tsx b/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesThresholdInput.tsxdeleted file mode 100644index 54ca24f6c0..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/DisconnectValuesSelector/DisconnectValuesThresholdInput.tsx+++ /dev/null@@ -1,93 +0,0 @@-import { ChangeEvent, useEffect, useState } from 'react';-import { rangeUtil } from '@grafana/data';-import { Callout } from '@signozhq/ui/callout';-import { Input } from '@signozhq/ui/input';-interface DisconnectValuesThresholdInputProps {- value: number;- onChange: (seconds: number) => void;- minValue: number;-}--export default function DisconnectValuesThresholdInput({- value,- onChange,- minValue,-}: DisconnectValuesThresholdInputProps): JSX.Element {- const [inputValue, setInputValue] = useState<string>(- rangeUtil.secondsToHms(value),- );- const [error, setError] = useState<string | null>(null);-- useEffect(() => {- setInputValue(rangeUtil.secondsToHms(value));- setError(null);- }, [value]);-- const updateValue = (txt: string): void => {- if (!txt) {- return;- }- try {- let seconds: number;- if (rangeUtil.isValidTimeSpan(txt)) {- seconds = rangeUtil.intervalToSeconds(txt);- } else {- const parsed = Number(txt);- if (Number.isNaN(parsed) || parsed <= 0) {- setError('Enter a valid duration (e.g. 1h, 10m, 1d)');- return;- }- seconds = parsed;- }- if (minValue !== undefined && seconds < minValue) {- setError(`Threshold should be > ${rangeUtil.secondsToHms(minValue)}`);- return;- }- setError(null);- setInputValue(txt);- onChange(seconds);- } catch {- setError('Invalid threshold value');- }- };-- const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>): void => {- if (e.key === 'Enter') {- updateValue(e.currentTarget.value);- }- };-- const handleBlur = (e: React.FocusEvent<HTMLInputElement>): void => {- updateValue(e.currentTarget.value);- };-- const handleChange = (e: ChangeEvent<HTMLInputElement>): void => {- setInputValue(e.currentTarget.value);- if (error) {- setError(null);- }- };-- return (- <div className="disconnect-values-threshold-wrapper">- <Input- name="disconnect-values-threshold"- type="text"- className="disconnect-values-threshold-input"- prefix={<span className="disconnect-values-threshold-prefix">></span>}- value={inputValue}- onChange={handleChange}- onKeyDown={handleKeyDown}- onBlur={handleBlur}- autoFocus={true}- aria-invalid={!!error}- aria-describedby={error ? 'threshold-error' : undefined}- />- {error && (- <Callout type="error" size="small" showIcon>- {error}- </Callout>- )}- </div>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/FillModeSelector/FillModeSelector.styles.scss b/frontend/src/container/NewWidget/RightContainer/components/FillModeSelector/FillModeSelector.styles.scssdeleted file mode 100644index 4427a5290c..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/FillModeSelector/FillModeSelector.styles.scss+++ /dev/null@@ -1,13 +0,0 @@-.fill-mode-selector {- .fill-mode-icon {- width: 24px;- height: 24px;- }-- .fill-mode-label {- text-transform: uppercase;- font-size: 12px;- font-weight: 500;- color: var(--l2-foreground);- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/FillModeSelector/FillModeSelector.tsx b/frontend/src/container/NewWidget/RightContainer/components/FillModeSelector/FillModeSelector.tsxdeleted file mode 100644index 32373f56ec..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/FillModeSelector/FillModeSelector.tsx+++ /dev/null@@ -1,112 +0,0 @@-import { ToggleGroupSimple } from '@signozhq/ui/toggle-group';-import { Typography } from '@signozhq/ui/typography';-import { FillMode } from 'lib/uPlotV2/config/types';--import './FillModeSelector.styles.scss';--interface FillModeSelectorProps {- value: FillMode;- onChange: (value: FillMode) => void;-}--export default function FillModeSelector({- value,- onChange,-}: FillModeSelectorProps): JSX.Element {- return (- <section className="fill-mode-selector control-container">- <Typography.Text className="section-heading">Fill mode</Typography.Text>- <ToggleGroupSimple- type="single"- value={value}- size="lg"- onChange={(newValue: string): void => {- if (newValue) {- onChange(newValue as FillMode);- }- }}- items={[- {- value: FillMode.None,- 'aria-label': 'None',- label: (- <>- <svg- className="fill-mode-icon"- viewBox="0 0 48 48"- fill="none"- stroke="#888"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- >- <rect x="8" y="16" width="32" height="16" stroke="#888" fill="none" />- </svg>- <Typography.Text className="section-heading-small">- None- </Typography.Text>- </>- ),- },- {- value: FillMode.Solid,- 'aria-label': 'Solid',- label: (- <>- <svg- className="fill-mode-icon"- viewBox="0 0 48 48"- fill="none"- stroke="#888"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- >- <rect x="8" y="16" width="32" height="16" fill="#888" />- </svg>- <Typography.Text className="section-heading-small">- Solid- </Typography.Text>- </>- ),- },- {- value: FillMode.Gradient,- 'aria-label': 'Gradient',- label: (- <>- <svg- className="fill-mode-icon"- viewBox="0 0 48 48"- fill="none"- stroke="#888"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- >- <defs>- <linearGradient id="fill-gradient" x1="0" y1="0" x2="1" y2="0">- <stop offset="0%" stopColor="#888" stopOpacity="0.2" />- <stop offset="100%" stopColor="#888" stopOpacity="0.8" />- </linearGradient>- </defs>- <rect- x="8"- y="16"- width="32"- height="16"- fill="url(#fill-gradient)"- stroke="#888"- />- </svg>- <Typography.Text className="section-heading-small">- Gradient- </Typography.Text>- </>- ),- },- ]}- />- </section>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/LineInterpolationSelector/LineInterpolationSelector.styles.scss b/frontend/src/container/NewWidget/RightContainer/components/LineInterpolationSelector/LineInterpolationSelector.styles.scssdeleted file mode 100644index 3160e74894..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/LineInterpolationSelector/LineInterpolationSelector.styles.scss+++ /dev/null@@ -1,13 +0,0 @@-.line-interpolation-selector {- .line-interpolation-icon {- width: 24px;- height: 24px;- }-- .line-interpolation-label {- text-transform: uppercase;- font-size: 12px;- font-weight: 500;- color: var(--l2-foreground);- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/LineInterpolationSelector/LineInterpolationSelector.tsx b/frontend/src/container/NewWidget/RightContainer/components/LineInterpolationSelector/LineInterpolationSelector.tsxdeleted file mode 100644index 49b8596464..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/LineInterpolationSelector/LineInterpolationSelector.tsx+++ /dev/null@@ -1,115 +0,0 @@-import { ToggleGroupSimple } from '@signozhq/ui/toggle-group';-import { Typography } from '@signozhq/ui/typography';-import { LineInterpolation } from 'lib/uPlotV2/config/types';--import './LineInterpolationSelector.styles.scss';--interface LineInterpolationSelectorProps {- value: LineInterpolation;- onChange: (value: LineInterpolation) => void;-}--export default function LineInterpolationSelector({- value,- onChange,-}: LineInterpolationSelectorProps): JSX.Element {- return (- <section className="line-interpolation-selector control-container">- <Typography.Text className="section-heading">- Line interpolation- </Typography.Text>- <ToggleGroupSimple- type="single"- value={value}- size="lg"- onChange={(newValue: string): void => {- if (newValue) {- onChange(newValue as LineInterpolation);- }- }}- items={[- {- value: LineInterpolation.Linear,- 'aria-label': 'Linear',- label: (- <svg- className="line-interpolation-icon"- viewBox="0 0 48 48"- fill="none"- stroke="#888"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- >- <circle cx="8" cy="32" r="3" fill="#888" />- <circle cx="24" cy="16" r="3" fill="#888" />- <circle cx="40" cy="32" r="3" fill="#888" />- <path d="M8 32 L24 16 L40 32" stroke="#888" />- </svg>- ),- },- {- value: LineInterpolation.Spline,- 'aria-label': 'Spline',- label: (- <svg- className="line-interpolation-icon"- viewBox="0 0 48 48"- fill="none"- stroke="#888"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- >- <circle cx="8" cy="32" r="3" fill="#888" />- <circle cx="24" cy="16" r="3" fill="#888" />- <circle cx="40" cy="32" r="3" fill="#888" />- <path d="M8 32 C16 8, 32 8, 40 32" />- </svg>- ),- },- {- value: LineInterpolation.StepAfter,- 'aria-label': 'Step After',- label: (- <svg- className="line-interpolation-icon"- viewBox="0 0 48 48"- fill="none"- stroke="#888"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- >- <circle cx="8" cy="32" r="3" fill="#888" />- <circle cx="24" cy="16" r="3" fill="#888" />- <circle cx="40" cy="32" r="3" fill="#888" />- <path d="M8 32 V16 H24 V32 H40" />- </svg>- ),- },- {- value: LineInterpolation.StepBefore,- 'aria-label': 'Step Before',- label: (- <svg- className="line-interpolation-icon"- viewBox="0 0 48 48"- fill="none"- stroke="#888"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- >- <circle cx="8" cy="32" r="3" fill="#888" />- <circle cx="24" cy="16" r="3" fill="#888" />- <circle cx="40" cy="32" r="3" fill="#888" />- <path d="M8 32 H24 V16 H40 V32" />- </svg>- ),- },- ]}- />- </section>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/LineStyleSelector/LineStyleSelector.styles.scss b/frontend/src/container/NewWidget/RightContainer/components/LineStyleSelector/LineStyleSelector.styles.scssdeleted file mode 100644index 3f82bc3836..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/LineStyleSelector/LineStyleSelector.styles.scss+++ /dev/null@@ -1,13 +0,0 @@-.line-style-selector {- .line-style-icon {- width: 24px;- height: 24px;- }-- .line-style-label {- text-transform: uppercase;- font-size: 12px;- font-weight: 500;- color: var(--l2-foreground);- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/LineStyleSelector/LineStyleSelector.tsx b/frontend/src/container/NewWidget/RightContainer/components/LineStyleSelector/LineStyleSelector.tsxdeleted file mode 100644index adf5a80c38..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/LineStyleSelector/LineStyleSelector.tsx+++ /dev/null@@ -1,78 +0,0 @@-import { ToggleGroupSimple } from '@signozhq/ui/toggle-group';-import { Typography } from '@signozhq/ui/typography';-import { LineStyle } from 'lib/uPlotV2/config/types';--import './LineStyleSelector.styles.scss';--interface LineStyleSelectorProps {- value: LineStyle;- onChange: (value: LineStyle) => void;-}--export default function LineStyleSelector({- value,- onChange,-}: LineStyleSelectorProps): JSX.Element {- return (- <section className="line-style-selector control-container">- <Typography.Text className="section-heading">Line style</Typography.Text>- <ToggleGroupSimple- type="single"- value={value}- size="lg"- onChange={(newValue: string): void => {- if (newValue) {- onChange(newValue as LineStyle);- }- }}- items={[- {- value: LineStyle.Solid,- 'aria-label': 'Solid',- label: (- <>- <svg- className="line-style-icon"- viewBox="0 0 48 48"- fill="none"- stroke="#888"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- >- <path d="M8 24 L40 24" />- </svg>- <Typography.Text className="section-heading-small">- Solid- </Typography.Text>- </>- ),- },- {- value: LineStyle.Dashed,- 'aria-label': 'Dashed',- label: (- <>- <svg- className="line-style-icon"- viewBox="0 0 48 48"- fill="none"- stroke="#888"- strokeWidth="2"- strokeLinecap="round"- strokeLinejoin="round"- strokeDasharray="6 4"- >- <path d="M8 24 L40 24" />- </svg>- <Typography.Text className="section-heading-small">- Dashed- </Typography.Text>- </>- ),- },- ]}- />- </section>- );-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/SettingsSection/SettingsSection.styles.scss b/frontend/src/container/NewWidget/RightContainer/components/SettingsSection/SettingsSection.styles.scssdeleted file mode 100644index fbcfc229dc..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/SettingsSection/SettingsSection.styles.scss+++ /dev/null@@ -1,56 +0,0 @@-.settings-section {- border-top: 1px solid var(--l1-border);-}--.settings-section-header {- display: flex;- align-items: center;- justify-content: space-between;- width: 100%;- padding: 12px 12px;- min-height: 44px;- background: transparent;- border: none;- outline: none;- cursor: pointer;-- .settings-section-title {- display: flex;- align-items: center;- gap: 8px;- color: var(--l1-foreground);- font-family: 'Space Mono';- font-size: 13px;- font-weight: 400;- text-transform: uppercase;- }-- .chevron-icon {- color: var(--l2-foreground);- transition: transform 0.2s ease-in-out;-- &.open {- transform: rotate(180deg);- }- }-}--.settings-section-content {- padding: 0 12px 0 12px;- display: flex;- flex-direction: column;- gap: 20px;- max-height: 0;- overflow: hidden;- opacity: 0;- transition:- max-height 0.1s ease,- opacity 0.1s ease,- padding 0.1s ease;-- &.open {- padding-bottom: 24px;- max-height: 1000px;- opacity: 1;- }-}diff --git a/frontend/src/container/NewWidget/RightContainer/components/SettingsSection/SettingsSection.tsx b/frontend/src/container/NewWidget/RightContainer/components/SettingsSection/SettingsSection.tsxdeleted file mode 100644index e65cae25c6..0000000000--- a/frontend/src/container/NewWidget/RightContainer/components/SettingsSection/SettingsSection.tsx+++ /dev/null@@ -1,51 +0,0 @@-import { ReactNode, useState } from 'react';-import { ChevronDown } from '@signozhq/icons';--import './SettingsSection.styles.scss';--export interface SettingsSectionProps {- title: string;- defaultOpen?: boolean;- children: ReactNode;- icon?: ReactNode;-}--function SettingsSection({- title,- defaultOpen = false,- children,- icon,-}: SettingsSectionProps): JSX.Element {- const [isOpen, setIsOpen] = useState(defaultOpen);-- const toggleOpen = (): void => {- setIsOpen((prev) => !prev);- };-- return (- <section className="settings-section">- <button- type="button"- className="settings-section-header"- onClick={toggleOpen}- >- <span className="settings-section-title">- {icon ? icon : null} {title}- </span>- <ChevronDown- size={16}- className={isOpen ? 'chevron-icon open' : 'chevron-icon'}- />- </button>- <div- className={- isOpen ? 'settings-section-content open' : 'settings-section-content'- }- >- {children}- </div>- </section>- );-}--export default SettingsSection;diff --git a/frontend/src/container/NewWidget/RightContainer/constants.ts b/frontend/src/container/NewWidget/RightContainer/constants.tsdeleted file mode 100644index bbc97d763b..0000000000--- a/frontend/src/container/NewWidget/RightContainer/constants.ts+++ /dev/null@@ -1,278 +0,0 @@-import type { DefaultOptionType } from 'antd/es/select';-import { PANEL_TYPES } from 'constants/queryBuilder';--export const operatorOptions: DefaultOptionType[] = [- { value: '>', label: '>' },- { value: '>=', label: '>=' },- { value: '<', label: '<' },- { value: '<=', label: '<=' },-];--export const showAsOptions: DefaultOptionType[] = [- { value: 'Text', label: 'Text' },- { value: 'Background', label: 'Background' },-];--export const panelTypeVsThreshold: { [key in PANEL_TYPES]: boolean } = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: true,- [PANEL_TYPES.TABLE]: true,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsSoftMinMax: { [key in PANEL_TYPES]: boolean } = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsDragAndDrop: { [key in PANEL_TYPES]: boolean } = {- [PANEL_TYPES.TIME_SERIES]: false,- [PANEL_TYPES.VALUE]: true,- [PANEL_TYPES.TABLE]: true,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.BAR]: false,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsFillSpan: { [key in PANEL_TYPES]: boolean } = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: false,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsLogScale: { [key in PANEL_TYPES]: boolean } = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsYAxisUnit: { [key in PANEL_TYPES]: boolean } = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: true,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: true,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsCreateAlert: { [key in PANEL_TYPES]: boolean } = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: true,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsBucketConfig: { [key in PANEL_TYPES]: boolean } = {- [PANEL_TYPES.TIME_SERIES]: false,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: false,- [PANEL_TYPES.HISTOGRAM]: true,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsPanelTimePreferences: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: true,- [PANEL_TYPES.TABLE]: true,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: true,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsColumnUnitPreferences: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: false,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: true,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsStackingChartPreferences: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: false,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsLegendPosition: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsLegendColors: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: true,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.HISTOGRAM]: true,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsContextLinks: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: true,- [PANEL_TYPES.TABLE]: true,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: true,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.HISTOGRAM]: true,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsDecimalPrecision: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: true,- [PANEL_TYPES.TABLE]: true,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: true,- [PANEL_TYPES.BAR]: true,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsLineInterpolation: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: false,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsLineStyle: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: false,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsFillMode: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: false,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsShowPoints: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: false,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;--export const panelTypeVsSpanGaps: {- [key in PANEL_TYPES]: boolean;-} = {- [PANEL_TYPES.TIME_SERIES]: true,- [PANEL_TYPES.VALUE]: false,- [PANEL_TYPES.TABLE]: false,- [PANEL_TYPES.LIST]: false,- [PANEL_TYPES.PIE]: false,- [PANEL_TYPES.BAR]: false,- [PANEL_TYPES.HISTOGRAM]: false,- [PANEL_TYPES.TRACE]: false,- [PANEL_TYPES.EMPTY_WIDGET]: false,-} as const;diff --git a/frontend/src/container/NewWidget/RightContainer/index.tsx b/frontend/src/container/NewWidget/RightContainer/index.tsxdeleted file mode 100644index ff3d92acc6..0000000000--- a/frontend/src/container/NewWidget/RightContainer/index.tsx+++ /dev/null@@ -1,403 +0,0 @@-import { Dispatch, SetStateAction, useMemo } from 'react';-import { UseQueryResult } from 'react-query';-import { Typography } from '@signozhq/ui/typography';-import { ExecStats } from 'api/v5/v5';-import { PrecisionOption, PrecisionOptionsEnum } from 'components/Graph/types';-import { PANEL_TYPES, PanelDisplay } from 'constants/queryBuilder';-import { PanelTypesWithData } from 'container/GridCardLayout/panelTypeItems';-import { useDashboardVariables } from 'hooks/dashboard/useDashboardVariables';-import useCreateAlerts from 'hooks/queryBuilder/useCreateAlerts';-import {- FillMode,- LineInterpolation,- LineStyle,-} from 'lib/uPlotV2/config/types';-import get from 'lodash-es/get';-import { SuccessResponse } from 'types/api';-import {- ColumnUnit,- ContextLinksData,- LegendPosition,- Widgets,-} from 'types/api/dashboard/getAll';-import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';--import {- panelTypeVsBucketConfig,- panelTypeVsColumnUnitPreferences,- panelTypeVsContextLinks,- panelTypeVsCreateAlert,- panelTypeVsDecimalPrecision,- panelTypeVsFillMode,- panelTypeVsFillSpan,- panelTypeVsLegendColors,- panelTypeVsLegendPosition,- panelTypeVsLineInterpolation,- panelTypeVsLineStyle,- panelTypeVsLogScale,- panelTypeVsPanelTimePreferences,- panelTypeVsShowPoints,- panelTypeVsSoftMinMax,- panelTypeVsSpanGaps,- panelTypeVsStackingChartPreferences,- panelTypeVsThreshold,- panelTypeVsYAxisUnit,-} from './constants';-import AlertsSection from './SettingSections/AlertsSection/AlertsSection';-import AxesSection from './SettingSections/AxesSection/AxesSection';-import ChartAppearanceSection from './SettingSections/ChartAppearanceSection/ChartAppearanceSection';-import ContextLinksSection from './SettingSections/ContextLinksSection/ContextLinksSection';-import FormattingUnitsSection from './SettingSections/FormattingUnitsSection/FormattingUnitsSection';-import GeneralSettingsSection from './SettingSections/GeneralSettingsSection/GeneralSettingsSection';-import HistogramBucketsSection from './SettingSections/HistogramBucketsSection/HistogramBucketsSection';-import LegendSection from './SettingSections/LegendSection/LegendSection';-import ThresholdsSection from './SettingSections/ThresholdsSection/ThresholdsSection';-import VisualizationSettingsSection from './SettingSections/VisualizationSettingsSection/VisualizationSettingsSection';-import { ThresholdProps } from './Threshold/types';-import { timePreferance } from './timeItems';--import './RightContainer.styles.scss';-function RightContainer({- description,- setDescription,- setTitle,- title,- selectedGraph,- lineInterpolation,- setLineInterpolation,- fillMode,- setFillMode,- lineStyle,- setLineStyle,- showPoints,- setShowPoints,- spanGaps,- setSpanGaps,- bucketCount,- bucketWidth,- stackedBarChart,- setStackedBarChart,- setBucketCount,- setBucketWidth,- setSelectedTime,- selectedTime,- yAxisUnit,- setYAxisUnit,- decimalPrecision,- setDecimalPrecision,- setGraphHandler,- thresholds,- combineHistogram,- setCombineHistogram,- setThresholds,- selectedWidget,- isFillSpans,- setIsFillSpans,- softMax,- softMin,- setSoftMax,- setSoftMin,- columnUnits,- setColumnUnits,- isLogScale,- setIsLogScale,- legendPosition,- setLegendPosition,- customLegendColors,- setCustomLegendColors,- queryResponse,- contextLinks,- setContextLinks,- enableDrillDown = false,- isNewDashboard,-}: RightContainerProps): JSX.Element {- const { dashboardVariables } = useDashboardVariables();-- const selectedPanelDisplay = PanelTypesWithData.find(- (e) => e.name === selectedGraph,- )?.display as PanelDisplay;-- const onCreateAlertsHandler = useCreateAlerts(selectedWidget, 'panelView');-- const allowThreshold = panelTypeVsThreshold[selectedGraph];- const allowSoftMinMax = panelTypeVsSoftMinMax[selectedGraph];- const allowFillSpans = panelTypeVsFillSpan[selectedGraph];- const allowLogScale = panelTypeVsLogScale[selectedGraph];- const allowYAxisUnit = panelTypeVsYAxisUnit[selectedGraph];- const allowCreateAlerts = panelTypeVsCreateAlert[selectedGraph];- const allowBucketConfig = panelTypeVsBucketConfig[selectedGraph];- const allowStackingBarChart =- panelTypeVsStackingChartPreferences[selectedGraph];- const allowPanelTimePreference =- panelTypeVsPanelTimePreferences[selectedGraph];- const allowLegendPosition = panelTypeVsLegendPosition[selectedGraph];- const allowLegendColors = panelTypeVsLegendColors[selectedGraph];-- const allowPanelColumnPreference =- panelTypeVsColumnUnitPreferences[selectedGraph];- const allowContextLinks =- panelTypeVsContextLinks[selectedGraph] && enableDrillDown;- const allowDecimalPrecision = panelTypeVsDecimalPrecision[selectedGraph];-- const allowLineInterpolation = panelTypeVsLineInterpolation[selectedGraph];- const allowLineStyle = panelTypeVsLineStyle[selectedGraph];- const allowFillMode = panelTypeVsFillMode[selectedGraph];- const allowShowPoints = panelTypeVsShowPoints[selectedGraph];- const allowSpanGaps = panelTypeVsSpanGaps[selectedGraph];-- const decimapPrecisionOptions = useMemo(- () => [- { label: '0 decimals', value: PrecisionOptionsEnum.ZERO },- { label: '1 decimal', value: PrecisionOptionsEnum.ONE },- { label: '2 decimals', value: PrecisionOptionsEnum.TWO },- { label: '3 decimals', value: PrecisionOptionsEnum.THREE },- ],- [],- );-- const isAxisSectionVisible = useMemo(- () => allowSoftMinMax || allowLogScale,- [allowSoftMinMax, allowLogScale],- );-- const isFormattingSectionVisible = useMemo(- () => allowYAxisUnit || allowDecimalPrecision || allowPanelColumnPreference,- [allowYAxisUnit, allowDecimalPrecision, allowPanelColumnPreference],- );-- const isLegendSectionVisible = useMemo(- () => allowLegendPosition || allowLegendColors,- [allowLegendPosition, allowLegendColors],- );-- const isChartAppearanceSectionVisible = useMemo(- () =>- /**- * Disabled for now as we are not done with other settings in chart appearance section- * TODO: @ahrefabhi Enable this after we are done other settings in chart appearance section- */-- // oxlint-disable-next-line no-constant-binary-expression- false &&- (allowFillMode ||- allowLineStyle ||- allowLineInterpolation ||- allowShowPoints ||- allowSpanGaps),- [- allowFillMode,- allowLineStyle,- allowLineInterpolation,- allowShowPoints,- allowSpanGaps,- ],- );-- const stepInterval = useMemo(() => {- const stepIntervals: ExecStats['stepIntervals'] = get(- queryResponse,- 'data.payload.data.newResult.meta.stepIntervals',- {},- );- return Math.min(...Object.values(stepIntervals));- }, [queryResponse]);-- return (- <div className="right-container">- <section className="header">- <div className="purple-dot" />- <Typography.Text className="header-text">Panel Settings</Typography.Text>- </section>-- <GeneralSettingsSection- title={title}- setTitle={setTitle}- description={description}- setDescription={setDescription}- dashboardVariables={dashboardVariables}- />-- <section className="panel-config">- <VisualizationSettingsSection- selectedGraph={selectedGraph}- setGraphHandler={setGraphHandler}- selectedTime={selectedTime}- setSelectedTime={setSelectedTime}- stackedBarChart={stackedBarChart}- setStackedBarChart={setStackedBarChart}- isFillSpans={isFillSpans}- setIsFillSpans={setIsFillSpans}- allowPanelTimePreference={allowPanelTimePreference}- allowStackingBarChart={allowStackingBarChart}- allowFillSpans={allowFillSpans}- />-- {isFormattingSectionVisible && (- <FormattingUnitsSection- selectedPanelDisplay={selectedPanelDisplay}- yAxisUnit={yAxisUnit}- setYAxisUnit={setYAxisUnit}- isNewDashboard={isNewDashboard}- decimalPrecision={decimalPrecision}- setDecimalPrecision={setDecimalPrecision}- columnUnits={columnUnits}- setColumnUnits={setColumnUnits}- allowYAxisUnit={allowYAxisUnit}- allowDecimalPrecision={allowDecimalPrecision}- allowPanelColumnPreference={allowPanelColumnPreference}- decimapPrecisionOptions={decimapPrecisionOptions}- />- )}-- {isChartAppearanceSectionVisible && (- <ChartAppearanceSection- fillMode={fillMode}- setFillMode={setFillMode}- lineStyle={lineStyle}- setLineStyle={setLineStyle}- lineInterpolation={lineInterpolation}- setLineInterpolation={setLineInterpolation}- showPoints={showPoints}- setShowPoints={setShowPoints}- spanGaps={spanGaps}- setSpanGaps={setSpanGaps}- allowFillMode={allowFillMode}- allowLineStyle={allowLineStyle}- allowLineInterpolation={allowLineInterpolation}- allowShowPoints={allowShowPoints}- allowSpanGaps={allowSpanGaps}- stepInterval={stepInterval}- />- )}-- {isAxisSectionVisible && (- <AxesSection- allowSoftMinMax={allowSoftMinMax}- allowLogScale={allowLogScale}- softMin={softMin}- softMax={softMax}- setSoftMin={setSoftMin}- setSoftMax={setSoftMax}- isLogScale={isLogScale}- setIsLogScale={setIsLogScale}- />- )}-- {isLegendSectionVisible && (- <LegendSection- allowLegendPosition={allowLegendPosition}- allowLegendColors={allowLegendColors}- legendPosition={legendPosition}- setLegendPosition={setLegendPosition}- customLegendColors={customLegendColors}- setCustomLegendColors={setCustomLegendColors}- queryResponse={queryResponse}- />- )}-- {allowBucketConfig && (- <HistogramBucketsSection- bucketCount={bucketCount}- setBucketCount={setBucketCount}- bucketWidth={bucketWidth}- setBucketWidth={setBucketWidth}- combineHistogram={combineHistogram}- setCombineHistogram={setCombineHistogram}- />- )}- </section>-- {allowCreateAlerts && (- <AlertsSection onCreateAlertsHandler={onCreateAlertsHandler} />- )}-- {allowContextLinks && (- <ContextLinksSection- contextLinks={contextLinks}- setContextLinks={setContextLinks}- selectedWidget={selectedWidget}- />- )}-- {allowThreshold && (- <ThresholdsSection- thresholds={thresholds}- setThresholds={setThresholds}- yAxisUnit={yAxisUnit}- selectedGraph={selectedGraph}- columnUnits={columnUnits}- />- )}- </div>- );-}--export interface RightContainerProps {- title: string;- setTitle: Dispatch<SetStateAction<string>>;- description: string;- setDescription: Dispatch<SetStateAction<string>>;- opacity: string;- setOpacity: Dispatch<SetStateAction<string>>;- selectedNullZeroValue: string;- setSelectedNullZeroValue: Dispatch<SetStateAction<string>>;- selectedGraph: PANEL_TYPES;- setSelectedTime: Dispatch<SetStateAction<timePreferance>>;- selectedTime: timePreferance;- yAxisUnit: string;- stackedBarChart: boolean;- setStackedBarChart: Dispatch<SetStateAction<boolean>>;- bucketWidth: number;- bucketCount: number;- combineHistogram: boolean;- setCombineHistogram: Dispatch<SetStateAction<boolean>>;- setBucketWidth: Dispatch<SetStateAction<number>>;- setBucketCount: Dispatch<SetStateAction<number>>;- setYAxisUnit: Dispatch<SetStateAction<string>>;- decimalPrecision: PrecisionOption;- setDecimalPrecision: Dispatch<SetStateAction<PrecisionOption>>;- setGraphHandler: (type: PANEL_TYPES) => void;- thresholds: ThresholdProps[];- setThresholds: Dispatch<SetStateAction<ThresholdProps[]>>;- selectedWidget?: Widgets;- isFillSpans: boolean;- setIsFillSpans: Dispatch<SetStateAction<boolean>>;- softMin: number | null;- softMax: number | null;- columnUnits: ColumnUnit;- setColumnUnits: Dispatch<SetStateAction<ColumnUnit>>;- setSoftMin: Dispatch<SetStateAction<number | null>>;- setSoftMax: Dispatch<SetStateAction<number | null>>;- isLogScale: boolean;- setIsLogScale: Dispatch<SetStateAction<boolean>>;- legendPosition: LegendPosition;- setLegendPosition: Dispatch<SetStateAction<LegendPosition>>;- customLegendColors: Record<string, string>;- setCustomLegendColors: Dispatch<SetStateAction<Record<string, string>>>;- queryResponse?: UseQueryResult<- SuccessResponse<MetricRangePayloadProps, unknown>,- Error- >;- contextLinks: ContextLinksData;- setContextLinks: Dispatch<SetStateAction<ContextLinksData>>;- enableDrillDown?: boolean;- isNewDashboard: boolean;- lineInterpolation: LineInterpolation;- setLineInterpolation: Dispatch<SetStateAction<LineInterpolation>>;- fillMode: FillMode;- setFillMode: Dispatch<SetStateAction<FillMode>>;- lineStyle: LineStyle;- setLineStyle: Dispatch<SetStateAction<LineStyle>>;- showPoints: boolean;- setShowPoints: Dispatch<SetStateAction<boolean>>;- spanGaps: boolean | number;- setSpanGaps: Dispatch<SetStateAction<boolean | number>>;-}--RightContainer.defaultProps = {- selectedWidget: undefined,- queryResponse: null,- enableDrillDown: false,-};--export default RightContainer;diff --git a/frontend/src/container/NewWidget/WidgetModals/DiscardChangesModal.tsx b/frontend/src/container/NewWidget/WidgetModals/DiscardChangesModal.tsxdeleted file mode 100644index 0021a7952e..0000000000--- a/frontend/src/container/NewWidget/WidgetModals/DiscardChangesModal.tsx+++ /dev/null@@ -1,53 +0,0 @@-import { SolidAlertTriangle } from '@signozhq/icons';-import { ConfirmDialog } from '@signozhq/ui/dialog';-import { Typography } from '@signozhq/ui/typography';--export interface DiscardChangesModalProps {- open: boolean;- isNewPanel: boolean;- panelTitle?: string;- dashboardTitle?: string;- onDiscard: () => void;- onClose: () => void;-}--export default function DiscardChangesModal({- open,- isNewPanel,- panelTitle,- dashboardTitle,- onDiscard,- onClose,-}: DiscardChangesModalProps): JSX.Element {- const dashboardName = dashboardTitle ? (- <>- {' '}- to <strong>{dashboardTitle}</strong>- </>- ) : null;- const panelLabel = panelTitle ? <strong>{panelTitle}</strong> : 'this panel';-- return (- <ConfirmDialog- open={open}- onOpenChange={(next): void => {- if (!next) {- onClose();- }- }}- title="Discard changes?"- titleIcon={<SolidAlertTriangle size={14} color="#fdd600" />}- confirmText="Discard"- confirmColor="destructive"- cancelText="Keep editing"- onConfirm={onDiscard}- onCancel={onClose}- >- {isNewPanel ? (- <Typography>This new panel won't be added{dashboardName}.</Typography>- ) : (- <Typography>Your unsaved edits to {panelLabel} will be lost.</Typography>- )}- </ConfirmDialog>- );-}diff --git a/frontend/src/container/NewWidget/__test__/NewWidget.test.tsx b/frontend/src/container/NewWidget/__test__/NewWidget.test.tsxdeleted file mode 100644index d17990e9f3..0000000000--- a/frontend/src/container/NewWidget/__test__/NewWidget.test.tsx+++ /dev/null@@ -1,435 +0,0 @@-// This test suite covers several important scenarios:-// - Empty layout - widget should be placed at origin (0,0)-// - Empty layout with custom dimensions-// - Placing widget next to an existing widget when there's space in the last row-// - Placing widget at bottom when the last row is full-// - Handling multiple rows correctly-// - Handling widgets with different heights--import { ReactNode } from 'react';-import { I18nextProvider } from 'react-i18next';-import { useSearchParams } from 'react-router-dom-v5-compat';-import { screen } from '@testing-library/react';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { useDashboardBootstrap } from 'hooks/dashboard/useDashboardBootstrap';--function DashboardBootstrapWrapper({- dashboardId,- children,-}: {- dashboardId: string;- children: ReactNode;-}): JSX.Element {- useDashboardBootstrap(dashboardId);- // eslint-disable-next-line react/jsx-no-useless-fragment- return <>{children}</>;-}-import { PreferenceContextProvider } from 'providers/preferences/context/PreferenceContextProvider';-import i18n from 'ReactI18';-import {- getByText as getByTextUtil,- render,- userEvent,- within,-} from 'tests/test-utils';--import NewWidget from '..';-import {- getDefaultWidgetData,- placeWidgetAtBottom,- placeWidgetBetweenRows,-} from '../utils';--// Helper function to check stack series state-const checkStackSeriesState = (- container: HTMLElement,- expectedChecked: boolean,-): HTMLElement => {- expect(getByTextUtil(container, 'Stack series')).toBeInTheDocument();-- const stackSeriesSection = container.querySelector(- '.stack-chart',- ) as HTMLElement;- expect(stackSeriesSection).toBeInTheDocument();-- const switchElement = within(stackSeriesSection).getByRole('switch');- if (expectedChecked) {- expect(switchElement).toBeChecked();- } else {- expect(switchElement).not.toBeChecked();- }-- return switchElement;-};--const MOCK_SEARCH_PARAMS =- '?graphType=bar&widgetId=b473eef0-8eb5-4dd3-8089-c1817734084f&compositeQuery=%7B"id"%3A"f026c678-9abf-42af-a3dc-f73dc8cbb810"%2C"builder"%3A%7B"queryData"%3A%5B%7B"dataSource"%3A"metrics"%2C"queryName"%3A"A"%2C"aggregateOperator"%3A"count"%2C"aggregateAttribute"%3A%7B"id"%3A"----"%2C"dataType"%3A""%2C"key"%3A""%2C"type"%3A""%7D%2C"timeAggregation"%3A"rate"%2C"spaceAggregation"%3A"sum"%2C"filter"%3A%7B"expression"%3A""%7D%2C"aggregations"%3A%5B%7B"metricName"%3A""%2C"temporality"%3A""%2C"timeAggregation"%3A"count"%2C"spaceAggregation"%3A"sum"%2C"reduceTo"%3A"avg"%7D%5D%2C"functions"%3A%5B%5D%2C"filters"%3A%7B"items"%3A%5B%5D%2C"op"%3A"AND"%7D%2C"expression"%3A"A"%2C"disabled"%3Afalse%2C"stepInterval"%3Anull%2C"having"%3A%5B%5D%2C"limit"%3Anull%2C"orderBy"%3A%5B%5D%2C"groupBy"%3A%5B%5D%2C"legend"%3A""%2C"reduceTo"%3A"avg"%2C"source"%3A""%7D%5D%2C"queryFormulas"%3A%5B%5D%2C"queryTraceOperator"%3A%5B%5D%7D%2C"clickhouse_sql"%3A%5B%7B"name"%3A"A"%2C"legend"%3A""%2C"disabled"%3Afalse%2C"query"%3A""%7D%5D%2C"promql"%3A%5B%7B"name"%3A"A"%2C"query"%3A""%2C"legend"%3A""%2C"disabled"%3Afalse%7D%5D%2C"queryType"%3A"builder"%7D&relativeTime=30m';-// Mocks-jest.mock('uplot', () => ({- paths: { spline: jest.fn(), bars: jest.fn() },- default: jest.fn(() => ({ paths: { spline: jest.fn(), bars: jest.fn() } })),-}));--jest.mock('react-router-dom', () => ({- ...jest.requireActual('react-router-dom'),- useLocation: (): { pathname: string; search: string } => ({- pathname: '',- search: MOCK_SEARCH_PARAMS,- }),-}));--jest.mock('hooks/useSafeNavigate', () => ({- useSafeNavigate: (): { safeNavigate: jest.Mock } => ({- safeNavigate: jest.fn(),- }),-}));--jest.mock('react-router-dom-v5-compat', () => ({- ...jest.requireActual('react-router-dom-v5-compat'),- useSearchParams: jest.fn(),- useNavigationType: jest.fn(() => 'PUSH'),-}));--describe('placeWidgetAtBottom', () => {- it('should place widget at (0,0) when layout is empty', () => {- const result = placeWidgetAtBottom('widget1', []);- expect(result).toStrictEqual({- i: 'widget1',- x: 0,- y: 0,- w: 6,- h: 6,- });- });-- it('should place widget at (0,0) with custom dimensions when layout is empty', () => {- const result = placeWidgetAtBottom('widget1', [], 4, 8);- expect(result).toStrictEqual({- i: 'widget1',- x: 0,- y: 0,- w: 4,- h: 8,- });- });-- it('should place widget next to existing widget in last row if space available', () => {- const existingLayout = [{ i: 'widget1', x: 0, y: 0, w: 6, h: 6 }];- const result = placeWidgetAtBottom('widget2', existingLayout);- expect(result).toStrictEqual({- i: 'widget2',- x: 6,- y: 0,- w: 6,- h: 6,- });- });-- it('should place widget at bottom when last row is full', () => {- const existingLayout = [- { i: 'widget1', x: 0, y: 0, w: 6, h: 6 },- { i: 'widget2', x: 6, y: 0, w: 6, h: 6 },- ];- const result = placeWidgetAtBottom('widget3', existingLayout);- expect(result).toStrictEqual({- i: 'widget3',- x: 0,- y: 6,- w: 6,- h: 6,- });- });-- it('should handle multiple rows correctly', () => {- const existingLayout = [- { i: 'widget1', x: 0, y: 0, w: 6, h: 6 },- { i: 'widget2', x: 6, y: 0, w: 6, h: 6 },- { i: 'widget3', x: 0, y: 6, w: 6, h: 6 },- ];- const result = placeWidgetAtBottom('widget4', existingLayout);- expect(result).toStrictEqual({- i: 'widget4',- x: 6,- y: 6,- w: 6,- h: 6,- });- });-- it('should handle widgets with different heights', () => {- const existingLayout = [- { i: 'widget1', x: 0, y: 0, w: 6, h: 8 },- { i: 'widget2', x: 6, y: 0, w: 6, h: 4 },- ];- const result = placeWidgetAtBottom('widget3', existingLayout);- // y = 2 here as later the react-grid-layout will add 2px to the y value while adjusting the layout- expect(result).toStrictEqual({- i: 'widget3',- x: 6,- y: 2,- w: 6,- h: 6,- });- });-});--describe('placeWidgetBetweenRows', () => {- it('should return single widget layout when layout is empty', () => {- const result = placeWidgetBetweenRows('widget1', [], 'currentRow');- expect(result).toStrictEqual([- {- i: 'widget1',- x: 0,- y: 0,- w: 6,- h: 6,- },- ]);- });-- it('should place widget at the end of the layout when no nextRowId is provided', () => {- const existingLayout = [- { i: 'widget1', x: 0, y: 0, w: 6, h: 6 },- { i: 'widget2', x: 6, y: 0, w: 6, h: 6 },- ];-- const result = placeWidgetBetweenRows('widget3', existingLayout, 'widget2');-- expect(result).toStrictEqual([- { i: 'widget1', x: 0, y: 0, w: 6, h: 6 },- { i: 'widget2', x: 6, y: 0, w: 6, h: 6 },- { i: 'widget3', x: 0, y: 6, w: 6, h: 6 },- ]);- });-- it('should place widget between current and next row', () => {- const existingLayout = [- {- h: 1,- i: "'widget1'",- maxH: 1,- minH: 1,- minW: 12,- moved: false,- static: false,- w: 12,- x: 0,- y: 0,- },- { i: 'widget2', x: 6, y: 0, w: 6, h: 6 },- {- h: 1,- i: 'widget3',- maxH: 1,- minH: 1,- minW: 12,- moved: false,- static: false,- w: 12,- x: 0,- y: 7,- },- ];-- const result = placeWidgetBetweenRows(- 'widget4',- existingLayout,- 'widget1',- 'widget3',- );-- expect(result).toStrictEqual([- {- h: 1,- i: "'widget1'",- maxH: 1,- minH: 1,- minW: 12,- moved: false,- static: false,- w: 12,- x: 0,- y: 0,- },- {- h: 6,- i: 'widget2',- w: 6,- x: 6,- y: 0,- },- {- h: 6,- i: 'widget4',- w: 6,- x: 0,- y: 6,- },- {- h: 1,- i: 'widget3',- maxH: 1,- minH: 1,- minW: 12,- moved: false,- static: false,- w: 12,- x: 0,- y: 7,- },- ]);- });-- it('should respect custom widget dimensions', () => {- const existingLayout = [{ i: 'widget1', x: 0, y: 0, w: 12, h: 4 }];-- const result = placeWidgetBetweenRows(- 'widget2',- existingLayout,- 'widget1',- null,- 8,- 3,- );-- expect(result).toStrictEqual([- { i: 'widget1', x: 0, y: 0, w: 12, h: 4 },- { i: 'widget2', x: 0, y: 4, w: 8, h: 3 },- ]);- });-});--describe('getDefaultWidgetData', () => {- it('should set stackedBarChart to true by default for new panel creation', () => {- const widgetId = 'test-widget-123';- const panelType = PANEL_TYPES.BAR;-- const result = getDefaultWidgetData(widgetId, panelType);-- expect(result.stackedBarChart).toBe(true);- expect(result.id).toBe(widgetId);- expect(result.panelTypes).toBe(panelType);- });-});--describe('Stacking bar in new panel', () => {- it('New panel should have stack bar - true by default', () => {- // Mock useSearchParams to return the expected values- (useSearchParams as jest.Mock).mockReturnValue([- new URLSearchParams(MOCK_SEARCH_PARAMS),- jest.fn(),- ]);-- const { container, getByText } = render(- <I18nextProvider i18n={i18n}>- <DashboardBootstrapWrapper dashboardId="">- <PreferenceContextProvider>- <NewWidget- dashboardId=""- dashboardData={undefined}- selectedGraph={PANEL_TYPES.BAR}- />- </PreferenceContextProvider>- </DashboardBootstrapWrapper>- </I18nextProvider>,- );-- // Verify label is present- expect(getByText('Stack series')).toBeInTheDocument();-- // Verify section exists- const section = container.querySelector('.stack-chart');- expect(section).toBeInTheDocument();-- // Verify switch is present and enabled- const switchBtn = section?.querySelector('[role="switch"]');- expect(switchBtn).toBeInTheDocument();- expect(switchBtn).toHaveAttribute('data-state', 'checked');-- // Check that stack series is present and checked- checkStackSeriesState(container, true);- });-});--const STACKING_STATE_ATTR = 'data-stacking-state';--describe('when switching to BAR panel type', () => {- beforeEach(() => {- jest.useFakeTimers();- jest.clearAllMocks();-- // Mock useSearchParams to return the expected values- (useSearchParams as jest.Mock).mockReturnValue([- new URLSearchParams(MOCK_SEARCH_PARAMS),- jest.fn(),- ]);- });-- afterEach(() => {- jest.useRealTimers();- });-- it('should preserve saved stacking value of true', async () => {- const user = userEvent.setup({- advanceTimers: jest.advanceTimersByTime.bind(jest),- });-- const { getByTestId, getByText, container } = render(- <DashboardBootstrapWrapper dashboardId="">- <NewWidget- dashboardId=""- dashboardData={undefined}- selectedGraph={PANEL_TYPES.BAR}- />- </DashboardBootstrapWrapper>,- );-- expect(getByTestId('panel-change-select')).toHaveAttribute(- STACKING_STATE_ATTR,- 'true',- );-- await user.click(getByText('Bar')); // Panel Type Selected-- // find dropdown with - .ant-select-dropdown- const panelDropdown = document.querySelector(- '.ant-select-dropdown',- ) as HTMLElement;- expect(panelDropdown).toBeInTheDocument();-- // Select TimeSeries from dropdown- const option = within(panelDropdown).getByText('Time Series');- await user.click(option);-- expect(getByTestId('panel-change-select')).toHaveAttribute(- STACKING_STATE_ATTR,- 'false',- );-- // Since we are on timeseries panel, stack series should be false- expect(screen.queryByText('Stack series')).not.toBeInTheDocument();-- // switch back to Bar panel- const panelTypeDropdown2 = getByTestId('panel-change-select') as HTMLElement;- expect(panelTypeDropdown2).toBeInTheDocument();-- expect(getByTextUtil(panelTypeDropdown2, 'Time Series')).toBeInTheDocument();- await user.click(getByTextUtil(panelTypeDropdown2, 'Time Series'));-- // find dropdown with - .ant-select-dropdown- const panelDropdown2 = document.querySelector(- '.ant-select-dropdown',- ) as HTMLElement;- // // Select BAR from dropdown- const BarOption = within(panelDropdown2).getByText('Bar');- await user.click(BarOption);-- // Stack series should be true- checkStackSeriesState(container, true);-- expect(getByTestId('panel-change-select')).toHaveAttribute(- STACKING_STATE_ATTR,- 'true',- );- });-});diff --git a/frontend/src/container/NewWidget/__test__/__mocks__/uplotChartData.ts b/frontend/src/container/NewWidget/__test__/__mocks__/uplotChartData.tsdeleted file mode 100644index 31a2d66382..0000000000--- a/frontend/src/container/NewWidget/__test__/__mocks__/uplotChartData.ts+++ /dev/null@@ -1,134 +0,0 @@-import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';--export const BarNonStackedChartData = {- apiResponse: {- data: {- result: [- {- metric: {- 'service.name': 'recommendationservice',- },- values: [- [1758713940, '33.933'],- [1758715020, '31.767'],- ],- queryName: 'A',- metaData: {- alias: '__result_0',- index: 0,- queryName: 'A',- },- legend: '',- },- {- metric: {- 'service.name': 'frontend',- },- values: [- [1758713940, '20.0'],- [1758715020, '25.0'],- ],- queryName: 'B',- metaData: {- alias: '__result_1',- index: 1,- queryName: 'B',- },- legend: '',- },- ],- resultType: 'time_series',- newResult: {- data: {- resultType: 'time_series',- result: [- {- queryName: 'A',- legend: '',- series: [- {- labels: {- 'service.name': 'recommendationservice',- },- labelsArray: [- {- 'service.name': 'recommendationservice',- },- ],- values: [- {- timestamp: 1758713940000,- value: '33.933',- },- {- timestamp: 1758715020000,- value: '31.767',- },- ],- metaData: {- alias: '__result_0',- index: 0,- queryName: 'A',- },- },- ],- predictedSeries: [],- upperBoundSeries: [],- lowerBoundSeries: [],- anomalyScores: [],- list: null,- },- {- queryName: 'B',- legend: '',- series: [- {- labels: {- 'service.name': 'frontend',- },- labelsArray: [- {- 'service.name': 'frontend',- },- ],- values: [- {- timestamp: 1758713940000,- value: '20.0',- },- {- timestamp: 1758715020000,- value: '25.0',- },- ],- metaData: {- alias: '__result_1',- index: 1,- queryName: 'B',- },- },- ],- predictedSeries: [],- upperBoundSeries: [],- lowerBoundSeries: [],- anomalyScores: [],- list: null,- },- ],- },- },- },- } as MetricRangePayloadProps,- fillSpans: false,- stackedBarChart: false,-};--export const BarStackedChartData = {- ...BarNonStackedChartData,- stackedBarChart: true,-};--export const TimeSeriesChartData = {- ...BarNonStackedChartData,- stackedBarChart: false,-};diff --git a/frontend/src/container/NewWidget/__test__/getUplotChartData.test.ts b/frontend/src/container/NewWidget/__test__/getUplotChartData.test.tsdeleted file mode 100644index 5be043bcc3..0000000000--- a/frontend/src/container/NewWidget/__test__/getUplotChartData.test.ts+++ /dev/null@@ -1,50 +0,0 @@-import { getUPlotChartData } from '../../../lib/uPlotLib/utils/getUplotChartData';-import {- BarNonStackedChartData,- BarStackedChartData,- TimeSeriesChartData,-} from './__mocks__/uplotChartData';--describe('getUplotChartData', () => {- it('should return the correct chart data for non-stacked bar chart', () => {- const result = getUPlotChartData(- BarNonStackedChartData.apiResponse,- BarNonStackedChartData.fillSpans,- BarNonStackedChartData.stackedBarChart,- );- expect(result).toStrictEqual([- [1758713940, 1758715020],- [33.933, 31.767],- [20.0, 25.0],- ]);- });-- it('should return the correct chart data for stacked bar chart', () => {- const result = getUPlotChartData(- BarStackedChartData.apiResponse,- BarStackedChartData.fillSpans,- BarStackedChartData.stackedBarChart,- );- // For stacked charts, the values should be cumulative- // First series: [33.933, 31.767] + [20.0, 25.0] = [53.933, 56.767]- // Second series: [20.0, 25.0] (unchanged)- expect(result).toHaveLength(3);- expect(result[0]).toStrictEqual([1758713940, 1758715020]);- expect(result[1][0]).toBeCloseTo(53.933, 3);- expect(result[1][1]).toBeCloseTo(56.767, 3);- expect(result[2]).toStrictEqual([20.0, 25.0]);- });-- it('should return the correct chart data for time series chart', () => {- const result = getUPlotChartData(- TimeSeriesChartData.apiResponse,- TimeSeriesChartData.fillSpans,- TimeSeriesChartData.stackedBarChart,- );- expect(result).toStrictEqual([- [1758713940, 1758715020],- [33.933, 31.767],- [20.0, 25.0],- ]);- });-});diff --git a/frontend/src/container/NewWidget/__test__/utils.test.ts b/frontend/src/container/NewWidget/__test__/utils.test.tsdeleted file mode 100644index 45c310d54e..0000000000--- a/frontend/src/container/NewWidget/__test__/utils.test.ts+++ /dev/null@@ -1,207 +0,0 @@-import {- initialAutocompleteData,- initialQueryBuilderFormValuesMap,- PANEL_TYPES,-} from 'constants/queryBuilder';-import { cloneDeep } from 'lodash-es';-import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';-import { Query } from 'types/api/queryBuilder/queryBuilderData';-import { MetricAggregation } from 'types/api/v5/queryRange';-import { EQueryType } from 'types/common/dashboard';-import { DataSource } from 'types/common/queryBuilder';--import type { PartialPanelTypes } from '../utils';-import { getIsQueryModified, handleQueryChange } from '../utils';--const buildSupersetQuery = (extras?: Record<string, unknown>): Query => ({- queryType: EQueryType.QUERY_BUILDER,- promql: [],- clickhouse_sql: [],- id: '1',- unit: '1',- builder: {- queryFormulas: [],- queryData: [- {- ...initialQueryBuilderFormValuesMap[DataSource.LOGS],- queryName: 'A',- orderBy: [{ columnName: 'x', order: 'asc' }],- limit: 10,- ...(extras || {}),- },- {- ...initialQueryBuilderFormValuesMap[DataSource.LOGS],- queryName: 'B',- orderBy: [{ columnName: 'x', order: 'desc' }],- limit: 20,- ...(extras || {}),- },- ],- queryTraceOperator: [],- },-});--const buildMetricsQuery = (- overrides?: Partial<{- metricName: string;- aggregateAttributeKey: string;- legend: string;- groupByKey: string;- }>,-): Query => ({- queryType: EQueryType.QUERY_BUILDER,- promql: [],- clickhouse_sql: [],- id: 'query-id',- unit: '',- builder: {- queryFormulas: [],- queryData: [- {- ...initialQueryBuilderFormValuesMap[DataSource.METRICS],- queryName: 'A',- aggregateAttribute: overrides?.aggregateAttributeKey- ? {- ...initialAutocompleteData,- key: overrides.aggregateAttributeKey,- type: 'tag',- dataType: DataTypes.Float64,- }- : cloneDeep(initialAutocompleteData),- aggregations: [- {- metricName: overrides?.metricName ?? 'system.cpu.load',- temporality: '',- timeAggregation: 'rate',- spaceAggregation: 'sum',- reduceTo: 'avg',- } as MetricAggregation,- ],- legend: overrides?.legend ?? '',- groupBy: overrides?.groupByKey- ? [- {- ...initialAutocompleteData,- key: overrides.groupByKey,- type: 'tag',- dataType: DataTypes.String,- },- ]- : [],- },- ],- queryTraceOperator: [],- },-});--describe('getIsQueryModified', () => {- it('returns false when baseline is null (new unsaved panel with no edits anchor)', () => {- const current = buildMetricsQuery();- expect(getIsQueryModified(current, null)).toBe(false);- });-- it('returns false when baseline is undefined', () => {- const current = buildMetricsQuery();- expect(getIsQueryModified(current, undefined)).toBe(false);- });-- it('returns false when current only differs by auto-backfilled aggregateAttribute', () => {- // saved widget query: aggregateAttribute is the v5-style empty initial value- // (stripped from persisted spec; spread back in as initialAutocompleteData on load)- const savedQuery = buildMetricsQuery({ metricName: 'system.cpu.load' });- // after MetricNameSelector edit-mode backfill, currentQuery has the populated- // aggregateAttribute while the rest of the query is identical- const currentQuery = buildMetricsQuery({- metricName: 'system.cpu.load',- aggregateAttributeKey: 'system.cpu.load',- });- expect(getIsQueryModified(currentQuery, savedQuery)).toBe(false);- });-- it('returns true when the user edits the legend', () => {- const baseline = buildMetricsQuery({ metricName: 'system.cpu.load' });- const edited = buildMetricsQuery({- metricName: 'system.cpu.load',- legend: 'cpu-load',- });- expect(getIsQueryModified(edited, baseline)).toBe(true);- });-- it('returns true when the user picks a different metric (aggregations diverges)', () => {- const baseline = buildMetricsQuery({ metricName: 'system.cpu.load' });- const edited = buildMetricsQuery({ metricName: 'system.memory.usage' });- expect(getIsQueryModified(edited, baseline)).toBe(true);- });-- it('returns true when the user adds a groupBy', () => {- const baseline = buildMetricsQuery({ metricName: 'system.cpu.load' });- const edited = buildMetricsQuery({- metricName: 'system.cpu.load',- groupByKey: 'host.name',- });- expect(getIsQueryModified(edited, baseline)).toBe(true);- });-- it('returns true on existing widget when current diverges from saved (Stage-and-Run silent-loss flow)', () => {- // After Edit → Stage and Run, stagedQuery is reset to match currentQuery.- // The dirty check must compare against the SAVED widget query, not stagedQuery.- const savedQuery = buildMetricsQuery({ metricName: 'system.cpu.load' });- const currentQuery = buildMetricsQuery({ metricName: 'system.memory.usage' });- expect(getIsQueryModified(currentQuery, savedQuery)).toBe(true);- });-- it('returns false for a new panel where currentQuery still matches stagedQuery baseline', () => {- const stagedQuery = buildMetricsQuery();- const currentQuery = buildMetricsQuery();- expect(getIsQueryModified(currentQuery, stagedQuery)).toBe(false);- });-- it('returns true for a new panel where currentQuery has been edited away from stagedQuery', () => {- const stagedQuery = buildMetricsQuery();- const currentQuery = buildMetricsQuery({ legend: 'custom' });- expect(getIsQueryModified(currentQuery, stagedQuery)).toBe(true);- });-});--describe('handleQueryChange', () => {- it('sets list-specific fields when switching to LIST', () => {- const superset = buildSupersetQuery();- const output = handleQueryChange(- PANEL_TYPES.LIST as keyof PartialPanelTypes,- superset as Query,- PANEL_TYPES.TABLE,- );- const firstQuery = output.builder.queryData[0];- expect(firstQuery.aggregateOperator).toBe('noop');- expect(firstQuery.offset).toBe(0);- expect(firstQuery.pageSize).toBe(10);- expect(firstQuery.orderBy).toBeUndefined();- expect(firstQuery.queryName).toBe('A');-- const secondQuery = output.builder.queryData[1];- expect(secondQuery.aggregateOperator).toBe('noop');- expect(secondQuery.offset).toBe(0);- expect(secondQuery.pageSize).toBe(10);- expect(secondQuery.orderBy).toBeUndefined();- expect(secondQuery.queryName).toBe('B');- });-- it('resets noop and pagination when leaving LIST', () => {- const superset = buildSupersetQuery({- aggregateOperator: 'noop',- offset: 5,- pageSize: 50,- });- const output = handleQueryChange(- PANEL_TYPES.TABLE as keyof PartialPanelTypes,- superset as Query,- PANEL_TYPES.LIST,- );- const q = output.builder.queryData[0];- expect(q.aggregateOperator).not.toBe('noop');- expect(q.offset).toBeUndefined();- expect(q.pageSize).toBeUndefined();- expect(q.orderBy).toBeUndefined();- expect(q.queryName).toBe('A');- });-});diff --git a/frontend/src/container/NewWidget/index.tsx b/frontend/src/container/NewWidget/index.tsxdeleted file mode 100644index c80ef1784a..0000000000--- a/frontend/src/container/NewWidget/index.tsx+++ /dev/null@@ -1,978 +0,0 @@-/* eslint-disable sonarjs/cognitive-complexity */-import { useCallback, useEffect, useMemo, useRef, useState } from 'react';-import { UseQueryResult } from 'react-query';-// eslint-disable-next-line no-restricted-imports-import { useSelector } from 'react-redux';-import { generatePath } from 'react-router-dom';-import { Check, X } from '@signozhq/icons';-import { Button } from '@signozhq/ui/button';-import {- ResizableHandle,- ResizablePanel,- ResizablePanelGroup,-} from '@signozhq/ui/resizable';-import { Flex } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import logEvent from 'api/common/logEvent';-import { PrecisionOption, PrecisionOptionsEnum } from 'components/Graph/types';-import HeaderRightSection from 'components/HeaderRightSection/HeaderRightSection';-import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';-import { adjustQueryForV5 } from 'components/QueryBuilderV2/utils';-import { QueryParams } from 'constants/query';-import {- initialQueriesMap,- PANEL_GROUP_TYPES,- PANEL_TYPES,-} from 'constants/queryBuilder';-import ROUTES from 'constants/routes';-import { DashboardShortcuts } from 'constants/shortcuts/DashboardShortcuts';-import { DEFAULT_BUCKET_COUNT } from 'container/PanelWrapper/constants';-import { useDashboardVariables } from 'hooks/dashboard/useDashboardVariables';-import { useUpdateDashboard } from 'hooks/dashboard/useUpdateDashboard';-import { useKeyboardHotkeys } from 'hooks/hotkeys/useKeyboardHotkeys';-import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { useSafeNavigate } from 'hooks/useSafeNavigate';-import useUrlQuery from 'hooks/useUrlQuery';-import createQueryParams from 'lib/createQueryParams';-import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';-import { getDashboardVariables } from 'lib/dashboardVariables/getDashboardVariables';-import {- FillMode,- LineInterpolation,- LineStyle,-} from 'lib/uPlotV2/config/types';-import { cloneDeep, defaultTo, isEmpty, isUndefined } from 'lodash-es';-import { useScrollToWidgetIdStore } from 'providers/Dashboard/helpers/scrollToWidgetIdHelper';-import {- clearSelectedRowWidgetId,- getSelectedRowWidgetId,-} from 'providers/Dashboard/helpers/selectedRowWidgetIdHelper';-import {- getNextWidgets,- getPreviousWidgets,- getSelectedWidgetIndex,-} from 'providers/Dashboard/util';-import { AppState } from 'store/reducers';-import {- ColumnUnit,- ContextLinksData,- LegendPosition,- Widgets,-} from 'types/api/dashboard/getAll';-import { Props } from 'types/api/dashboard/update';-import { IField } from 'types/api/logs/fields';-import { MetricQueryRangeSuccessResponse } from 'types/api/metrics/getQueryRange';-import { EQueryType } from 'types/common/dashboard';-import { DataSource } from 'types/common/queryBuilder';-import { GlobalReducer } from 'types/reducer/globalTime';-import { getGraphType, getGraphTypeForFormat } from 'utils/getGraphType';--import LeftContainer from './LeftContainer';-import RightContainer from './RightContainer';-import { ThresholdProps } from './RightContainer/Threshold/types';-import TimeItems, { timePreferance } from './RightContainer/timeItems';-import { Container, PanelContainer } from './styles';-import { NewWidgetProps } from './types';-import {- getDefaultWidgetData,- getIsQueryModified,- handleQueryChange,- placeWidgetAtBottom,- placeWidgetBetweenRows,-} from './utils';-import DiscardChangesModal from './WidgetModals/DiscardChangesModal';--import './NewWidget.styles.scss';--function NewWidget({- dashboardData,- dashboardId,- selectedGraph,- enableDrillDown = false,-}: NewWidgetProps): JSX.Element {- const { safeNavigate } = useSafeNavigate();- const setToScrollWidgetId = useScrollToWidgetIdStore(- (s) => s.setToScrollWidgetId,- );-- const { dashboardVariables } = useDashboardVariables();-- const { registerShortcut, deregisterShortcut } = useKeyboardHotkeys();-- const {- currentQuery,- stagedQuery,- redirectWithQueryBuilderData,- supersetQuery,- setSupersetQuery,- } = useQueryBuilder();-- const { selectedTime: globalSelectedInterval } = useSelector<- AppState,- GlobalReducer- >((state) => state.globalTime);-- const isLogsQuery =- currentQuery?.builder?.queryData?.length > 0 &&- currentQuery?.builder?.queryData?.every(- (query) => query?.dataSource === DataSource.LOGS,- );-- const customGlobalSelectedInterval = useMemo(- () =>- // custom selected time interval for list panel to prevent recalculating the start and end timestamps before fetching next / prev pages- selectedGraph === PANEL_TYPES.LIST && isLogsQuery- ? 'custom'- : globalSelectedInterval,- [selectedGraph, globalSelectedInterval, isLogsQuery],- );-- const { widgets = [] } = dashboardData?.data || {};-- const query = useUrlQuery();-- // For existing widgets, compare currentQuery against the saved widget query- // (stable across Stage-and-Run cycles). For new panels with no saved baseline,- // fall back to stagedQuery so initial edits still trigger the warning.- const savedWidgetQuery = useMemo(() => {- const widgetId = query.get('widgetId');- const match = widgets?.find((w) => w.id === widgetId);- if (!match || match.panelTypes === PANEL_GROUP_TYPES.ROW) {- return null;- }- return (match as Widgets).query ?? null;- }, [widgets, query]);-- const isQueryModified = useMemo(- () => getIsQueryModified(currentQuery, savedWidgetQuery ?? stagedQuery),- [currentQuery, savedWidgetQuery, stagedQuery],- );-- const [isNewDashboard, setIsNewDashboard] = useState<boolean>(false);-- const logEventCalledRef = useRef(false);-- useEffect(() => {- const widgetId = query.get('widgetId');- const selectedWidget = widgets?.find((e) => e.id === widgetId);- const isWidgetNotPresent = isUndefined(selectedWidget);- if (isWidgetNotPresent) {- setIsNewDashboard(true);- }-- if (!logEventCalledRef.current) {- logEvent('Panel Edit: Page visited', {- panelType: selectedWidget?.panelTypes,- dashboardId: dashboardData?.id,- widgetId: selectedWidget?.id,- dashboardName: dashboardData?.data.title,- isNewPanel: !!isWidgetNotPresent,- dataSource: currentQuery?.builder?.queryData?.[0]?.dataSource,- });- logEventCalledRef.current = true;- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, []);-- const getWidget = useCallback(() => {- const widgetId = query.get('widgetId');- const selectedWidget = widgets?.find((e) => e.id === widgetId);- return defaultTo(- selectedWidget,- getDefaultWidgetData(widgetId || '', selectedGraph),- ) as Widgets;- }, [query, selectedGraph, widgets]);-- const [selectedWidget, setSelectedWidget] = useState(getWidget());-- const [title, setTitle] = useState<string>(- selectedWidget?.title?.toString() || '',- );- const [description, setDescription] = useState<string>(- selectedWidget?.description || '',- );- const [yAxisUnit, setYAxisUnit] = useState<string>(- selectedWidget?.yAxisUnit || 'none',- );-- const [decimalPrecision, setDecimalPrecision] = useState<PrecisionOption>(- selectedWidget?.decimalPrecision ?? PrecisionOptionsEnum.TWO,- );-- const [stackedBarChart, setStackedBarChart] = useState<boolean>(- selectedWidget?.stackedBarChart || false,- );- const [opacity, setOpacity] = useState<string>(selectedWidget?.opacity || '1');- const [thresholds, setThresholds] = useState<ThresholdProps[]>(- selectedWidget?.thresholds || [],- );- const [selectedNullZeroValue, setSelectedNullZeroValue] = useState<string>(- selectedWidget?.nullZeroValues || 'zero',- );- const [isFillSpans, setIsFillSpans] = useState<boolean>(- selectedWidget?.fillSpans || false,- );- const [isLogScale, setIsLogScale] = useState<boolean>(- selectedWidget?.isLogScale || false,- );- const [legendPosition, setLegendPosition] = useState<LegendPosition>(- selectedWidget?.legendPosition || LegendPosition.BOTTOM,- );- const [lineInterpolation, setLineInterpolation] = useState<LineInterpolation>(- selectedWidget?.lineInterpolation || LineInterpolation.Spline,- );- const [fillMode, setFillMode] = useState<FillMode>(- selectedWidget?.fillMode || FillMode.None,- );- const [lineStyle, setLineStyle] = useState<LineStyle>(- selectedWidget?.lineStyle || LineStyle.Solid,- );- const [showPoints, setShowPoints] = useState<boolean>(- selectedWidget?.showPoints ?? false,- );- const [spanGaps, setSpanGaps] = useState<boolean | number>(- selectedWidget?.spanGaps ?? true,- );- const [customLegendColors, setCustomLegendColors] = useState<- Record<string, string>- >(selectedWidget?.customLegendColors || {});-- const [discardModal, setDiscardModal] = useState(false);-- const [bucketWidth, setBucketWidth] = useState<number>(- selectedWidget?.bucketWidth || 0,- );-- const [bucketCount, setBucketCount] = useState<number>(- selectedWidget?.bucketCount || DEFAULT_BUCKET_COUNT,- );-- const [combineHistogram, setCombineHistogram] = useState<boolean>(- selectedWidget?.mergeAllActiveQueries || false,- );-- const [softMin, setSoftMin] = useState<number | null>(- selectedWidget?.softMin === null || selectedWidget?.softMin === undefined- ? null- : selectedWidget?.softMin || 0,- );-- const [selectedLogFields, setSelectedLogFields] = useState<IField[] | null>(- selectedWidget?.selectedLogFields || null,- );-- const [selectedTracesFields, setSelectedTracesFields] = useState(- selectedWidget?.selectedTracesFields || null,- );-- const [softMax, setSoftMax] = useState<number | null>(- selectedWidget?.softMax === null || selectedWidget?.softMax === undefined- ? null- : selectedWidget?.softMax || 0,- );-- const [columnUnits, setColumnUnits] = useState<ColumnUnit>(- selectedWidget?.columnUnits || {},- );-- const [contextLinks, setContextLinks] = useState<ContextLinksData>(- selectedWidget?.contextLinks || { linksData: [] },- );-- useEffect(() => {- setSelectedWidget((prev) => {- if (!prev) {- return prev;- }- return {- ...prev,- query: currentQuery,- title,- description,- opacity,- nullZeroValues: selectedNullZeroValue,- yAxisUnit,- decimalPrecision,- thresholds,- softMin,- softMax,- fillSpans: isFillSpans,- lineInterpolation,- fillMode,- lineStyle,- showPoints,- spanGaps,- columnUnits,- bucketCount,- stackedBarChart,- bucketWidth,- mergeAllActiveQueries: combineHistogram,- selectedLogFields,- selectedTracesFields,- isLogScale,- legendPosition,- customLegendColors,- columnWidths: selectedWidget.columnWidths,- contextLinks,- };- });- }, [- columnUnits,- currentQuery,- description,- isFillSpans,- opacity,- selectedLogFields,- selectedNullZeroValue,- selectedTracesFields,- softMax,- softMin,- thresholds,- title,- yAxisUnit,- decimalPrecision,- bucketWidth,- bucketCount,- combineHistogram,- stackedBarChart,- isLogScale,- legendPosition,- lineInterpolation,- fillMode,- lineStyle,- showPoints,- spanGaps,- customLegendColors,- contextLinks,- selectedWidget.columnWidths,- ]);-- const closeModal = (): void => {- setDiscardModal(false);- };-- const [graphType, setGraphType] = useState(selectedGraph);-- const getSelectedTime = useCallback(- () =>- TimeItems.find(- (e) => e.enum === (selectedWidget?.timePreferance || 'GLOBAL_TIME'),- ),- [selectedWidget],- );-- const [selectedTime, setSelectedTime] = useState<timePreferance>({- name: getSelectedTime()?.name || '',- enum: selectedWidget?.timePreferance || 'GLOBAL_TIME',- });-- const updateDashboardMutation = useUpdateDashboard();-- const { afterWidgets, preWidgets } = useMemo(() => {- if (!dashboardData) {- return {- selectedWidget: {} as Widgets,- preWidgets: [],- afterWidgets: [],- };- }-- const widgetId = query.get('widgetId');-- const selectedWidgetIndex = getSelectedWidgetIndex(dashboardData, widgetId);-- const preWidgets = getPreviousWidgets(dashboardData, selectedWidgetIndex);-- const afterWidgets = getNextWidgets(dashboardData, selectedWidgetIndex);-- const selectedWidget = (dashboardData.data.widgets || [])[- selectedWidgetIndex || 0- ];-- return { selectedWidget, preWidgets, afterWidgets };- }, [dashboardData, query]);-- // this loading state is to take care of mismatch in the responses for table and other panels- // hence while changing the query contains the older value and the processing logic fails- const [isLoadingPanelData, setIsLoadingPanelData] = useState<boolean>(false);-- // State to hold query response for sharing between left and right containers- const [queryResponse, setQueryResponse] = useState<- UseQueryResult<MetricQueryRangeSuccessResponse, Error>- >(null as any);-- // request data should be handled by the parent and the child components should consume the same- // this has been moved here from the left container- const [requestData, setRequestData] = useState<GetQueryResultsProps>(() => {- const updatedQuery = cloneDeep(stagedQuery || initialQueriesMap.metrics);- if (selectedWidget) {- if (selectedGraph === PANEL_TYPES.LIST) {- return {- query: updatedQuery,- graphType: PANEL_TYPES.LIST,- selectedTime: selectedTime.enum || 'GLOBAL_TIME',- globalSelectedInterval: customGlobalSelectedInterval,- variables: getDashboardVariables(dashboardVariables),- tableParams: {- pagination: {- offset: 0,- limit: updatedQuery?.builder?.queryData?.[0]?.limit || 0,- },- },- };- }- return {- selectedTime: selectedWidget?.timePreferance,- graphType: getGraphType(selectedGraph || selectedWidget.panelTypes),- query: stagedQuery || initialQueriesMap.metrics,- globalSelectedInterval: customGlobalSelectedInterval,- formatForWeb:- getGraphTypeForFormat(selectedGraph || selectedWidget.panelTypes) ===- PANEL_TYPES.TABLE,- variables: getDashboardVariables(dashboardVariables),- originalGraphType: selectedGraph || selectedWidget?.panelTypes,- };- }-- // If stagedQuery exists, don't re-run the query (e.g. when clicking on Add to Dashboard from logs and traces explorer)- if (!stagedQuery) {- redirectWithQueryBuilderData(updatedQuery);- }- return {- query: updatedQuery,- graphType: selectedGraph,- selectedTime: selectedTime.enum || 'GLOBAL_TIME',- globalSelectedInterval: customGlobalSelectedInterval,- variables: getDashboardVariables(dashboardVariables),- };- });-- useEffect(() => {- if (stagedQuery) {- setIsLoadingPanelData(false);- setRequestData((prev) => ({- ...prev,- selectedTime: selectedTime.enum || prev.selectedTime,- globalSelectedInterval: customGlobalSelectedInterval,- graphType: getGraphType(selectedGraph || selectedWidget.panelTypes),- query: stagedQuery,- fillGaps: selectedWidget.fillSpans || false,- isLogScale: selectedWidget.isLogScale || false,- formatForWeb:- getGraphTypeForFormat(selectedGraph || selectedWidget.panelTypes) ===- PANEL_TYPES.TABLE,- originalGraphType: selectedGraph || selectedWidget.panelTypes,- }));- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [- stagedQuery,- selectedTime,- selectedWidget.fillSpans,- selectedWidget.isLogScale,- globalSelectedInterval,- ]);-- const navigateToDashboardPage = useCallback(() => {- const params = new URLSearchParams();-- const urlVariablesQueryString = query.get(QueryParams.variables);- if (urlVariablesQueryString) {- params.set(QueryParams.variables, urlVariablesQueryString);- }-- const search = params.toString() ? `?${params.toString()}` : '';-- safeNavigate(generatePath(ROUTES.DASHBOARD, { dashboardId }) + search);- }, [dashboardId, query, safeNavigate]);-- const onClickSaveHandler = useCallback(() => {- if (!dashboardData) {- return;- }-- const widgetId = query.get('widgetId') || '';- let updatedLayout = dashboardData.data.layout || [];-- const selectedRowWidgetId = getSelectedRowWidgetId(dashboardId);-- if (isNewDashboard && isEmpty(selectedRowWidgetId)) {- const newLayoutItem = placeWidgetAtBottom(widgetId, updatedLayout);- updatedLayout = [...updatedLayout, newLayoutItem];- }-- if (isNewDashboard && selectedRowWidgetId) {- // Find the next row by looking through remaining layout items- const currentIndex = updatedLayout.findIndex(- (e) => e.i === selectedRowWidgetId,- );- const nextRowIndex = updatedLayout.findIndex(- (item, index) =>- index > currentIndex &&- widgets?.find((w) => w.id === item.i)?.panelTypes ===- PANEL_GROUP_TYPES.ROW,- );- const nextRowId = nextRowIndex !== -1 ? updatedLayout[nextRowIndex].i : null;-- const newLayoutItem = placeWidgetBetweenRows(- widgetId,- updatedLayout,- selectedRowWidgetId,- nextRowId,- );- updatedLayout = newLayoutItem;- }-- const adjustedQueryForV5 = adjustQueryForV5(currentQuery);-- const dashboard: Props = {- id: dashboardData.id,-- data: {- ...dashboardData.data,- widgets: isNewDashboard- ? [- ...afterWidgets,- {- ...(selectedWidget || ({} as Widgets)),- description: selectedWidget?.description || '',- timePreferance: selectedTime.enum,- opacity: selectedWidget?.opacity || '1',- nullZeroValues: selectedWidget?.nullZeroValues || 'zero',- title: selectedWidget?.title,- stackedBarChart: selectedWidget?.stackedBarChart || false,- yAxisUnit: selectedWidget?.yAxisUnit,- decimalPrecision:- selectedWidget?.decimalPrecision ?? PrecisionOptionsEnum.TWO,- panelTypes: graphType,- query: adjustedQueryForV5,- thresholds: selectedWidget?.thresholds,- columnUnits: selectedWidget?.columnUnits,- softMin: selectedWidget?.softMin || 0,- softMax: selectedWidget?.softMax || 0,- fillSpans: selectedWidget?.fillSpans,- spanGaps: selectedWidget?.spanGaps ?? true,- isLogScale: selectedWidget?.isLogScale || false,- bucketWidth: selectedWidget?.bucketWidth || 0,- bucketCount: selectedWidget?.bucketCount || 0,- mergeAllActiveQueries: selectedWidget?.mergeAllActiveQueries || false,- selectedLogFields: selectedWidget?.selectedLogFields || [],- selectedTracesFields: selectedWidget?.selectedTracesFields || [],- legendPosition: selectedWidget?.legendPosition || LegendPosition.BOTTOM,- customLegendColors: selectedWidget?.customLegendColors || {},- contextLinks: selectedWidget?.contextLinks || { linksData: [] },- },- ]- : [- ...preWidgets,- {- ...(selectedWidget || ({} as Widgets)),- description: selectedWidget?.description || '',- timePreferance: selectedTime.enum,- opacity: selectedWidget?.opacity || '1',- nullZeroValues: selectedWidget?.nullZeroValues || 'zero',- title: selectedWidget?.title,- stackedBarChart: selectedWidget?.stackedBarChart || false,- yAxisUnit: selectedWidget?.yAxisUnit,- decimalPrecision:- selectedWidget?.decimalPrecision ?? PrecisionOptionsEnum.TWO,- panelTypes: graphType,- query: adjustedQueryForV5,- thresholds: selectedWidget?.thresholds,- columnUnits: selectedWidget?.columnUnits,- softMin: selectedWidget?.softMin || 0,- softMax: selectedWidget?.softMax || 0,- fillSpans: selectedWidget?.fillSpans,- spanGaps: selectedWidget?.spanGaps ?? true,- isLogScale: selectedWidget?.isLogScale || false,- bucketWidth: selectedWidget?.bucketWidth || 0,- bucketCount: selectedWidget?.bucketCount || 0,- mergeAllActiveQueries: selectedWidget?.mergeAllActiveQueries || false,- selectedLogFields: selectedWidget?.selectedLogFields || [],- selectedTracesFields: selectedWidget?.selectedTracesFields || [],- legendPosition: selectedWidget?.legendPosition || LegendPosition.BOTTOM,- customLegendColors: selectedWidget?.customLegendColors || {},- contextLinks: selectedWidget?.contextLinks || { linksData: [] },- },- ...afterWidgets,- ],- layout: [...updatedLayout],- },- };-- return updateDashboardMutation.mutateAsync(dashboard, {- onSuccess: () => {- setToScrollWidgetId(selectedWidget?.id || '');- navigateToDashboardPage();- },- });- }, [- dashboardData,- query,- isNewDashboard,- afterWidgets,- selectedWidget,- selectedTime.enum,- graphType,- currentQuery,- preWidgets,- updateDashboardMutation,- widgets,- setToScrollWidgetId,- navigateToDashboardPage,- dashboardId,- ]);-- const onClickDiscardHandler = useCallback(() => {- if (isQueryModified) {- setDiscardModal(true);- return;- }- navigateToDashboardPage();- }, [isQueryModified, navigateToDashboardPage]);-- const discardChanges = useCallback(() => {- navigateToDashboardPage();- }, [navigateToDashboardPage]);-- const setGraphHandler = (type: PANEL_TYPES): void => {- setIsLoadingPanelData(true);- const updatedQuery = handleQueryChange(- type as any,- supersetQuery,- selectedGraph,- );- setGraphType(type);-- // with a single source of truth for stacking, we can use the saved stacking value as a default value- const savedStackingValue = getWidget()?.stackedBarChart;- setStackedBarChart(- type === PANEL_TYPES.BAR ? savedStackingValue || false : false,- );-- redirectWithQueryBuilderData(- updatedQuery,- { [QueryParams.graphType]: type },- undefined,- true,- );- };-- // add useEffect for graph type change from url- useEffect(() => {- const graphType = query.get('graphType');- if (graphType && graphType !== selectedGraph) {- setGraphType(graphType as PANEL_TYPES);- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [query]);-- const isNewPanel = useMemo(() => {- const widgetId = query.get('widgetId');- const selectedWidget = widgets?.find((e) => e.id === widgetId);- return isUndefined(selectedWidget);- }, [query, widgets]);-- const onSaveDashboard = useCallback((): void => {- logEvent('Panel Edit: Save changes', {- panelType: selectedWidget.panelTypes,- dashboardId: dashboardData?.id,- widgetId: selectedWidget.id,- dashboardName: dashboardData?.data.title,- queryType: currentQuery.queryType,- isNewPanel,- dataSource: currentQuery?.builder?.queryData?.[0]?.dataSource,- ...(currentQuery.queryType === EQueryType.CLICKHOUSE && {- clickhouseQueryCount: currentQuery.clickhouse_sql.length,- clickhouseQueries: currentQuery.clickhouse_sql.map((q) => ({- name: q.name,- query: (q.query ?? '')- .replace(/--[^\n]*/g, '') // strip line comments- .replace(/\/\*[\s\S]*?\*\//g, '') // strip block comments- .replace(/'(?:[^'\\]|\\.|'')*'/g, "'?'") // replace single-quoted strings (handles \' and '' escapes)- .replace(/\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/g, '?'), // replace numeric literals (int, float, scientific)- disabled: q.disabled,- })),- }),- });- onClickSaveHandler();- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [onClickSaveHandler]);-- const isNewTraceLogsAvailable =- currentQuery.queryType === EQueryType.QUERY_BUILDER &&- currentQuery?.builder?.queryData?.find(- (query) => query.dataSource !== DataSource.METRICS,- ) !== undefined;-- const isSaveDisabled = useMemo(() => {- // new created dashboard- if (selectedWidget?.id === 'empty') {- return isNewTraceLogsAvailable;- }-- const isTraceOrLogsQueryBuilder =- currentQuery?.builder?.queryData?.find(- (query) =>- query.dataSource === DataSource.TRACES ||- query.dataSource === DataSource.LOGS,- ) !== undefined;-- if (isTraceOrLogsQueryBuilder) {- return false;- }-- return isNewTraceLogsAvailable;- }, [- currentQuery?.builder?.queryData,- selectedWidget?.id,- isNewTraceLogsAvailable,- ]);-- useEffect(() => {- /**- * we need this extra handling for superset query because we cannot keep this in sync with current query- * always.we do not sync superset query in the initQueryBuilderData because that function is called on all stage and run- * actions. we do not want that as we loose out on superset functionalities if we do the same. hence initialising the superset query- * on mount here with the currentQuery in the begining itself- */- setSupersetQuery(currentQuery);-- return (): void => {- clearSelectedRowWidgetId(dashboardId);- };- // eslint-disable-next-line react-hooks/exhaustive-deps- }, []);-- useEffect(() => {- registerShortcut(DashboardShortcuts.SaveChanges, onSaveDashboard);- registerShortcut(DashboardShortcuts.DiscardChanges, onClickDiscardHandler);-- return (): void => {- deregisterShortcut(DashboardShortcuts.SaveChanges);- deregisterShortcut(DashboardShortcuts.DiscardChanges);- };- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [onSaveDashboard]);-- useEffect(() => {- if (selectedGraph === PANEL_TYPES.LIST) {- const initialDataSource = currentQuery?.builder?.queryData?.[0]?.dataSource;- if (initialDataSource === DataSource.LOGS) {- // we do not need selected log columns in the request data as the entire response contains all the necessary data- setRequestData((prev) => ({- ...prev,- tableParams: {- ...prev.tableParams,- },- }));- } else if (initialDataSource === DataSource.TRACES) {- setRequestData((prev) => ({- ...prev,- tableParams: {- ...prev.tableParams,- selectColumns: selectedTracesFields,- },- }));- }- }- }, [selectedLogFields, selectedTracesFields, currentQuery, selectedGraph]);-- const showSwitchToViewModeButton =- enableDrillDown && !isNewDashboard && !!query.get('widgetId');-- const handleSwitchToViewMode = useCallback(() => {- if (!query.get('widgetId')) {- return;- }- const widgetId = query.get('widgetId') || '';- const graphType = query.get('graphType') || '';- const variables = query.get(QueryParams.variables) || '';- const queryParams = {- [QueryParams.expandedWidgetId]: widgetId,- [QueryParams.graphType]: graphType,- [QueryParams.compositeQuery]: encodeURIComponent(- JSON.stringify(currentQuery),- ),- [QueryParams.variables]: variables,- };-- const updatedSearch = createQueryParams(queryParams);- safeNavigate({- pathname: generatePath(ROUTES.DASHBOARD, { dashboardId }),- search: updatedSearch,- });- }, [query, safeNavigate, dashboardId, currentQuery]);-- return (- <Container className="new-widget-container">- <div className="edit-header">- <div className="left-header">- <X- size={14}- onClick={onClickDiscardHandler}- className="discard-icon"- data-testid="discard-button"- />- <Flex align="center" gap={24}>- <Typography.Text className="configure-panel">- Configure panel- </Typography.Text>- </Flex>- </div>- <div className="right-header">- <HeaderRightSection- enableAnnouncements={false}- enableShare={false}- enableFeedback={false}- />- {showSwitchToViewModeButton && (- <Button- color="primary"- data-testid="switch-to-view-mode"- disabled={isSaveDisabled || !currentQuery}- onClick={handleSwitchToViewMode}- >- Switch to View Mode- </Button>- )}- {isSaveDisabled && (- <Button- color="primary"- data-testid="new-widget-save"- loading={updateDashboardMutation.isLoading}- disabled={isSaveDisabled}- onClick={onSaveDashboard}- className="save-btn"- >- Save Changes- </Button>- )}- {!isSaveDisabled && (- <Button- color="primary"- data-testid="new-widget-save"- loading={updateDashboardMutation.isLoading}- disabled={isSaveDisabled}- onClick={onSaveDashboard}- prefix={<Check size={14} />}- className="save-btn"- >- Save Changes- </Button>- )}- </div>- </div>-- <PanelContainer>- <ResizablePanelGroup- orientation="horizontal"- className="widget-resizable-panel-group"- >- <ResizablePanel- minSize={70}- maxSize={80}- defaultSize={80}- className="resizable-panel-left-container"- >- <OverlayScrollbar>- {selectedWidget && (- <LeftContainer- dashboardData={dashboardData}- selectedGraph={graphType}- selectedLogFields={selectedLogFields}- setSelectedLogFields={setSelectedLogFields}- selectedTracesFields={selectedTracesFields}- setSelectedTracesFields={setSelectedTracesFields}- selectedWidget={selectedWidget}- selectedTime={selectedTime}- requestData={requestData}- setRequestData={setRequestData}- isLoadingPanelData={isLoadingPanelData}- setQueryResponse={setQueryResponse}- enableDrillDown={enableDrillDown}- />- )}- </OverlayScrollbar>- </ResizablePanel>- <ResizableHandle withHandle className="widget-resizable-handle" />- <ResizablePanel- minSize={20}- maxSize={30}- defaultSize={20}- className="resizable-panel-right-container"- >- <RightContainer- setGraphHandler={setGraphHandler}- title={title}- setTitle={setTitle}- description={description}- setDescription={setDescription}- stackedBarChart={stackedBarChart}- setStackedBarChart={setStackedBarChart}- lineInterpolation={lineInterpolation}- setLineInterpolation={setLineInterpolation}- fillMode={fillMode}- setFillMode={setFillMode}- lineStyle={lineStyle}- setLineStyle={setLineStyle}- showPoints={showPoints}- setShowPoints={setShowPoints}- spanGaps={spanGaps}- setSpanGaps={setSpanGaps}- opacity={opacity}- yAxisUnit={yAxisUnit}- columnUnits={columnUnits}- setColumnUnits={setColumnUnits}- bucketCount={bucketCount}- bucketWidth={bucketWidth}- combineHistogram={combineHistogram}- setCombineHistogram={setCombineHistogram}- setBucketWidth={setBucketWidth}- setBucketCount={setBucketCount}- setOpacity={setOpacity}- selectedNullZeroValue={selectedNullZeroValue}- setSelectedNullZeroValue={setSelectedNullZeroValue}- selectedGraph={graphType}- setSelectedTime={setSelectedTime}- selectedTime={selectedTime}- setYAxisUnit={setYAxisUnit}- decimalPrecision={decimalPrecision}- setDecimalPrecision={setDecimalPrecision}- thresholds={thresholds}- setThresholds={setThresholds}- selectedWidget={selectedWidget}- isFillSpans={isFillSpans}- setIsFillSpans={setIsFillSpans}- isLogScale={isLogScale}- setIsLogScale={setIsLogScale}- legendPosition={legendPosition}- setLegendPosition={setLegendPosition}- customLegendColors={customLegendColors}- setCustomLegendColors={setCustomLegendColors}- queryResponse={queryResponse}- softMin={softMin}- setSoftMin={setSoftMin}- softMax={softMax}- setSoftMax={setSoftMax}- contextLinks={contextLinks}- setContextLinks={setContextLinks}- enableDrillDown={enableDrillDown}- isNewDashboard={isNewDashboard}- />- </ResizablePanel>- </ResizablePanelGroup>- </PanelContainer>- <DiscardChangesModal- open={discardModal}- isNewPanel={isNewPanel}- panelTitle={title}- dashboardTitle={dashboardData?.data?.title}- onDiscard={discardChanges}- onClose={closeModal}- />- </Container>- );-}--export default NewWidget;diff --git a/frontend/src/container/NewWidget/styles.ts b/frontend/src/container/NewWidget/styles.tsdeleted file mode 100644index b568a0c7b5..0000000000--- a/frontend/src/container/NewWidget/styles.ts+++ /dev/null@@ -1,20 +0,0 @@-import styled from 'styled-components';--export const Container = styled.div`- min-height: 78vh;- display: flex;- flex-direction: column;- overflow-y: hidden;-`;--export const ButtonContainer = styled.div`- display: flex;- gap: 8px;- margin-bottom: 1rem;- justify-content: flex-end;-`;--export const PanelContainer = styled.div`- display: flex;- overflow-y: auto;-`;diff --git a/frontend/src/container/NewWidget/types.ts b/frontend/src/container/NewWidget/types.tsdeleted file mode 100644index d42044f168..0000000000--- a/frontend/src/container/NewWidget/types.ts+++ /dev/null@@ -1,46 +0,0 @@-import { Dispatch, SetStateAction } from 'react';-import { UseQueryResult } from 'react-query';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';-import { Dashboard, Widgets } from 'types/api/dashboard/getAll';-import { MetricQueryRangeSuccessResponse } from 'types/api/metrics/getQueryRange';--import { timePreferance } from './RightContainer/timeItems';--export interface NewWidgetProps {- dashboardId: string;- dashboardData: Dashboard | undefined;- selectedGraph: PANEL_TYPES;- enableDrillDown?: boolean;-}--export interface WidgetGraphProps {- selectedLogFields: Widgets['selectedLogFields'];- setSelectedLogFields?: Dispatch<SetStateAction<Widgets['selectedLogFields']>>;- selectedTracesFields: Widgets['selectedTracesFields'];- setSelectedTracesFields?: Dispatch<- SetStateAction<Widgets['selectedTracesFields']>- >;- selectedWidget: Widgets;- selectedGraph: PANEL_TYPES;- selectedTime: timePreferance;- requestData: GetQueryResultsProps;- setRequestData: Dispatch<SetStateAction<GetQueryResultsProps>>;- isLoadingPanelData: boolean;- setQueryResponse?: Dispatch<- SetStateAction<UseQueryResult<MetricQueryRangeSuccessResponse, Error>>- >;- enableDrillDown?: boolean;- dashboardData: Dashboard | undefined;- isNewPanel?: boolean;-}--export type WidgetGraphContainerProps = {- queryResponse: UseQueryResult<MetricQueryRangeSuccessResponse, Error>;- setRequestData: Dispatch<SetStateAction<GetQueryResultsProps>>;- selectedGraph: PANEL_TYPES;- selectedWidget: Widgets;- isLoadingPanelData: boolean;- enableDrillDown?: boolean;- isCancelled?: boolean;-};diff --git a/frontend/src/container/PanelWrapper/constants.ts b/frontend/src/container/PanelWrapper/constants.tsdeleted file mode 100644index aa2a00ba75..0000000000--- a/frontend/src/container/PanelWrapper/constants.ts+++ /dev/null@@ -1,50 +0,0 @@-import { PANEL_TYPES } from 'constants/queryBuilder';-import BarPanel from 'container/DashboardContainer/visualization/panels/BarPanel/BarPanel';-import HistogramPanel from 'container/DashboardContainer/visualization/panels/HistogramPanel/HistogramPanel';--import TimeSeriesPanel from '../DashboardContainer/visualization/panels/TimeSeriesPanel/TimeSeriesPanel';-import ListPanelWrapper from './ListPanelWrapper';-import PiePanelWrapper from './PiePanelWrapper';-import TablePanelWrapper from './TablePanelWrapper';-import ValuePanelWrapper from './ValuePanelWrapper';--export const PanelTypeVsPanelWrapper = {- [PANEL_TYPES.TIME_SERIES]: TimeSeriesPanel,- [PANEL_TYPES.TABLE]: TablePanelWrapper,- [PANEL_TYPES.LIST]: ListPanelWrapper,- [PANEL_TYPES.VALUE]: ValuePanelWrapper,- [PANEL_TYPES.TRACE]: null,- [PANEL_TYPES.EMPTY_WIDGET]: null,- [PANEL_TYPES.PIE]: PiePanelWrapper,- [PANEL_TYPES.BAR]: BarPanel,- [PANEL_TYPES.HISTOGRAM]: HistogramPanel,-};--export const DEFAULT_BUCKET_COUNT = 30;--// prettier-ignore-export const histogramBucketSizes = [- 1e-9, 2e-9, 2.5e-9, 4e-9, 5e-9,- 1e-8, 2e-8, 2.5e-8, 4e-8, 5e-8,- 1e-7, 2e-7, 2.5e-7, 4e-7, 5e-7,- 1e-6, 2e-6, 2.5e-6, 4e-6, 5e-6,- 1e-5, 2e-5, 2.5e-5, 4e-5, 5e-5,- 1e-4, 2e-4, 2.5e-4, 4e-4, 5e-4,- 1e-3, 2e-3, 2.5e-3, 4e-3, 5e-3,- 1e-2, 2e-2, 2.5e-2, 4e-2, 5e-2,- 1e-1, 2e-1, 2.5e-1, 4e-1, 5e-1,- 1, 2, 4, 5,- 1e+1, 2e+1, 2.5e+1, 4e+1, 5e+1,- 1e+2, 2e+2, 2.5e+2, 4e+2, 5e+2,- 1e+3, 2e+3, 2.5e+3, 4e+3, 5e+3,- 1e+4, 2e+4, 2.5e+4, 4e+4, 5e+4,- 1e+5, 2e+5, 2.5e+5, 4e+5, 5e+5,- 1e+6, 2e+6, 2.5e+6, 4e+6, 5e+6,- 1e+7, 2e+7, 2.5e+7, 4e+7, 5e+7,- 1e+8, 2e+8, 2.5e+8, 4e+8, 5e+8,- 1e+9, 2e+9, 2.5e+9, 4e+9, 5e+9,- ];--export const NULL_REMOVE = 0;-export const NULL_RETAIN = 1;-export const NULL_EXPAND = 2;diff --git a/frontend/src/container/PublicDashboardContainer/AutoRefresh.module.scss b/frontend/src/container/PublicDashboardContainer/AutoRefresh.module.scssdeleted file mode 100644index 3caca7cb43..0000000000--- a/frontend/src/container/PublicDashboardContainer/AutoRefresh.module.scss+++ /dev/null@@ -1,13 +0,0 @@-.autoRefresh {- display: flex;- align-items: center;- gap: 6px;-}--.icon {- color: var(--l2-foreground);-}--.select {- min-width: 96px;-}diff --git a/frontend/src/container/PublicDashboardContainer/AutoRefresh.tsx b/frontend/src/container/PublicDashboardContainer/AutoRefresh.tsxdeleted file mode 100644index 480dd4c5ea..0000000000--- a/frontend/src/container/PublicDashboardContainer/AutoRefresh.tsx+++ /dev/null@@ -1,41 +0,0 @@-import { RefreshCw } from '@signozhq/icons';-import { SelectSimple } from '@signozhq/ui/select';-import { refreshIntervalOptions } from 'container/TopNav/AutoRefreshV2/constants';--import styles from './AutoRefresh.module.scss';--const REFRESH_ITEMS = refreshIntervalOptions.map((option) => ({- value: option.key,- label: option.key === 'off' ? 'Off' : option.label,-}));--interface AutoRefreshProps {- value: string;- disabled?: boolean;- onChange: (value: string) => void;-}--// Interval selector for the public dashboard. Self-contained (no Redux global-// time); the container advances its own time window on each tick.-function AutoRefresh({- value,- disabled = false,- onChange,-}: AutoRefreshProps): JSX.Element {- return (- <div className={styles.autoRefresh}>- <RefreshCw size={14} className={styles.icon} />- <SelectSimple- className={styles.select}- testId="public-dashboard-auto-refresh"- items={REFRESH_ITEMS}- value={value}- disabled={disabled}- withPortal={false}- onChange={(next): void => onChange(next as string)}- />- </div>- );-}--export default AutoRefresh;diff --git a/frontend/src/container/PublicDashboardContainer/Panel.tsx b/frontend/src/container/PublicDashboardContainer/Panel.tsxdeleted file mode 100644index 70bb2fc13f..0000000000--- a/frontend/src/container/PublicDashboardContainer/Panel.tsx+++ /dev/null@@ -1,126 +0,0 @@-import { memo, useCallback, useEffect, useRef, useState } from 'react';-import { ENTITY_VERSION_V5 } from 'constants/app';-import { PANEL_TYPES } from 'constants/queryBuilder';-import EmptyWidget from 'container/GridCardLayout/EmptyWidget';-import WidgetGraphComponent from 'container/GridCardLayout/GridCard/WidgetGraphComponent';-import { populateMultipleResults } from 'container/NewWidget/LeftContainer/WidgetGraph/util';-import { useGetQueryRange } from 'hooks/queryBuilder/useGetQueryRange';-import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';-import { isEqual } from 'lodash-es';-import { Widgets } from 'types/api/dashboard/getAll';-import { getSortedSeriesData } from 'utils/getSortedSeriesData';--import { getPublicPanelRequestData } from './utils';--function Panel({- widget,- index,- dashboardId,- startTime,- endTime,-}: {- widget: Widgets;- index: number;- dashboardId: string;- startTime: number;- endTime: number;-}): JSX.Element {- const graphRef = useRef<HTMLDivElement>(null);- const updatedQuery = widget?.query;-- // State (not memo) so LIST panels get a setRequestData — ListPanelWrapper- // renders nothing without one.- const [requestData, setRequestData] = useState<GetQueryResultsProps>(() =>- getPublicPanelRequestData({ widget, startTime, endTime }),- );-- useEffect(() => {- if (!isEqual(updatedQuery, requestData.query)) {- setRequestData((prev) => ({- ...prev,- query: updatedQuery,- }));- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [updatedQuery]);-- const queryResponse = useGetQueryRange(- {- ...requestData,- start: startTime,- end: endTime,- originalGraphType: widget?.panelTypes,- },- ENTITY_VERSION_V5,- {- // Public data is fetched by index and the payload redacts each widget's- // filters, so query bodies are identical across panels. Key on panel- // identity + time — the only inputs that determine the response — so- // panels don't collapse onto one cache entry.- queryKey: [widget?.id, index, startTime, endTime],- retry(failureCount, error): boolean {- if (- String(error).includes('status: error') &&- String(error).includes('i/o timeout')- ) {- return false;- }-- return failureCount < 2;- },- keepPreviousData: true,- enabled: !!widget?.query,- refetchOnMount: false,- },- {},- {- isPublic: true,- widgetIndex: index,- publicDashboardId: dashboardId,- },- );-- const isEmptyLayout = widget?.id === PANEL_TYPES.EMPTY_WIDGET;-- if (queryResponse.data && widget.panelTypes === PANEL_TYPES.BAR) {- const sortedSeriesData = getSortedSeriesData(- queryResponse.data?.payload.data.result,- );- queryResponse.data.payload.data.result = sortedSeriesData;- }-- if (queryResponse.data && widget.panelTypes === PANEL_TYPES.PIE) {- const transformedData = populateMultipleResults(queryResponse?.data);- queryResponse.data = transformedData;- }-- const onDragSelect = useCallback((_start: number, _end: number): void => {- // Handle drag select if needed - no-op for public dashboards- }, []);-- return (- <div- className="panel-container"- style={{ height: '100%', width: '100%' }}- ref={graphRef}- >- {isEmptyLayout ? (- <EmptyWidget />- ) : (- <WidgetGraphComponent- widget={widget}- queryResponse={queryResponse}- errorMessage={undefined}- headerMenuList={[]}- isWarning={false}- isFetchingResponse={queryResponse.isFetching || queryResponse.isLoading}- setRequestData={setRequestData}- hidePagination- onDragSelect={onDragSelect}- />- )}- </div>- );-}--export default memo(Panel);diff --git a/frontend/src/container/PublicDashboardContainer/PublicDashboardContainer.styles.scss b/frontend/src/container/PublicDashboardContainer/PublicDashboardContainer.styles.scssdeleted file mode 100644index 9b835769b9..0000000000--- a/frontend/src/container/PublicDashboardContainer/PublicDashboardContainer.styles.scss+++ /dev/null@@ -1,100 +0,0 @@-.public-dashboard-container {- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;- height: 100%;- width: 100%;-- .public-dashboard-header {- display: flex;- justify-content: space-between;- align-items: center;- width: 100%;- padding: 8px 16px;- border-bottom: 1px solid var(--l1-border);- background: var(--l3-background);-- position: sticky;- top: 0;- z-index: 999;-- .public-dashboard-header-left {- display: flex;- align-items: center;- gap: 16px;-- width: 50%;-- .brand-logo {- display: flex;- align-items: center;- gap: 8px;-- width: 100px;- }-- .public-dashboard-header-title {- flex: 1;- display: flex;- align-items: center;- gap: 8px;- width: calc(100% - 100px);-- .public-dashboard-header-title-text {- font-family: 'Work Sans', sans-serif;- font-size: 14px;- font-style: normal;- font-weight: 500;- line-height: 18px;-- // ellipsis text- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;- max-width: 100%;- }- }- }-- .public-dashboard-header-right {- display: flex;- align-items: center;- gap: 16px;-- .datetime-section {- .time-range-select-dropdown {- width: 200px;- }- }- }-- .brand-logo {- display: flex;- align-items: center;- gap: 8px;- }-- .brand-logo-name {- font-family: 'Work Sans', sans-serif;- font-size: 14px;- font-style: normal;- font-weight: 500;- line-height: 18px;- }-- .brand-logo-img {- height: 24px;- width: 24px;- }- }-- .public-dashboard-content {- width: 100%;- height: 100%;- }-- .fullscreen-grid-container {- margin: 0px 8px;- }-}diff --git a/frontend/src/container/PublicDashboardContainer/PublicDashboardContainer.tsx b/frontend/src/container/PublicDashboardContainer/PublicDashboardContainer.tsxdeleted file mode 100644index f81beb017d..0000000000--- a/frontend/src/container/PublicDashboardContainer/PublicDashboardContainer.tsx+++ /dev/null@@ -1,273 +0,0 @@-import { useMemo, useState } from 'react';-import RGL, { WidthProvider } from 'react-grid-layout';-import { useInterval } from 'react-use';-import { Typography } from '@signozhq/ui/typography';-import cx from 'classnames';-import { PANEL_GROUP_TYPES, PANEL_TYPES } from 'constants/queryBuilder';-import { themeColors } from 'constants/theme';-import { Card, CardContainer } from 'container/GridCardLayout/styles';-import { refreshIntervalOptions } from 'container/TopNav/AutoRefreshV2/constants';-import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';-import { DEFAULT_TIME_RANGE } from 'container/TopNav/DateTimeSelectionV2/constants';-import {- CustomTimeType,- Time,-} from 'container/TopNav/DateTimeSelectionV2/types';-import dayjs from 'dayjs';-import { useIsDarkMode } from 'hooks/useDarkMode';-import GetMinMax from 'lib/getMinMax';-import { NANO_SECOND_MULTIPLIER } from 'store/globalTime/utils';-import { SuccessResponseV2 } from 'types/api';-import { Widgets } from 'types/api/dashboard/getAll';-import { PublicDashboardDataProps } from 'types/api/dashboard/public/get';--import signozBrandLogoUrl from '@/assets/Logos/signoz-brand-logo.svg';--import AutoRefresh from './AutoRefresh';-import Panel from './Panel';--import './PublicDashboardContainer.styles.scss';--const ReactGridLayoutComponent = WidthProvider(RGL);--const CUSTOM_TIME_REGEX = /^(\d+)([mhdw])$/;--const getStartTimeAndEndTimeFromTimeRange = (- timeRange: string,-): { startTime: number; endTime: number } => {- const isValidFormat = CUSTOM_TIME_REGEX.test(timeRange);-- if (isValidFormat) {- const match = timeRange.match(CUSTOM_TIME_REGEX) as RegExpMatchArray;-- const timeValue = parseInt(match[1] as string, 10);- const timeUnit = match[2] as string;-- switch (timeUnit) {- case 'm':- return {- startTime: dayjs().subtract(timeValue, 'minutes').unix(),- endTime: dayjs().unix(),- };- case 'h':- return {- startTime: dayjs().subtract(timeValue, 'hours').unix(),- endTime: dayjs().unix(),- };- case 'd':- return {- startTime: dayjs().subtract(timeValue, 'days').unix(),- endTime: dayjs().unix(),- };- case 'w':- return {- startTime: dayjs().subtract(timeValue, 'weeks').unix(),- endTime: dayjs().unix(),- };- default:- return { startTime: dayjs().unix(), endTime: dayjs().unix() };- }- }-- return {- startTime: dayjs().subtract(30, 'minutes').unix(),- endTime: dayjs().unix(),- };-};--function PublicDashboardContainer({- publicDashboardId,- publicDashboardData,-}: {- publicDashboardId: string;- publicDashboardData: SuccessResponseV2<PublicDashboardDataProps>;-}): JSX.Element {- const isDarkMode = useIsDarkMode();- const { dashboard, publicDashboard } = publicDashboardData?.data || {};- const { widgets } = dashboard?.data || {};-- const [selectedTimeRangeLabel, setSelectedTimeRangeLabel] = useState<string>(- publicDashboard?.defaultTimeRange || DEFAULT_TIME_RANGE,- );-- const [selectedTimeRange, setSelectedTimeRange] = useState<{- startTime: number;- endTime: number;- }>(- getStartTimeAndEndTimeFromTimeRange(- publicDashboard?.defaultTimeRange || DEFAULT_TIME_RANGE,- ),- );-- const isTimeRangeEnabled = publicDashboard?.timeRangeEnabled || false;-- // Memoize dashboardLayout to prevent array recreation on every render- const dashboardLayout = useMemo(- () => dashboard?.data?.layout || [],- [dashboard?.data?.layout],- );-- const currentPanelMap = useMemo(- () => dashboard?.data?.panelMap || {},- [dashboard?.data?.panelMap],- );-- const handleTimeChange = (- interval: Time | CustomTimeType,- dateTimeRange?: [number, number],- ): void => {- if (dateTimeRange) {- setSelectedTimeRange({- startTime: Math.floor(dateTimeRange[0] / 1000),- endTime: Math.floor(dateTimeRange[1] / 1000),- });- } else if (interval !== 'custom') {- const { maxTime, minTime } = GetMinMax(interval);-- setSelectedTimeRange({- startTime: Math.floor(minTime / NANO_SECOND_MULTIPLIER / 1000),- endTime: Math.floor(maxTime / NANO_SECOND_MULTIPLIER / 1000),- });- }-- setSelectedTimeRangeLabel(interval as string);- };-- const [refreshIntervalKey, setRefreshIntervalKey] = useState<string>('off');-- // Auto-refresh only makes sense for a rolling relative range, not a fixed- // custom window — pause it (and disable the control) when 'custom' is picked.- const isAutoRefreshPaused = selectedTimeRangeLabel === 'custom';-- const refreshIntervalMs = useMemo(- () =>- refreshIntervalOptions.find((option) => option.key === refreshIntervalKey)- ?.value || 0,- [refreshIntervalKey],- );-- // Re-run the existing time-change handler with the current relative range so- // the rolling window advances — no need to duplicate the GetMinMax logic.- useInterval(- () => handleTimeChange(selectedTimeRangeLabel as Time),- isAutoRefreshPaused || refreshIntervalMs === 0 ? null : refreshIntervalMs,- );-- return (- <div className="public-dashboard-container">- <div className="public-dashboard-header">- <div className="public-dashboard-header-left">- <div className="brand-logo">- <img src={signozBrandLogoUrl} alt="SigNoz" className="brand-logo-img" />-- <Typography className="brand-logo-name">SigNoz</Typography>- </div>-- <div className="public-dashboard-header-title">- <Typography.Text className="public-dashboard-header-title-text">- {dashboard?.data?.title}- </Typography.Text>- </div>- </div>-- {isTimeRangeEnabled && (- <div className="public-dashboard-header-right">- <AutoRefresh- value={refreshIntervalKey}- disabled={isAutoRefreshPaused}- onChange={setRefreshIntervalKey}- />- <div className="datetime-section">- <DateTimeSelectionV2- showAutoRefresh={false}- showRefreshText={false}- hideShareModal- onTimeChange={handleTimeChange}- defaultRelativeTime={publicDashboard?.defaultTimeRange as Time}- isModalTimeSelection- modalSelectedInterval={selectedTimeRangeLabel as Time}- disableUrlSync- showRecentlyUsed={false}- modalInitialStartTime={selectedTimeRange.startTime * 1000}- modalInitialEndTime={selectedTimeRange.endTime * 1000}- />- </div>- </div>- )}- </div>-- <div className="public-dashboard-content fullscreen-grid-container">- <ReactGridLayoutComponent- cols={12}- rowHeight={45}- autoSize- width={100}- useCSSTransforms- isDraggable={false}- isDroppable={false}- isResizable={false}- allowOverlap={false}- layout={dashboardLayout}- style={{ backgroundColor: isDarkMode ? '' : themeColors.snowWhite }}- >- {dashboardLayout?.map((layout) => {- const { i: id } = layout;- const currentWidget = (widgets || [])?.find((e) => e.id === id);- const currentWidgetIndex = (widgets || [])?.findIndex((e) => e.id === id);-- if (currentWidget?.panelTypes === PANEL_GROUP_TYPES.ROW) {- const rowWidgetProperties = currentPanelMap[id] || {};- let { title } = currentWidget;- if (rowWidgetProperties.collapsed) {- const widgetCount = rowWidgetProperties.widgets?.length || 0;- const collapsedText = `(${widgetCount} widget${- widgetCount > 1 ? 's' : ''- })`;- title += ` ${collapsedText}`;- }-- return (- <CardContainer- isDarkMode={isDarkMode}- className="row-card"- key={id}- data-grid={JSON.stringify(currentWidget)}- >- <div className={cx('row-panel')}>- <div style={{ display: 'flex', gap: '6px', alignItems: 'center' }}>- <Typography.Text className="section-title">{title}</Typography.Text>- </div>- </div>- </CardContainer>- );- }-- return (- <CardContainer- isDarkMode={isDarkMode}- key={id}- data-grid={JSON.stringify(currentWidget)}- >- <Card- className="grid-item"- isDarkMode={isDarkMode}- $panelType={currentWidget?.panelTypes || PANEL_TYPES.TIME_SERIES}- >- <Panel- dashboardId={publicDashboardId}- widget={(currentWidget as Widgets) || ({ id, query: {} } as Widgets)}- index={currentWidgetIndex}- startTime={selectedTimeRange.startTime}- endTime={selectedTimeRange.endTime}- />- </Card>- </CardContainer>- );- })}- </ReactGridLayoutComponent>- </div>- </div>- );-}--export default PublicDashboardContainer;diff --git a/frontend/src/container/PublicDashboardContainer/__tests__/AutoRefresh.test.tsx b/frontend/src/container/PublicDashboardContainer/__tests__/AutoRefresh.test.tsxdeleted file mode 100644index 5724db7063..0000000000--- a/frontend/src/container/PublicDashboardContainer/__tests__/AutoRefresh.test.tsx+++ /dev/null@@ -1,23 +0,0 @@-import userEvent from '@testing-library/user-event';-import { render, screen } from 'tests/test-utils';--import AutoRefresh from '../AutoRefresh';--describe('Public dashboard AutoRefresh', () => {- it('renders the interval selector', () => {- render(<AutoRefresh value="off" onChange={jest.fn()} />);- expect(- screen.getByTestId('public-dashboard-auto-refresh'),- ).toBeInTheDocument();- });-- it('lets the viewer pick a refresh interval', async () => {- const onChange = jest.fn();- render(<AutoRefresh value="off" onChange={onChange} />);-- await userEvent.click(screen.getByTestId('public-dashboard-auto-refresh'));- await userEvent.click(screen.getByText('30 seconds'));-- expect(onChange).toHaveBeenCalledWith('30s');- });-});diff --git a/frontend/src/container/PublicDashboardContainer/__tests__/Panel.test.tsx b/frontend/src/container/PublicDashboardContainer/__tests__/Panel.test.tsxdeleted file mode 100644index c6aeff57d5..0000000000--- a/frontend/src/container/PublicDashboardContainer/__tests__/Panel.test.tsx+++ /dev/null@@ -1,100 +0,0 @@-import { PANEL_TYPES } from 'constants/queryBuilder';-import { render } from 'tests/test-utils';-import { Widgets } from 'types/api/dashboard/getAll';--import Panel from '../Panel';--const useGetQueryRangeMock = jest.fn();--jest.mock('hooks/queryBuilder/useGetQueryRange', () => ({- useGetQueryRange: (...args: unknown[]): unknown => {- useGetQueryRangeMock(...args);- return {- data: undefined,- isFetching: false,- isLoading: false,- isSuccess: true,- isError: false,- };- },-}));--const widgetGraphProps = jest.fn();--jest.mock('container/GridCardLayout/GridCard/WidgetGraphComponent', () => ({- __esModule: true,- default: (props: { setRequestData?: unknown }): JSX.Element => {- widgetGraphProps(props);- return <div data-testid="widget-graph" />;- },-}));--const buildWidget = (id: string): Widgets =>- ({- id,- panelTypes: PANEL_TYPES.LIST,- query: {- builder: {- queryData: [{ dataSource: 'logs', limit: 100, orderBy: [] }],- },- },- timePreferance: 'GLOBAL_TIME',- }) as unknown as Widgets;--describe('Public dashboard Panel', () => {- beforeEach(() => {- useGetQueryRangeMock.mockClear();- widgetGraphProps.mockClear();- });-- it('forwards a setRequestData setter so LIST panels render (bug 3646)', () => {- render(- <Panel- widget={buildWidget('widget-a')}- index={0}- dashboardId="dash-1"- startTime={100}- endTime={200}- />,- );-- const props = widgetGraphProps.mock.calls[0][0];- expect(typeof props.setRequestData).toBe('function');- });-- it('keys each panel by widget id + index so identical queries do not collide (bug 5503)', () => {- render(- <>- <Panel- widget={buildWidget('widget-a')}- index={2}- dashboardId="dash-1"- startTime={100}- endTime={200}- />- <Panel- widget={buildWidget('widget-b')}- index={62}- dashboardId="dash-1"- startTime={100}- endTime={200}- />- </>,- );-- const [callA, callB] = useGetQueryRangeMock.mock.calls;- const queryKeyA = callA[2].queryKey;- const metaA = callA[4];- const queryKeyB = callB[2].queryKey;- const metaB = callB[4];-- // Key is panel identity + time only — the redacted query body is not part- // of it, so identical query bodies can't collapse two panels onto one key.- expect(queryKeyA).toStrictEqual(['widget-a', 2, 100, 200]);- expect(queryKeyB).toStrictEqual(['widget-b', 62, 100, 200]);- expect(queryKeyA).not.toStrictEqual(queryKeyB);-- expect(metaA.widgetIndex).toBe(2);- expect(metaB.widgetIndex).toBe(62);- });-});diff --git a/frontend/src/container/PublicDashboardContainer/__tests__/PublicDashboardContainer.test.tsx b/frontend/src/container/PublicDashboardContainer/__tests__/PublicDashboardContainer.test.tsxdeleted file mode 100644index 48e8eb8e78..0000000000--- a/frontend/src/container/PublicDashboardContainer/__tests__/PublicDashboardContainer.test.tsx+++ /dev/null@@ -1,802 +0,0 @@-import { Layout } from 'react-grid-layout';-import { PANEL_GROUP_TYPES, PANEL_TYPES } from 'constants/queryBuilder';-import { DEFAULT_TIME_RANGE } from 'container/TopNav/DateTimeSelectionV2/constants';-import { useIsDarkMode } from 'hooks/useDarkMode';-import { StatusCodes } from 'http-status-codes';-import {- publicDashboardResponse,- publicDashboardWidgetData,-} from 'mocks-server/__mockdata__/publicDashboard';-import { rest, server } from 'mocks-server/server';-import { render, screen, userEvent, waitFor } from 'tests/test-utils';-import { SuccessResponseV2 } from 'types/api';-import { Widgets } from 'types/api/dashboard/getAll';-import { PublicDashboardDataProps } from 'types/api/dashboard/public/get';-import { EQueryType } from 'types/common/dashboard';--import PublicDashboardContainer from '../PublicDashboardContainer';--// Mock dependencies-jest.mock('hooks/useDarkMode', () => ({- useIsDarkMode: jest.fn(() => false),-}));--jest.mock('lib/getMinMax', () => ({- __esModule: true,- default: jest.fn((interval: string) => {- if (interval === '1h') {- return {- minTime: 1000000000000,- maxTime: 2000000000000,- };- }- return {- minTime: 500000000000,- maxTime: 1000000000000,- };- }),-}));--jest.mock('container/TopNav/DateTimeSelectionV2', () => ({- __esModule: true,- default: ({- onTimeChange,- }: {- onTimeChange: (interval: string, dateTimeRange?: [number, number]) => void;- }): JSX.Element => (- <div data-testid="datetime-selection">- <button- type="button"- onClick={(): void => onTimeChange('1h')}- aria-label="Change time to 1 hour"- >- Change Time- </button>- <button- type="button"- onClick={(): void => onTimeChange('custom', [1000000, 2000000])}- aria-label="Set custom time range"- >- Custom Time- </button>- </div>- ),-}));--jest.mock('../Panel', () => ({- __esModule: true,- default: ({- widget,- startTime,- endTime,- }: {- widget: Widgets;- startTime: number;- endTime: number;- }): JSX.Element => (- <div data-testid={`panel-${widget.id}`}>- <span>- Panel: {widget.id} ({startTime}-{endTime})- </span>- </div>- ),-}));--jest.mock('react-grid-layout', () => ({- __esModule: true,- default: ({- children,- layout,- style,- }: {- children: React.ReactNode;- layout: Layout[];- style?: React.CSSProperties;- }): JSX.Element => (- <div- data-testid="grid-layout"- data-layout={JSON.stringify(layout)}- style={style}- >- {children}- </div>- ),- WidthProvider: (- Component: React.ComponentType<unknown>,- ): React.ComponentType<unknown> => Component,-}));--// Mock dayjs-jest.mock('dayjs', () => {- const actualDayjs = jest.requireActual('dayjs');- const mockUnix = jest.fn(() => 1000);- const mockUtcOffset = jest.fn(() => 0);- const mockTzMethod = jest.fn(() => ({- utcOffset: mockUtcOffset,- }));- const mockSubtract = jest.fn(() => ({- subtract: jest.fn(),- unix: mockUnix,- tz: mockTzMethod,- }));- const mockDayjs = jest.fn(() => ({- subtract: mockSubtract,- unix: mockUnix,- tz: mockTzMethod,- }));- Object.keys(actualDayjs).forEach((key) => {- (mockDayjs as unknown as Record<string, unknown>)[key] = (- actualDayjs as Record<string, unknown>- )[key];- });- (mockDayjs as unknown as { extend: jest.Mock }).extend = jest.fn();- (mockDayjs as unknown as { tz: { guess: jest.Mock } }).tz = {- guess: jest.fn(() => 'UTC'),- };- return mockDayjs;-});--const mockUseIsDarkMode = jest.mocked(useIsDarkMode);--// MSW setup-beforeAll(() => {- server.listen();-});--afterAll(() => {- server.close();-});--afterEach(() => {- server.resetHandlers();-});--// Test constants-const MOCK_PUBLIC_DASHBOARD_ID = 'test-dashboard-id';-const MOCK_PUBLIC_PATH = '/public/dashboard/test';-// Use title from mock data-const TEST_DASHBOARD_TITLE = publicDashboardResponse.data.dashboard.data.title;-// Use widget ID from mock data-const WIDGET_1_ID =- publicDashboardResponse.data.dashboard.data.widgets?.[0]?.id || 'widget-1';-const WIDGET_1_TITLE = 'Widget 1';-const ROW_PANEL_ID = 'row-1';-const ROW_PANEL_TITLE = 'Row Panel';--// Type definitions-interface MockWidget {- id: string;- panelTypes: PANEL_TYPES | PANEL_GROUP_TYPES;- title: string;- query?: Widgets['query'];- description?: string;- opacity?: string;- nullZeroValues?: string;- timePreferance?: string;- softMin?: number | null;- softMax?: number | null;- selectedLogFields?: null;- selectedTracesFields?: null;-}--interface MockPublicDashboardData {- dashboard: {- data: {- title: string;- widgets?: MockWidget[];- layout?: Layout[];- panelMap?: Record<string, { widgets: Layout[]; collapsed: boolean }>;- variables?: Record<string, unknown>;- };- };- publicDashboard: {- timeRangeEnabled: boolean;- defaultTimeRange: string;- publicPath: string;- };-}--// Helper function to create mock query-const createMockQuery = (): Widgets['query'] => ({- builder: {- queryData: [],- queryFormulas: [],- queryTraceOperator: [],- },- clickhouse_sql: [],- promql: [],- id: 'query-1',- queryType: EQueryType.QUERY_BUILDER,-});--// Base mock data - transform publicDashboardResponse to match component's expected format-const baseMockData: SuccessResponseV2<PublicDashboardDataProps> = {- data: publicDashboardResponse.data as unknown as PublicDashboardDataProps,- httpStatusCode: StatusCodes.OK,-};--// Helper function to create mock data with optional overrides-const createMockData = (- overrides?: Partial<MockPublicDashboardData>,-): SuccessResponseV2<PublicDashboardDataProps> => {- if (!overrides) {- return baseMockData;- }-- const baseData = baseMockData.data;-- // Apply overrides if provided- const mergedData: PublicDashboardDataProps = {- dashboard:- (overrides?.dashboard as PublicDashboardDataProps['dashboard']) ||- baseData.dashboard,- publicDashboard: overrides?.publicDashboard || baseData.publicDashboard,- };-- return {- data: mergedData,- httpStatusCode: StatusCodes.OK,- };-};--describe('Public Dashboard Container', () => {- beforeEach(() => {- jest.clearAllMocks();- mockUseIsDarkMode.mockReturnValue(false);-- // Set up default MSW handler for widget query range API- server.use(- rest.get(- '*/public/dashboards/:dashboardId/widgets/:widgetIndex/query_range',- (_req, res, ctx) =>- res(ctx.status(StatusCodes.OK), ctx.json(publicDashboardWidgetData)),- ),- );- });-- describe('Rendering', () => {- it('should render dashboard with title and brand logo', () => {- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={baseMockData}- />,- );-- expect(screen.getByText(TEST_DASHBOARD_TITLE)).toBeInTheDocument();- expect(screen.getByText('SigNoz')).toBeInTheDocument();- expect(screen.getByAltText('SigNoz')).toBeInTheDocument();- });-- it('should render time range selector when timeRangeEnabled is true', () => {- const mockData = createMockData({- publicDashboard: {- timeRangeEnabled: true,- defaultTimeRange: DEFAULT_TIME_RANGE,- publicPath: MOCK_PUBLIC_PATH,- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- expect(screen.getByTestId('datetime-selection')).toBeInTheDocument();- expect(- screen.getByRole('button', { name: /change time to 1 hour/i }),- ).toBeInTheDocument();- });-- it('should not render time range selector when timeRangeEnabled is false', () => {- const mockData = createMockData({- publicDashboard: {- timeRangeEnabled: false,- defaultTimeRange: DEFAULT_TIME_RANGE,- publicPath: MOCK_PUBLIC_PATH,- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- expect(screen.queryByTestId('datetime-selection')).not.toBeInTheDocument();- });-- it('should render widgets in grid layout', () => {- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={baseMockData}- />,- );-- expect(screen.getByTestId('grid-layout')).toBeInTheDocument();- expect(screen.getByTestId(`panel-${WIDGET_1_ID}`)).toBeInTheDocument();- expect(- screen.getByText(new RegExp(`Panel: ${WIDGET_1_ID}`)),- ).toBeInTheDocument();- });-- it('should handle empty dashboard data gracefully', () => {- const mockData = createMockData({- dashboard: {- data: {- title: 'Empty Dashboard',- widgets: [],- layout: [],- panelMap: {},- variables: {},- },- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- expect(screen.getByText('Empty Dashboard')).toBeInTheDocument();- expect(screen.getByTestId('grid-layout')).toBeInTheDocument();- });- });-- describe('Time Range Handling', () => {- it('should initialize with default time range from publicDashboard', () => {- const mockData = createMockData({- publicDashboard: {- timeRangeEnabled: true,- defaultTimeRange: '1h',- publicPath: MOCK_PUBLIC_PATH,- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- // Panel should receive the initial time range- expect(screen.getByTestId(`panel-${WIDGET_1_ID}`)).toBeInTheDocument();- });-- it('should update time range when time change handler is called with interval', async () => {- const user = userEvent.setup({ pointerEventsCheck: 0 });- const mockData = createMockData({- publicDashboard: {- timeRangeEnabled: true,- defaultTimeRange: DEFAULT_TIME_RANGE,- publicPath: MOCK_PUBLIC_PATH,- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- const timeChangeButton = screen.getByRole('button', {- name: /change time to 1 hour/i,- });- await user.click(timeChangeButton);-- await waitFor(() => {- const panel = screen.getByTestId(`panel-${WIDGET_1_ID}`);- expect(panel).toBeInTheDocument();- });- });-- it('should update time range when time change handler is called with custom dateTimeRange', async () => {- const user = userEvent.setup({ pointerEventsCheck: 0 });- const mockData = createMockData({- publicDashboard: {- timeRangeEnabled: true,- defaultTimeRange: DEFAULT_TIME_RANGE,- publicPath: MOCK_PUBLIC_PATH,- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- const customTimeButton = screen.getByRole('button', {- name: /set custom time range/i,- });- await user.click(customTimeButton);-- await waitFor(() => {- // Panel should receive updated time range- expect(screen.getByTestId(`panel-${WIDGET_1_ID}`)).toBeInTheDocument();- });- });-- it('should use default time range of 30m when defaultTimeRange is not provided', () => {- const mockData = createMockData({- publicDashboard: {- timeRangeEnabled: true,- defaultTimeRange: undefined as unknown as string,- publicPath: MOCK_PUBLIC_PATH,- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- expect(screen.getByTestId(`panel-${WIDGET_1_ID}`)).toBeInTheDocument();- });- });-- describe('Panel Rendering', () => {- it('should render row panel when widget panelTypes is ROW', () => {- const mockData = createMockData({- dashboard: {- data: {- title: TEST_DASHBOARD_TITLE,- widgets: [- {- id: ROW_PANEL_ID,- panelTypes: PANEL_GROUP_TYPES.ROW,- title: ROW_PANEL_TITLE,- },- ],- layout: [- {- i: ROW_PANEL_ID,- x: 0,- y: 0,- w: 12,- h: 2,- },- ],- panelMap: {},- variables: {},- },- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- expect(screen.getByText(ROW_PANEL_TITLE)).toBeInTheDocument();- });-- it('should render collapsed row panel with widget count', () => {- const mockData = createMockData({- dashboard: {- data: {- title: TEST_DASHBOARD_TITLE,- widgets: [- {- id: ROW_PANEL_ID,- panelTypes: PANEL_GROUP_TYPES.ROW,- title: ROW_PANEL_TITLE,- },- ],- layout: [- {- i: ROW_PANEL_ID,- x: 0,- y: 0,- w: 12,- h: 2,- },- ],- panelMap: {- [ROW_PANEL_ID]: {- widgets: [- { i: 'w1', x: 0, y: 0, w: 6, h: 6 },- { i: 'w2', x: 6, y: 0, w: 6, h: 6 },- ],- collapsed: true,- },- },- variables: {},- },- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- expect(screen.getByText(/Row Panel \(2 widgets\)/)).toBeInTheDocument();- });-- it('should render collapsed row panel with singular widget count', () => {- const mockData = createMockData({- dashboard: {- data: {- title: TEST_DASHBOARD_TITLE,- widgets: [- {- id: ROW_PANEL_ID,- panelTypes: PANEL_GROUP_TYPES.ROW,- title: ROW_PANEL_TITLE,- },- ],- layout: [- {- i: ROW_PANEL_ID,- x: 0,- y: 0,- w: 12,- h: 2,- },- ],- panelMap: {- [ROW_PANEL_ID]: {- widgets: [{ i: 'w1', x: 0, y: 0, w: 6, h: 6 }],- collapsed: true,- },- },- variables: {},- },- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- expect(screen.getByText(/Row Panel \(1 widget\)/)).toBeInTheDocument();- });-- it('should render regular panel for non-ROW widget types', () => {- const mockData = createMockData({- dashboard: {- data: {- title: TEST_DASHBOARD_TITLE,- widgets: [- {- id: WIDGET_1_ID,- panelTypes: PANEL_TYPES.TIME_SERIES,- title: WIDGET_1_TITLE,- query: createMockQuery(),- },- ],- layout: [- {- i: WIDGET_1_ID,- x: 0,- y: 0,- w: 6,- h: 6,- },- ],- panelMap: {},- variables: {},- },- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- expect(screen.getByTestId(`panel-${WIDGET_1_ID}`)).toBeInTheDocument();- expect(- screen.getByText(new RegExp(`Panel: ${WIDGET_1_ID}`)),- ).toBeInTheDocument();- });-- it('should handle missing widget in layout gracefully', () => {- const mockData = createMockData({- dashboard: {- data: {- title: TEST_DASHBOARD_TITLE,- widgets: [- {- id: WIDGET_1_ID,- panelTypes: PANEL_TYPES.TIME_SERIES,- title: WIDGET_1_TITLE,- query: createMockQuery(),- },- ],- layout: [- {- i: 'missing-widget',- x: 0,- y: 0,- w: 6,- h: 6,- },- ],- panelMap: {},- variables: {},- },- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- // Should render panel with fallback widget data- expect(screen.getByTestId('panel-missing-widget')).toBeInTheDocument();- expect(screen.getByText(/Panel: missing-widget/)).toBeInTheDocument();- });- });-- describe('Dark Mode', () => {- it('should apply dark mode styles when isDarkMode is true', () => {- mockUseIsDarkMode.mockReturnValue(true);-- const { container } = render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={baseMockData}- />,- );-- const gridLayout = container.querySelector('[data-testid="grid-layout"]');- expect(gridLayout).toBeInTheDocument();- if (gridLayout) {- expect(gridLayout).toHaveStyle({ backgroundColor: '' });- }- });-- it('should apply light mode styles when isDarkMode is false', () => {- mockUseIsDarkMode.mockReturnValue(false);-- const { container } = render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={baseMockData}- />,- );-- const gridLayout = container.querySelector('[data-testid="grid-layout"]');- expect(gridLayout).toBeInTheDocument();- if (gridLayout) {- // themeColors.snowWhite is '#fafafa' which computes to 'rgb(250, 250, 250)'- expect(gridLayout).toHaveStyle({- backgroundColor: 'rgb(250, 250, 250)',- });- }- });- });-- describe('Edge Cases', () => {- it('should handle undefined dashboard data', () => {- const mockData: SuccessResponseV2<PublicDashboardDataProps> = {- data: {- dashboard: undefined as unknown as PublicDashboardDataProps['dashboard'],- publicDashboard: {- timeRangeEnabled: false,- defaultTimeRange: DEFAULT_TIME_RANGE,- publicPath: MOCK_PUBLIC_PATH,- },- },- httpStatusCode: StatusCodes.OK,- };-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- expect(screen.getByText('SigNoz')).toBeInTheDocument();- });-- it('should handle missing layout data', () => {- const mockData = createMockData({- dashboard: {- data: {- title: TEST_DASHBOARD_TITLE,- widgets: [- {- id: WIDGET_1_ID,- panelTypes: PANEL_TYPES.TIME_SERIES,- title: WIDGET_1_TITLE,- query: createMockQuery(),- },- ],- layout: undefined as unknown as Layout[],- panelMap: {},- variables: {},- },- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- // Component should render without errors even with missing layout- expect(screen.getByText(TEST_DASHBOARD_TITLE)).toBeInTheDocument();- });-- it('should handle multiple widgets in layout', () => {- const mockData = createMockData({- dashboard: {- data: {- title: TEST_DASHBOARD_TITLE,- widgets: [- {- id: WIDGET_1_ID,- panelTypes: PANEL_TYPES.TIME_SERIES,- title: WIDGET_1_TITLE,- query: createMockQuery(),- },- {- id: 'widget-2',- panelTypes: PANEL_TYPES.TABLE,- title: 'Widget 2',- query: createMockQuery(),- },- ],- layout: [- {- i: WIDGET_1_ID,- x: 0,- y: 0,- w: 6,- h: 6,- },- {- i: 'widget-2',- x: 6,- y: 0,- w: 6,- h: 6,- },- ],- panelMap: {},- variables: {},- },- },- });-- render(- <PublicDashboardContainer- publicDashboardId={MOCK_PUBLIC_DASHBOARD_ID}- publicDashboardData={mockData}- />,- );-- expect(screen.getByTestId(`panel-${WIDGET_1_ID}`)).toBeInTheDocument();- expect(screen.getByTestId('panel-widget-2')).toBeInTheDocument();- });- });-});diff --git a/frontend/src/container/PublicDashboardContainer/index.tsx b/frontend/src/container/PublicDashboardContainer/index.tsxdeleted file mode 100644index 7d33fc2389..0000000000--- a/frontend/src/container/PublicDashboardContainer/index.tsx+++ /dev/null@@ -1,3 +0,0 @@-import PublicDashboardContainer from './PublicDashboardContainer';--export default PublicDashboardContainer;diff --git a/frontend/src/container/PublicDashboardContainer/utils.ts b/frontend/src/container/PublicDashboardContainer/utils.tsdeleted file mode 100644index c0a804f309..0000000000--- a/frontend/src/container/PublicDashboardContainer/utils.ts+++ /dev/null@@ -1,53 +0,0 @@-import { PANEL_TYPES } from 'constants/queryBuilder';-import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';-import { Widgets } from 'types/api/dashboard/getAll';-import { DataSource } from 'types/common/queryBuilder';-import { getGraphType } from 'utils/getGraphType';--// Builds the useGetQueryRange payload for a public-dashboard panel, mirroring the-// authenticated GridCard.-export const getPublicPanelRequestData = ({- widget,- startTime,- endTime,-}: {- widget: Widgets;- startTime: number;- endTime: number;-}): GetQueryResultsProps => {- const updatedQuery = widget?.query;-- if (widget.panelTypes !== PANEL_TYPES.LIST) {- return {- selectedTime: widget?.timePreferance,- graphType: getGraphType(widget.panelTypes),- query: updatedQuery,- variables: {}, // we are not supporting variables in public dashboards- fillGaps: widget.fillSpans,- formatForWeb: widget.panelTypes === PANEL_TYPES.TABLE,- start: startTime,- end: endTime,- originalGraphType: widget.panelTypes,- };- }-- const initialDataSource = updatedQuery.builder.queryData[0].dataSource;-- return {- query: updatedQuery,- graphType: PANEL_TYPES.LIST,- selectedTime: widget.timePreferance || 'GLOBAL_TIME',- tableParams: {- pagination: {- offset: 0,- limit: updatedQuery.builder.queryData[0].limit || 0,- },- // we do not need select columns in case of logs- selectColumns:- initialDataSource === DataSource.TRACES && widget.selectedTracesFields,- },- fillGaps: widget.fillSpans,- start: startTime,- end: endTime,- };-};diff --git a/frontend/src/container/QueryBuilder/filters/BuilderUnitsFilter/BuilderUnits.tsx b/frontend/src/container/QueryBuilder/filters/BuilderUnitsFilter/BuilderUnits.tsxindex bf4e2fc70e..ac34112f31 100644--- a/frontend/src/container/QueryBuilder/filters/BuilderUnitsFilter/BuilderUnits.tsx+++ b/frontend/src/container/QueryBuilder/filters/BuilderUnitsFilter/BuilderUnits.tsx@@ -1,6 +1,6 @@import { Select, SelectProps, Space } from 'antd';import { Typography } from '@signozhq/ui/typography';-import { getCategorySelectOptionByName } from 'container/NewWidget/RightContainer/alertFomatCategories';+import { getCategorySelectOptionByName } from 'constants/formats/alertFormatCategories';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { useSelectPopupContainer } from 'utils/selectPopupContainer';diff --git a/frontend/src/container/QueryBuilder/filters/QueryBuilderSearchV2/__test__/QueryBuilderSearchV2.test.tsx b/frontend/src/container/QueryBuilder/filters/QueryBuilderSearchV2/__test__/QueryBuilderSearchV2.test.tsxindex 7187fe0de1..bc80ecff6f 100644--- a/frontend/src/container/QueryBuilder/filters/QueryBuilderSearchV2/__test__/QueryBuilderSearchV2.test.tsx+++ b/frontend/src/container/QueryBuilder/filters/QueryBuilderSearchV2/__test__/QueryBuilderSearchV2.test.tsx@@ -7,7 +7,7 @@ import {} from 'constants/queryBuilder';import { IUseDashboardVariablesReturn } from 'providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreTypes';import { QueryBuilderContext } from 'providers/QueryBuilder';-import { IDashboardVariable } from 'types/api/dashboard/getAll';+import { IDashboardVariable } from 'types/api/dashboard/variables';import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';import { DataSource } from 'types/common/queryBuilder';diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/ClickHouse.styles.scss b/frontend/src/container/QueryBuilder/rawQueryEditors/ClickHouse/ClickHouse.styles.scsssimilarity index 100%rename from frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/ClickHouse.styles.scssrename to frontend/src/container/QueryBuilder/rawQueryEditors/ClickHouse/ClickHouse.styles.scssdiff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/index.tsx b/frontend/src/container/QueryBuilder/rawQueryEditors/ClickHouse/index.tsxsimilarity index 84%rename from frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/index.tsxrename to frontend/src/container/QueryBuilder/rawQueryEditors/ClickHouse/index.tsxindex 2a3ab21a43..5154c4f2ef 100644--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/index.tsx+++ b/frontend/src/container/QueryBuilder/rawQueryEditors/ClickHouse/index.tsx@@ -4,10 +4,10 @@ import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { EQueryType } from 'types/common/dashboard';import DOCLINKS from 'utils/docLinks';-import { QueryButton } from '../../styles';-import ClickHouseQueryBuilder from './query';+import { QueryButton } from 'container/QueryBuilder/rawQueryEditors/styles';+import ClickHouseQueryBuilder from 'container/QueryBuilder/rawQueryEditors/ClickHouse/query';-import './ClickHouse.styles.scss';+import 'container/QueryBuilder/rawQueryEditors/ClickHouse/ClickHouse.styles.scss';function ClickHouseQueryContainer(): JSX.Element | null {const { currentQuery, addNewQueryItem } = useQueryBuilder();diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/query.tsx b/frontend/src/container/QueryBuilder/rawQueryEditors/ClickHouse/query.tsxsimilarity index 97%rename from frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/query.tsxrename to frontend/src/container/QueryBuilder/rawQueryEditors/ClickHouse/query.tsxindex d94e6af97b..4d34c919b8 100644--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse/query.tsx+++ b/frontend/src/container/QueryBuilder/rawQueryEditors/ClickHouse/query.tsx@@ -9,7 +9,7 @@ import { IClickHouseQuery } from 'types/api/queryBuilder/queryBuilderData';import { EQueryType } from 'types/common/dashboard';import { getFormatedLegend } from 'utils/getFormatedLegend';-import QueryHeader from '../QueryHeader';+import QueryHeader from 'container/QueryBuilder/rawQueryEditors/QueryHeader';interface IClickHouseQueryBuilderProps {queryData: IClickHouseQuery;diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/promQL/index.tsx b/frontend/src/container/QueryBuilder/rawQueryEditors/PromQL/index.tsxsimilarity index 84%rename from frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/promQL/index.tsxrename to frontend/src/container/QueryBuilder/rawQueryEditors/PromQL/index.tsxindex f3e8562889..751596d570 100644--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/promQL/index.tsx+++ b/frontend/src/container/QueryBuilder/rawQueryEditors/PromQL/index.tsx@@ -3,8 +3,8 @@ import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { IPromQLQuery } from 'types/api/queryBuilder/queryBuilderData';import { EQueryType } from 'types/common/dashboard';-import { QueryButton } from '../../styles';-import PromQLQueryBuilder from './query';+import { QueryButton } from 'container/QueryBuilder/rawQueryEditors/styles';+import PromQLQueryBuilder from 'container/QueryBuilder/rawQueryEditors/PromQL/query';function PromQLQueryContainer(): JSX.Element | null {const { addNewQueryItem, currentQuery } = useQueryBuilder();diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/promQL/query.tsx b/frontend/src/container/QueryBuilder/rawQueryEditors/PromQL/query.tsxsimilarity index 96%rename from frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/promQL/query.tsxrename to frontend/src/container/QueryBuilder/rawQueryEditors/PromQL/query.tsxindex 6d56664d5b..f870876e96 100644--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/promQL/query.tsx+++ b/frontend/src/container/QueryBuilder/rawQueryEditors/PromQL/query.tsx@@ -6,7 +6,7 @@ import { IPromQLQuery } from 'types/api/queryBuilder/queryBuilderData';import { EQueryType } from 'types/common/dashboard';import { getFormatedLegend } from 'utils/getFormatedLegend';-import QueryHeader from '../QueryHeader';+import QueryHeader from 'container/QueryBuilder/rawQueryEditors/QueryHeader';interface IPromQLQueryBuilderProps {queryData: IPromQLQuery;diff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/QueryHeader.styles.scss b/frontend/src/container/QueryBuilder/rawQueryEditors/QueryHeader.styles.scsssimilarity index 100%rename from frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/QueryHeader.styles.scssrename to frontend/src/container/QueryBuilder/rawQueryEditors/QueryHeader.styles.scssdiff --git a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/QueryHeader.tsx b/frontend/src/container/QueryBuilder/rawQueryEditors/QueryHeader.tsxsimilarity index 89%rename from frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/QueryHeader.tsxrename to frontend/src/container/QueryBuilder/rawQueryEditors/QueryHeader.tsxindex 3c693a8e9f..31e6ac512c 100644--- a/frontend/src/container/NewWidget/LeftContainer/QuerySection/QueryBuilder/QueryHeader.tsx+++ b/frontend/src/container/QueryBuilder/rawQueryEditors/QueryHeader.tsx@@ -8,9 +8,9 @@ import {} from '@signozhq/icons';import { Button, Row } from 'antd';-import { QueryWrapper } from '../styles';+import { QueryWrapper } from 'container/QueryBuilder/rawQueryEditors/styles';-import './QueryHeader.styles.scss';+import 'container/QueryBuilder/rawQueryEditors/QueryHeader.styles.scss';interface IQueryHeaderProps {disabled: boolean;diff --git a/frontend/src/container/QueryBuilder/rawQueryEditors/styles.ts b/frontend/src/container/QueryBuilder/rawQueryEditors/styles.tsnew file mode 100644index 0000000000..877f351510--- /dev/null+++ b/frontend/src/container/QueryBuilder/rawQueryEditors/styles.ts@@ -0,0 +1,17 @@+import { Button } from 'antd';+import styled from 'styled-components';++export const QueryButton = styled(Button)`+ &&& {+ display: flex;+ align-items: center;+ }+`;++export const QueryWrapper = styled.div`+ width: 100%;+ margin: 0;+ padding: 0.5rem 0;+ display: flex;+ flex-direction: column;+`;diff --git a/frontend/src/container/QueryTable/Drilldown/__tests__/Breakout.test.tsx b/frontend/src/container/QueryTable/Drilldown/__tests__/Breakout.test.tsxindex c4233836c1..c7866b0a9e 100644--- a/frontend/src/container/QueryTable/Drilldown/__tests__/Breakout.test.tsx+++ b/frontend/src/container/QueryTable/Drilldown/__tests__/Breakout.test.tsx@@ -38,7 +38,7 @@ jest.mock('hooks/queryBuilder/useQueryBuilder', () => ({}),}));-jest.mock('container/GridCardLayout/useResolveQuery', () => ({+jest.mock('container/WidgetCard/hooks/useResolveQuery', () => ({__esModule: true,default: (): any => ({getUpdatedQuery: jest.fn().mockResolvedValue({}),diff --git a/frontend/src/container/QueryTable/Drilldown/__tests__/numericGroupByDrilldown.test.tsx b/frontend/src/container/QueryTable/Drilldown/__tests__/numericGroupByDrilldown.test.tsxindex 01e1858101..4bdef1962f 100644--- a/frontend/src/container/QueryTable/Drilldown/__tests__/numericGroupByDrilldown.test.tsx+++ b/frontend/src/container/QueryTable/Drilldown/__tests__/numericGroupByDrilldown.test.tsx@@ -8,7 +8,7 @@ import { PANEL_TYPES } from 'constants/queryBuilder';import {fromPerses,toPerses,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters';+} from 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters';import { ClickedData } from 'periscope/components/ContextMenu';import { getGroupContextMenuConfig } from '../contextConfig';diff --git a/frontend/src/container/QueryTable/Drilldown/__tests__/useBaseAggregateOptions.test.tsx b/frontend/src/container/QueryTable/Drilldown/__tests__/useBaseAggregateOptions.test.tsxindex 93341a3b79..d5a410eca6 100644--- a/frontend/src/container/QueryTable/Drilldown/__tests__/useBaseAggregateOptions.test.tsx+++ b/frontend/src/container/QueryTable/Drilldown/__tests__/useBaseAggregateOptions.test.tsx@@ -6,7 +6,7 @@ import useBaseAggregateOptions from '../useBaseAggregateOptions';const mockGetUpdatedQuery = jest.fn();const mockNotificationsError = jest.fn();-jest.mock('container/GridCardLayout/useResolveQuery', () => ({+jest.mock('container/WidgetCard/hooks/useResolveQuery', () => ({__esModule: true,default: (): unknown => ({getUpdatedQuery: mockGetUpdatedQuery,@@ -20,10 +20,6 @@ jest.mock('hooks/useNotifications', () => ({}),}));-jest.mock('providers/Dashboard/store/useDashboardStore', () => ({- useDashboardStore: (): unknown => ({ dashboardData: undefined }),-}));-jest.mock('hooks/dashboard/useContextVariables', () => ({__esModule: true,default: (): unknown => ({ processedVariables: {} }),diff --git a/frontend/src/container/QueryTable/Drilldown/drilldownUtils.tsx b/frontend/src/container/QueryTable/Drilldown/drilldownUtils.tsxindex c07959eb9f..5fd69fca79 100644--- a/frontend/src/container/QueryTable/Drilldown/drilldownUtils.tsx+++ b/frontend/src/container/QueryTable/Drilldown/drilldownUtils.tsx@@ -6,7 +6,7 @@ import {QUERY_BUILDER_OPERATORS_BY_TYPES,} from 'constants/queryBuilder';import ROUTES from 'constants/routes';-import { isApmMetric } from 'container/PanelWrapper/utils';+import { isApmMetric } from 'container/WidgetCard/Panels/utils';import {applyMappingsToExpression,DRILLDOWN_TO_LOGS_MAPPINGS,diff --git a/frontend/src/container/QueryTable/Drilldown/useAggregateDrilldown.tsx b/frontend/src/container/QueryTable/Drilldown/useAggregateDrilldown.tsxindex 501abbc986..91f17c12a3 100644--- a/frontend/src/container/QueryTable/Drilldown/useAggregateDrilldown.tsx+++ b/frontend/src/container/QueryTable/Drilldown/useAggregateDrilldown.tsx@@ -1,7 +1,7 @@import { useMemo } from 'react';import { UseQueryResult } from 'react-query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { ContextLinksData } from 'types/api/dashboard/getAll';+import { ContextLinksData } from 'types/api/widgets/widget';import { MetricQueryRangeSuccessResponse } from 'types/api/metrics/getQueryRange';import { Query } from 'types/api/queryBuilder/queryBuilderData';import { getTimeRange } from 'utils/getTimeRange';diff --git a/frontend/src/container/QueryTable/Drilldown/useBaseAggregateOptions.tsx b/frontend/src/container/QueryTable/Drilldown/useBaseAggregateOptions.tsxindex c731122be7..25e84f9c83 100644--- a/frontend/src/container/QueryTable/Drilldown/useBaseAggregateOptions.tsx+++ b/frontend/src/container/QueryTable/Drilldown/useBaseAggregateOptions.tsx@@ -2,13 +2,12 @@ import { useCallback, useEffect, useMemo, useState } from 'react';import { Link, Loader } from '@signozhq/icons';import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';import { PANEL_TYPES } from 'constants/queryBuilder';-import useUpdatedQuery from 'container/GridCardLayout/useResolveQuery';-import { processContextLinks } from 'container/NewWidget/RightContainer/ContextLinks/utils';+import useUpdatedQuery from 'container/WidgetCard/hooks/useResolveQuery';+import { processContextLinks } from 'utils/contextLinks/utils';import useContextVariables from 'hooks/dashboard/useContextVariables';import { useNotifications } from 'hooks/useNotifications';import ContextMenu from 'periscope/components/ContextMenu';-import { useDashboardStore } from 'providers/Dashboard/store/useDashboardStore';-import { ContextLinksData } from 'types/api/dashboard/getAll';+import { ContextLinksData } from 'types/api/widgets/widget';import { Query } from 'types/api/queryBuilder/queryBuilderData';import { openInNewTab } from 'utils/navigation';@@ -49,7 +48,6 @@ const useBaseAggregateOptions = ({const [resolvedQuery, setResolvedQuery] = useState<Query>(query);const { getUpdatedQuery, isLoading: isResolveQueryLoading } =useUpdatedQuery();- const { dashboardData } = useDashboardStore();const { notifications } = useNotifications();useEffect(() => {@@ -62,7 +60,6 @@ const useBaseAggregateOptions = ({panelTypes: panelType || PANEL_TYPES.TIME_SERIES,timePreferance: 'GLOBAL_TIME',},- dashboardData,}).then(setResolvedQuery).catch(() => {diff --git a/frontend/src/container/QueryTable/Drilldown/useGraphContextMenu.tsx b/frontend/src/container/QueryTable/Drilldown/useGraphContextMenu.tsxindex 2ee9adb95c..f6a53884e5 100644--- a/frontend/src/container/QueryTable/Drilldown/useGraphContextMenu.tsx+++ b/frontend/src/container/QueryTable/Drilldown/useGraphContextMenu.tsx@@ -2,7 +2,7 @@ import { useMemo } from 'react';import { UseQueryResult } from 'react-query';import { PANEL_TYPES } from 'constants/queryBuilder';import { useGetCompositeQueryParam } from 'hooks/queryBuilder/useGetCompositeQueryParam';-import { ContextLinksData } from 'types/api/dashboard/getAll';+import { ContextLinksData } from 'types/api/widgets/widget';import { MetricQueryRangeSuccessResponse } from 'types/api/metrics/getQueryRange';import { Query } from 'types/api/queryBuilder/queryBuilderData';diff --git a/frontend/src/container/QueryTable/Drilldown/useTableContextMenu.tsx b/frontend/src/container/QueryTable/Drilldown/useTableContextMenu.tsxindex 1b43b7c970..89a730c851 100644--- a/frontend/src/container/QueryTable/Drilldown/useTableContextMenu.tsx+++ b/frontend/src/container/QueryTable/Drilldown/useTableContextMenu.tsx@@ -2,7 +2,7 @@ import { useMemo } from 'react';import { PANEL_TYPES } from 'constants/queryBuilder';import { useGetCompositeQueryParam } from 'hooks/queryBuilder/useGetCompositeQueryParam';import { ClickedData } from 'periscope/components/ContextMenu/types';-import { ContextLinksData } from 'types/api/dashboard/getAll';+import { ContextLinksData } from 'types/api/widgets/widget';import { Query } from 'types/api/queryBuilder/queryBuilderData';import { QueryRangeRequestV5 } from 'types/api/v5/queryRange';import { getTimeRangeFromQueryRangeRequest } from 'utils/getTimeRange';diff --git a/frontend/src/container/QueryTable/QueryTable.intefaces.ts b/frontend/src/container/QueryTable/QueryTable.intefaces.tsindex 8e854c755c..9ef69ce52c 100644--- a/frontend/src/container/QueryTable/QueryTable.intefaces.ts+++ b/frontend/src/container/QueryTable/QueryTable.intefaces.ts@@ -4,7 +4,7 @@ import { TableProps } from 'antd';import { PANEL_TYPES } from 'constants/queryBuilder';import { DownloadOptions } from 'container/Download/Download.types';import { RowData } from 'lib/query/createTableColumnsFromQuery';-import { ContextLinksData } from 'types/api/dashboard/getAll';+import { ContextLinksData } from 'types/api/widgets/widget';import { Query } from 'types/api/queryBuilder/queryBuilderData';import { QueryRangeRequestV5 } from 'types/api/v5/queryRange';import { QueryDataV3 } from 'types/api/widgets/getQuery';diff --git a/frontend/src/container/QueryTable/__test__/QueryTable.test.tsx b/frontend/src/container/QueryTable/__test__/QueryTable.test.tsxindex 53fedb473a..5480579f67 100644--- a/frontend/src/container/QueryTable/__test__/QueryTable.test.tsx+++ b/frontend/src/container/QueryTable/__test__/QueryTable.test.tsx@@ -1,4 +1,4 @@-import WidgetHeader from 'container/GridCardLayout/WidgetHeader';+import WidgetHeader from 'container/WidgetCard/Header';import { fireEvent, render } from 'tests/test-utils';import { QueryTable } from '../QueryTable';@@ -12,15 +12,6 @@ jest.mock('react-router-dom', () => ({}));// Mock useDashabord hook-jest.mock('providers/Dashboard/store/useDashboardStore', () => ({- useDashboardStore: (): any => ({- dashboardData: {- data: {- variables: [],- },- },- }),-}));jest.mock('hooks/useSafeNavigate', () => ({useSafeNavigate: (): any => ({diff --git a/frontend/src/container/QueryTable/__test__/mocks.ts b/frontend/src/container/QueryTable/__test__/mocks.tsindex b2b93fa632..f31d2ac475 100644--- a/frontend/src/container/QueryTable/__test__/mocks.ts+++ b/frontend/src/container/QueryTable/__test__/mocks.ts@@ -638,7 +638,7 @@ export const WidgetHeaderProps: any = {isRefetchError: false,isStale: true,},- headerMenuList: ['view', 'clone', 'delete', 'edit'],+ headerMenuList: ['view'],isWarning: false,isFetchingResponse: false,tableProcessedDataRef: {diff --git a/frontend/src/container/SideNav/config.ts b/frontend/src/container/SideNav/config.tsindex d4d93759d5..2851bf9953 100644--- a/frontend/src/container/SideNav/config.ts+++ b/frontend/src/container/SideNav/config.ts@@ -22,7 +22,6 @@ export const routeConfig: Record<string, QueryParams[]> = {[ROUTES.CHANNELS_EDIT]: [QueryParams.resourceAttributes],[ROUTES.CHANNELS_NEW]: [QueryParams.resourceAttributes],[ROUTES.DASHBOARD]: [QueryParams.resourceAttributes],- [ROUTES.DASHBOARD_WIDGET]: [QueryParams.resourceAttributes],[ROUTES.EDIT_ALERTS]: [QueryParams.resourceAttributes],[ROUTES.ERROR_DETAIL]: [QueryParams.resourceAttributes],[ROUTES.HOME_PAGE]: [QueryParams.resourceAttributes],diff --git a/frontend/src/container/TimeSeriesView/TimeSeriesView.tsx b/frontend/src/container/TimeSeriesView/TimeSeriesView.tsxindex a4f99110c0..4e0f201bd8 100644--- a/frontend/src/container/TimeSeriesView/TimeSeriesView.tsx+++ b/frontend/src/container/TimeSeriesView/TimeSeriesView.tsx@@ -17,7 +17,7 @@ import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';import EmptyLogsSearch from 'container/EmptyLogsSearch/EmptyLogsSearch';import { BuilderUnitsFilter } from 'container/QueryBuilder/filters/BuilderUnitsFilter';-import { getLocalStorageGraphVisibilityState } from 'container/GridCardLayout/GridCard/utils';+import { getLocalStorageGraphVisibilityState } from 'container/WidgetCard/Card/utils';import { LogsLoading } from 'container/LogsLoading/LogsLoading';import EmptyMetricsSearch from 'container/MetricsExplorer/Explorer/EmptyMetricsSearch';import { MetricsLoading } from 'container/MetricsExplorer/MetricsLoading/MetricsLoading';@@ -31,7 +31,7 @@ import useUrlQuery from 'hooks/useUrlQuery';import GetMinMax from 'lib/getMinMax';import getTimeString from 'lib/getTimeString';import history from 'lib/history';-import { stackSeries } from 'container/DashboardContainer/visualization/charts/utils/stackSeriesUtils';+import { stackSeries } from 'lib/visualization/charts/utils/stackSeriesUtils';import { getUPlotChartOptions } from 'lib/uPlotLib/getUplotChartOptions';import { getUPlotChartData } from 'lib/uPlotLib/utils/getUplotChartData';import { isEmpty } from 'lodash-es';@@ -39,7 +39,7 @@ import { useTimezone } from 'providers/Timezone';import { UpdateTimeInterval } from 'store/actions';import { AppState } from 'store/reducers';import { SuccessResponse, Warning } from 'types/api';-import { LegendPosition } from 'types/api/dashboard/getAll';+import { LegendPosition } from 'types/api/widgets/widget';import APIError from 'types/api/error';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { QueryRangeResponseV5 } from 'types/api/v5/queryRange';diff --git a/frontend/src/container/TimeSeriesView/__tests__/TimeSeriesView.test.tsx b/frontend/src/container/TimeSeriesView/__tests__/TimeSeriesView.test.tsxindex cc9c4eb1e9..0aca14fe81 100644--- a/frontend/src/container/TimeSeriesView/__tests__/TimeSeriesView.test.tsx+++ b/frontend/src/container/TimeSeriesView/__tests__/TimeSeriesView.test.tsx@@ -39,12 +39,11 @@ jest.mock('lib/uPlotLib/utils/getUplotChartData', () => ({],}));-jest.mock(- 'container/DashboardContainer/visualization/charts/utils/stackSeriesUtils',- () => ({ stackSeries: (): unknown => ({ data: [], bands: [] }) }),-);+jest.mock('lib/visualization/charts/utils/stackSeriesUtils', () => ({+ stackSeries: (): unknown => ({ data: [], bands: [] }),+}));-jest.mock('container/GridCardLayout/GridCard/utils', () => ({+jest.mock('container/WidgetCard/Card/utils', () => ({getLocalStorageGraphVisibilityState: (): unknown => ({graphVisibilityStates: [],}),diff --git a/frontend/src/container/TopNav/DateTimeSelectionV2/constants.ts b/frontend/src/container/TopNav/DateTimeSelectionV2/constants.tsindex a43e3a0679..47ee87e4ed 100644--- a/frontend/src/container/TopNav/DateTimeSelectionV2/constants.ts+++ b/frontend/src/container/TopNav/DateTimeSelectionV2/constants.ts@@ -177,7 +177,6 @@ export const routesToSkip = [ROUTES.INTEGRATIONS,ROUTES.INTEGRATIONS_DETAIL,ROUTES.DASHBOARD,- ROUTES.DASHBOARD_WIDGET,ROUTES.SERVICE_TOP_LEVEL_OPERATIONS,ROUTES.ALERT_HISTORY,ROUTES.ALERT_OVERVIEW,diff --git a/frontend/src/container/TracesTableComponent/TracesTableComponent.tsx b/frontend/src/container/TracesTableComponent/TracesTableComponent.tsxindex 4cc376c463..c6550770b9 100644--- a/frontend/src/container/TracesTableComponent/TracesTableComponent.tsx+++ b/frontend/src/container/TracesTableComponent/TracesTableComponent.tsx@@ -26,7 +26,7 @@ import history from 'lib/history';import { RowData } from 'lib/query/createTableColumnsFromQuery';import { useTimezone } from 'providers/Timezone';import { SuccessResponse } from 'types/api';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { openInNewTab } from 'utils/navigation';diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/PanelTypeSelector.scss b/frontend/src/container/WidgetCard/Card/FullView/PanelTypeSelector.scsssimilarity index 100%rename from frontend/src/container/GridCardLayout/GridCard/FullView/PanelTypeSelector.scssrename to frontend/src/container/WidgetCard/Card/FullView/PanelTypeSelector.scssdiff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/PanelTypeSelector.tsx b/frontend/src/container/WidgetCard/Card/FullView/PanelTypeSelector.tsxsimilarity index 90%rename from frontend/src/container/GridCardLayout/GridCard/FullView/PanelTypeSelector.tsxrename to frontend/src/container/WidgetCard/Card/FullView/PanelTypeSelector.tsxindex d1b3df806b..3937082730 100644--- a/frontend/src/container/GridCardLayout/GridCard/FullView/PanelTypeSelector.tsx+++ b/frontend/src/container/WidgetCard/Card/FullView/PanelTypeSelector.tsx@@ -3,12 +3,12 @@ import { Select } from 'antd';import { Typography } from '@signozhq/ui/typography';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelTypesWithData } from 'container/GridCardLayout/panelTypeItems';-import { handleQueryChange } from 'container/NewWidget/utils';+import { PanelTypesWithData } from 'container/WidgetCard/panelTypeItems';+import { handleQueryChange } from 'lib/query/panelQuery';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { Query } from 'types/api/queryBuilder/queryBuilderData';-import './PanelTypeSelector.scss';+import 'container/WidgetCard/Card/FullView/PanelTypeSelector.scss';const { Option } = Select;diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/WidgetFullView.styles.scss b/frontend/src/container/WidgetCard/Card/FullView/WidgetFullView.styles.scsssimilarity index 100%rename from frontend/src/container/GridCardLayout/GridCard/FullView/WidgetFullView.styles.scssrename to frontend/src/container/WidgetCard/Card/FullView/WidgetFullView.styles.scssdiff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/__tests__/PanelWrapperDragSelect.test.tsx b/frontend/src/container/WidgetCard/Card/FullView/__tests__/PanelWrapperDragSelect.test.tsxsimilarity index 94%rename from frontend/src/container/GridCardLayout/GridCard/FullView/__tests__/PanelWrapperDragSelect.test.tsxrename to frontend/src/container/WidgetCard/Card/FullView/__tests__/PanelWrapperDragSelect.test.tsxindex 56b4e6232c..c1cb5c7fb5 100644--- a/frontend/src/container/GridCardLayout/GridCard/FullView/__tests__/PanelWrapperDragSelect.test.tsx+++ b/frontend/src/container/WidgetCard/Card/FullView/__tests__/PanelWrapperDragSelect.test.tsx@@ -1,16 +1,16 @@import { MutableRefObject } from 'react';import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import PanelWrapper from 'container/PanelWrapper/PanelWrapper';+import { PanelMode } from 'lib/visualization/panels/types';+import PanelWrapper from 'container/WidgetCard/Panels/PanelWrapper';import { RowData } from 'lib/query/createTableColumnsFromQuery';import { render, screen, waitFor } from 'tests/test-utils';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';import { EQueryType } from 'types/common/dashboard';import { DataSource } from 'types/common/queryBuilder';// Mock dependencies-jest.mock('container/PanelWrapper/constants', () => ({+jest.mock('container/WidgetCard/Panels/constants', () => ({PanelTypeVsPanelWrapper: {[PANEL_TYPES.TIME_SERIES]: ({onDragSelect,diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/contants.ts b/frontend/src/container/WidgetCard/Card/FullView/contants.tssimilarity index 87%rename from frontend/src/container/GridCardLayout/GridCard/FullView/contants.tsrename to frontend/src/container/WidgetCard/Card/FullView/contants.tsindex 4b9fd59b55..7e3cce6245 100644--- a/frontend/src/container/GridCardLayout/GridCard/FullView/contants.ts+++ b/frontend/src/container/WidgetCard/Card/FullView/contants.ts@@ -1,4 +1,4 @@-import { PanelTypeAndGraphManagerVisibilityProps } from './types';+import { PanelTypeAndGraphManagerVisibilityProps } from 'container/WidgetCard/Card/FullView/types';export enum ColumnsKeyAndDataIndex {Index = 'index',diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/index.tsx b/frontend/src/container/WidgetCard/Card/FullView/index.tsxsimilarity index 82%rename from frontend/src/container/GridCardLayout/GridCard/FullView/index.tsxrename to frontend/src/container/WidgetCard/Card/FullView/index.tsxindex 027c545b3d..587d61ef1b 100644--- a/frontend/src/container/GridCardLayout/GridCard/FullView/index.tsx+++ b/frontend/src/container/WidgetCard/Card/FullView/index.tsx@@ -22,45 +22,37 @@ import WarningPopover from 'components/WarningPopover/WarningPopover';import { ENTITY_VERSION_V5 } from 'constants/app';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import useDrilldown from 'container/GridCardLayout/GridCard/FullView/useDrilldown';-import { populateMultipleResults } from 'container/NewWidget/LeftContainer/WidgetGraph/util';-import {- timeItems,- timePreferance,-} from 'container/NewWidget/RightContainer/timeItems';-import PanelWrapper from 'container/PanelWrapper/PanelWrapper';+import { PanelMode } from 'lib/visualization/panels/types';+import useDrilldown from 'container/WidgetCard/Card/FullView/useDrilldown';+import { populateMultipleResults } from 'lib/query/populateMultipleResults';+import { timeItems, timePreferance } from 'constants/timePreference';+import PanelWrapper from 'container/WidgetCard/Panels/PanelWrapper';import RightToolbarActions from 'container/QueryBuilder/components/ToolbarActions/RightToolbarActions';import { useDashboardVariables } from 'hooks/dashboard/useDashboardVariables';import { useGetQueryRange } from 'hooks/queryBuilder/useGetQueryRange';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { useChartMutable } from 'hooks/useChartMutable';-import useComponentPermission from 'hooks/useComponentPermission';-import { useSafeNavigate } from 'hooks/useSafeNavigate';import useUrlQuery from 'hooks/useUrlQuery';import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';import { getDashboardVariables } from 'lib/dashboardVariables/getDashboardVariables';import GetMinMax from 'lib/getMinMax';import { isEmpty } from 'lodash-es';-import { useAppContext } from 'providers/App/App';-import {- selectIsDashboardLocked,- useDashboardStore,-} from 'providers/Dashboard/store/useDashboardStore';import { AppState } from 'store/reducers';import { Warning } from 'types/api';import { GlobalReducer } from 'types/reducer/globalTime';-import { isModifierKeyPressed } from 'utils/app';import { getGraphType } from 'utils/getGraphType';import { getSortedSeriesData } from 'utils/getSortedSeriesData';-import { getLocalStorageGraphVisibilityState } from '../utils';-import { PANEL_TYPES_VS_FULL_VIEW_TABLE } from './contants';-import PanelTypeSelector from './PanelTypeSelector';-import { GraphContainer, TimeContainer } from './styles';-import { FullViewProps } from './types';+import { getLocalStorageGraphVisibilityState } from 'container/WidgetCard/Card/utils';+import { PANEL_TYPES_VS_FULL_VIEW_TABLE } from 'container/WidgetCard/Card/FullView/contants';+import PanelTypeSelector from 'container/WidgetCard/Card/FullView/PanelTypeSelector';+import {+ GraphContainer,+ TimeContainer,+} from 'container/WidgetCard/Card/FullView/styles';+import { FullViewProps } from 'container/WidgetCard/Card/FullView/types';-import './WidgetFullView.styles.scss';+import 'container/WidgetCard/Card/FullView/WidgetFullView.styles.scss';function FullView({widget,@@ -75,7 +67,6 @@ function FullView({setCurrentGraphRef,enableDrillDown = false,}: FullViewProps): JSX.Element {- const { safeNavigate } = useSafeNavigate();const {selectedTime: globalSelectedTime,minTime,@@ -91,19 +82,7 @@ function FullView({setCurrentGraphRef(fullViewRef);}, [setCurrentGraphRef]);- const { dashboardData, setColumnWidths } = useDashboardStore();- const isDashboardLocked = useDashboardStore(selectIsDashboardLocked);-- const onColumnWidthsChange = useCallback(- (widths: Record<string, number>) => {- setColumnWidths((prev) => ({ ...prev, [widget.id]: widths }));- },- [setColumnWidths, widget.id],- );const { dashboardVariables } = useDashboardVariables();- const { user } = useAppContext();-- const [editWidget] = useComponentPermission(['edit_widget'], user.role);const getSelectedTime = useCallback(() =>@@ -157,14 +136,11 @@ function FullView({};});- const { drilldownQuery, dashboardEditView, handleResetQuery, showResetQuery } =- useDrilldown({- enableDrillDown,- widget,- setRequestData,- dashboardData,- selectedPanelType,- });+ const { drilldownQuery, handleResetQuery, showResetQuery } = useDrilldown({+ enableDrillDown,+ widget,+ setRequestData,+ });useEffect(() => {const timeRange =@@ -292,8 +268,6 @@ function FullView({return <Spinner height="100%" size="large" tip="Loading..." />;}- const showEditBtn = editWidget && dashboardEditView;-return (<div className="full-view-container"><OverlayScrollbar>@@ -308,21 +282,6 @@ function FullView({Reset Query</Button>)}- {showEditBtn && (- <Button- className="switch-edit-btn"- disabled={response.isFetching || response.isLoading}- onClick={(e: React.MouseEvent): void => {- if (dashboardEditView) {- safeNavigate(dashboardEditView, {- newTab: isModifierKeyPressed(e),- });- }- }}- >- Switch to Edit Mode- </Button>- )}<PanelTypeSelectorselectedPanelType={selectedPanelType}disabled={response.isFetching || response.isLoading}@@ -362,7 +321,7 @@ function FullView({<><QueryBuilderV2panelType={selectedPanelType}- version={dashboardData?.data?.version || 'v3'}+ version="v3"isListViewPanel={selectedPanelType === PANEL_TYPES.LIST}signalSourceChangeEnabled// filterConfigs={filterConfigs}@@ -381,7 +340,6 @@ function FullView({<divclassName={cx('graph-container', {- disabled: isDashboardLocked,'height-widget':widget?.mergeAllActiveQueries || widget?.stackedBarChart,'full-view-graph-container': isListView,@@ -424,7 +382,6 @@ function FullView({onClickHandler={onClickHandler}enableDrillDown={enableDrillDown}selectedGraph={selectedPanelType}- onColumnWidthsChange={onColumnWidthsChange}/>)}</GraphContainer>diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/styles.ts b/frontend/src/container/WidgetCard/Card/FullView/styles.tssimilarity index 93%rename from frontend/src/container/GridCardLayout/GridCard/FullView/styles.tsrename to frontend/src/container/WidgetCard/Card/FullView/styles.tsindex 02da422241..ccbd5d6e5d 100644--- a/frontend/src/container/GridCardLayout/GridCard/FullView/styles.ts+++ b/frontend/src/container/WidgetCard/Card/FullView/styles.ts@@ -2,7 +2,7 @@ import { PANEL_TYPES } from 'constants/queryBuilder';import { themeColors } from 'constants/theme';import styled, { css, FlattenSimpleInterpolation } from 'styled-components';-import { GraphContainerProps } from './types';+import { GraphContainerProps } from 'container/WidgetCard/Card/FullView/types';interface Props {$panelType: PANEL_TYPES;diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/types.ts b/frontend/src/container/WidgetCard/Card/FullView/types.tssimilarity index 82%rename from frontend/src/container/GridCardLayout/GridCard/FullView/types.tsrename to frontend/src/container/WidgetCard/Card/FullView/types.tsindex dd48a01b73..cfa6319412 100644--- a/frontend/src/container/GridCardLayout/GridCard/FullView/types.ts+++ b/frontend/src/container/WidgetCard/Card/FullView/types.ts@@ -4,7 +4,7 @@ import { UplotProps } from 'components/Uplot/Uplot';import { PANEL_TYPES } from 'constants/queryBuilder';import { RowData } from 'lib/query/createTableColumnsFromQuery';import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import uPlot from 'uplot';export interface DataSetProps {@@ -24,15 +24,6 @@ export interface LegendEntryProps {show: boolean;}-export type ExtendedChartDataset = uPlot.Series & {- show: boolean;- sum: number;- avg: number;- min: number;- max: number;- index: number;-};-export type PanelTypeAndGraphManagerVisibilityProps = Record<keyof typeof PANEL_TYPES,boolean@@ -72,17 +63,6 @@ export interface GraphManagerProps extends UplotProps {parentChartRef?: MutableRefObject<ToggleGraphProps | undefined>;}-export interface CheckBoxProps {- data: ExtendedChartDataset[];- index: number;- graphVisibilityState: boolean[];- checkBoxOnChangeHandler: (- checked: boolean | 'indeterminate',- index: number,- ) => void;- disabled?: boolean;-}-export interface SaveLegendEntriesToLocalStoreProps {options: uPlot.Options;graphVisibilityState: boolean[];diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/useDrilldown.tsx b/frontend/src/container/WidgetCard/Card/FullView/useDrilldown.tsxsimilarity index 79%rename from frontend/src/container/GridCardLayout/GridCard/FullView/useDrilldown.tsxrename to frontend/src/container/WidgetCard/Card/FullView/useDrilldown.tsxindex 2c03e1e84c..64318ee4a9 100644--- a/frontend/src/container/GridCardLayout/GridCard/FullView/useDrilldown.tsx+++ b/frontend/src/container/WidgetCard/Card/FullView/useDrilldown.tsx@@ -7,25 +7,20 @@ import {useRef,} from 'react';import { QueryParams } from 'constants/query';-import { PANEL_TYPES } from 'constants/queryBuilder';import { useGetCompositeQueryParam } from 'hooks/queryBuilder/useGetCompositeQueryParam';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';-import { Dashboard, Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { Query } from 'types/api/queryBuilder/queryBuilderData';-import { generateExportToDashboardLink } from 'utils/dashboard/generateExportToDashboardLink';export interface DrilldownQueryProps {widget: Widgets;setRequestData: Dispatch<SetStateAction<GetQueryResultsProps>>;enableDrillDown: boolean;- dashboardData: Dashboard | undefined;- selectedPanelType: PANEL_TYPES;}export interface UseDrilldownReturn {drilldownQuery: Query;- dashboardEditView: string;handleResetQuery: () => void;showResetQuery: boolean;}@@ -34,8 +29,6 @@ const useDrilldown = ({enableDrillDown,widget,setRequestData,- dashboardData,- selectedPanelType,}: DrilldownQueryProps): UseDrilldownReturn => {const isMounted = useRef(false);const { redirectWithQueryBuilderData, currentQuery } = useQueryBuilder();@@ -60,15 +53,6 @@ const useDrilldown = ({isMounted.current = true;}, [widget, enableDrillDown, compositeQuery, redirectWithQueryBuilderData]);- const dashboardEditView = dashboardData?.id- ? generateExportToDashboardLink({- query: currentQuery,- panelType: selectedPanelType,- dashboardId: dashboardData?.id || '',- widgetId: widget.id,- })- : '';-const showResetQuery = useMemo(() =>JSON.stringify(widget.query?.builder) !==@@ -90,7 +74,6 @@ const useDrilldown = ({return {drilldownQuery: compositeQuery || widget.query,- dashboardEditView,handleResetQuery,showResetQuery,};diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/utils.ts b/frontend/src/container/WidgetCard/Card/FullView/utils.tssimilarity index 96%rename from frontend/src/container/GridCardLayout/GridCard/FullView/utils.tsrename to frontend/src/container/WidgetCard/Card/FullView/utils.tsindex 4ae672f287..e798477fe8 100644--- a/frontend/src/container/GridCardLayout/GridCard/FullView/utils.ts+++ b/frontend/src/container/WidgetCard/Card/FullView/utils.ts@@ -6,10 +6,10 @@ import { QueryData } from 'types/api/widgets/getQuery';import uPlot from 'uplot';import {- ExtendedChartDataset,LegendEntryProps,SaveLegendEntriesToLocalStoreProps,-} from './types';+} from 'container/WidgetCard/Card/FullView/types';+import { ExtendedChartDataset } from 'lib/visualization/charts/types';function convertToTwoDecimalsOrZero(value: number): number {if (diff --git a/frontend/src/container/GridCardLayout/GridCard/WidgetGraphComponent.test.tsx b/frontend/src/container/WidgetCard/Card/WidgetGraphComponent.test.tsxsimilarity index 93%rename from frontend/src/container/GridCardLayout/GridCard/WidgetGraphComponent.test.tsxrename to frontend/src/container/WidgetCard/Card/WidgetGraphComponent.test.tsxindex 5348904327..42067f4416 100644--- a/frontend/src/container/GridCardLayout/GridCard/WidgetGraphComponent.test.tsx+++ b/frontend/src/container/WidgetCard/Card/WidgetGraphComponent.test.tsx@@ -15,9 +15,9 @@ import { DataSource, ReduceOperators } from 'types/common/queryBuilder';import {MENUITEM_KEYS_VS_LABELS,MenuItemKeys,-} from '../WidgetHeader/contants';-import { WidgetGraphComponentProps } from './types';-import WidgetGraphComponent from './WidgetGraphComponent';+} from 'container/WidgetCard/Header/contants';+import { WidgetGraphComponentProps } from 'container/WidgetCard/Card/types';+import WidgetGraphComponent from 'container/WidgetCard/Card/WidgetGraphComponent';jest.mock('react-router-dom', () => ({...jest.requireActual('react-router-dom'),@@ -161,18 +161,6 @@ const mockProps: WidgetGraphComponentProps = {onOpenTraceBtnClick: jest.fn(),};-// Mock useDashabord hook-jest.mock('providers/Dashboard/store/useDashboardStore', () => ({- useDashboardStore: (): any => ({- dashboardData: {- data: {- variables: [],- },- },- setColumnWidths: jest.fn(),- }),-}));-describe('WidgetGraphComponent', () => {it('should show correct menu items when hovering over more options while loading', async () => {const user = userEvent.setup({ pointerEventsCheck: 0 });diff --git a/frontend/src/container/GridCardLayout/GridCard/WidgetGraphComponent.tsx b/frontend/src/container/WidgetCard/Card/WidgetGraphComponent.tsxsimilarity index 88%rename from frontend/src/container/GridCardLayout/GridCard/WidgetGraphComponent.tsxrename to frontend/src/container/WidgetCard/Card/WidgetGraphComponent.tsxindex a4ffec44e4..151bc63987 100644--- a/frontend/src/container/GridCardLayout/GridCard/WidgetGraphComponent.tsx+++ b/frontend/src/container/WidgetCard/Card/WidgetGraphComponent.tsx@@ -1,4 +1,4 @@-import { RefObject, useCallback, useEffect, useRef, useState } from 'react';+import { RefObject, useEffect, useRef, useState } from 'react';import { useLocation } from 'react-router-dom';import { Skeleton, Tooltip } from 'antd';import { Typography } from '@signozhq/ui/typography';@@ -7,8 +7,8 @@ import { useNavigateToExplorer } from 'components/CeleryTask/useNavigateToExplorimport { ToggleGraphProps } from 'components/Graph/types';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import PanelWrapper from 'container/PanelWrapper/PanelWrapper';+import { PanelMode } from 'lib/visualization/panels/types';+import PanelWrapper from 'container/WidgetCard/Panels/PanelWrapper';import useGetResolvedText from 'hooks/dashboard/useGetResolvedText';import { useNotifications } from 'hooks/useNotifications';import { useSafeNavigate } from 'hooks/useSafeNavigate';@@ -19,19 +19,21 @@ import {getCustomTimeRangeWindowSweepInMS,getStartAndEndTimesInMilliseconds,} from 'pages/MessagingQueues/MessagingQueuesUtils';-import { useDashboardStore } from 'providers/Dashboard/store/useDashboardStore';import { EQueryType } from 'types/common/dashboard';import { DataSource } from 'types/common/queryBuilder';-import { useGraphClickToShowButton } from '../useGraphClickToShowButton';-import useNavigateToExplorerPages from '../useNavigateToExplorerPages';-import WidgetHeader from '../WidgetHeader';-import FullView from './FullView';-import { Modal } from './styles';-import { WidgetGraphComponentProps } from './types';-import { getLocalStorageGraphVisibilityState, handleGraphClick } from './utils';+import { useGraphClickToShowButton } from 'container/WidgetCard/hooks/useGraphClickToShowButton';+import useNavigateToExplorerPages from 'container/WidgetCard/hooks/useNavigateToExplorerPages';+import WidgetHeader from 'container/WidgetCard/Header';+import FullView from 'container/WidgetCard/Card/FullView';+import { Modal } from 'container/WidgetCard/Card/styles';+import { WidgetGraphComponentProps } from 'container/WidgetCard/Card/types';+import {+ getLocalStorageGraphVisibilityState,+ handleGraphClick,+} from 'container/WidgetCard/Card/utils';-import '../GridCardLayout.styles.scss';+import 'container/WidgetCard/WidgetCard.styles.scss';function WidgetGraphComponent({widget,@@ -87,15 +89,6 @@ function WidgetGraphComponent({const navigateToExplorerPages = useNavigateToExplorerPages();- const { setColumnWidths } = useDashboardStore();-- const onColumnWidthsChange = useCallback(- (widths: Record<string, number>) => {- setColumnWidths((prev) => ({ ...prev, [widget.id]: widths }));- },- [setColumnWidths, widget.id],- );-const handleOnView = (): void => {const queryParams = {[QueryParams.expandedWidgetId]: widget.id,@@ -281,7 +274,6 @@ function WidgetGraphComponent({customOnRowClick={customOnRowClick}enableDrillDown={enableDrillDown}hidePagination={hidePagination}- onColumnWidthsChange={onColumnWidthsChange}/></div>)}diff --git a/frontend/src/container/GridCardLayout/GridCard/__tests__/errorDetails.test.ts b/frontend/src/container/WidgetCard/Card/__tests__/errorDetails.test.tssimilarity index 96%rename from frontend/src/container/GridCardLayout/GridCard/__tests__/errorDetails.test.tsrename to frontend/src/container/WidgetCard/Card/__tests__/errorDetails.test.tsindex aecf6c04c3..5ff1ed64d4 100644--- a/frontend/src/container/GridCardLayout/GridCard/__tests__/errorDetails.test.ts+++ b/frontend/src/container/WidgetCard/Card/__tests__/errorDetails.test.ts@@ -1,6 +1,6 @@import APIError from 'types/api/error';-import { errorDetails } from '../utils';+import { errorDetails } from 'container/WidgetCard/Card/utils';function makeAPIError(message: string,diff --git a/frontend/src/container/GridCardLayout/GridCard/index.tsx b/frontend/src/container/WidgetCard/Card/index.tsxsimilarity index 94%rename from frontend/src/container/GridCardLayout/GridCard/index.tsxrename to frontend/src/container/WidgetCard/Card/index.tsxindex cf78d92d51..443d50a1f0 100644--- a/frontend/src/container/GridCardLayout/GridCard/index.tsx+++ b/frontend/src/container/WidgetCard/Card/index.tsx@@ -5,8 +5,8 @@ import logEvent from 'api/common/logEvent';import { DEFAULT_ENTITY_VERSION, ENTITY_VERSION_V5 } from 'constants/app';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { useScrollWidgetIntoView } from 'container/DashboardContainer/visualization/hooks/useScrollWidgetIntoView';-import { populateMultipleResults } from 'container/NewWidget/LeftContainer/WidgetGraph/util';+import { useScrollWidgetIntoView } from 'lib/visualization/hooks/useScrollWidgetIntoView';+import { populateMultipleResults } from 'lib/query/populateMultipleResults';import { CustomTimeType } from 'container/TopNav/DateTimeSelectionV2/types';import { useIsPanelWaitingOnVariable } from 'hooks/dashboard/useVariableFetchState';import { useGetQueryRange } from 'hooks/queryBuilder/useGetQueryRange';@@ -30,11 +30,14 @@ import {DASHBOARD_CACHE_TIME_ON_REFRESH_ENABLED,} from '../../../constants/queryCacheTime';import { REACT_QUERY_KEY } from '../../../constants/reactQueryKeys';-import EmptyWidget from '../EmptyWidget';-import { MenuItemKeys } from '../WidgetHeader/contants';-import { GridCardGraphProps } from './types';-import { errorDetails, isDataAvailableByPanelType } from './utils';-import WidgetGraphComponent from './WidgetGraphComponent';+import EmptyWidget from 'container/WidgetCard/EmptyWidget';+import { MenuItemKeys } from 'container/WidgetCard/Header/contants';+import { GridCardGraphProps } from 'container/WidgetCard/Card/types';+import {+ errorDetails,+ isDataAvailableByPanelType,+} from 'container/WidgetCard/Card/utils';+import WidgetGraphComponent from 'container/WidgetCard/Card/WidgetGraphComponent';// eslint-disable-next-line sonarjs/cognitive-complexityfunction GridCardGraph({diff --git a/frontend/src/container/GridCardLayout/GridCard/styles.ts b/frontend/src/container/WidgetCard/Card/styles.tssimilarity index 100%rename from frontend/src/container/GridCardLayout/GridCard/styles.tsrename to frontend/src/container/WidgetCard/Card/styles.tsdiff --git a/frontend/src/container/GridCardLayout/GridCard/types.ts b/frontend/src/container/WidgetCard/Card/types.tssimilarity index 94%rename from frontend/src/container/GridCardLayout/GridCard/types.tsrename to frontend/src/container/WidgetCard/Card/types.tsindex 9a24477b62..d641623458 100644--- a/frontend/src/container/GridCardLayout/GridCard/types.ts+++ b/frontend/src/container/WidgetCard/Card/types.ts@@ -5,7 +5,7 @@ import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';import { RowData } from 'lib/query/createTableColumnsFromQuery';import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';import { IDashboardVariables } from 'providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreTypes';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import {MetricQueryRangeSuccessResponse,MetricRangePayloadProps,@@ -13,8 +13,8 @@ import {import { QueryData } from 'types/api/widgets/getQuery';import uPlot from 'uplot';-import { MenuItemKeys } from '../WidgetHeader/contants';-import { LegendEntryProps } from './FullView/types';+import { MenuItemKeys } from 'container/WidgetCard/Header/contants';+import { LegendEntryProps } from 'container/WidgetCard/Card/FullView/types';export interface GraphVisibilityLegendEntryProps {graphVisibilityStates: boolean[];diff --git a/frontend/src/container/GridCardLayout/GridCard/utils.ts b/frontend/src/container/WidgetCard/Card/utils.tssimilarity index 94%rename from frontend/src/container/GridCardLayout/GridCard/utils.tsrename to frontend/src/container/WidgetCard/Card/utils.tsindex c8a8cc8d8d..fd01102cc0 100644--- a/frontend/src/container/GridCardLayout/GridCard/utils.ts+++ b/frontend/src/container/WidgetCard/Card/utils.ts@@ -5,25 +5,25 @@ import { NavigateToExplorerProps } from 'components/CeleryTask/useNavigateToExplimport { LOCALSTORAGE } from 'constants/localStorage';import { PANEL_TYPES } from 'constants/queryBuilder';import getLabelName from 'lib/getLabelName';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import APIError from 'types/api/error';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { TagFilterItem } from 'types/api/queryBuilder/queryBuilderData';import { QueryData } from 'types/api/widgets/getQuery';import { DataSource } from 'types/common/queryBuilder';-import { GraphClickProps } from '../useGraphClickToShowButton';-import { NavigateToExplorerPagesProps } from '../useNavigateToExplorerPages';-import { LegendEntryProps } from './FullView/types';+import { GraphClickProps } from 'container/WidgetCard/hooks/useGraphClickToShowButton';+import { NavigateToExplorerPagesProps } from 'container/WidgetCard/hooks/useNavigateToExplorerPages';+import { LegendEntryProps } from 'container/WidgetCard/Card/FullView/types';import {showAllDataSet,showAllDataSetFromApiResponse,-} from './FullView/utils';+} from 'container/WidgetCard/Card/FullView/utils';import {GetGraphVisibilityStateOnLegendClickProps,GraphVisibilityLegendEntryProps,ToggleGraphsVisibilityInChartProps,-} from './types';+} from 'container/WidgetCard/Card/types';export const getLocalStorageGraphVisibilityState = ({apiResponse,diff --git a/frontend/src/container/GridCardLayout/EmptyWidget/index.tsx b/frontend/src/container/WidgetCard/EmptyWidget/index.tsxsimilarity index 80%rename from frontend/src/container/GridCardLayout/EmptyWidget/index.tsxrename to frontend/src/container/WidgetCard/EmptyWidget/index.tsxindex e89e77b53a..5033c04dc8 100644--- a/frontend/src/container/GridCardLayout/EmptyWidget/index.tsx+++ b/frontend/src/container/WidgetCard/EmptyWidget/index.tsx@@ -1,6 +1,6 @@import { Typography } from '@signozhq/ui/typography';-import { Container } from './styles';+import { Container } from 'container/WidgetCard/EmptyWidget/styles';function EmptyWidget(): JSX.Element {return (diff --git a/frontend/src/container/GridCardLayout/EmptyWidget/styles.ts b/frontend/src/container/WidgetCard/EmptyWidget/styles.tssimilarity index 100%rename from frontend/src/container/GridCardLayout/EmptyWidget/styles.tsrename to frontend/src/container/WidgetCard/EmptyWidget/styles.tsdiff --git a/frontend/src/container/GridCardLayout/WidgetHeader/DisplayThreshold.tsx b/frontend/src/container/WidgetCard/Header/DisplayThreshold.tsxsimilarity index 78%rename from frontend/src/container/GridCardLayout/WidgetHeader/DisplayThreshold.tsxrename to frontend/src/container/WidgetCard/Header/DisplayThreshold.tsxindex 90996b3c62..1734744f17 100644--- a/frontend/src/container/GridCardLayout/WidgetHeader/DisplayThreshold.tsx+++ b/frontend/src/container/WidgetCard/Header/DisplayThreshold.tsx@@ -4,8 +4,8 @@ import {DisplayThresholdContainer,TypographHeading,Typography,-} from './styles';-import { DisplayThresholdProps } from './types';+} from 'container/WidgetCard/Header/styles';+import { DisplayThresholdProps } from 'container/WidgetCard/Header/types';function DisplayThreshold({ threshold }: DisplayThresholdProps): JSX.Element {return (diff --git a/frontend/src/container/GridCardLayout/WidgetHeader/WidgetHeader.styles.scss b/frontend/src/container/WidgetCard/Header/WidgetHeader.styles.scsssimilarity index 100%rename from frontend/src/container/GridCardLayout/WidgetHeader/WidgetHeader.styles.scssrename to frontend/src/container/WidgetCard/Header/WidgetHeader.styles.scssdiff --git a/frontend/src/container/GridCardLayout/WidgetHeader/__tests__/WidgetHeader.test.tsx b/frontend/src/container/WidgetCard/Header/__tests__/WidgetHeader.test.tsxsimilarity index 98%rename from frontend/src/container/GridCardLayout/WidgetHeader/__tests__/WidgetHeader.test.tsxrename to frontend/src/container/WidgetCard/Header/__tests__/WidgetHeader.test.tsxindex 5a57dd5959..94fc5cc0bb 100644--- a/frontend/src/container/GridCardLayout/WidgetHeader/__tests__/WidgetHeader.test.tsx+++ b/frontend/src/container/WidgetCard/Header/__tests__/WidgetHeader.test.tsx@@ -12,13 +12,13 @@ import { IAppContext } from 'providers/App/types';import configureStore from 'redux-mock-store';import thunk from 'redux-thunk';import { SuccessResponse, Warning } from 'types/api';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { EQueryType } from 'types/common/dashboard';import { ROLES } from 'types/roles';-import { MenuItemKeys } from '../contants';-import WidgetHeader from '../index';+import { MenuItemKeys } from 'container/WidgetCard/Header/contants';+import WidgetHeader from 'container/WidgetCard/Header/index';const TEST_WIDGET_TITLE = 'Test Widget';const TABLE_WIDGET_TITLE = 'Table Widget';diff --git a/frontend/src/container/GridCardLayout/WidgetHeader/config.ts b/frontend/src/container/WidgetCard/Header/config.tssimilarity index 100%rename from frontend/src/container/GridCardLayout/WidgetHeader/config.tsrename to frontend/src/container/WidgetCard/Header/config.tsdiff --git a/frontend/src/container/GridCardLayout/WidgetHeader/contants.ts b/frontend/src/container/WidgetCard/Header/contants.tssimilarity index 100%rename from frontend/src/container/GridCardLayout/WidgetHeader/contants.tsrename to frontend/src/container/WidgetCard/Header/contants.tsdiff --git a/frontend/src/container/GridCardLayout/WidgetHeader/index.tsx b/frontend/src/container/WidgetCard/Header/index.tsxsimilarity index 95%rename from frontend/src/container/GridCardLayout/WidgetHeader/index.tsxrename to frontend/src/container/WidgetCard/Header/index.tsxindex f9fdcbebd2..54d0f54c94 100644--- a/frontend/src/container/GridCardLayout/WidgetHeader/index.tsx+++ b/frontend/src/container/WidgetCard/Header/index.tsx@@ -34,17 +34,23 @@ import { isEmpty } from 'lodash-es';import { unparse } from 'papaparse';import { useAppContext } from 'providers/App/App';import { SuccessResponse, Warning } from 'types/api';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import APIError from 'types/api/error';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { buildAbsolutePath } from 'utils/app';-import { errorTooltipPosition } from './config';-import { MENUITEM_KEYS_VS_LABELS, MenuItemKeys } from './contants';-import { MenuItem } from './types';-import { generateMenuList, isTWidgetOptions } from './utils';+import { errorTooltipPosition } from 'container/WidgetCard/Header/config';+import {+ MENUITEM_KEYS_VS_LABELS,+ MenuItemKeys,+} from 'container/WidgetCard/Header/contants';+import { MenuItem } from 'container/WidgetCard/Header/types';+import {+ generateMenuList,+ isTWidgetOptions,+} from 'container/WidgetCard/Header/utils';-import './WidgetHeader.styles.scss';+import 'container/WidgetCard/Header/WidgetHeader.styles.scss';interface IWidgetHeaderProps {title: ReactNode;diff --git a/frontend/src/container/GridCardLayout/WidgetHeader/styles.ts b/frontend/src/container/WidgetCard/Header/styles.tssimilarity index 100%rename from frontend/src/container/GridCardLayout/WidgetHeader/styles.tsrename to frontend/src/container/WidgetCard/Header/styles.tsdiff --git a/frontend/src/container/GridCardLayout/WidgetHeader/types.ts b/frontend/src/container/WidgetCard/Header/types.tssimilarity index 79%rename from frontend/src/container/GridCardLayout/WidgetHeader/types.tsrename to frontend/src/container/WidgetCard/Header/types.tsindex ba3b7f1449..56ac57a462 100644--- a/frontend/src/container/GridCardLayout/WidgetHeader/types.ts+++ b/frontend/src/container/WidgetCard/Header/types.ts@@ -1,6 +1,6 @@import { ReactNode } from 'react';-import { MenuItemKeys } from './contants';+import { MenuItemKeys } from 'container/WidgetCard/Header/contants';export interface MenuItem {key: MenuItemKeys;diff --git a/frontend/src/container/GridCardLayout/WidgetHeader/utils.ts b/frontend/src/container/WidgetCard/Header/utils.tssimilarity index 82%rename from frontend/src/container/GridCardLayout/WidgetHeader/utils.tsrename to frontend/src/container/WidgetCard/Header/utils.tsindex b5309cdf48..ff3a3fc4cf 100644--- a/frontend/src/container/GridCardLayout/WidgetHeader/utils.ts+++ b/frontend/src/container/WidgetCard/Header/utils.ts@@ -1,7 +1,7 @@import type { MenuItem as DropdownMenuItem } from '@signozhq/ui/dropdown-menu';-import { MenuItemKeys } from './contants';-import { MenuItem } from './types';+import { MenuItemKeys } from 'container/WidgetCard/Header/contants';+import { MenuItem } from 'container/WidgetCard/Header/types';export const generateMenuList = (actions: MenuItem[]): DropdownMenuItem[] =>actionsdiff --git a/frontend/src/container/DashboardContainer/visualization/panels/BarPanel/BarPanel.tsx b/frontend/src/container/WidgetCard/Panels/BarPanel/BarPanel.tsxsimilarity index 80%rename from frontend/src/container/DashboardContainer/visualization/panels/BarPanel/BarPanel.tsxrename to frontend/src/container/WidgetCard/Panels/BarPanel/BarPanel.tsxindex d217e61e43..2425b0c260 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/BarPanel/BarPanel.tsx+++ b/frontend/src/container/WidgetCard/Panels/BarPanel/BarPanel.tsx@@ -1,26 +1,28 @@import { useCallback, useEffect, useMemo, useRef, useState } from 'react';-import { PanelWrapperProps } from 'container/PanelWrapper/panelWrapper.types';-import { useDashboardCursorSyncMode } from 'hooks/dashboard/useDashboardCursorSyncMode';-import { useSyncTooltipFilterMode } from 'hooks/dashboard/useSyncTooltipFilterMode';+import { PanelWrapperProps } from 'container/WidgetCard/Panels/panelWrapper.types';import { useIsDarkMode } from 'hooks/useDarkMode';import { useResizeObserver } from 'hooks/useDimensions';import {IRenderTooltipFooterArgs,LegendPosition,} from 'lib/uPlotV2/components/types';+import {+ DashboardCursorSync,+ SyncTooltipFilterMode,+} from 'lib/uPlotV2/plugins/TooltipPlugin/types';import ContextMenu from 'periscope/components/ContextMenu';-import { useDashboardStore } from 'providers/Dashboard/store/useDashboardStore';import { useTimezone } from 'providers/Timezone';import uPlot from 'uplot';import { getTimeRange } from 'utils/getTimeRange';-import BarChart from '../../charts/BarChart/BarChart';-import ChartManager from '../../components/ChartManager/ChartManager';-import { usePanelContextMenu } from '../../hooks/usePanelContextMenu';-import { prepareBarPanelConfig } from './utils';+import BarChart from 'lib/visualization/charts/BarChart/BarChart';+import ChartManager from 'lib/visualization/components/ChartManager/ChartManager';+import { usePanelContextMenu } from 'container/WidgetCard/Panels/hooks/usePanelContextMenu';+import { PanelMode } from 'lib/visualization/panels/types';+import { prepareBarPanelConfig } from 'container/WidgetCard/Panels/BarPanel/utils';-import '../Panel.styles.scss';-import TooltipFooter from '../components/TooltipFooter';+import 'container/WidgetCard/Panels/Panel.styles.scss';+import TooltipFooter from 'lib/visualization/panels/components/TooltipFooter';import { prepareChartData } from 'lib/uPlotV2/utils/dataUtils';import { StackMode } from 'lib/uPlotV2/config/types';@@ -44,9 +46,12 @@ function BarPanel(props: PanelWrapperProps): JSX.Element {const isDarkMode = useIsDarkMode();const { timezone } = useTimezone();- const dashboardId = useDashboardStore((s) => s.dashboardData?.id);- const [syncMode] = useDashboardCursorSyncMode(dashboardId, panelMode);- const [syncFilterMode] = useSyncTooltipFilterMode(dashboardId);+ // These panels never render inside a dashboard, so there is no stored+ // cursor-sync preference to read — only the panel-mode gate applies.+ const syncMode =+ panelMode === PanelMode.DASHBOARD_VIEW+ ? DashboardCursorSync.Crosshair+ : DashboardCursorSync.None;useEffect((): void => {const { startTime, endTime } = getTimeRange(queryResponse);@@ -147,7 +152,6 @@ function BarPanel(props: PanelWrapperProps): JSX.Element {<div className="panel-container" ref={graphRef}>{containerDimensions.width > 0 && containerDimensions.height > 0 && (<BarChart- key={`${syncMode}-${syncFilterMode}`}stack={widget.stackedBarChart ? StackMode.Normal : StackMode.None}config={config}legendConfig={{@@ -165,7 +169,7 @@ function BarPanel(props: PanelWrapperProps): JSX.Element {decimalPrecision={widget.decimalPrecision}timezone={timezone}syncMode={syncMode}- syncFilterMode={syncFilterMode}+ syncFilterMode={SyncTooltipFilterMode.Filtered}renderTooltipFooter={renderTooltipFooter}><ContextMenudiff --git a/frontend/src/container/DashboardContainer/visualization/panels/BarPanel/__tests__/utils.test.ts b/frontend/src/container/WidgetCard/Panels/BarPanel/__tests__/utils.test.tssimilarity index 95%rename from frontend/src/container/DashboardContainer/visualization/panels/BarPanel/__tests__/utils.test.tsrename to frontend/src/container/WidgetCard/Panels/BarPanel/__tests__/utils.test.tsindex e4a0dd1f23..a0bc96f427 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/BarPanel/__tests__/utils.test.ts+++ b/frontend/src/container/WidgetCard/Panels/BarPanel/__tests__/utils.test.ts@@ -1,20 +1,17 @@-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import {MetricRangePayloadProps,MetricRangePayloadV3,} from 'types/api/metrics/getQueryRange';import { Query } from 'types/api/queryBuilder/queryBuilderData';-import { PanelMode } from '../../types';-import { prepareBarPanelConfig } from '../utils';+import { PanelMode } from 'lib/visualization/panels/types';+import { prepareBarPanelConfig } from 'container/WidgetCard/Panels/BarPanel/utils';import { prepareChartData } from 'lib/uPlotV2/utils/dataUtils';-jest.mock(- 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils',- () => ({- getStoredSeriesVisibility: jest.fn(),- }),-);+jest.mock('lib/visualization/panels/utils/legendVisibilityUtils', () => ({+ getStoredSeriesVisibility: jest.fn(),+}));jest.mock('lib/uPlotLib/plugins/onClickPlugin', () => ({__esModule: true,diff --git a/frontend/src/container/DashboardContainer/visualization/panels/BarPanel/utils.ts b/frontend/src/container/WidgetCard/Panels/BarPanel/utils.tssimilarity index 92%rename from frontend/src/container/DashboardContainer/visualization/panels/BarPanel/utils.tsrename to frontend/src/container/WidgetCard/Panels/BarPanel/utils.tsindex 388af58138..71bac454c0 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/BarPanel/utils.ts+++ b/frontend/src/container/WidgetCard/Panels/BarPanel/utils.ts@@ -7,12 +7,12 @@ import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';import { DrawStyle } from 'lib/uPlotV2/config/types';import { UPlotConfigBuilder } from 'lib/uPlotV2/config/UPlotConfigBuilder';import { get } from 'lodash-es';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { Query } from 'types/api/queryBuilder/queryBuilderData';-import { PanelMode } from '../types';-import { buildBaseConfig } from '../utils/baseConfigBuilder';+import { PanelMode } from 'lib/visualization/panels/types';+import { buildBaseConfig } from 'lib/visualization/panels/utils/baseConfigBuilder';export function prepareBarPanelConfig({widget,diff --git a/frontend/src/container/DashboardContainer/visualization/panels/HistogramPanel/HistogramPanel.tsx b/frontend/src/container/WidgetCard/Panels/HistogramPanel/HistogramPanel.tsxsimilarity index 86%rename from frontend/src/container/DashboardContainer/visualization/panels/HistogramPanel/HistogramPanel.tsxrename to frontend/src/container/WidgetCard/Panels/HistogramPanel/HistogramPanel.tsxindex 4935b572e9..f17e286a7b 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/HistogramPanel/HistogramPanel.tsx+++ b/frontend/src/container/WidgetCard/Panels/HistogramPanel/HistogramPanel.tsx@@ -1,5 +1,5 @@import { useCallback, useMemo, useRef } from 'react';-import { PanelWrapperProps } from 'container/PanelWrapper/panelWrapper.types';+import { PanelWrapperProps } from 'container/WidgetCard/Panels/panelWrapper.types';import { useIsDarkMode } from 'hooks/useDarkMode';import { useResizeObserver } from 'hooks/useDimensions';import {@@ -8,15 +8,15 @@ import {} from 'lib/uPlotV2/components/types';import uPlot from 'uplot';-import Histogram from '../../charts/Histogram/Histogram';-import ChartManager from '../../components/ChartManager/ChartManager';+import Histogram from 'lib/visualization/charts/Histogram/Histogram';+import ChartManager from 'lib/visualization/components/ChartManager/ChartManager';import {prepareHistogramPanelConfig,prepareHistogramPanelData,-} from './utils';+} from 'container/WidgetCard/Panels/HistogramPanel/utils';-import '../Panel.styles.scss';-import TooltipFooter from '../components/TooltipFooter';+import 'container/WidgetCard/Panels/Panel.styles.scss';+import TooltipFooter from 'lib/visualization/panels/components/TooltipFooter';function HistogramPanel(props: PanelWrapperProps): JSX.Element {const {diff --git a/frontend/src/container/DashboardContainer/visualization/panels/HistogramPanel/__tests__/HistogramPanel.test.tsx b/frontend/src/container/WidgetCard/Panels/HistogramPanel/__tests__/HistogramPanel.test.tsxsimilarity index 78%rename from frontend/src/container/DashboardContainer/visualization/panels/HistogramPanel/__tests__/HistogramPanel.test.tsxrename to frontend/src/container/WidgetCard/Panels/HistogramPanel/__tests__/HistogramPanel.test.tsxindex 3d280c66a5..2186d5423e 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/HistogramPanel/__tests__/HistogramPanel.test.tsx+++ b/frontend/src/container/WidgetCard/Panels/HistogramPanel/__tests__/HistogramPanel.test.tsx@@ -1,15 +1,15 @@import type { UseQueryResult } from 'react-query';-import { HistogramChartProps } from 'container/DashboardContainer/visualization/charts/types';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { HistogramChartProps } from 'lib/visualization/charts/types';+import { PanelMode } from 'lib/visualization/panels/types';import { LegendPosition } from 'lib/uPlotV2/components/types';import { render, screen } from 'tests/test-utils';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import {MetricQueryRangeSuccessResponse,MetricRangePayloadProps,} from 'types/api/metrics/getQueryRange';-import HistogramPanel from '../HistogramPanel';+import HistogramPanel from 'container/WidgetCard/Panels/HistogramPanel/HistogramPanel';jest.mock('hooks/useDimensions', () => ({useResizeObserver: jest.fn().mockReturnValue({ width: 800, height: 400 }),@@ -31,42 +31,33 @@ jest.mock('providers/Timezone', () => ({}),}));-jest.mock(- 'container/DashboardContainer/visualization/hooks/useScrollWidgetIntoView',- () => ({- useScrollWidgetIntoView: jest.fn(),- }),-);--jest.mock(- 'container/DashboardContainer/visualization/charts/Histogram/Histogram',- () => ({- __esModule: true,- default: (props: HistogramChartProps): JSX.Element => (- <div data-testid="histogram-chart">- <div data-testid="histogram-props">- {JSON.stringify({- legendPosition: props.legendConfig?.position,- isQueriesMerged: props.isQueriesMerged,- yAxisUnit: props?.yAxisUnit,- decimalPrecision: props?.decimalPrecision,- })}- </div>- {props.layoutChildren}+jest.mock('lib/visualization/hooks/useScrollWidgetIntoView', () => ({+ useScrollWidgetIntoView: jest.fn(),+}));++jest.mock('lib/visualization/charts/Histogram/Histogram', () => ({+ __esModule: true,+ default: (props: HistogramChartProps): JSX.Element => (+ <div data-testid="histogram-chart">+ <div data-testid="histogram-props">+ {JSON.stringify({+ legendPosition: props.legendConfig?.position,+ isQueriesMerged: props.isQueriesMerged,+ yAxisUnit: props?.yAxisUnit,+ decimalPrecision: props?.decimalPrecision,+ })}</div>- ),- }),-);--jest.mock(- 'container/DashboardContainer/visualization/components/ChartManager/ChartManager',- () => ({- __esModule: true,- default: (): JSX.Element => (- <div data-testid="chart-manager">ChartManager</div>- ),- }),-);+ {props.layoutChildren}+ </div>+ ),+}));++jest.mock('lib/visualization/components/ChartManager/ChartManager', () => ({+ __esModule: true,+ default: (): JSX.Element => (+ <div data-testid="chart-manager">ChartManager</div>+ ),+}));function createQueryResponse(payloadOverrides: Partial<MetricRangePayloadProps> = {},diff --git a/frontend/src/container/DashboardContainer/visualization/panels/HistogramPanel/utils.ts b/frontend/src/container/WidgetCard/Panels/HistogramPanel/utils.tssimilarity index 94%rename from frontend/src/container/DashboardContainer/visualization/panels/HistogramPanel/utils.tsrename to frontend/src/container/WidgetCard/Panels/HistogramPanel/utils.tsindex a4c6e4a14e..6a580dfead 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/HistogramPanel/utils.ts+++ b/frontend/src/container/WidgetCard/Panels/HistogramPanel/utils.ts@@ -1,23 +1,23 @@import { histogramBucketSizes } from '@grafana/data';import { PANEL_TYPES } from 'constants/queryBuilder';-import { DEFAULT_BUCKET_COUNT } from 'container/PanelWrapper/constants';+import { DEFAULT_BUCKET_COUNT } from 'lib/visualization/constants';import { getLegend } from 'lib/dashboard/getQueryResults';import getLabelName from 'lib/getLabelName';import { DrawStyle } from 'lib/uPlotV2/config/types';import { UPlotConfigBuilder } from 'lib/uPlotV2/config/UPlotConfigBuilder';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { AlignedData } from 'uplot';import { incrRoundDn, roundDecimals } from 'utils/round';-import { PanelMode } from '../types';-import { buildBaseConfig } from '../utils/baseConfigBuilder';+import { PanelMode } from 'lib/visualization/panels/types';+import { buildBaseConfig } from 'lib/visualization/panels/utils/baseConfigBuilder';import {buildHistogramBuckets,mergeAlignedDataTables,prependNullBinToFirstHistogramSeries,replaceUndefinedWithNullInAlignedData,-} from '../utils/histogram';+} from 'lib/visualization/panels/utils/histogram';export interface PrepareHistogramPanelDataParams {apiResponse: MetricRangePayloadProps;diff --git a/frontend/src/container/PanelWrapper/ListPanelWrapper.tsx b/frontend/src/container/WidgetCard/Panels/ListPanelWrapper.tsxsimilarity index 92%rename from frontend/src/container/PanelWrapper/ListPanelWrapper.tsxrename to frontend/src/container/WidgetCard/Panels/ListPanelWrapper.tsxindex d0a46e2841..3fed73660b 100644--- a/frontend/src/container/PanelWrapper/ListPanelWrapper.tsx+++ b/frontend/src/container/WidgetCard/Panels/ListPanelWrapper.tsx@@ -2,7 +2,7 @@ import LogsPanelComponent from 'container/LogsPanelTable/LogsPanelComponent';import TracesTableComponent from 'container/TracesTableComponent/TracesTableComponent';import { DataSource } from 'types/common/queryBuilder';-import { PanelWrapperProps } from './panelWrapper.types';+import { PanelWrapperProps } from 'container/WidgetCard/Panels/panelWrapper.types';function ListPanelWrapper({widget,diff --git a/frontend/src/container/DashboardContainer/visualization/panels/Panel.styles.scss b/frontend/src/container/WidgetCard/Panels/Panel.styles.scsssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/panels/Panel.styles.scssrename to frontend/src/container/WidgetCard/Panels/Panel.styles.scssdiff --git a/frontend/src/container/PanelWrapper/PanelWrapper.tsx b/frontend/src/container/WidgetCard/Panels/PanelWrapper.tsxsimilarity index 92%rename from frontend/src/container/PanelWrapper/PanelWrapper.tsxrename to frontend/src/container/WidgetCard/Panels/PanelWrapper.tsxindex dd6af47b2a..be8b41f667 100644--- a/frontend/src/container/PanelWrapper/PanelWrapper.tsx+++ b/frontend/src/container/WidgetCard/Panels/PanelWrapper.tsx@@ -2,8 +2,8 @@ import { FC, useMemo } from 'react';import Spinner from 'components/Spinner';import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse';-import { PanelTypeVsPanelWrapper } from './constants';-import { PanelWrapperProps } from './panelWrapper.types';+import { PanelTypeVsPanelWrapper } from 'container/WidgetCard/Panels/constants';+import { PanelWrapperProps } from 'container/WidgetCard/Panels/panelWrapper.types';function PanelWrapper({widget,diff --git a/frontend/src/container/PanelWrapper/PiePanelWrapper.styles.scss b/frontend/src/container/WidgetCard/Panels/PiePanelWrapper.styles.scsssimilarity index 100%rename from frontend/src/container/PanelWrapper/PiePanelWrapper.styles.scssrename to frontend/src/container/WidgetCard/Panels/PiePanelWrapper.styles.scssdiff --git a/frontend/src/container/PanelWrapper/PiePanelWrapper.tsx b/frontend/src/container/WidgetCard/Panels/PiePanelWrapper.tsxsimilarity index 97%rename from frontend/src/container/PanelWrapper/PiePanelWrapper.tsxrename to frontend/src/container/WidgetCard/Panels/PiePanelWrapper.tsxindex d772e3275e..e17d38c124 100644--- a/frontend/src/container/PanelWrapper/PiePanelWrapper.tsx+++ b/frontend/src/container/WidgetCard/Panels/PiePanelWrapper.tsx@@ -10,11 +10,14 @@ import useGraphContextMenu from 'container/QueryTable/Drilldown/useGraphContextMimport { useIsDarkMode } from 'hooks/useDarkMode';import ContextMenu, { useCoordinates } from 'periscope/components/ContextMenu';-import { PanelWrapperProps, TooltipData } from './panelWrapper.types';-import { preparePieChartData } from './preparePieChartData';-import { lightenColor, tooltipStyles } from './utils';--import './PiePanelWrapper.styles.scss';+import {+ PanelWrapperProps,+ TooltipData,+} from 'container/WidgetCard/Panels/panelWrapper.types';+import { preparePieChartData } from 'container/WidgetCard/Panels/preparePieChartData';+import { lightenColor, tooltipStyles } from 'container/WidgetCard/Panels/utils';++import 'container/WidgetCard/Panels/PiePanelWrapper.styles.scss';// reference: https://www.youtube.com/watch?v=bL3P9CqQkKwfunction PiePanelWrapper({diff --git a/frontend/src/container/GridTableComponent/GridTableComponent.styles.scss b/frontend/src/container/WidgetCard/Panels/TablePanel/GridTableComponent.styles.scsssimilarity index 100%rename from frontend/src/container/GridTableComponent/GridTableComponent.styles.scssrename to frontend/src/container/WidgetCard/Panels/TablePanel/GridTableComponent.styles.scssdiff --git a/frontend/src/container/GridTableComponent/__tests__/response.ts b/frontend/src/container/WidgetCard/Panels/TablePanel/__tests__/response.tssimilarity index 100%rename from frontend/src/container/GridTableComponent/__tests__/response.tsrename to frontend/src/container/WidgetCard/Panels/TablePanel/__tests__/response.tsdiff --git a/frontend/src/container/GridTableComponent/__tests__/utils.test.tsx b/frontend/src/container/WidgetCard/Panels/TablePanel/__tests__/utils.test.tsxsimilarity index 98%rename from frontend/src/container/GridTableComponent/__tests__/utils.test.tsxrename to frontend/src/container/WidgetCard/Panels/TablePanel/__tests__/utils.test.tsxindex 7f00572ec5..2caeae2089 100644--- a/frontend/src/container/GridTableComponent/__tests__/utils.test.tsx+++ b/frontend/src/container/WidgetCard/Panels/TablePanel/__tests__/utils.test.tsx@@ -4,7 +4,7 @@ import {createColumnsAndDataSource,getQueryLegend,sortFunction,-} from '../utils';+} from 'container/WidgetCard/Panels/TablePanel/utils';import {expectedOutputQBv5MultiAggregations,expectedOutputWithLegends,@@ -12,7 +12,7 @@ import {tableDataQBv5MultiAggregations,widgetQueryQBv5MultiAggregations,widgetQueryWithLegend,-} from './response';+} from 'container/WidgetCard/Panels/TablePanel/__tests__/response';describe('Table Panel utils', () => {it('createColumnsAndDataSource function', () => {diff --git a/frontend/src/container/GridTableComponent/config.ts b/frontend/src/container/WidgetCard/Panels/TablePanel/config.tssimilarity index 100%rename from frontend/src/container/GridTableComponent/config.tsrename to frontend/src/container/WidgetCard/Panels/TablePanel/config.tsdiff --git a/frontend/src/container/GridTableComponent/index.tsx b/frontend/src/container/WidgetCard/Panels/TablePanel/index.tsxsimilarity index 96%rename from frontend/src/container/GridTableComponent/index.tsxrename to frontend/src/container/WidgetCard/Panels/TablePanel/index.tsxindex b29e2516c6..ca1c4f6fd2 100644--- a/frontend/src/container/GridTableComponent/index.tsx+++ b/frontend/src/container/WidgetCard/Panels/TablePanel/index.tsx@@ -12,15 +12,15 @@ import LineClampedText from 'periscope/components/LineClampedText/LineClampedTeximport styled from 'styled-components';import { eventEmitter } from 'utils/getEventEmitter';-import { WrapperStyled } from './styles';-import { GridTableComponentProps } from './types';+import { WrapperStyled } from 'container/WidgetCard/Panels/TablePanel/styles';+import { GridTableComponentProps } from 'container/WidgetCard/Panels/TablePanel/types';import {createColumnsAndDataSource,findMatchingThreshold,TableData,-} from './utils';+} from 'container/WidgetCard/Panels/TablePanel/utils';-import './GridTableComponent.styles.scss';+import 'container/WidgetCard/Panels/TablePanel/GridTableComponent.styles.scss';const ButtonWrapper = styled.div`position: absolute;diff --git a/frontend/src/container/GridTableComponent/styles.ts b/frontend/src/container/WidgetCard/Panels/TablePanel/styles.tssimilarity index 100%rename from frontend/src/container/GridTableComponent/styles.tsrename to frontend/src/container/WidgetCard/Panels/TablePanel/styles.tsdiff --git a/frontend/src/container/GridTableComponent/types.ts b/frontend/src/container/WidgetCard/Panels/TablePanel/types.tssimilarity index 91%rename from frontend/src/container/GridTableComponent/types.tsrename to frontend/src/container/WidgetCard/Panels/TablePanel/types.tsindex 1328c330a5..c36ea5a8e5 100644--- a/frontend/src/container/GridTableComponent/types.ts+++ b/frontend/src/container/WidgetCard/Panels/TablePanel/types.ts@@ -5,10 +5,11 @@ import { LogsExplorerTableProps } from 'container/LogsExplorerTable/LogsExplorerimport {ThresholdOperators,ThresholdProps,-} from 'container/NewWidget/RightContainer/Threshold/types';+} from 'types/api/widgets/threshold';import { QueryTableProps } from 'container/QueryTable/QueryTable.intefaces';import { RowData } from 'lib/query/createTableColumnsFromQuery';-import { ColumnUnit, ContextLinksData } from 'types/api/dashboard/getAll';+import { ColumnUnit } from 'types/api/widgets/columnUnit';+import { ContextLinksData } from 'types/api/widgets/widget';import { Query } from 'types/api/queryBuilder/queryBuilderData';import { QueryRangeRequestV5 } from 'types/api/v5/queryRange';diff --git a/frontend/src/container/GridTableComponent/utils.ts b/frontend/src/container/WidgetCard/Panels/TablePanel/utils.tssimilarity index 97%rename from frontend/src/container/GridTableComponent/utils.tsrename to frontend/src/container/WidgetCard/Panels/TablePanel/utils.tsindex fb7ee3ce62..2220a0a494 100644--- a/frontend/src/container/GridTableComponent/utils.ts+++ b/frontend/src/container/WidgetCard/Panels/TablePanel/utils.ts@@ -1,6 +1,6 @@import { TableColumnType as ColumnType } from 'antd';-import { convertUnit } from 'container/NewWidget/RightContainer/dataFormatCategories';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import { convertUnit } from 'constants/formats/dataFormatCategories';+import { ThresholdProps } from 'types/api/widgets/threshold';import { QUERY_TABLE_CONFIG } from 'container/QueryTable/config';import { QueryTableProps } from 'container/QueryTable/QueryTable.intefaces';import { RowData } from 'lib/query/createTableColumnsFromQuery';diff --git a/frontend/src/container/PanelWrapper/TablePanelWrapper.tsx b/frontend/src/container/WidgetCard/Panels/TablePanelWrapper.tsxsimilarity index 85%rename from frontend/src/container/PanelWrapper/TablePanelWrapper.tsxrename to frontend/src/container/WidgetCard/Panels/TablePanelWrapper.tsxindex 53585ee573..f95a5f581f 100644--- a/frontend/src/container/PanelWrapper/TablePanelWrapper.tsx+++ b/frontend/src/container/WidgetCard/Panels/TablePanelWrapper.tsx@@ -1,8 +1,8 @@import { PANEL_TYPES } from 'constants/queryBuilder';-import GridTableComponent from 'container/GridTableComponent';-import { GRID_TABLE_CONFIG } from 'container/GridTableComponent/config';+import GridTableComponent from 'container/WidgetCard/Panels/TablePanel';+import { GRID_TABLE_CONFIG } from 'container/WidgetCard/Panels/TablePanel/config';-import { PanelWrapperProps } from './panelWrapper.types';+import { PanelWrapperProps } from 'container/WidgetCard/Panels/panelWrapper.types';function TablePanelWrapper({widget,diff --git a/frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/TimeSeriesPanel.tsx b/frontend/src/container/WidgetCard/Panels/TimeSeriesPanel/TimeSeriesPanel.tsxsimilarity index 72%rename from frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/TimeSeriesPanel.tsxrename to frontend/src/container/WidgetCard/Panels/TimeSeriesPanel/TimeSeriesPanel.tsxindex 39efbb86f5..bc382d5f51 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/TimeSeriesPanel.tsx+++ b/frontend/src/container/WidgetCard/Panels/TimeSeriesPanel/TimeSeriesPanel.tsx@@ -1,26 +1,28 @@import { useCallback, useEffect, useMemo, useRef, useState } from 'react';-import TimeSeries from 'container/DashboardContainer/visualization/charts/TimeSeries/TimeSeries';-import ChartManager from 'container/DashboardContainer/visualization/components/ChartManager/ChartManager';-import { usePanelContextMenu } from 'container/DashboardContainer/visualization/hooks/usePanelContextMenu';-import { PanelWrapperProps } from 'container/PanelWrapper/panelWrapper.types';-import { useDashboardCursorSyncMode } from 'hooks/dashboard/useDashboardCursorSyncMode';-import { useSyncTooltipFilterMode } from 'hooks/dashboard/useSyncTooltipFilterMode';+import TimeSeries from 'lib/visualization/charts/TimeSeries/TimeSeries';+import ChartManager from 'lib/visualization/components/ChartManager/ChartManager';+import { usePanelContextMenu } from 'container/WidgetCard/Panels/hooks/usePanelContextMenu';+import { PanelWrapperProps } from 'container/WidgetCard/Panels/panelWrapper.types';import { useIsDarkMode } from 'hooks/useDarkMode';import { useResizeObserver } from 'hooks/useDimensions';import {IRenderTooltipFooterArgs,LegendPosition,} from 'lib/uPlotV2/components/types';+import {+ DashboardCursorSync,+ SyncTooltipFilterMode,+} from 'lib/uPlotV2/plugins/TooltipPlugin/types';import { ContextMenu } from 'periscope/components/ContextMenu';-import { useDashboardStore } from 'providers/Dashboard/store/useDashboardStore';import { useTimezone } from 'providers/Timezone';import uPlot from 'uplot';import { getTimeRange } from 'utils/getTimeRange';-import { prepareUPlotConfig } from '../TimeSeriesPanel/utils';+import { prepareUPlotConfig } from 'container/WidgetCard/Panels/TimeSeriesPanel/utils';+import { PanelMode } from 'lib/visualization/panels/types';-import '../Panel.styles.scss';-import TooltipFooter from '../components/TooltipFooter';+import 'container/WidgetCard/Panels/Panel.styles.scss';+import TooltipFooter from 'lib/visualization/panels/components/TooltipFooter';import { prepareChartData } from 'lib/uPlotV2/utils/dataUtils';function TimeSeriesPanel(props: PanelWrapperProps): JSX.Element {@@ -42,9 +44,12 @@ function TimeSeriesPanel(props: PanelWrapperProps): JSX.Element {const isDarkMode = useIsDarkMode();const { timezone } = useTimezone();- const dashboardId = useDashboardStore((s) => s.dashboardData?.id);- const [syncMode] = useDashboardCursorSyncMode(dashboardId, panelMode);- const [syncFilterMode] = useSyncTooltipFilterMode(dashboardId);+ // These panels never render inside a dashboard, so there is no stored+ // cursor-sync preference to read — only the panel-mode gate applies.+ const syncMode =+ panelMode === PanelMode.DASHBOARD_VIEW+ ? DashboardCursorSync.Crosshair+ : DashboardCursorSync.None;useEffect((): void => {const { startTime, endTime } = getTimeRange(queryResponse);@@ -95,11 +100,6 @@ function TimeSeriesPanel(props: PanelWrapperProps): JSX.Element {minTimeScale,maxTimeScale,timezone,- // `config` gets mutated by TooltipPlugin (config.setCursor for cursor sync).- // Rebuild it on syncMode changes so the new chart instance starts from a- // clean config — otherwise switching to "No Sync" would inherit stale sync- // settings from the previous mode.- syncMode,]);const layoutChildren = useMemo(() => {@@ -137,7 +137,6 @@ function TimeSeriesPanel(props: PanelWrapperProps): JSX.Element {<div className="panel-container" ref={graphRef}>{containerDimensions.width > 0 && containerDimensions.height > 0 && (<TimeSeries- key={`${syncMode}-${syncFilterMode}`}config={config}legendConfig={{position: widget?.legendPosition ?? LegendPosition.BOTTOM,@@ -151,7 +150,7 @@ function TimeSeriesPanel(props: PanelWrapperProps): JSX.Element {width={containerDimensions.width}height={containerDimensions.height}syncMode={syncMode}- syncFilterMode={syncFilterMode}+ syncFilterMode={SyncTooltipFilterMode.Filtered}layoutChildren={layoutChildren}renderTooltipFooter={renderTooltipFooter}>diff --git a/frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/__tests__/utils.test.ts b/frontend/src/container/WidgetCard/Panels/TimeSeriesPanel/__tests__/utils.test.tssimilarity index 96%rename from frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/__tests__/utils.test.tsrename to frontend/src/container/WidgetCard/Panels/TimeSeriesPanel/__tests__/utils.test.tsindex 7adcffd763..3be7bcfe15 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/__tests__/utils.test.ts+++ b/frontend/src/container/WidgetCard/Panels/TimeSeriesPanel/__tests__/utils.test.ts@@ -1,20 +1,17 @@-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import {MetricRangePayloadProps,MetricRangePayloadV3,} from 'types/api/metrics/getQueryRange';import { Query } from 'types/api/queryBuilder/queryBuilderData';-import { PanelMode } from '../../types';-import { prepareUPlotConfig } from '../utils';+import { PanelMode } from 'lib/visualization/panels/types';+import { prepareUPlotConfig } from 'container/WidgetCard/Panels/TimeSeriesPanel/utils';import { prepareChartData } from 'lib/uPlotV2/utils/dataUtils';-jest.mock(- 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils',- () => ({- getStoredSeriesVisibility: jest.fn(),- }),-);+jest.mock('lib/visualization/panels/utils/legendVisibilityUtils', () => ({+ getStoredSeriesVisibility: jest.fn(),+}));jest.mock('lib/uPlotLib/plugins/onClickPlugin', () => ({__esModule: true,diff --git a/frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/utils.ts b/frontend/src/container/WidgetCard/Panels/TimeSeriesPanel/utils.tssimilarity index 93%rename from frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/utils.tsrename to frontend/src/container/WidgetCard/Panels/TimeSeriesPanel/utils.tsindex bbf7b74c3f..432cb46296 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/TimeSeriesPanel/utils.ts+++ b/frontend/src/container/WidgetCard/Panels/TimeSeriesPanel/utils.ts@@ -13,12 +13,12 @@ import {import { UPlotConfigBuilder } from 'lib/uPlotV2/config/UPlotConfigBuilder';import { hasSingleVisiblePoint } from 'lib/uPlotV2/utils/dataUtils';import get from 'lodash-es/get';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { Query } from 'types/api/queryBuilder/queryBuilderData';-import { PanelMode } from '../types';-import { buildBaseConfig } from '../utils/baseConfigBuilder';+import { PanelMode } from 'lib/visualization/panels/types';+import { buildBaseConfig } from 'lib/visualization/panels/utils/baseConfigBuilder';export const prepareUPlotConfig = ({widget,diff --git a/frontend/src/container/GridValueComponent/index.tsx b/frontend/src/container/WidgetCard/Panels/ValuePanel/index.tsxsimilarity index 92%rename from frontend/src/container/GridValueComponent/index.tsxrename to frontend/src/container/WidgetCard/Panels/ValuePanel/index.tsxindex 578ab2dcd6..0f1f9deae4 100644--- a/frontend/src/container/GridValueComponent/index.tsx+++ b/frontend/src/container/WidgetCard/Panels/ValuePanel/index.tsx@@ -3,13 +3,16 @@ import { useLocation } from 'react-router-dom';import { Typography } from '@signozhq/ui/typography';import { getYAxisFormattedValue } from 'components/Graph/yAxisConfig';import ValueGraph from 'components/ValueGraph';-import { generateGridTitle } from 'container/GridPanelSwitch/utils';+import { generateGridTitle } from 'utils/generateGridTitle';import useGraphContextMenu from 'container/QueryTable/Drilldown/useGraphContextMenu';import ContextMenu, { useCoordinates } from 'periscope/components/ContextMenu';import { EQueryType } from 'types/common/dashboard';-import { TitleContainer, ValueContainer } from './styles';-import { GridValueComponentProps } from './types';+import {+ TitleContainer,+ ValueContainer,+} from 'container/WidgetCard/Panels/ValuePanel/styles';+import { GridValueComponentProps } from 'container/WidgetCard/Panels/ValuePanel/types';function GridValueComponent({data,diff --git a/frontend/src/container/GridValueComponent/styles.ts b/frontend/src/container/WidgetCard/Panels/ValuePanel/styles.tssimilarity index 100%rename from frontend/src/container/GridValueComponent/styles.tsrename to frontend/src/container/WidgetCard/Panels/ValuePanel/styles.tsdiff --git a/frontend/src/container/GridValueComponent/types.ts b/frontend/src/container/WidgetCard/Panels/ValuePanel/types.tssimilarity index 76%rename from frontend/src/container/GridValueComponent/types.tsrename to frontend/src/container/WidgetCard/Panels/ValuePanel/types.tsindex 35e00afc7e..adb42eda39 100644--- a/frontend/src/container/GridValueComponent/types.ts+++ b/frontend/src/container/WidgetCard/Panels/ValuePanel/types.ts@@ -1,6 +1,6 @@import { UseQueryResult } from 'react-query';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';-import { ContextLinksData, Widgets } from 'types/api/dashboard/getAll';+import { ThresholdProps } from 'types/api/widgets/threshold';+import { ContextLinksData, Widgets } from 'types/api/widgets/widget';import { MetricQueryRangeSuccessResponse } from 'types/api/metrics/getQueryRange';import uPlot from 'uplot';diff --git a/frontend/src/container/PanelWrapper/ValuePanelWrapper.tsx b/frontend/src/container/WidgetCard/Panels/ValuePanelWrapper.tsxsimilarity index 84%rename from frontend/src/container/PanelWrapper/ValuePanelWrapper.tsxrename to frontend/src/container/WidgetCard/Panels/ValuePanelWrapper.tsxindex 275b130093..64a507889c 100644--- a/frontend/src/container/PanelWrapper/ValuePanelWrapper.tsx+++ b/frontend/src/container/WidgetCard/Panels/ValuePanelWrapper.tsx@@ -1,7 +1,7 @@-import GridValueComponent from 'container/GridValueComponent';+import GridValueComponent from 'container/WidgetCard/Panels/ValuePanel';import { getUPlotChartData } from 'lib/uPlotLib/utils/getUplotChartData';-import { PanelWrapperProps } from './panelWrapper.types';+import { PanelWrapperProps } from 'container/WidgetCard/Panels/panelWrapper.types';function ValuePanelWrapper({widget,diff --git a/frontend/src/container/PanelWrapper/__tests__/TablePanelWrapper.test.tsx b/frontend/src/container/WidgetCard/Panels/__tests__/TablePanelWrapper.test.tsxsimilarity index 78%rename from frontend/src/container/PanelWrapper/__tests__/TablePanelWrapper.test.tsxrename to frontend/src/container/WidgetCard/Panels/__tests__/TablePanelWrapper.test.tsxindex 2881b0aec8..8ab1484e96 100644--- a/frontend/src/container/PanelWrapper/__tests__/TablePanelWrapper.test.tsx+++ b/frontend/src/container/WidgetCard/Panels/__tests__/TablePanelWrapper.test.tsx@@ -1,12 +1,12 @@-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';import { render } from 'tests/test-utils';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';-import TablePanelWrapper from '../TablePanelWrapper';+import TablePanelWrapper from 'container/WidgetCard/Panels/TablePanelWrapper';import {tablePanelQueryResponse,tablePanelWidgetQuery,-} from './tablePanelWrapperHelper';+} from 'container/WidgetCard/Panels/__tests__/tablePanelWrapperHelper';describe('Table panel wrappper tests', () => {it('table should render fine with the query response and column units', () => {diff --git a/frontend/src/container/PanelWrapper/__tests__/ValuePanelWrapper.test.tsx b/frontend/src/container/WidgetCard/Panels/__tests__/ValuePanelWrapper.test.tsxsimilarity index 83%rename from frontend/src/container/PanelWrapper/__tests__/ValuePanelWrapper.test.tsxrename to frontend/src/container/WidgetCard/Panels/__tests__/ValuePanelWrapper.test.tsxindex 71e3e1c7c3..570964150e 100644--- a/frontend/src/container/PanelWrapper/__tests__/ValuePanelWrapper.test.tsx+++ b/frontend/src/container/WidgetCard/Panels/__tests__/ValuePanelWrapper.test.tsx@@ -1,13 +1,13 @@-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';import { render } from 'tests/test-utils';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';-import ValuePanelWrapper from '../ValuePanelWrapper';+import ValuePanelWrapper from 'container/WidgetCard/Panels/ValuePanelWrapper';import {thresholds,valuePanelQueryResponse,valuePanelWidget,-} from './valuePanelWrapperHelper';+} from 'container/WidgetCard/Panels/__tests__/valuePanelWrapperHelper';window.ResizeObserver =window.ResizeObserver ||diff --git a/frontend/src/container/PanelWrapper/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snap b/frontend/src/container/WidgetCard/Panels/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snapsimilarity index 100%rename from frontend/src/container/PanelWrapper/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snaprename to frontend/src/container/WidgetCard/Panels/__tests__/__snapshots__/TablePanelWrapper.test.tsx.snapdiff --git a/frontend/src/container/PanelWrapper/__tests__/__snapshots__/ValuePanelWrapper.test.tsx.snap b/frontend/src/container/WidgetCard/Panels/__tests__/__snapshots__/ValuePanelWrapper.test.tsx.snapsimilarity index 100%rename from frontend/src/container/PanelWrapper/__tests__/__snapshots__/ValuePanelWrapper.test.tsx.snaprename to frontend/src/container/WidgetCard/Panels/__tests__/__snapshots__/ValuePanelWrapper.test.tsx.snapdiff --git a/frontend/src/container/PanelWrapper/__tests__/enhancedLegend.test.ts b/frontend/src/container/WidgetCard/Panels/__tests__/enhancedLegend.test.tssimilarity index 99%rename from frontend/src/container/PanelWrapper/__tests__/enhancedLegend.test.tsrename to frontend/src/container/WidgetCard/Panels/__tests__/enhancedLegend.test.tsindex e1a849274f..dcbfdbfd07 100644--- a/frontend/src/container/PanelWrapper/__tests__/enhancedLegend.test.ts+++ b/frontend/src/container/WidgetCard/Panels/__tests__/enhancedLegend.test.ts@@ -1,11 +1,11 @@import { Dimensions } from 'hooks/useDimensions';-import { LegendPosition } from 'types/api/dashboard/getAll';+import { LegendPosition } from 'types/api/widgets/widget';import {applyEnhancedLegendStyling,calculateEnhancedLegendConfig,EnhancedLegendConfig,-} from '../enhancedLegend';+} from 'container/WidgetCard/Panels/enhancedLegend';describe('Enhanced Legend Functionality', () => {const mockDimensions: Dimensions = {diff --git a/frontend/src/container/PanelWrapper/__tests__/getQueryResults.test.ts b/frontend/src/container/WidgetCard/Panels/__tests__/getQueryResults.test.tssimilarity index 98%rename from frontend/src/container/PanelWrapper/__tests__/getQueryResults.test.tsrename to frontend/src/container/WidgetCard/Panels/__tests__/getQueryResults.test.tsindex 6e43e45dcd..8c16a453ba 100644--- a/frontend/src/container/PanelWrapper/__tests__/getQueryResults.test.ts+++ b/frontend/src/container/WidgetCard/Panels/__tests__/getQueryResults.test.ts@@ -4,7 +4,10 @@ import { QueryData } from 'types/api/widgets/getQuery';import { EQueryType } from 'types/common/dashboard';import { DataSource } from 'types/common/queryBuilder';-import { getMockQuery, getMockQueryData } from './testUtils';+import {+ getMockQuery,+ getMockQueryData,+} from 'container/WidgetCard/Panels/__tests__/testUtils';const mockQueryData = getMockQueryData();const mockQuery = getMockQuery();diff --git a/frontend/src/container/PanelWrapper/__tests__/histogramLegendScroll.test.tsx b/frontend/src/container/WidgetCard/Panels/__tests__/histogramLegendScroll.test.tsxsimilarity index 100%rename from frontend/src/container/PanelWrapper/__tests__/histogramLegendScroll.test.tsxrename to frontend/src/container/WidgetCard/Panels/__tests__/histogramLegendScroll.test.tsxdiff --git a/frontend/src/container/PanelWrapper/__tests__/legendScroll.test.ts b/frontend/src/container/WidgetCard/Panels/__tests__/legendScroll.test.tssimilarity index 98%rename from frontend/src/container/PanelWrapper/__tests__/legendScroll.test.tsrename to frontend/src/container/WidgetCard/Panels/__tests__/legendScroll.test.tsindex 86c1bf5220..c22374750a 100644--- a/frontend/src/container/PanelWrapper/__tests__/legendScroll.test.ts+++ b/frontend/src/container/WidgetCard/Panels/__tests__/legendScroll.test.ts@@ -1,6 +1,6 @@import { initialQueriesMap } from 'constants/queryBuilder';import { getUPlotChartOptions } from 'lib/uPlotLib/getUplotChartOptions';-import { LegendPosition } from 'types/api/dashboard/getAll';+import { LegendPosition } from 'types/api/widgets/widget';// Mock uPlotjest.mock('uplot', () => {@@ -18,7 +18,7 @@ jest.mock('uplot', () => {});// Mock dependencies-jest.mock('container/PanelWrapper/enhancedLegend', () => ({+jest.mock('container/WidgetCard/Panels/enhancedLegend', () => ({calculateEnhancedLegendConfig: jest.fn(() => ({minHeight: 46,maxHeight: 80,diff --git a/frontend/src/container/PanelWrapper/__tests__/preparePieChartData.test.ts b/frontend/src/container/WidgetCard/Panels/__tests__/preparePieChartData.test.tssimilarity index 98%rename from frontend/src/container/PanelWrapper/__tests__/preparePieChartData.test.tsrename to frontend/src/container/WidgetCard/Panels/__tests__/preparePieChartData.test.tsindex cfe8c01978..7b2fe88ced 100644--- a/frontend/src/container/PanelWrapper/__tests__/preparePieChartData.test.ts+++ b/frontend/src/container/WidgetCard/Panels/__tests__/preparePieChartData.test.ts@@ -2,7 +2,7 @@ import { themeColors } from 'constants/theme';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { QueryData, QueryDataV3 } from 'types/api/widgets/getQuery';-import { preparePieChartData } from '../preparePieChartData';+import { preparePieChartData } from 'container/WidgetCard/Panels/preparePieChartData';const options = { colorMap: themeColors.chartcolors };diff --git a/frontend/src/container/PanelWrapper/__tests__/tablePanelWrapperHelper.ts b/frontend/src/container/WidgetCard/Panels/__tests__/tablePanelWrapperHelper.tssimilarity index 100%rename from frontend/src/container/PanelWrapper/__tests__/tablePanelWrapperHelper.tsrename to frontend/src/container/WidgetCard/Panels/__tests__/tablePanelWrapperHelper.tsdiff --git a/frontend/src/container/PanelWrapper/__tests__/testUtils.ts b/frontend/src/container/WidgetCard/Panels/__tests__/testUtils.tssimilarity index 100%rename from frontend/src/container/PanelWrapper/__tests__/testUtils.tsrename to frontend/src/container/WidgetCard/Panels/__tests__/testUtils.tsdiff --git a/frontend/src/container/PanelWrapper/__tests__/valuePanelWrapperHelper.ts b/frontend/src/container/WidgetCard/Panels/__tests__/valuePanelWrapperHelper.tssimilarity index 100%rename from frontend/src/container/PanelWrapper/__tests__/valuePanelWrapperHelper.tsrename to frontend/src/container/WidgetCard/Panels/__tests__/valuePanelWrapperHelper.tsdiff --git a/frontend/src/container/WidgetCard/Panels/constants.ts b/frontend/src/container/WidgetCard/Panels/constants.tsnew file mode 100644index 0000000000..dd2d234c62--- /dev/null+++ b/frontend/src/container/WidgetCard/Panels/constants.ts@@ -0,0 +1,21 @@+import { PANEL_TYPES } from 'constants/queryBuilder';+import BarPanel from 'container/WidgetCard/Panels/BarPanel/BarPanel';+import HistogramPanel from 'container/WidgetCard/Panels/HistogramPanel/HistogramPanel';++import TimeSeriesPanel from 'container/WidgetCard/Panels/TimeSeriesPanel/TimeSeriesPanel';+import ListPanelWrapper from 'container/WidgetCard/Panels/ListPanelWrapper';+import PiePanelWrapper from 'container/WidgetCard/Panels/PiePanelWrapper';+import TablePanelWrapper from 'container/WidgetCard/Panels/TablePanelWrapper';+import ValuePanelWrapper from 'container/WidgetCard/Panels/ValuePanelWrapper';++export const PanelTypeVsPanelWrapper = {+ [PANEL_TYPES.TIME_SERIES]: TimeSeriesPanel,+ [PANEL_TYPES.TABLE]: TablePanelWrapper,+ [PANEL_TYPES.LIST]: ListPanelWrapper,+ [PANEL_TYPES.VALUE]: ValuePanelWrapper,+ [PANEL_TYPES.TRACE]: null,+ [PANEL_TYPES.EMPTY_WIDGET]: null,+ [PANEL_TYPES.PIE]: PiePanelWrapper,+ [PANEL_TYPES.BAR]: BarPanel,+ [PANEL_TYPES.HISTOGRAM]: HistogramPanel,+};diff --git a/frontend/src/container/PanelWrapper/enhancedLegend.ts b/frontend/src/container/WidgetCard/Panels/enhancedLegend.tssimilarity index 99%rename from frontend/src/container/PanelWrapper/enhancedLegend.tsrename to frontend/src/container/WidgetCard/Panels/enhancedLegend.tsindex 948521593c..c449f70bb0 100644--- a/frontend/src/container/PanelWrapper/enhancedLegend.ts+++ b/frontend/src/container/WidgetCard/Panels/enhancedLegend.ts@@ -1,5 +1,5 @@import { Dimensions } from 'hooks/useDimensions';-import { LegendPosition } from 'types/api/dashboard/getAll';+import { LegendPosition } from 'types/api/widgets/widget';export interface EnhancedLegendConfig {minHeight: number;diff --git a/frontend/src/container/DashboardContainer/visualization/hooks/__tests__/usePanelContextMenu.test.ts b/frontend/src/container/WidgetCard/Panels/hooks/__tests__/usePanelContextMenu.test.tssimilarity index 94%rename from frontend/src/container/DashboardContainer/visualization/hooks/__tests__/usePanelContextMenu.test.tsrename to frontend/src/container/WidgetCard/Panels/hooks/__tests__/usePanelContextMenu.test.tsindex 4d98d2cabb..cd5fa8a2c9 100644--- a/frontend/src/container/DashboardContainer/visualization/hooks/__tests__/usePanelContextMenu.test.ts+++ b/frontend/src/container/WidgetCard/Panels/hooks/__tests__/usePanelContextMenu.test.ts@@ -1,9 +1,9 @@import { renderHook } from '@testing-library/react';import { UseQueryResult } from 'react-query';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricQueryRangeSuccessResponse } from 'types/api/metrics/getQueryRange';-import { usePanelContextMenu } from '../usePanelContextMenu';+import { usePanelContextMenu } from 'container/WidgetCard/Panels/hooks/usePanelContextMenu';// The hook composes `useCoordinates` (popover state) and `useGraphContextMenu`// (menu items). We mock both so the test focuses on the `enableDrillDown` gate@@ -37,7 +37,7 @@ jest.mock('container/QueryTable/Drilldown/drilldownUtils', () => ({})),}));-jest.mock('container/PanelWrapper/utils', () => ({+jest.mock('container/WidgetCard/Panels/utils', () => ({isApmMetric: jest.fn(() => false),getTimeRangeFromStepInterval: jest.fn(() => ({ start: 0, end: 0 })),}));diff --git a/frontend/src/container/DashboardContainer/visualization/hooks/usePanelContextMenu.ts b/frontend/src/container/WidgetCard/Panels/hooks/usePanelContextMenu.tssimilarity index 96%rename from frontend/src/container/DashboardContainer/visualization/hooks/usePanelContextMenu.tsrename to frontend/src/container/WidgetCard/Panels/hooks/usePanelContextMenu.tsindex e83b13ec84..c108b9cafc 100644--- a/frontend/src/container/DashboardContainer/visualization/hooks/usePanelContextMenu.ts+++ b/frontend/src/container/WidgetCard/Panels/hooks/usePanelContextMenu.ts@@ -3,14 +3,14 @@ import { UseQueryResult } from 'react-query';import {getTimeRangeFromStepInterval,isApmMetric,-} from 'container/PanelWrapper/utils';+} from 'container/WidgetCard/Panels/utils';import { getUplotClickData } from 'container/QueryTable/Drilldown/drilldownUtils';import useGraphContextMenu from 'container/QueryTable/Drilldown/useGraphContextMenu';import {PopoverPosition,useCoordinates,} from 'periscope/components/ContextMenu';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricQueryRangeSuccessResponse } from 'types/api/metrics/getQueryRange';import { DataSource } from 'types/common/queryBuilder';diff --git a/frontend/src/container/PanelWrapper/panelWrapper.types.ts b/frontend/src/container/WidgetCard/Panels/panelWrapper.types.tssimilarity index 87%rename from frontend/src/container/PanelWrapper/panelWrapper.types.tsrename to frontend/src/container/WidgetCard/Panels/panelWrapper.types.tsindex 849ff31036..b2d77f21bd 100644--- a/frontend/src/container/PanelWrapper/panelWrapper.types.ts+++ b/frontend/src/container/WidgetCard/Panels/panelWrapper.types.ts@@ -1,12 +1,12 @@import { Dispatch, SetStateAction } from 'react';import { UseQueryResult } from 'react-query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import { WidgetGraphComponentProps } from 'container/GridCardLayout/GridCard/types';+import { PanelMode } from 'lib/visualization/panels/types';+import { WidgetGraphComponentProps } from 'container/WidgetCard/Card/types';import { RowData } from 'lib/query/createTableColumnsFromQuery';import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { MetricQueryRangeSuccessResponse } from 'types/api/metrics/getQueryRange';import { QueryData } from 'types/api/widgets/getQuery';diff --git a/frontend/src/container/PanelWrapper/preparePieChartData.ts b/frontend/src/container/WidgetCard/Panels/preparePieChartData.tssimilarity index 100%rename from frontend/src/container/PanelWrapper/preparePieChartData.tsrename to frontend/src/container/WidgetCard/Panels/preparePieChartData.tsdiff --git a/frontend/src/container/PanelWrapper/utils.ts b/frontend/src/container/WidgetCard/Panels/utils.tssimilarity index 100%rename from frontend/src/container/PanelWrapper/utils.tsrename to frontend/src/container/WidgetCard/Panels/utils.tsdiff --git a/frontend/src/container/GridCardLayout/GridCardLayout.styles.scss b/frontend/src/container/WidgetCard/WidgetCard.styles.scsssimilarity index 100%rename from frontend/src/container/GridCardLayout/GridCardLayout.styles.scssrename to frontend/src/container/WidgetCard/WidgetCard.styles.scssdiff --git a/frontend/src/container/GridCardLayout/__tests__/rowCollapse.test.ts b/frontend/src/container/WidgetCard/__tests__/rowCollapse.test.tssimilarity index 98%rename from frontend/src/container/GridCardLayout/__tests__/rowCollapse.test.tsrename to frontend/src/container/WidgetCard/__tests__/rowCollapse.test.tsindex e98594d7ca..c90c2e9fb7 100644--- a/frontend/src/container/GridCardLayout/__tests__/rowCollapse.test.ts+++ b/frontend/src/container/WidgetCard/__tests__/rowCollapse.test.ts@@ -1,6 +1,6 @@import { Layout } from 'react-grid-layout';-import { applyRowCollapse, PanelMap } from '../utils';+import { applyRowCollapse, PanelMap } from 'container/WidgetCard/utils';// Helper to produce deeply-frozen objects that mimic what zustand/immer returns.function freeze<T>(obj: T): T {diff --git a/frontend/src/container/GridCardLayout/__tests__/useResolveQuery.test.tsx b/frontend/src/container/WidgetCard/__tests__/useResolveQuery.test.tsxsimilarity index 97%rename from frontend/src/container/GridCardLayout/__tests__/useResolveQuery.test.tsxrename to frontend/src/container/WidgetCard/__tests__/useResolveQuery.test.tsxindex 564a0cbcf7..d87313dac4 100644--- a/frontend/src/container/GridCardLayout/__tests__/useResolveQuery.test.tsx+++ b/frontend/src/container/WidgetCard/__tests__/useResolveQuery.test.tsx@@ -3,7 +3,7 @@ import { PANEL_TYPES } from 'constants/queryBuilder';import MockQueryClientProvider from 'providers/test/MockQueryClientProvider';import { Query } from 'types/api/queryBuilder/queryBuilderData';-import useUpdatedQuery from '../useResolveQuery';+import useUpdatedQuery from 'container/WidgetCard/hooks/useResolveQuery';const mockGetSubstituteVars = jest.fn();const mockDynamicVariables: unknown[] = [];diff --git a/frontend/src/container/GridCardLayout/__tests__/utils.test.ts b/frontend/src/container/WidgetCard/__tests__/utils.test.tssimilarity index 98%rename from frontend/src/container/GridCardLayout/__tests__/utils.test.tsrename to frontend/src/container/WidgetCard/__tests__/utils.test.tsindex ed71f0e66a..30e6a2c0e3 100644--- a/frontend/src/container/GridCardLayout/__tests__/utils.test.ts+++ b/frontend/src/container/WidgetCard/__tests__/utils.test.ts@@ -2,7 +2,10 @@ import { Query } from 'types/api/queryBuilder/queryBuilderData';import { EQueryType } from 'types/common/dashboard';import { DataSource, ReduceOperators } from 'types/common/queryBuilder';-import { getBarStepIntervalPoints, updateBarStepInterval } from '../utils';+import {+ getBarStepIntervalPoints,+ updateBarStepInterval,+} from 'container/WidgetCard/utils';describe('GridCardLayout Utils', () => {describe('getBarStepIntervalPoints', () => {diff --git a/frontend/src/container/GridCardLayout/config.ts b/frontend/src/container/WidgetCard/config.tssimilarity index 82%rename from frontend/src/container/GridCardLayout/config.tsrename to frontend/src/container/WidgetCard/config.tsindex 67c731e07b..7394203d9b 100644--- a/frontend/src/container/GridCardLayout/config.ts+++ b/frontend/src/container/WidgetCard/config.ts@@ -1,5 +1,5 @@import { PANEL_TYPES } from 'constants/queryBuilder';-import { MenuItemKeys } from 'container/GridCardLayout/WidgetHeader/contants';+import { MenuItemKeys } from 'container/WidgetCard/Header/contants';export const ViewMenuAction = [MenuItemKeys.View];diff --git a/frontend/src/container/GridCardLayout/useGraphClickToShowButton.ts b/frontend/src/container/WidgetCard/hooks/useGraphClickToShowButton.tssimilarity index 98%rename from frontend/src/container/GridCardLayout/useGraphClickToShowButton.tsrename to frontend/src/container/WidgetCard/hooks/useGraphClickToShowButton.tsindex b29bfbbfc3..6d1575b813 100644--- a/frontend/src/container/GridCardLayout/useGraphClickToShowButton.ts+++ b/frontend/src/container/WidgetCard/hooks/useGraphClickToShowButton.ts@@ -1,7 +1,7 @@import { useCallback, useEffect, useRef } from 'react';import { isUndefined } from 'lodash-es';-import './GridCardLayout.styles.scss';+import 'container/WidgetCard/WidgetCard.styles.scss';interface ClickToShowButtonProps {graphRef: React.RefObject<HTMLDivElement>;diff --git a/frontend/src/container/GridCardLayout/useNavigateToExplorerPages.ts b/frontend/src/container/WidgetCard/hooks/useNavigateToExplorerPages.tssimilarity index 93%rename from frontend/src/container/GridCardLayout/useNavigateToExplorerPages.tsrename to frontend/src/container/WidgetCard/hooks/useNavigateToExplorerPages.tsindex 20f2b10c9d..eaab1acb9e 100644--- a/frontend/src/container/GridCardLayout/useNavigateToExplorerPages.ts+++ b/frontend/src/container/WidgetCard/hooks/useNavigateToExplorerPages.ts@@ -1,7 +1,6 @@import { useCallback } from 'react';import { useNotifications } from 'hooks/useNotifications';-import { useDashboardStore } from 'providers/Dashboard/store/useDashboardStore';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse';import {IBuilderQuery,@@ -10,7 +9,7 @@ import {} from 'types/api/queryBuilder/queryBuilderData';import { v4 } from 'uuid';-import { extractQueryNamesFromExpression } from './utils';+import { extractQueryNamesFromExpression } from 'container/WidgetCard/utils';export type GraphClickMetaData = {[key: string]: string | boolean;@@ -121,7 +120,6 @@ function useNavigateToExplorerPages(): () => Promise<{[queryName: string]: { filters: TagFilterItem[]; dataSource?: string };}> {- const { dashboardData } = useDashboardStore();const { notifications } = useNotifications();return useCallback(@@ -143,7 +141,7 @@ function useNavigateToExplorerPages(): (}},// eslint-disable-next-line react-hooks/exhaustive-deps- [dashboardData, notifications],+ [notifications],);}diff --git a/frontend/src/container/GridCardLayout/useResolveQuery.ts b/frontend/src/container/WidgetCard/hooks/useResolveQuery.tssimilarity index 97%rename from frontend/src/container/GridCardLayout/useResolveQuery.tsrename to frontend/src/container/WidgetCard/hooks/useResolveQuery.tsindex ee1cd338b4..78938d1d5d 100644--- a/frontend/src/container/GridCardLayout/useResolveQuery.ts+++ b/frontend/src/container/WidgetCard/hooks/useResolveQuery.ts@@ -6,7 +6,7 @@ import { isEmpty } from 'lodash-es';import { getSubstituteVars } from 'api/dashboard/substitute_vars';import { prepareQueryRangePayloadV5 } from 'api/v5/v5';import { PANEL_TYPES } from 'constants/queryBuilder';-import { timePreferenceType } from 'container/NewWidget/RightContainer/timeItems';+import { timePreferenceType } from 'constants/timePreference';import { useDashboardVariablesByType } from 'hooks/dashboard/useDashboardVariablesByType';import { getDashboardVariables } from 'lib/dashboardVariables/getDashboardVariables';import { mapQueryDataFromApi } from 'lib/newQueryBuilder/queryBuilderMappers/mapQueryDataFromApi';diff --git a/frontend/src/container/GridCardLayout/panelTypeItems.tsx b/frontend/src/container/WidgetCard/panelTypeItems.tsxsimilarity index 100%rename from frontend/src/container/GridCardLayout/panelTypeItems.tsxrename to frontend/src/container/WidgetCard/panelTypeItems.tsxdiff --git a/frontend/src/container/GridCardLayout/styles.ts b/frontend/src/container/WidgetCard/styles.tssimilarity index 100%rename from frontend/src/container/GridCardLayout/styles.tsrename to frontend/src/container/WidgetCard/styles.tsdiff --git a/frontend/src/container/GridCardLayout/utils.ts b/frontend/src/container/WidgetCard/utils.tssimilarity index 88%rename from frontend/src/container/GridCardLayout/utils.tsrename to frontend/src/container/WidgetCard/utils.tsindex 5406c99c30..2127736b1b 100644--- a/frontend/src/container/GridCardLayout/utils.ts+++ b/frontend/src/container/WidgetCard/utils.ts@@ -1,7 +1,5 @@import { Layout } from 'react-grid-layout';import { FORMULA_REGEXP } from 'constants/regExp';-import { isEmpty, isEqual } from 'lodash-es';-import { Dashboard, Widgets } from 'types/api/dashboard/getAll';import { IBuilderQuery, Query } from 'types/api/queryBuilder/queryBuilderData';export type PanelMap = Record<@@ -147,34 +145,6 @@ export function extractQueryNamesFromExpression(expression: string): string[] {return [...new Set(expression.match(queryNameRegex) || [])];}-export const hasColumnWidthsChanged = (- columnWidths: Record<string, Record<string, number>>,- dashboardData?: Dashboard,-): boolean => {- // If no column widths stored, no changes- if (isEmpty(columnWidths) || !dashboardData) {- return false;- }-- // Check each widget's column widths- return Object.keys(columnWidths).some((widgetId) => {- const dashboardWidget = dashboardData?.data?.widgets?.find(- (widget) => widget.id === widgetId,- ) as Widgets;-- const newWidths = columnWidths[widgetId];- const existingWidths = dashboardWidget?.columnWidths;-- // If both are empty/undefined, no change- if (isEmpty(newWidths) || isEmpty(existingWidths)) {- return false;- }-- // Compare stored column widths with dashboard widget's column widths- return !isEqual(newWidths, existingWidths);- });-};-/*** Calculates the step interval in uPlot points (1 minute = 60 points)* based on the time duration between two timestamps in nanoseconds.diff --git a/frontend/src/hooks/dashboard/__test__/useDashboardCursorSyncMode.test.ts b/frontend/src/hooks/dashboard/__test__/useDashboardCursorSyncMode.test.tsindex ccbd0af637..95df34e565 100644--- a/frontend/src/hooks/dashboard/__test__/useDashboardCursorSyncMode.test.ts+++ b/frontend/src/hooks/dashboard/__test__/useDashboardCursorSyncMode.test.ts@@ -1,6 +1,6 @@import { act, renderHook } from '@testing-library/react';import { LOCALSTORAGE } from 'constants/localStorage';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';import { DashboardCursorSync } from 'lib/uPlotV2/plugins/TooltipPlugin/types';import { useDashboardCursorSyncMode } from '../useDashboardCursorSyncMode';diff --git a/frontend/src/hooks/dashboard/__test__/useGetResolvedPublicDashboard.test.tsx b/frontend/src/hooks/dashboard/__test__/useGetResolvedPublicDashboard.test.tsxindex 8ea0576ee1..251dd5ce4c 100644--- a/frontend/src/hooks/dashboard/__test__/useGetResolvedPublicDashboard.test.tsx+++ b/frontend/src/hooks/dashboard/__test__/useGetResolvedPublicDashboard.test.tsx@@ -1,6 +1,5 @@import { renderHook, waitFor } from '@testing-library/react';import { getPublicDashboardDataV2 } from 'api/generated/services/dashboard';-import getPublicDashboardDataAPI from 'api/dashboard/public/getPublicDashboardData';import { ReactNode } from 'react';import { QueryClient, QueryClientProvider } from 'react-query';@@ -12,13 +11,8 @@ import {jest.mock('api/generated/services/dashboard', () => ({getPublicDashboardDataV2: jest.fn(),}));-jest.mock('api/dashboard/public/getPublicDashboardData', () => ({- __esModule: true,- default: jest.fn(),-}));const mockV2 = getPublicDashboardDataV2 as jest.Mock;-const mockV1 = getPublicDashboardDataAPI as jest.Mock;const wrapper = ({ children }: { children: ReactNode }): JSX.Element => {const client = new QueryClient({@@ -28,7 +22,7 @@ const wrapper = ({ children }: { children: ReactNode }): JSX.Element => {};// A schema mismatch on the v2 endpoint surfaces as an AxiosError with HTTP 501 and this-// error code; anything else must NOT trigger the v1 fallback.+// error code; anything else must surface as an error, not as "legacy".const schemaMismatchError = {isAxiosError: true,response: {@@ -40,10 +34,9 @@ const schemaMismatchError = {describe('useGetResolvedPublicDashboard', () => {beforeEach(() => {mockV2.mockReset();- mockV1.mockReset();});- it('returns the v2 model when the v2 endpoint succeeds and never calls v1', async () => {+ it('returns the v2 model when the v2 endpoint succeeds', async () => {mockV2.mockResolvedValue({ status: 'success', data: { dashboard: {} } });const { result } = renderHook(() => useGetResolvedPublicDashboard('id-1'), {@@ -53,26 +46,20 @@ describe('useGetResolvedPublicDashboard', () => {await waitFor(() => expect(result.current.isSuccess).toBe(true));expect(result.current.data?.schema).toBe(PublicDashboardSchema.V2);expect(mockV2).toHaveBeenCalledWith({ id: 'id-1' });- expect(mockV1).not.toHaveBeenCalled();});- it('falls back to v1 when the v2 endpoint reports a schema mismatch', async () => {+ it('resolves to legacy when the v2 endpoint reports a schema mismatch', async () => {mockV2.mockRejectedValue(schemaMismatchError);- mockV1.mockResolvedValue({- httpStatusCode: 200,- data: { dashboard: { data: { title: 'v1' } } },- });const { result } = renderHook(() => useGetResolvedPublicDashboard('id-2'), {wrapper,});await waitFor(() => expect(result.current.isSuccess).toBe(true));- expect(result.current.data?.schema).toBe(PublicDashboardSchema.V1);- expect(mockV1).toHaveBeenCalledWith({ id: 'id-2' });+ expect(result.current.data?.schema).toBe(PublicDashboardSchema.Legacy);});- it('surfaces a non-schema-mismatch v2 error without falling back to v1', async () => {+ it('surfaces a non-schema-mismatch v2 error as an error, not as legacy', async () => {mockV2.mockRejectedValue({isAxiosError: true,response: { status: 500, data: { error: { code: 'internal' } } },@@ -83,12 +70,11 @@ describe('useGetResolvedPublicDashboard', () => {});await waitFor(() => expect(result.current.isError).toBe(true));- expect(mockV1).not.toHaveBeenCalled();+ expect(result.current.data).toBeUndefined();});it('does not fetch without an id', () => {renderHook(() => useGetResolvedPublicDashboard(''), { wrapper });expect(mockV2).not.toHaveBeenCalled();- expect(mockV1).not.toHaveBeenCalled();});});diff --git a/frontend/src/hooks/dashboard/__test__/useIsPanelWaitingOnVariable.test.ts b/frontend/src/hooks/dashboard/__test__/useIsPanelWaitingOnVariable.test.tsindex a4662ca6d8..3a89e36d2f 100644--- a/frontend/src/hooks/dashboard/__test__/useIsPanelWaitingOnVariable.test.ts+++ b/frontend/src/hooks/dashboard/__test__/useIsPanelWaitingOnVariable.test.ts@@ -5,7 +5,7 @@ import {VariableFetchState,variableFetchStore,} from 'providers/Dashboard/store/variableFetchStore';-import { IDashboardVariable } from 'types/api/dashboard/getAll';+import { IDashboardVariable } from 'types/api/dashboard/variables';import { useIsPanelWaitingOnVariable } from '../useVariableFetchState';diff --git a/frontend/src/hooks/dashboard/__test__/useTransformDashboardVariables.test.tsx b/frontend/src/hooks/dashboard/__test__/useTransformDashboardVariables.test.tsxdeleted file mode 100644index 13a0f414fd..0000000000--- a/frontend/src/hooks/dashboard/__test__/useTransformDashboardVariables.test.tsx+++ /dev/null@@ -1,337 +0,0 @@-import { renderHook } from '@testing-library/react';-import { getLocalStorageDashboardVariables } from 'hooks/dashboard/useDashboardFromLocalStorage';-import { useTransformDashboardVariables } from 'hooks/dashboard/useTransformDashboardVariables';-import useVariablesFromUrl from 'hooks/dashboard/useVariablesFromUrl';-import { Dashboard, IDashboardVariable } from 'types/api/dashboard/getAll';--jest.mock('hooks/dashboard/useDashboardFromLocalStorage');-jest.mock('hooks/dashboard/useVariablesFromUrl');--const mockGetLocalStorageDashboardVariables =- getLocalStorageDashboardVariables as jest.MockedFunction<- typeof getLocalStorageDashboardVariables- >;-const mockUseVariablesFromUrl = useVariablesFromUrl as jest.MockedFunction<- typeof useVariablesFromUrl->;--const makeVariable = (- overrides: Partial<IDashboardVariable> = {},-): IDashboardVariable => ({- id: 'existing-id',- name: 'env',- description: '',- type: 'QUERY',- sort: 'DISABLED',- multiSelect: false,- showALLOption: false,- selectedValue: 'prod',- ...overrides,-});--const makeDashboard = (- variables: Record<string, IDashboardVariable>,-): Dashboard => ({- id: 'dash-1',- createdAt: '',- updatedAt: '',- createdBy: '',- updatedBy: '',- data: {- title: 'Test',- variables,- },-});--const setupHook = (- currentDashboard: Record<string, any> = {},- urlVariables: Record<string, any> = {},-): ReturnType<typeof useTransformDashboardVariables> => {- mockGetLocalStorageDashboardVariables.mockReturnValue(currentDashboard as any);- mockUseVariablesFromUrl.mockReturnValue({- getUrlVariables: () => urlVariables,- setUrlVariables: jest.fn(),- updateUrlVariable: jest.fn(),- });-- const { result } = renderHook(() => useTransformDashboardVariables('dash-1'));- return result.current;-};--describe('useTransformDashboardVariables', () => {- beforeEach(() => jest.clearAllMocks());-- describe('order assignment', () => {- it('assigns order starting from 0 to variables that have none', () => {- const { transformDashboardVariables } = setupHook();- const dashboard = makeDashboard({- v1: makeVariable({ id: 'id1', name: 'v1', order: undefined }),- v2: makeVariable({ id: 'id2', name: 'v2', order: undefined }),- });-- const result = transformDashboardVariables(dashboard);-- const orders = Object.values(result.data.variables!).map((v) => v.order);- expect(orders).toContain(0);- expect(orders).toContain(1);- });-- it('preserves existing order values', () => {- const { transformDashboardVariables } = setupHook();- const dashboard = makeDashboard({- v1: makeVariable({ id: 'id1', name: 'v1', order: 5 }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.order).toBe(5);- });-- it('assigns unique orders across multiple variables that all lack an order', () => {- const { transformDashboardVariables } = setupHook();- const dashboard = makeDashboard({- v1: makeVariable({ id: 'id1', name: 'v1', order: undefined }),- v2: makeVariable({ id: 'id2', name: 'v2', order: undefined }),- v3: makeVariable({ id: 'id3', name: 'v3', order: undefined }),- });-- const result = transformDashboardVariables(dashboard);-- const orders = Object.values(result.data.variables!).map((v) => v.order);- // All three newly assigned orders must be distinct- expect(new Set(orders).size).toBe(3);- });- });-- describe('ID assignment', () => {- it('assigns a UUID to variables that have no id', () => {- const { transformDashboardVariables } = setupHook();- const variable = makeVariable({ name: 'v1' });- (variable as any).id = undefined;- const dashboard = makeDashboard({ v1: variable });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.id).toMatch(- /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,- );- });-- it('preserves existing IDs', () => {- const { transformDashboardVariables } = setupHook();- const dashboard = makeDashboard({- v1: makeVariable({ id: 'keep-me', name: 'v1' }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.id).toBe('keep-me');- });- });-- describe('TEXTBOX backward compatibility', () => {- it('copies textboxValue to defaultValue when defaultValue is missing', () => {- const { transformDashboardVariables } = setupHook();- const dashboard = makeDashboard({- v1: makeVariable({- id: 'id1',- name: 'v1',- type: 'TEXTBOX',- textboxValue: 'hello',- defaultValue: undefined,- order: undefined,- }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.defaultValue).toBe('hello');- });-- it('does not overwrite an existing defaultValue', () => {- const { transformDashboardVariables } = setupHook();- const dashboard = makeDashboard({- v1: makeVariable({- id: 'id1',- name: 'v1',- type: 'TEXTBOX',- textboxValue: 'old',- defaultValue: 'keep',- order: undefined,- }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.defaultValue).toBe('keep');- });- });-- describe('localStorage merge', () => {- it('applies localStorage selectedValue over DB value', () => {- const { transformDashboardVariables } = setupHook({- env: { selectedValue: 'staging', allSelected: false },- });- const dashboard = makeDashboard({- v1: makeVariable({ id: 'id1', name: 'env', selectedValue: 'prod' }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.selectedValue).toBe('staging');- });-- it('applies localStorage allSelected over DB value', () => {- const { transformDashboardVariables } = setupHook({- env: { selectedValue: undefined, allSelected: true },- });- const dashboard = makeDashboard({- v1: makeVariable({- id: 'id1',- name: 'env',- allSelected: false,- showALLOption: true,- }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.allSelected).toBe(true);- });- });-- describe('URL variable override', () => {- it('sets allSelected=true when URL value is __ALL__', () => {- const { transformDashboardVariables } = setupHook(- { env: { selectedValue: 'prod', allSelected: false } },- { env: '__ALL__' },- );- const dashboard = makeDashboard({- v1: makeVariable({- id: 'id1',- name: 'env',- showALLOption: true,- allSelected: false,- }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.allSelected).toBe(true);- });-- it('sets selectedValue from URL and clears allSelected when showALLOption is true', () => {- const { transformDashboardVariables } = setupHook(- { env: { selectedValue: undefined, allSelected: true } },- { env: 'dev' },- );- const dashboard = makeDashboard({- v1: makeVariable({- id: 'id1',- name: 'env',- showALLOption: true,- allSelected: true,- multiSelect: false,- }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.selectedValue).toBe('dev');- expect(result.data.variables!.v1.allSelected).toBe(false);- });-- it('does not set allSelected=false when showALLOption is false', () => {- const { transformDashboardVariables } = setupHook(- { env: { selectedValue: undefined, allSelected: true } },- { env: 'dev' },- );- const dashboard = makeDashboard({- v1: makeVariable({- id: 'id1',- name: 'env',- showALLOption: false,- allSelected: true,- multiSelect: false,- }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.selectedValue).toBe('dev');- expect(result.data.variables!.v1.allSelected).toBe(true);- });-- it('normalizes array URL value to single value for single-select variable', () => {- const { transformDashboardVariables } = setupHook(- {},- { env: ['prod', 'dev'] },- );- const dashboard = makeDashboard({- v1: makeVariable({- id: 'id1',- name: 'env',- multiSelect: false,- }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.selectedValue).toBe('prod');- });-- it('wraps single URL value in array for multi-select variable', () => {- const { transformDashboardVariables } = setupHook({}, { env: 'prod' });- const dashboard = makeDashboard({- v1: makeVariable({- id: 'id1',- name: 'env',- multiSelect: true,- }),- });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.selectedValue).toStrictEqual(['prod']);- });-- it('looks up URL variable by variable id when name is absent', () => {- const { transformDashboardVariables } = setupHook(- {},- { 'var-uuid': 'fallback' },- );- const variable = makeVariable({ id: 'var-uuid', multiSelect: false });- delete variable.name;- const dashboard = makeDashboard({ v1: variable });-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables!.v1.selectedValue).toBe('fallback');- });- });-- describe('edge cases', () => {- it('returns data unchanged when there are no variables', () => {- const { transformDashboardVariables } = setupHook();- const dashboard = makeDashboard({});-- const result = transformDashboardVariables(dashboard);-- expect(result.data.variables).toStrictEqual({});- });-- it('does not mutate the original dashboard', () => {- const { transformDashboardVariables } = setupHook({- env: { selectedValue: 'staging', allSelected: false },- });- const dashboard = makeDashboard({- v1: makeVariable({ id: 'id1', name: 'env', selectedValue: 'prod' }),- });- const originalValue = dashboard.data.variables!.v1.selectedValue;-- transformDashboardVariables(dashboard);-- expect(dashboard.data.variables!.v1.selectedValue).toBe(originalValue);- });- });-});diff --git a/frontend/src/hooks/dashboard/__test__/useVariablesFromUrl.test.tsx b/frontend/src/hooks/dashboard/__test__/useVariablesFromUrl.test.tsxdeleted file mode 100644index 40b8300fd7..0000000000--- a/frontend/src/hooks/dashboard/__test__/useVariablesFromUrl.test.tsx+++ /dev/null@@ -1,288 +0,0 @@-import { Router } from 'react-router-dom';-import { act, renderHook } from '@testing-library/react';-import { QueryParams } from 'constants/query';-import { createMemoryHistory } from 'history';-import { IDashboardVariable } from 'types/api/dashboard/getAll';--import useVariablesFromUrl, {- LocalStoreDashboardVariables,-} from '../useVariablesFromUrl';--describe('useVariablesFromUrl', () => {- it('should initialize with empty variables when no URL params exist', () => {- const history = createMemoryHistory({- initialEntries: ['/'],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- expect(result.current.getUrlVariables()).toStrictEqual({});- });-- it('should correctly parse variables from URL', () => {- const mockVariables = {- var1: 'value1',- var2: ['value2', 'value3'],- var3: 123,- };-- const encodedVariables = encodeURIComponent(JSON.stringify(mockVariables));- const history = createMemoryHistory({- initialEntries: [`/?${QueryParams.variables}=${encodedVariables}`],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- expect(result.current.getUrlVariables()).toStrictEqual(mockVariables);- });-- it('should handle malformed URL parameters gracefully', () => {- const history = createMemoryHistory({- initialEntries: [`/?${QueryParams.variables}=invalid-json`],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- // Should return empty object when JSON parsing fails- expect(result.current.getUrlVariables()).toStrictEqual({});- });-- it('should set variables to URL correctly', () => {- const history = createMemoryHistory({- initialEntries: ['/'],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- const mockVariables: LocalStoreDashboardVariables = {- var1: 'value1',- var2: ['value2', 'value3'],- };-- act(() => {- result.current.setUrlVariables(mockVariables);- });-- // Check if the URL was updated correctly- const searchParams = new URLSearchParams(history.location.search);- const urlVariables = searchParams.get(QueryParams.variables);-- expect(urlVariables).toBeTruthy();- expect(JSON.parse(decodeURIComponent(urlVariables || ''))).toStrictEqual(- mockVariables,- );- });-- it('should remove variables param from URL when empty object is provided', () => {- const mockVariables = {- var1: 'value1',- var2: ['value2', 'value3'],- };-- const encodedVariables = encodeURIComponent(JSON.stringify(mockVariables));- const history = createMemoryHistory({- initialEntries: [`/?${QueryParams.variables}=${encodedVariables}`],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- act(() => {- result.current.setUrlVariables({});- });-- // Check if the URL param was removed- const searchParams = new URLSearchParams(history.location.search);- expect(searchParams.has(QueryParams.variables)).toBe(false);- });-- it('should update a specific variable correctly', () => {- const initialVariables = {- var1: 'value1',- var2: ['value2', 'value3'],- };-- const encodedVariables = encodeURIComponent(JSON.stringify(initialVariables));- const history = createMemoryHistory({- initialEntries: [`/?${QueryParams.variables}=${encodedVariables}`],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- const newValue: IDashboardVariable['selectedValue'] = 'updated-value';-- act(() => {- result.current.updateUrlVariable('var1', newValue);- });-- // Check if only the specified variable was updated- const updatedVariables = result.current.getUrlVariables();- expect(updatedVariables.var1).toStrictEqual(newValue);- expect(updatedVariables.var2).toStrictEqual(initialVariables.var2);- });-- it('should preserve other URL parameters when updating variables', () => {- const history = createMemoryHistory({- initialEntries: ['/?otherParam=value'],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- const mockVariables: LocalStoreDashboardVariables = {- var1: 'value1',- };-- act(() => {- result.current.setUrlVariables(mockVariables);- });-- // Check if other params are preserved- const searchParams = new URLSearchParams(history.location.search);- expect(searchParams.get('otherParam')).toBe('value');- expect(searchParams.has(QueryParams.variables)).toBe(true);- });-- it('should handle different variable value types correctly', () => {- const mockVariables: LocalStoreDashboardVariables = {- stringVar: 'production',- numberVar: 123,- booleanVar: true,- arrayVar: ['service1', 'service2'],- mixedArrayVar: ['string', 456, false],- nullVar: null,- };-- const encodedVariables = encodeURIComponent(JSON.stringify(mockVariables));- const history = createMemoryHistory({- initialEntries: [`/?${QueryParams.variables}=${encodedVariables}`],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- const urlVariables = result.current.getUrlVariables();- expect(urlVariables.stringVar).toBe('production');- expect(urlVariables.numberVar).toBe(123);- expect(urlVariables.booleanVar).toBe(true);- expect(urlVariables.arrayVar).toStrictEqual(['service1', 'service2']);- expect(urlVariables.mixedArrayVar).toStrictEqual(['string', 456, false]);- expect(urlVariables.nullVar).toBeNull();- });-- it('should handle edge cases in URL variable parsing', () => {- const edgeCaseVariables = {- emptyString: '',- emptyArray: [],- singleItemArray: ['solo'],- };-- const encodedVariables = encodeURIComponent(- JSON.stringify(edgeCaseVariables),- );- const history = createMemoryHistory({- initialEntries: [`/?${QueryParams.variables}=${encodedVariables}`],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- const urlVariables = result.current.getUrlVariables();- expect(urlVariables.emptyString).toBe('');- expect(urlVariables.emptyArray).toStrictEqual([]);- expect(urlVariables.singleItemArray).toStrictEqual(['solo']);- expect(urlVariables.undefinedVar).toBeUndefined();- });-- it('should return empty object when URL param contains a bare % that makes decodeURIComponent throw', () => {- // Simulate a URL where the variables param is a raw JSON string containing a literal %- // (e.g. a metric value like "cpu_usage_50%"). URLSearchParams.get() returns the value- // as-is when it was set directly; if it contains a bare %, decodeURIComponent throws a URIError.- const rawJson = JSON.stringify({ threshold: '50%' });- const history = createMemoryHistory({- initialEntries: [`/?${QueryParams.variables}=${rawJson}`],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- // Should parse successfully via the raw fallback, not throw or return {}- const vars = result.current.getUrlVariables();- expect(vars).toStrictEqual({ threshold: '50%' });- });-- it('should return empty object when URL param is completely unparseable', () => {- // A value that fails both decodeURIComponent and JSON.parse- const history = createMemoryHistory({- initialEntries: [`/?${QueryParams.variables}=not-json-%ZZ`],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- expect(result.current.getUrlVariables()).toStrictEqual({});- });-- it('should update variables with array values correctly', () => {- const history = createMemoryHistory({- initialEntries: ['/'],- });-- const { result } = renderHook(() => useVariablesFromUrl(), {- wrapper: ({ children }: { children: React.ReactNode }) => (- <Router history={history}>{children}</Router>- ),- });-- const arrayValue: IDashboardVariable['selectedValue'] = [- 'value1',- 'value2',- 'value3',- ];-- act(() => {- result.current.updateUrlVariable('multiSelectVar', arrayValue);- });-- const updatedVariables = result.current.getUrlVariables();- expect(updatedVariables.multiSelectVar).toStrictEqual(arrayValue);- });-});diff --git a/frontend/src/hooks/dashboard/useDashboardBootstrap.test.tsx b/frontend/src/hooks/dashboard/useDashboardBootstrap.test.tsxdeleted file mode 100644index 3af856d84d..0000000000--- a/frontend/src/hooks/dashboard/useDashboardBootstrap.test.tsx+++ /dev/null@@ -1,158 +0,0 @@-import { act, render } from '@testing-library/react';-import { Modal } from 'antd';-import { useDashboardBootstrap } from 'hooks/dashboard/useDashboardBootstrap';-import { useTransformDashboardVariables } from 'hooks/dashboard/useTransformDashboardVariables';-import useTabVisibility from 'hooks/useTabFocus';-import { getMinMaxForSelectedTime } from 'lib/getMinMax';-import { useDashboardStore } from 'providers/Dashboard/store/useDashboardStore';-import { useDashboardQuery } from './useDashboardQuery';--const mockDispatch = jest.fn();-const mockSetDashboardData = jest.fn();-const mockSetLayouts = jest.fn();-const mockSetPanelMap = jest.fn();-const mockResetDashboardStore = jest.fn();-const mockGetUrlVariables = jest.fn();-const mockUpdateUrlVariable = jest.fn();-const mockRefetch = jest.fn();--let mockGlobalTime = {- selectedTime: 'custom',- minTime: 1710000000000000000,- maxTime: 1710000300000000000,- isAutoRefreshDisabled: true,-};--let currentQueryData: unknown;--jest.mock('react-i18next', () => ({- useTranslation: (): { t: (key: string) => string } => ({- t: (key: string): string => key,- }),-}));--jest.mock('react-redux', () => ({- useDispatch: jest.fn(() => mockDispatch),- useSelector: jest.fn(- (- selectorFn: (state: { globalTime: typeof mockGlobalTime }) => unknown,- ): unknown => selectorFn({ globalTime: mockGlobalTime }),- ),-}));--jest.mock('hooks/useTabFocus', () => jest.fn(() => true));-jest.mock('hooks/dashboard/useDashboardVariablesSync', () => ({- useDashboardVariablesSync: jest.fn(),-}));-jest.mock('./useDashboardQuery', () => ({- useDashboardQuery: jest.fn(),-}));-jest.mock('hooks/dashboard/useTransformDashboardVariables', () => ({- useTransformDashboardVariables: jest.fn(),-}));-jest.mock('providers/Dashboard/store/useDashboardStore', () => ({- useDashboardStore: jest.fn(),-}));-jest.mock('providers/Dashboard/initializeDefaultVariables', () => ({- initializeDefaultVariables: jest.fn(),-}));-jest.mock('lib/dashboard/getUpdatedLayout', () => ({- getUpdatedLayout: jest.fn(() => []),-}));-jest.mock('providers/Dashboard/util', () => ({- sortLayout: jest.fn((layout) => layout),-}));-jest.mock('lib/getMinMax', () => ({- getMinMaxForSelectedTime: jest.fn(),-}));--function TestComponent({ confirm }: { confirm: typeof Modal.confirm }): null {- useDashboardBootstrap('dashboard-1', { confirm });- return null;-}--describe('useDashboardBootstrap', () => {- beforeEach(() => {- jest.clearAllMocks();-- mockGlobalTime = {- selectedTime: 'custom',- minTime: 1710000000000000000,- maxTime: 1710000300000000000,- isAutoRefreshDisabled: true,- };-- jest.mocked(useDashboardStore as unknown as jest.Mock).mockReturnValue({- setDashboardData: mockSetDashboardData,- setLayouts: mockSetLayouts,- setPanelMap: mockSetPanelMap,- resetDashboardStore: mockResetDashboardStore,- });-- jest- .mocked(useTransformDashboardVariables as unknown as jest.Mock)- .mockReturnValue({- getUrlVariables: mockGetUrlVariables,- updateUrlVariable: mockUpdateUrlVariable,- transformDashboardVariables: <T,>(data: T): T => data,- });-- jest.mocked(useTabVisibility as unknown as jest.Mock).mockReturnValue(true);- jest- .mocked(useDashboardQuery as unknown as jest.Mock)- .mockImplementation(() => ({- data: currentQueryData,- isLoading: false,- isError: false,- isFetching: false,- error: null,- refetch: mockRefetch,- }));- });-- it('keeps minTime and maxTime unchanged for custom range on refresh confirm', () => {- const initialDashboard = {- id: 'dashboard-1',- updatedAt: '2024-01-01T00:00:00.000Z',- data: { layout: [], panelMap: {}, variables: {} },- };-- const updatedDashboard = {- id: 'dashboard-1',- updatedAt: '2024-01-01T01:00:00.000Z',- data: { layout: [], panelMap: {}, variables: {} },- };-- const mockConfirm = jest.fn<- ReturnType<typeof Modal.confirm>,- Parameters<typeof Modal.confirm>- >(() => ({ destroy: jest.fn(), update: jest.fn() }));-- currentQueryData = { data: initialDashboard };- const { rerender } = render(<TestComponent confirm={mockConfirm} />);-- expect(mockConfirm).not.toHaveBeenCalled();-- currentQueryData = { data: updatedDashboard };- rerender(<TestComponent confirm={mockConfirm} />);-- expect(mockConfirm).toHaveBeenCalledTimes(1);- const firstCall = mockConfirm.mock.calls[0];- expect(firstCall).toBeDefined();- const [confirmProps] = firstCall as Parameters<typeof Modal.confirm>;-- act(() => {- confirmProps.onOk?.();- });-- expect(getMinMaxForSelectedTime).not.toHaveBeenCalled();- expect(mockDispatch).toHaveBeenCalledWith({- type: 'UPDATE_TIME_INTERVAL',- payload: {- selectedTime: 'custom',- minTime: mockGlobalTime.minTime,- maxTime: mockGlobalTime.maxTime,- },- });- });-});diff --git a/frontend/src/hooks/dashboard/useDashboardBootstrap.ts b/frontend/src/hooks/dashboard/useDashboardBootstrap.tsdeleted file mode 100644index 3c123f6f7f..0000000000--- a/frontend/src/hooks/dashboard/useDashboardBootstrap.ts+++ /dev/null@@ -1,165 +0,0 @@-import { useEffect, useRef } from 'react';-import { useTranslation } from 'react-i18next';-// eslint-disable-next-line no-restricted-imports-import { useDispatch, useSelector } from 'react-redux';-import { Modal } from 'antd';-import dayjs from 'dayjs';-import { useTransformDashboardVariables } from 'hooks/dashboard/useTransformDashboardVariables';-import useTabVisibility from 'hooks/useTabFocus';-import { getUpdatedLayout } from 'lib/dashboard/getUpdatedLayout';-import { getMinMaxForSelectedTime } from 'lib/getMinMax';-import { defaultTo } from 'lodash-es';-import { initializeDefaultVariables } from 'providers/Dashboard/initializeDefaultVariables';-import { useDashboardStore } from 'providers/Dashboard/store/useDashboardStore';-import { sortLayout } from 'providers/Dashboard/util';-// eslint-disable-next-line no-restricted-imports-import { Dispatch } from 'redux';-import { AppState } from 'store/reducers';-import AppActions from 'types/actions';-import { UPDATE_TIME_INTERVAL } from 'types/actions/globalTime';-import { Dashboard } from 'types/api/dashboard/getAll';-import { GlobalReducer } from 'types/reducer/globalTime';--import { useDashboardQuery } from './useDashboardQuery';-import { useDashboardVariablesSync } from './useDashboardVariablesSync';--interface UseDashboardBootstrapOptions {- /** Pass `onModal.confirm` from `Modal.useModal()` to get theme-aware modals. Falls back to static `Modal.confirm`. */- confirm?: typeof Modal.confirm;-}--export interface UseDashboardBootstrapReturn {- isLoading: boolean;- isError: boolean;- isFetching: boolean;- error: unknown;-}--export function useDashboardBootstrap(- dashboardId: string,- options: UseDashboardBootstrapOptions = {},-): UseDashboardBootstrapReturn {- const confirm = options.confirm ?? Modal.confirm;-- const { t } = useTranslation(['dashboard']);- const dispatch = useDispatch<Dispatch<AppActions>>();- const globalTime = useSelector<AppState, GlobalReducer>(- (state) => state.globalTime,- );-- const { setDashboardData, setLayouts, setPanelMap, resetDashboardStore } =- useDashboardStore();-- const dashboardRef = useRef<Dashboard>();- const modalRef = useRef<ReturnType<typeof Modal.confirm>>();-- const isVisible = useTabVisibility();-- const { getUrlVariables, updateUrlVariable, transformDashboardVariables } =- useTransformDashboardVariables(dashboardId);-- // Keep the external variables store in sync with dashboardData- useDashboardVariablesSync(dashboardId);-- const dashboardQuery = useDashboardQuery(dashboardId);-- // Handle new dashboard data: initialize on first load, detect changes on subsequent fetches.- // React Query's structural sharing means this effect only fires when data actually changes.- useEffect(() => {- if (!dashboardQuery.data?.data) {- return;- }-- const updatedDashboardData = transformDashboardVariables(- dashboardQuery.data.data,- );- const updatedDate = dayjs(updatedDashboardData?.updatedAt);-- // First load: initialize store and URL variables, then return- if (!dashboardRef.current) {- const variables = updatedDashboardData?.data?.variables;- if (variables) {- initializeDefaultVariables(variables, getUrlVariables, updateUrlVariable);- }- setDashboardData(updatedDashboardData);- dashboardRef.current = updatedDashboardData;- setLayouts(sortLayout(getUpdatedLayout(updatedDashboardData?.data.layout)));- setPanelMap(defaultTo(updatedDashboardData?.data?.panelMap, {}));- return;- }-- // Subsequent fetches: skip if updatedAt hasn't advanced- if (!updatedDate.isAfter(dayjs(dashboardRef.current.updatedAt))) {- return;- }-- // Data has changed: prompt user if tab is visible- if (isVisible && dashboardRef.current.id === updatedDashboardData?.id) {- const modal = confirm({- centered: true,- title: t('dashboard_has_been_updated'),- content: t('do_you_want_to_refresh_the_dashboard'),- onOk() {- setDashboardData(updatedDashboardData);-- const { maxTime, minTime } =- globalTime.selectedTime === 'custom'- ? {- // For custom ranges, min/max are already stored in nanoseconds.- // Recomputing via getMinMaxForSelectedTime would multiply them again.- maxTime: globalTime.maxTime,- minTime: globalTime.minTime,- }- : getMinMaxForSelectedTime(- globalTime.selectedTime,- globalTime.minTime,- globalTime.maxTime,- );- dispatch({- type: UPDATE_TIME_INTERVAL,- payload: { maxTime, minTime, selectedTime: globalTime.selectedTime },- });-- dashboardRef.current = updatedDashboardData;- setLayouts(- sortLayout(getUpdatedLayout(updatedDashboardData?.data.layout)),- );- setPanelMap(defaultTo(updatedDashboardData?.data.panelMap, {}));- },- });- modalRef.current = modal;- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [dashboardQuery.data]);-- // Refetch when tab becomes visible (after initial load)- useEffect(() => {- if (isVisible && dashboardRef.current && !!dashboardId) {- dashboardQuery.refetch();- }- // eslint-disable-next-line react-hooks/exhaustive-deps- }, [isVisible]);-- // Dismiss stale modal when tab is hidden- useEffect(() => {- if (!isVisible && modalRef.current) {- modalRef.current.destroy();- }- }, [isVisible]);-- // Reset store on unmount so stale state doesn't bleed across dashboards- useEffect(- () => (): void => {- resetDashboardStore();- },- // eslint-disable-next-line react-hooks/exhaustive-deps- [],- );-- return {- isLoading: dashboardQuery.isLoading,- isError: dashboardQuery.isError,- isFetching: dashboardQuery.isFetching,- error: dashboardQuery.error,- };-}diff --git a/frontend/src/hooks/dashboard/useDashboardCursorSyncMode.ts b/frontend/src/hooks/dashboard/useDashboardCursorSyncMode.tsindex 527deda270..0536ead914 100644--- a/frontend/src/hooks/dashboard/useDashboardCursorSyncMode.ts+++ b/frontend/src/hooks/dashboard/useDashboardCursorSyncMode.ts@@ -1,7 +1,7 @@import { DashboardCursorSync } from 'lib/uPlotV2/plugins/TooltipPlugin/types';import { useDashboardPreference } from './useDashboardPreference';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';const NOOP = (): void => {};diff --git a/frontend/src/hooks/dashboard/useDashboardFromLocalStorage.ts b/frontend/src/hooks/dashboard/useDashboardFromLocalStorage.tsdeleted file mode 100644index 857547f386..0000000000--- a/frontend/src/hooks/dashboard/useDashboardFromLocalStorage.ts+++ /dev/null@@ -1,69 +0,0 @@-import getLocalStorageKey from 'api/browser/localstorage/get';-import setLocalStorageKey from 'api/browser/localstorage/set';-import { LOCALSTORAGE } from 'constants/localStorage';-import { IDashboardVariable } from 'types/api/dashboard/getAll';--export interface LocalStoreDashboardVariables {- [id: string]: {- selectedValue: IDashboardVariable['selectedValue'];- allSelected: boolean;- };-}--interface DashboardLocalStorageVariables {- [id: string]: LocalStoreDashboardVariables;-}--function readAll(): DashboardLocalStorageVariables {- const raw = getLocalStorageKey(LOCALSTORAGE.DASHBOARD_VARIABLES);- if (!raw) {- return {};- }- try {- return JSON.parse(raw);- } catch {- console.error('Failed to parse dashboard variables from local storage');- return {};- }-}--function writeAll(data: DashboardLocalStorageVariables): void {- try {- setLocalStorageKey(LOCALSTORAGE.DASHBOARD_VARIABLES, JSON.stringify(data));- } catch {- console.error('Failed to set dashboard variables in local storage');- }-}--/** Read the saved variable selections for a dashboard from localStorage. */-export function getLocalStorageDashboardVariables(- dashboardId: string,-): LocalStoreDashboardVariables {- return readAll()[dashboardId] ?? {};-}--/**- * Write one variable's selection for a dashboard to localStorage.- * All call sites write to the same store with no React state coordination.- */-export function updateLocalStorageDashboardVariable(- dashboardId: string,- id: string,- selectedValue: IDashboardVariable['selectedValue'],- allSelected: boolean,- isDynamic?: boolean,-): void {- const all = readAll();- all[dashboardId] = {- ...(all[dashboardId] ?? {}),- [id]:- isDynamic && allSelected- ? {- selectedValue:- undefined as unknown as IDashboardVariable['selectedValue'],- allSelected: true,- }- : { selectedValue, allSelected },- };- writeAll(all);-}diff --git a/frontend/src/hooks/dashboard/useDashboardQuery.ts b/frontend/src/hooks/dashboard/useDashboardQuery.tsdeleted file mode 100644index e8805276d9..0000000000--- a/frontend/src/hooks/dashboard/useDashboardQuery.ts+++ /dev/null@@ -1,49 +0,0 @@-import { useQuery, UseQueryResult } from 'react-query';-// eslint-disable-next-line no-restricted-imports-import { useSelector } from 'react-redux';-import getDashboard from 'api/v1/dashboards/id/get';-import {- DASHBOARD_CACHE_TIME,- DASHBOARD_CACHE_TIME_ON_REFRESH_ENABLED,-} from 'constants/queryCacheTime';-import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';-import { useAppContext } from 'providers/App/App';-import { useErrorModal } from 'providers/ErrorModalProvider';-import { AppState } from 'store/reducers';-import { SuccessResponseV2 } from 'types/api';-import { Dashboard } from 'types/api/dashboard/getAll';-import APIError from 'types/api/error';-import { GlobalReducer } from 'types/reducer/globalTime';--/**- * Fetches a dashboard by ID. Handles auth gating, cache time based on- * auto-refresh setting, and surfaces API errors via the error modal.- */-export function useDashboardQuery(- dashboardId: string,-): UseQueryResult<SuccessResponseV2<Dashboard>> {- const { isLoggedIn } = useAppContext();- const { showErrorModal } = useErrorModal();- const globalTime = useSelector<AppState, GlobalReducer>(- (state) => state.globalTime,- );-- return useQuery(- [- REACT_QUERY_KEY.DASHBOARD_BY_ID,- dashboardId,- globalTime.isAutoRefreshDisabled,- ],- {- enabled: !!dashboardId && isLoggedIn,- queryFn: () => getDashboard({ id: dashboardId }),- refetchOnWindowFocus: false,- cacheTime: globalTime.isAutoRefreshDisabled- ? DASHBOARD_CACHE_TIME- : DASHBOARD_CACHE_TIME_ON_REFRESH_ENABLED,- onError: (error) => {- showErrorModal(error as APIError);- },- },- );-}diff --git a/frontend/src/hooks/dashboard/useDashboardVariablesByType.ts b/frontend/src/hooks/dashboard/useDashboardVariablesByType.tsindex 7d1898c56b..86f1f479f7 100644--- a/frontend/src/hooks/dashboard/useDashboardVariablesByType.ts+++ b/frontend/src/hooks/dashboard/useDashboardVariablesByType.ts@@ -2,7 +2,7 @@ import { useMemo } from 'react';import {IDashboardVariable,TVariableQueryType,-} from 'types/api/dashboard/getAll';+} from 'types/api/dashboard/variables';import { useDashboardVariables } from './useDashboardVariables';diff --git a/frontend/src/hooks/dashboard/useDashboardVariablesSync.ts b/frontend/src/hooks/dashboard/useDashboardVariablesSync.tsdeleted file mode 100644index 27d8d79513..0000000000--- a/frontend/src/hooks/dashboard/useDashboardVariablesSync.ts+++ /dev/null@@ -1,33 +0,0 @@-import { useEffect } from 'react';-import isEqual from 'lodash-es/isEqual';-import {- setDashboardVariablesStore,- updateDashboardVariablesStore,-} from 'providers/Dashboard/store/dashboardVariables/dashboardVariablesStore';-import {- DashboardStore,- useDashboardStore,-} from 'providers/Dashboard/store/useDashboardStore';--import { useDashboardVariablesSelector } from './useDashboardVariables';--/**- * Keeps the external variables store in sync with the zustand dashboard store.- * When dashboardData changes, propagates variable updates to the variables store.- */-export function useDashboardVariablesSync(dashboardId: string): void {- const dashboardVariables = useDashboardVariablesSelector((s) => s.variables);- const savedDashboardId = useDashboardVariablesSelector((s) => s.dashboardId);- const dashboardData = useDashboardStore(- (s: DashboardStore) => s.dashboardData,- );-- useEffect(() => {- const updatedVariables = dashboardData?.data.variables || {};- if (savedDashboardId !== dashboardId) {- setDashboardVariablesStore({ dashboardId, variables: updatedVariables });- } else if (!isEqual(dashboardVariables, updatedVariables)) {- updateDashboardVariablesStore({ dashboardId, variables: updatedVariables });- }- }, [dashboardData]); // eslint-disable-line react-hooks/exhaustive-deps-}diff --git a/frontend/src/hooks/dashboard/useGetExportToDashboardLink.ts b/frontend/src/hooks/dashboard/useGetExportToDashboardLink.tsindex 3d4a1aaaf5..9734131b50 100644--- a/frontend/src/hooks/dashboard/useGetExportToDashboardLink.ts+++ b/frontend/src/hooks/dashboard/useGetExportToDashboardLink.ts@@ -1,6 +1,6 @@import { useCallback } from 'react';import type { PANEL_TYPES } from 'constants/queryBuilder';-import { buildExportPanelLink } from 'pages/DashboardPageV2/DashboardContainer/PanelEditor/newPanelRoute';+import { buildExportPanelLink } from 'pages/DashboardPage/DashboardContainer/PanelEditor/newPanelRoute';import type { Query } from 'types/api/queryBuilder/queryBuilderData';interface ExportToDashboardLinkParams {diff --git a/frontend/src/hooks/dashboard/useGetResolvedPublicDashboard.ts b/frontend/src/hooks/dashboard/useGetResolvedPublicDashboard.tsindex 0d8334730a..558b9df582 100644--- a/frontend/src/hooks/dashboard/useGetResolvedPublicDashboard.ts+++ b/frontend/src/hooks/dashboard/useGetResolvedPublicDashboard.ts@@ -1,14 +1,13 @@import { getPublicDashboardDataV2 } from 'api/generated/services/dashboard';import { DashboardtypesGettablePublicDashboardDataV2DTO } from 'api/generated/services/sigNoz.schemas';-import getPublicDashboardDataAPI from 'api/dashboard/public/getPublicDashboardData';import { AxiosError, isAxiosError } from 'axios';import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';import { useQuery, UseQueryResult } from 'react-query';import { ErrorV2Resp } from 'types/api';-import { PublicDashboardDataProps } from 'types/api/dashboard/public/get';export enum PublicDashboardSchema {- V1 = 'v1',+ /** Stored data never migrated to v6 — there is no v2 spec to render. */+ Legacy = 'legacy',V2 = 'v2',}@@ -17,9 +16,10 @@ export type ResolvedPublicDashboard =schema: PublicDashboardSchema.V2;data: DashboardtypesGettablePublicDashboardDataV2DTO;}- | { schema: PublicDashboardSchema.V1; data: PublicDashboardDataProps };+ | { schema: PublicDashboardSchema.Legacy };-// The v2 endpoint rejects non-v6 rows with this code — our signal that it's a v1 dashboard.+// The v2 endpoint rejects non-v6 rows with this code — our signal that the dashboard+// predates the v2 migration.const V2_SCHEMA_MISMATCH_CODE = 'dashboard_invalid_data';function isV2SchemaMismatch(error: unknown): boolean {@@ -30,8 +30,8 @@ function isV2SchemaMismatch(error: unknown): boolean {return response?.data?.error?.code === V2_SCHEMA_MISMATCH_CODE;}-// Probe v2 first, fall back to v1 only on a schema mismatch. v1-first is unsafe: it 200s for a-// v2 dashboard with queries un-redacted. Other v2 errors re-throw rather than mis-render as v1.+// Only a schema mismatch means "legacy"; every other v2 error propagates so the page shows+// its unavailable state rather than implying the dashboard just needs re-migrating.async function resolvePublicDashboard(id: string,): Promise<ResolvedPublicDashboard> {@@ -42,8 +42,7 @@ async function resolvePublicDashboard(if (!isV2SchemaMismatch(error)) {throw error;}- const v1 = await getPublicDashboardDataAPI({ id });- return { schema: PublicDashboardSchema.V1, data: v1.data };+ return { schema: PublicDashboardSchema.Legacy };}}diff --git a/frontend/src/hooks/dashboard/useTransformDashboardVariables.ts b/frontend/src/hooks/dashboard/useTransformDashboardVariables.tsdeleted file mode 100644index e1692bb8c3..0000000000--- a/frontend/src/hooks/dashboard/useTransformDashboardVariables.ts+++ /dev/null@@ -1,122 +0,0 @@-import { ALL_SELECTED_VALUE } from 'components/NewSelect/utils';-import { getLocalStorageDashboardVariables } from 'hooks/dashboard/useDashboardFromLocalStorage';-import useVariablesFromUrl, {- UseVariablesFromUrlReturn,-} from 'hooks/dashboard/useVariablesFromUrl';-import { isEmpty } from 'lodash-es';-import { normalizeUrlValueForVariable } from 'providers/Dashboard/normalizeUrlValue';-import { Dashboard, IDashboardVariable } from 'types/api/dashboard/getAll';-import { v4 as generateUUID } from 'uuid';--export function useTransformDashboardVariables(dashboardId: string): Pick<- UseVariablesFromUrlReturn,- 'getUrlVariables' | 'updateUrlVariable'-> & {- transformDashboardVariables: (data: Dashboard) => Dashboard;- currentDashboard: ReturnType<typeof getLocalStorageDashboardVariables>;-} {- const { getUrlVariables, updateUrlVariable } = useVariablesFromUrl();-- const mergeDBWithLocalStorage = (- data: Dashboard,- localStorageVariables: any,- ): Dashboard => {- const updatedData = data;- const variables = data?.data?.variables;- if (data && localStorageVariables && variables) {- const updatedVariables = variables;- const variablesFromUrl = getUrlVariables();- Object.keys(variables).forEach((variable) => {- const variableData = variables[variable];-- // values from url- const urlVariable = variableData?.name- ? variablesFromUrl[variableData?.name] || variablesFromUrl[variableData.id]- : variablesFromUrl[variableData.id];-- let updatedVariable = {- ...variables[variable],- ...localStorageVariables[variableData.name as any],- };-- // respect the url variable if it is set, override the others- if (!isEmpty(urlVariable)) {- if (urlVariable === ALL_SELECTED_VALUE) {- updatedVariable = {- ...updatedVariable,- allSelected: true,- };- } else {- // Normalize URL value to match variable's multiSelect configuration- const normalizedValue = normalizeUrlValueForVariable(- urlVariable,- variableData,- );-- updatedVariable = {- ...updatedVariable,- selectedValue: normalizedValue,- // Only set allSelected to false if showALLOption is available- ...(updatedVariable?.showALLOption && { allSelected: false }),- };- }- }-- updatedVariables[variable] = updatedVariable;- });- updatedData.data.variables = updatedVariables;- }- return updatedData;- };-- // As we do not have order and ID's in the variables object, we have to process variables to add order and ID if they do not exist in the variables object- // eslint-disable-next-line sonarjs/cognitive-complexity- const transformDashboardVariables = (data: Dashboard): Dashboard => {- if (data && data.data && data.data.variables) {- const clonedDashboardData = mergeDBWithLocalStorage(- JSON.parse(JSON.stringify(data)),- getLocalStorageDashboardVariables(dashboardId),- );- const { variables } = clonedDashboardData.data;- const existingOrders: Set<number> = new Set();-- for (const key in variables) {- // eslint-disable-next-line no-prototype-builtins- if (variables.hasOwnProperty(key)) {- const variable: IDashboardVariable = variables[key];-- // Check if 'order' property doesn't exist or is undefined- if (variable.order === undefined) {- // Find a unique order starting from 0- let order = 0;- while (existingOrders.has(order)) {- order += 1;- }-- variable.order = order;- existingOrders.add(order);- // ! BWC - Specific case for backward compatibility where textboxValue was used instead of defaultValue- if (variable.type === 'TEXTBOX' && !variable.defaultValue) {- variable.defaultValue = variable.textboxValue || '';- }- }-- if (variable.id === undefined) {- variable.id = generateUUID();- }- }- }-- return clonedDashboardData;- }-- return data;- };-- return {- transformDashboardVariables,- getUrlVariables,- updateUrlVariable,- currentDashboard: getLocalStorageDashboardVariables(dashboardId),- };-}diff --git a/frontend/src/hooks/dashboard/useUpdateDashboard.tsx b/frontend/src/hooks/dashboard/useUpdateDashboard.tsxdeleted file mode 100644index 750bf8b950..0000000000--- a/frontend/src/hooks/dashboard/useUpdateDashboard.tsx+++ /dev/null@@ -1,23 +0,0 @@-import { useMutation, UseMutationResult } from 'react-query';-import update from 'api/v1/dashboards/id/update';-import { useErrorModal } from 'providers/ErrorModalProvider';-import { SuccessResponseV2 } from 'types/api';-import { Dashboard } from 'types/api/dashboard/getAll';-import { Props } from 'types/api/dashboard/update';-import APIError from 'types/api/error';--export const useUpdateDashboard = (): UseUpdateDashboard => {- const { showErrorModal } = useErrorModal();- return useMutation(update, {- onError: (error) => {- showErrorModal(error);- },- });-};--type UseUpdateDashboard = UseMutationResult<- SuccessResponseV2<Dashboard>,- APIError,- Props,- unknown->;diff --git a/frontend/src/hooks/dashboard/useVariablesFromUrl.tsx b/frontend/src/hooks/dashboard/useVariablesFromUrl.tsxdeleted file mode 100644index c263c6c3f5..0000000000--- a/frontend/src/hooks/dashboard/useVariablesFromUrl.tsx+++ /dev/null@@ -1,98 +0,0 @@-import { useCallback } from 'react';-import { useHistory } from 'react-router-dom';-import * as Sentry from '@sentry/react';-import { QueryParams } from 'constants/query';-import useUrlQuery from 'hooks/useUrlQuery';-import { IDashboardVariable } from 'types/api/dashboard/getAll';--export interface LocalStoreDashboardVariables {- [name: string]:- | IDashboardVariable['selectedValue'][]- | IDashboardVariable['selectedValue'];-}--export interface UseVariablesFromUrlReturn {- getUrlVariables: () => LocalStoreDashboardVariables;- setUrlVariables: (variables: LocalStoreDashboardVariables) => void;- updateUrlVariable: (- name: string,- selectedValue: IDashboardVariable['selectedValue'],- ) => void;-}--const useVariablesFromUrl = (): UseVariablesFromUrlReturn => {- const urlQuery = useUrlQuery();- const history = useHistory();-- const getUrlVariables = useCallback((): LocalStoreDashboardVariables => {- const variablesParam = urlQuery.get(QueryParams.variables);-- if (!variablesParam) {- return {};- }-- try {- const decoded = ((): string => {- try {- return decodeURIComponent(variablesParam);- } catch {- return variablesParam;- }- })();- return JSON.parse(decoded);- } catch (error) {- Sentry.captureEvent({- message: `Failed to parse dashboard variables from URL: ${error}`,- level: 'error',- });- return {};- }- }, [urlQuery]);-- const setUrlVariables = useCallback(- (variables: LocalStoreDashboardVariables): void => {- const params = new URLSearchParams(urlQuery.toString());-- if (Object.keys(variables).length === 0) {- params.delete(QueryParams.variables);- } else {- try {- const encodedVariables = encodeURIComponent(JSON.stringify(variables));- params.set(QueryParams.variables, encodedVariables);- } catch (error) {- Sentry.captureEvent({- message: `Failed to serialize dashboard variables for URL: ${error}`,- level: 'error',- });- }- }-- history.replace({- search: params.toString(),- });- },- [history, urlQuery],- );-- const updateUrlVariable = useCallback(- (name: string, selectedValue: IDashboardVariable['selectedValue']): void => {- const currentVariables = getUrlVariables();-- const updatedVariables = {- ...currentVariables,- [name]: selectedValue,- };-- setUrlVariables(updatedVariables as LocalStoreDashboardVariables);- },- [getUrlVariables, setUrlVariables],- );-- return {- getUrlVariables,- setUrlVariables,- updateUrlVariable,- };-};--export default useVariablesFromUrl;diff --git a/frontend/src/hooks/dashboard/utils.test.ts b/frontend/src/hooks/dashboard/utils.test.tsdeleted file mode 100644index 86ba834771..0000000000--- a/frontend/src/hooks/dashboard/utils.test.ts+++ /dev/null@@ -1,182 +0,0 @@-import {- initialClickHouseData,- initialQueryBuilderFormValuesMap,- initialQueryPromQLData,- PANEL_TYPES,-} from 'constants/queryBuilder';-import { IDashboardVariable, Widgets } from 'types/api/dashboard/getAll';-import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';-import { Query } from 'types/api/queryBuilder/queryBuilderData';-import { EQueryType } from 'types/common/dashboard';-import { DataSource } from 'types/common/queryBuilder';--import { createDynamicVariableToWidgetsMap } from './utils';--const createMockDynamicVariable = (- overrides: Partial<IDashboardVariable> = {},-): IDashboardVariable => ({- id: 'var-1',- name: 'testVar',- description: '',- type: 'DYNAMIC',- sort: 'DISABLED',- multiSelect: false,- showALLOption: false,- dynamicVariablesAttribute: 'service.name',- ...overrides,-});--const createBaseWidget = (id: string, query: Query): Widgets => ({- id,- title: 'Test Widget',- description: '',- panelTypes: PANEL_TYPES.TIME_SERIES,- opacity: '1',- nullZeroValues: '',- timePreferance: 'GLOBAL_TIME',- softMin: null,- softMax: null,- selectedLogFields: null,- selectedTracesFields: null,- query,-});--const createMockPromQLWidget = (- id: string,- queries: {- query: string;- name?: string;- legend?: string;- disabled?: boolean;- }[],-): Widgets => {- const promqlQueries = queries.map((q) => ({- ...initialQueryPromQLData,- query: q.query,- name: q.name || 'A',- legend: q.legend || '',- disabled: q.disabled ?? false,- }));-- const query: Query = {- queryType: EQueryType.PROM,- promql: promqlQueries,- builder: {- queryData: [],- queryFormulas: [],- queryTraceOperator: [],- },- clickhouse_sql: [],- id: 'query-1',- };-- return createBaseWidget(id, query);-};--const createMockClickHouseWidget = (- id: string,- queries: {- query: string;- name?: string;- legend?: string;- disabled?: boolean;- }[],-): Widgets => {- const clickhouseQueries = queries.map((q) => ({- ...initialClickHouseData,- query: q.query,- name: q.name || 'A',- legend: q.legend || '',- disabled: q.disabled ?? false,- }));-- const query: Query = {- queryType: EQueryType.CLICKHOUSE,- promql: [],- builder: {- queryData: [],- queryFormulas: [],- queryTraceOperator: [],- },- clickhouse_sql: clickhouseQueries,- id: 'query-1',- };-- return createBaseWidget(id, query);-};--const createMockQueryBuilderWidget = (- id: string,- filters: { key: string; value: string | string[]; op?: string }[],-): Widgets => {- const queryData = {- ...initialQueryBuilderFormValuesMap[DataSource.LOGS],- queryName: 'A',- filters: {- items: filters.map((f, index) => ({- id: `filter-${index}`,- key: { key: f.key, dataType: DataTypes.String, type: '', id: f.key },- op: f.op || '=',- value: f.value,- })),- op: 'AND',- },- };-- const query: Query = {- queryType: EQueryType.QUERY_BUILDER,- promql: [],- builder: {- queryData: [queryData],- queryFormulas: [],- queryTraceOperator: [],- },- clickhouse_sql: [],- id: 'query-1',- };-- return createBaseWidget(id, query);-};--describe('createDynamicVariableToWidgetsMap', () => {- it('should handle widgets with different query types', () => {- const dynamicVariables = [- createMockDynamicVariable({- id: 'var-1',- name: 'service.name123',- dynamicVariablesAttribute: 'service.name',- }),- ];-- const widgets = [- createMockPromQLWidget('widget-promql-pass', [- { query: 'up{service="$service.name123"}' },- ]),- createMockPromQLWidget('widget-promql-fail', [- { query: 'up{service="$service.name"}' },- ]),- createMockClickHouseWidget('widget-clickhouse-pass', [- { query: "SELECT * FROM logs WHERE service_name = '$service.name123'" },- ]),- createMockClickHouseWidget('widget-clickhouse-fail', [- { query: "SELECT * FROM logs WHERE service_name = '$service.name'" },- ]),- createMockQueryBuilderWidget('widget-builder-pass', [- { key: 'service.name', value: '$service.name123' },- ]),- createMockQueryBuilderWidget('widget-builder-fail', [- { key: 'service.name', value: '$service.name' },- ]),- ];-- const result = createDynamicVariableToWidgetsMap(dynamicVariables, widgets);-- expect(result['var-1']).toContain('widget-promql-pass');- expect(result['var-1']).toContain('widget-clickhouse-pass');- expect(result['var-1']).toContain('widget-builder-pass');-- expect(result['var-1']).not.toContain('widget-promql-fail');- expect(result['var-1']).not.toContain('widget-clickhouse-fail');- expect(result['var-1']).not.toContain('widget-builder-fail');- });-});diff --git a/frontend/src/hooks/dashboard/utils.ts b/frontend/src/hooks/dashboard/utils.tsdeleted file mode 100644index 20cf254be2..0000000000--- a/frontend/src/hooks/dashboard/utils.ts+++ /dev/null@@ -1,244 +0,0 @@-/* eslint-disable sonarjs/cognitive-complexity */-import { TelemetryFieldKey } from 'api/v5/v5';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { convertKeysToColumnFields } from 'container/LogsExplorerList/utils';-import { placeWidgetAtBottom } from 'container/NewWidget/utils';-import { textContainsVariableReference } from 'lib/dashboardVariables/variableReference';-import { isArray } from 'lodash-es';-import {- Dashboard,- IDashboardVariable,- Widgets,-} from 'types/api/dashboard/getAll';-import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';-import {- IBuilderQuery,- Query,- TagFilterItem,-} from 'types/api/queryBuilder/queryBuilderData';-import { EQueryType } from 'types/common/dashboard';-import { v4 as uuidv4 } from 'uuid';--const baseLogsSelectedColumns = {- dataType: 'string',- type: '',- name: 'timestamp',-};--export const addEmptyWidgetInDashboardJSONWithQuery = (- dashboard: Dashboard,- query: Query,- widgetId: string,- panelType?: PANEL_TYPES,- selectedColumns?: TelemetryFieldKey[] | null,-): Dashboard => {- const logsSelectedColumns = [- baseLogsSelectedColumns,- ...convertKeysToColumnFields(selectedColumns || []),- ];-- const newLayoutItem = placeWidgetAtBottom(- widgetId,- dashboard?.data?.layout || [],- );-- return {- ...dashboard,- data: {- ...dashboard.data,- layout: [...(dashboard?.data?.layout || []), newLayoutItem],- widgets: [- ...(dashboard?.data?.widgets || []),- {- id: widgetId,- query,- description: '',- nullZeroValues: '',- opacity: '',- title: '',- timePreferance: 'GLOBAL_TIME',- panelTypes: panelType || PANEL_TYPES.TIME_SERIES,- softMax: null,- softMin: null,- selectedLogFields:- panelType === PANEL_TYPES.LIST ? logsSelectedColumns : [],- selectedTracesFields:- panelType === PANEL_TYPES.LIST ? selectedColumns || [] : [],- },- ],- },- };-};--export const getFiltersFromKeyValue = (- key: string,- value: string | number,- type?: string,- op?: string,- dataType?: DataTypes,-): TagFilterItem => ({- id: uuidv4(),- key: {- key,- dataType: dataType || DataTypes.String,- type: type || '',- id: `${key}--${dataType || DataTypes.String}--${type || ''}`,- },- op: op || '=',- value: value.toString(),-});--export const createDynamicVariableToWidgetsMap = (- dynamicVariables: IDashboardVariable[],- widgets: Widgets[],-): Record<string, string[]> => {- const dynamicVariableToWidgetsMap: Record<string, string[]> = {};-- // Initialize map with empty arrays for each variable- dynamicVariables.forEach((variable) => {- if (variable.id) {- dynamicVariableToWidgetsMap[variable.id] = [];- }- });-- // Check each widget for usage of dynamic variables- if (Array.isArray(widgets)) {- widgets.forEach((widget) => {- if (widget.query?.queryType === EQueryType.QUERY_BUILDER) {- if (!Array.isArray(widget.query.builder.queryData)) {- return;- }-- widget.query.builder.queryData.forEach((queryData: IBuilderQuery) => {- // Check filter items for dynamic variables- queryData.filters?.items?.forEach((filter: TagFilterItem) => {- // For each filter, check if it uses any dynamic variable- dynamicVariables.forEach((variable) => {- if (- variable.dynamicVariablesAttribute &&- variable.name &&- filter.key?.key === variable.dynamicVariablesAttribute &&- (isArray(filter.value)- ? filter.value.some(- (v) =>- typeof v === 'string' &&- variable.name &&- textContainsVariableReference(v, variable.name),- )- : typeof filter.value === 'string' &&- textContainsVariableReference(filter.value, variable.name)) &&- !dynamicVariableToWidgetsMap[variable.id].includes(widget.id)- ) {- dynamicVariableToWidgetsMap[variable.id].push(widget.id);- }- });- });-- // Check filter expression for dynamic variables- if (queryData.filter?.expression) {- dynamicVariables.forEach((variable) => {- if (- variable.dynamicVariablesAttribute &&- variable.name &&- queryData.filter?.expression &&- textContainsVariableReference(- queryData.filter.expression,- variable.name,- ) &&- !dynamicVariableToWidgetsMap[variable.id].includes(widget.id)- ) {- dynamicVariableToWidgetsMap[variable.id].push(widget.id);- }- });- }- });- } else if (widget.query?.queryType === EQueryType.PROM) {- if (!Array.isArray(widget.query.promql)) {- return;- }-- widget.query.promql.forEach((promqlQuery) => {- dynamicVariables.forEach((variable) => {- if (- variable.dynamicVariablesAttribute &&- variable.name &&- promqlQuery.query &&- textContainsVariableReference(promqlQuery.query, variable.name) &&- !dynamicVariableToWidgetsMap[variable.id].includes(widget.id)- ) {- dynamicVariableToWidgetsMap[variable.id].push(widget.id);- }- });- });- } else if (widget.query?.queryType === EQueryType.CLICKHOUSE) {- if (!Array.isArray(widget.query.clickhouse_sql)) {- return;- }-- widget.query.clickhouse_sql.forEach((clickhouseQuery) => {- dynamicVariables.forEach((variable) => {- if (- variable.dynamicVariablesAttribute &&- variable.name &&- clickhouseQuery.query &&- textContainsVariableReference(clickhouseQuery.query, variable.name) &&- !dynamicVariableToWidgetsMap[variable.id].includes(widget.id)- ) {- dynamicVariableToWidgetsMap[variable.id].push(widget.id);- }- });- });- }- });- }-- return dynamicVariableToWidgetsMap;-};--export const getWidgetsHavingDynamicVariableAttribute = (- dynamicVariablesAttribute: string,- widgets: Widgets[],- variableName?: string,-): string[] => {- const widgetsHavingDynamicVariableAttribute: string[] = [];-- if (Array.isArray(widgets)) {- widgets.forEach((widget) => {- if (- widget.query?.builder?.queryData &&- widget.query?.queryType === EQueryType.QUERY_BUILDER- ) {- widget.query.builder.queryData.forEach((queryData: IBuilderQuery) => {- // Check filter items for dynamic variables- queryData.filters?.items?.forEach((filter: TagFilterItem) => {- if (- dynamicVariablesAttribute &&- filter.key?.key === dynamicVariablesAttribute &&- // If variableName is provided, validate that the filter value actually contains the variable reference- (!variableName ||- (isArray(filter.value) && filter.value.includes(`$${variableName}`)) ||- filter.value === `$${variableName}`) &&- !widgetsHavingDynamicVariableAttribute.includes(widget.id)- ) {- widgetsHavingDynamicVariableAttribute.push(widget.id);- }- });-- // Check filter expression for dynamic variables- if (- queryData.filter?.expression &&- dynamicVariablesAttribute &&- queryData.filter.expression.includes(- variableName ? `$${variableName}` : `$${dynamicVariablesAttribute}`,- ) &&- !widgetsHavingDynamicVariableAttribute.includes(widget.id)- ) {- widgetsHavingDynamicVariableAttribute.push(widget.id);- }- });- }- });- }-- return widgetsHavingDynamicVariableAttribute;-};diff --git a/frontend/src/hooks/queryBuilder/__tests__/useCreateAlerts.test.tsx b/frontend/src/hooks/queryBuilder/__tests__/useCreateAlerts.test.tsxindex 0e9beea6a4..da918bef3f 100644--- a/frontend/src/hooks/queryBuilder/__tests__/useCreateAlerts.test.tsx+++ b/frontend/src/hooks/queryBuilder/__tests__/useCreateAlerts.test.tsx@@ -4,7 +4,7 @@ import { useSelector } from 'react-redux';import { act, renderHook } from '@testing-library/react';import { QueryParams } from 'constants/query';import { mapQueryDataFromApi } from 'lib/newQueryBuilder/queryBuilderMappers/mapQueryDataFromApi';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { EQueryType } from 'types/common/dashboard';import useCreateAlerts from '../useCreateAlerts';@@ -50,10 +50,6 @@ jest.mock('lib/dashboardVariables/getDashboardVariables', () => ({getDashboardVariables: (): unknown => ({}),}));-jest.mock('providers/Dashboard/store/useDashboardStore', () => ({- useDashboardStore: (): unknown => ({ dashboardData: undefined }),-}));-jest.mock('utils/getGraphType', () => ({getGraphType: jest.fn().mockReturnValue('time_series'),}));diff --git a/frontend/src/hooks/queryBuilder/useCreateAlerts.tsx b/frontend/src/hooks/queryBuilder/useCreateAlerts.tsxindex d6b7ba6567..a45a9ad260 100644--- a/frontend/src/hooks/queryBuilder/useCreateAlerts.tsx+++ b/frontend/src/hooks/queryBuilder/useCreateAlerts.tsx@@ -10,16 +10,15 @@ import { SOMETHING_WENT_WRONG } from 'constants/api';import { ENTITY_VERSION_V5 } from 'constants/app';import { QueryParams } from 'constants/query';import ROUTES from 'constants/routes';-import { MenuItemKeys } from 'container/GridCardLayout/WidgetHeader/contants';+import { MenuItemKeys } from 'container/WidgetCard/Header/contants';import { useDashboardVariables } from 'hooks/dashboard/useDashboardVariables';import { useDashboardVariablesByType } from 'hooks/dashboard/useDashboardVariablesByType';import { useNotifications } from 'hooks/useNotifications';import { getDashboardVariables } from 'lib/dashboardVariables/getDashboardVariables';import { mapQueryDataFromApi } from 'lib/newQueryBuilder/queryBuilderMappers/mapQueryDataFromApi';import { isEmpty } from 'lodash-es';-import { useDashboardStore } from 'providers/Dashboard/store/useDashboardStore';import { AppState } from 'store/reducers';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { GlobalReducer } from 'types/reducer/globalTime';import { withBasePath } from 'utils/basePath';import { getGraphType } from 'utils/getGraphType';@@ -27,7 +26,7 @@ import { getGraphType } from 'utils/getGraphType';/*** @deprecated V1-only. V2 dashboards seed alerts from a panel via* `useCreateAlertFromPanel` / `buildCreateAlertUrl`- * (pages/DashboardPageV2/.../Panel). Do not use in new code.+ * (pages/DashboardPage/.../Panel). Do not use in new code.*/const useCreateAlerts = (widget?: Widgets, caller?: string): VoidFunction => {const queryRangeMutation = useMutation(getSubstituteVars);@@ -39,8 +38,6 @@ const useCreateAlerts = (widget?: Widgets, caller?: string): VoidFunction => {const { notifications } = useNotifications();- const { dashboardData } = useDashboardStore();-const { dashboardVariables } = useDashboardVariables();const dashboardDynamicVariables = useDashboardVariablesByType('DYNAMIC',@@ -55,8 +52,6 @@ const useCreateAlerts = (widget?: Widgets, caller?: string): VoidFunction => {if (caller === 'panelView') {logEvent('Panel Edit: Create alert', {panelType: widget.panelTypes,- dashboardName: dashboardData?.data?.title,- dashboardId: dashboardData?.id,widgetId: widget.id,queryType: widget.query.queryType,});@@ -64,8 +59,6 @@ const useCreateAlerts = (widget?: Widgets, caller?: string): VoidFunction => {logEvent('Dashboard Detail: Panel action', {action: MenuItemKeys.CreateAlerts,panelType: widget.panelTypes,- dashboardName: dashboardData?.data?.title,- dashboardId: dashboardData?.id,widgetId: widget.id,queryType: widget.query.queryType,});diff --git a/frontend/src/hooks/queryBuilder/useGetQueryRange.ts b/frontend/src/hooks/queryBuilder/useGetQueryRange.tsindex b017477d6d..d949bf4832 100644--- a/frontend/src/hooks/queryBuilder/useGetQueryRange.ts+++ b/frontend/src/hooks/queryBuilder/useGetQueryRange.ts@@ -4,7 +4,7 @@ import { isAxiosError } from 'axios';import { PANEL_TYPES } from 'constants/queryBuilder';import { MAX_QUERY_RETRIES } from 'constants/reactQuery';import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';-import { updateBarStepInterval } from 'container/GridCardLayout/utils';+import { updateBarStepInterval } from 'container/WidgetCard/utils';import { useDashboardVariablesByType } from 'hooks/dashboard/useDashboardVariablesByType';import {GetMetricQueryRange,@@ -25,11 +25,6 @@ type UseGetQueryRange = (version: string,options?: UseGetQueryRangeOptions,headers?: Record<string, string>,- publicQueryMeta?: {- isPublic: boolean;- widgetIndex: number;- publicDashboardId: string;- },) => UseQueryResult<MetricQueryRangeSuccessResponse, Error>;export const useGetQueryRange: UseGetQueryRange = (@@ -37,7 +32,6 @@ export const useGetQueryRange: UseGetQueryRange = (version,options,headers,- publicQueryMeta,) => {const dashboardDynamicVariables = useDashboardVariablesByType('DYNAMIC',@@ -163,8 +157,6 @@ export const useGetQueryRange: UseGetQueryRange = (dashboardDynamicVariables,signal,headers,- undefined,- publicQueryMeta,),...options,retry,diff --git a/frontend/src/hooks/queryBuilder/useStepInterval.ts b/frontend/src/hooks/queryBuilder/useStepInterval.tsindex 0b932df987..8020383d49 100644--- a/frontend/src/hooks/queryBuilder/useStepInterval.ts+++ b/frontend/src/hooks/queryBuilder/useStepInterval.ts@@ -1,4 +1,4 @@-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';export const updateStepInterval = (query: Widgets['query'],diff --git a/frontend/src/hooks/useChartMutable.ts b/frontend/src/hooks/useChartMutable.tsindex 642b294b53..e0ef29ff4a 100644--- a/frontend/src/hooks/useChartMutable.ts+++ b/frontend/src/hooks/useChartMutable.ts@@ -1,5 +1,5 @@import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelTypeAndGraphManagerVisibilityProps } from 'container/GridCardLayout/GridCard/FullView/types';+import { PanelTypeAndGraphManagerVisibilityProps } from 'container/WidgetCard/Card/FullView/types';import { PanelTypeKeys } from 'types/common/queryBuilder';export const useChartMutable = ({diff --git a/frontend/src/lib/dashboard/getQueryResults.ts b/frontend/src/lib/dashboard/getQueryResults.tsindex a4d541a302..3b581e841f 100644--- a/frontend/src/lib/dashboard/getQueryResults.ts+++ b/frontend/src/lib/dashboard/getQueryResults.ts@@ -1,6 +1,5 @@// @ts-nocheck-import getPublicDashboardWidgetData from 'api/dashboard/public/getPublicDashboardWidgetData';import { getMetricsQueryRange } from 'api/metrics/getQueryRange';import { createAggregation } from 'api/v5/queryRange/prepareQueryRangePayloadV5';import {@@ -10,7 +9,7 @@ import {} from 'api/v5/v5';import { ENTITY_VERSION_V5 } from 'constants/app';import { PANEL_TYPES } from 'constants/queryBuilder';-import { timePreferenceType } from 'container/NewWidget/RightContainer/timeItems';+import { timePreferenceType } from 'constants/timePreference';import {CustomTimeType,Time,@@ -19,7 +18,7 @@ import { Pagination } from 'hooks/queryPagination';import { convertNewDataToOld } from 'lib/newQueryBuilder/convertNewDataToOld';import { isEmpty } from 'lodash-es';import { SuccessResponseV2, Warning } from 'types/api';-import { IDashboardVariable } from 'types/api/dashboard/getAll';+import { IDashboardVariable } from 'types/api/dashboard/variables';import { MetricQueryRangeSuccessResponse } from 'types/api/metrics/getQueryRange';import { IBuilderQuery, Query } from 'types/api/queryBuilder/queryBuilderData';import {@@ -183,12 +182,6 @@ export async function GetMetricQueryRange(dynamicVariables?: IDashboardVariable[],signal?: AbortSignal,headers?: Record<string, string>,- isInfraMonitoring?: boolean,- publicQueryMeta?: {- isPublic: boolean;- widgetIndex: number;- publicDashboardId: string;- },): Promise<MetricQueryRangeSuccessResponse> {let legendMap: Record<string, string>;let response:@@ -240,10 +233,7 @@ export async function GetMetricQueryRange(legendMap = v5Result.legendMap;// atleast one query should be there to make call to v5 api- if (- v5Result.queryPayload.compositeQuery.queries.length === 0 &&- !publicQueryMeta?.isPublic- ) {+ if (v5Result.queryPayload.compositeQuery.queries.length === 0) {return {statusCode: 200,error: null,@@ -266,51 +256,27 @@ export async function GetMetricQueryRange(};}- if (publicQueryMeta?.isPublic) {- const publicResponse = await getPublicDashboardWidgetData({- id: publicQueryMeta?.publicDashboardId,- index: publicQueryMeta?.widgetIndex,- startTime: props.start * 1000,- endTime: props.end * 1000,- });+ const v5Response = await getQueryRangeV5(+ v5Result.queryPayload,+ version,+ signal,+ headers,+ );- rawV5Response = publicResponse.data.data;+ rawV5Response = v5Response.data.data;- // Convert V5 response to legacy format for components- response = convertV5ResponseToLegacy(- {- payload: publicResponse.data,- params: v5Result.queryPayload,- },- legendMap,- finalFormatForWeb,- );-- warning = response.payload.warning || undefined;- meta = response.payload.meta || undefined;- } else {- const v5Response = await getQueryRangeV5(- v5Result.queryPayload,- version,- signal,- headers,- );-- rawV5Response = v5Response.data.data;-- // Convert V5 response to legacy format for components- response = convertV5ResponseToLegacy(- {- payload: v5Response.data,- params: v5Result.queryPayload,- },- legendMap,- finalFormatForWeb,- );+ // Convert V5 response to legacy format for components+ response = convertV5ResponseToLegacy(+ {+ payload: v5Response.data,+ params: v5Result.queryPayload,+ },+ legendMap,+ finalFormatForWeb,+ );- warning = response.payload.warning || undefined;- meta = response.payload.meta || undefined;- }+ warning = response.payload.warning || undefined;+ meta = response.payload.meta || undefined;} else {const legacyResult = prepareQueryRangePayload(props);legendMap = legacyResult.legendMap;diff --git a/frontend/src/lib/dashboard/getUpdatedLayout.ts b/frontend/src/lib/dashboard/getUpdatedLayout.tsdeleted file mode 100644index 487e930289..0000000000--- a/frontend/src/lib/dashboard/getUpdatedLayout.ts+++ /dev/null@@ -1,23 +0,0 @@-import { Layout } from 'react-grid-layout';-import { PANEL_TYPES } from 'constants/queryBuilder';--export const getUpdatedLayout = (layout?: Layout[]): Layout[] => {- let widgetLayout = layout;-- // filter empty from i from i due to previous version of signoz- widgetLayout = layout?.filter((i) => i.i !== 'empty');-- const seen = new Set();-- // filter duplicate i values- widgetLayout = widgetLayout?.filter((i) => {- const duplicate = seen.has(i.i);- seen.add(i.i);- return !duplicate;- });-- // filter EMPTY_WIDGET from i due to previous version of signoz- widgetLayout = widgetLayout?.filter((i) => i.i !== PANEL_TYPES.EMPTY_WIDGET);-- return widgetLayout || [];-};diff --git a/frontend/src/lib/dashboardVariables/dependencyGraph.ts b/frontend/src/lib/dashboardVariables/dependencyGraph.tsindex 8a522c9eea..54ca3982b4 100644--- a/frontend/src/lib/dashboardVariables/dependencyGraph.ts+++ b/frontend/src/lib/dashboardVariables/dependencyGraph.ts@@ -1,6 +1,6 @@import { textContainsVariableReference } from 'lib/dashboardVariables/variableReference';import { IDependencyData } from 'providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreTypes';-import { IDashboardVariable } from 'types/api/dashboard/getAll';+import { IDashboardVariable } from 'types/api/dashboard/variables';/*** Inter-variable dependency graph over the shared dashboard-variables store. A@@ -9,7 +9,7 @@ import { IDashboardVariable } from 'types/api/dashboard/getAll';** Keyed on `IDashboardVariable`. The V2 editor has a parallel implementation* over its own flat form model in- * `pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/variableDependencies.ts`.+ * `pages/DashboardPage/DashboardContainer/VariablesBar/utils/variableDependencies.ts`.*/export type VariableGraph = Record<string, string[]>;diff --git a/frontend/src/lib/getMaxMinTime.ts b/frontend/src/lib/getMaxMinTime.tsindex a6bd413729..48cefcb2c9 100644--- a/frontend/src/lib/getMaxMinTime.ts+++ b/frontend/src/lib/getMaxMinTime.ts@@ -1,6 +1,6 @@import { PANEL_TYPES } from 'constants/queryBuilder';import { GlobalTime } from 'types/actions/globalTime';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';const GetMaxMinTime = ({graphType,diff --git a/frontend/src/lib/getStartAndEndTime/index.ts b/frontend/src/lib/getStartAndEndTime/index.tsindex 43b7d2f6d6..e2c40f0922 100644--- a/frontend/src/lib/getStartAndEndTime/index.ts+++ b/frontend/src/lib/getStartAndEndTime/index.ts@@ -1,4 +1,4 @@-import { timePreferenceType } from 'container/NewWidget/RightContainer/timeItems';+import { timePreferenceType } from 'constants/timePreference';import getMicroSeconds from './getMicroSeconds';import getMinAgo from './getMinAgo';diff --git a/frontend/src/lib/getStartEndRangeTime.ts b/frontend/src/lib/getStartEndRangeTime.tsindex 0a962b11cc..37a477e6d5 100644--- a/frontend/src/lib/getStartEndRangeTime.ts+++ b/frontend/src/lib/getStartEndRangeTime.ts@@ -1,5 +1,5 @@import { PANEL_TYPES } from 'constants/queryBuilder';-import { timePreferenceType } from 'container/NewWidget/RightContainer/timeItems';+import { timePreferenceType } from 'constants/timePreference';import {CustomTimeType,Time,diff --git a/frontend/src/container/NewWidget/utils.ts b/frontend/src/lib/query/panelQuery.tssimilarity index 66%rename from frontend/src/container/NewWidget/utils.tsrename to frontend/src/lib/query/panelQuery.tsindex 7fc0057e7b..8bc0cfe0e5 100644--- a/frontend/src/container/NewWidget/utils.ts+++ b/frontend/src/lib/query/panelQuery.ts@@ -1,30 +1,16 @@-import { Layout } from 'react-grid-layout';-import { PrecisionOptionsEnum } from 'components/Graph/types';-import { YAxisCategoryNames } from 'components/YAxisUnitSelector/constants';-import {- UniversalYAxisUnit,- YAxisCategory,- YAxisSource,-} from 'components/YAxisUnitSelector/types';-import { getYAxisCategories } from 'components/YAxisUnitSelector/utils';+/**+ * Panel query shaping shared by the dashboard panel editor and the query+ * builder: the per-panel-type field allowlist, the panel-type switch, and the+ * dirty-check used to decide whether a panel has unsaved query edits.+ */import {initialQueryBuilderFormValuesMap,PANEL_TYPES,- PANEL_TYPES_INITIAL_QUERY,} from 'constants/queryBuilder';-import {- defaultLogsSelectedColumns,- defaultTraceSelectedColumns,-} from 'container/OptionsMenu/constants';-import { categoryToSupport } from 'container/QueryBuilder/filters/BuilderUnitsFilter/config';-import { cloneDeep, defaultTo, isEmpty, isEqual, set, unset } from 'lodash-es';-import { Widgets } from 'types/api/dashboard/getAll';+import { cloneDeep, isEqual, set, unset } from 'lodash-es';import { IBuilderQuery, Query } from 'types/api/queryBuilder/queryBuilderData';-import { EQueryType } from 'types/common/dashboard';import { DataSource } from 'types/common/queryBuilder';-import { getCategoryName } from './RightContainer/dataFormatCategories';-// Asks "would saving the current panel change the persisted widget spec?".//// `adjustQueryForV5` is deliberately not reused here: in addition to stripping@@ -602,203 +588,3 @@ export function handleQueryChange(},};}--export const getDefaultWidgetData = (- id: string,- name: PANEL_TYPES,-): Widgets => ({- id,- title: '',- description: '',- nullZeroValues: '',- opacity: '',- panelTypes: name,- query: PANEL_TYPES_INITIAL_QUERY[name],- timePreferance: 'GLOBAL_TIME',- softMax: null,- softMin: null,- stackedBarChart: name === PANEL_TYPES.BAR,- decimalPrecision: PrecisionOptionsEnum.TWO, // default decimal precision- selectedLogFields: defaultLogsSelectedColumns.map((field) => ({- ...field,- type: field.fieldContext ?? '',- dataType: field.fieldDataType ?? '',- })),- selectedTracesFields: defaultTraceSelectedColumns,-});--export const PANEL_TYPE_TO_QUERY_TYPES: Record<PANEL_TYPES, EQueryType[]> = {- [PANEL_TYPES.TIME_SERIES]: [- EQueryType.QUERY_BUILDER,- EQueryType.CLICKHOUSE,- EQueryType.PROM,- ],- [PANEL_TYPES.TABLE]: [EQueryType.QUERY_BUILDER, EQueryType.CLICKHOUSE],- [PANEL_TYPES.VALUE]: [- EQueryType.QUERY_BUILDER,- EQueryType.CLICKHOUSE,- EQueryType.PROM,- ],- [PANEL_TYPES.LIST]: [EQueryType.QUERY_BUILDER],- [PANEL_TYPES.TRACE]: [- EQueryType.QUERY_BUILDER,- EQueryType.CLICKHOUSE,- EQueryType.PROM,- ],- [PANEL_TYPES.BAR]: [- EQueryType.QUERY_BUILDER,- EQueryType.CLICKHOUSE,- EQueryType.PROM,- ],- [PANEL_TYPES.PIE]: [EQueryType.QUERY_BUILDER, EQueryType.CLICKHOUSE],- [PANEL_TYPES.HISTOGRAM]: [- EQueryType.QUERY_BUILDER,- EQueryType.CLICKHOUSE,- EQueryType.PROM,- ],- [PANEL_TYPES.EMPTY_WIDGET]: [- EQueryType.QUERY_BUILDER,- EQueryType.CLICKHOUSE,- EQueryType.PROM,- ],-};--/**- * Retrieves a list of category select options based on the provided category name.- * If the category is found, it maps the formats to an array of objects containing- * the label and value for each format.- */-export const getCategorySelectOptionByName = (- name?: YAxisCategoryNames,-): { name: string; id: UniversalYAxisUnit }[] => {- const categories = getYAxisCategories(YAxisSource.DASHBOARDS);- if (!categories.length) {- return [];- }- return (- categories- .find((category) => category.name === name)- ?.units.map((unit) => ({- name: unit.name,- id: unit.id,- })) || []- );-};--/**- * Generates unit options based on the provided column unit.- * It first retrieves the category name associated with the column unit.- * If the category is empty, it maps all supported categories to their respective- * select options. If a valid category is found, it filters the supported categories- * to return only the options for the matched category.- */-export const unitOptions = (columnUnit: string): YAxisCategory[] => {- const category = getCategoryName(columnUnit);- if (isEmpty(category)) {- return categoryToSupport.map((category) => ({- name: category,- units: getCategorySelectOptionByName(category),- }));- }- return categoryToSupport- .filter((supportedCategory) => supportedCategory === category)- .map((filteredCategory) => ({- name: filteredCategory,- units: getCategorySelectOptionByName(filteredCategory),- }));-};--export const placeWidgetAtBottom = (- widgetId: string,- layout: Layout[],- widgetWidth?: number,- widgetHeight?: number,-): Layout => {- if (layout.length === 0) {- return { i: widgetId, x: 0, y: 0, w: widgetWidth || 6, h: widgetHeight || 6 };- }-- // Find the maximum Y coordinate and height- const { maxY } = layout.reduce(- (acc, curr) => ({- maxY: Math.max(acc.maxY, curr.y + curr.h),- }),- { maxY: 0 },- );-- // Check for available space in the last row- const lastRowWidgets = layout.filter((item) => item.y + item.h === maxY);- const occupiedXInLastRow = lastRowWidgets.reduce(- (acc, widget) => acc + widget.w,- 0,- );-- // If there's space in the last row (total width < 12)- if (occupiedXInLastRow < 12) {- // Find the rightmost X coordinate in the last row- const maxXInLastRow = lastRowWidgets.reduce(- (acc, widget) => Math.max(acc, widget.x + widget.w),- 0,- );-- // If there's enough space for a 6-width widget- if (maxXInLastRow + defaultTo(widgetWidth, 6) <= 12) {- return {- i: widgetId,- x: maxXInLastRow,- y: maxY - (widgetHeight || 6), // Align with the last row- w: widgetWidth || 6,- h: widgetHeight || 6,- };- }- }-- // If no space in last row, place at the bottom- return {- i: widgetId,- x: 0,- y: maxY,- w: widgetWidth || 6,- h: widgetHeight || 6,- };-};--export const placeWidgetBetweenRows = (- widgetId: string,- layout: Layout[],- _currentRowId: string,- nextRowId?: string | null,- widgetWidth?: number,- widgetHeight?: number,-): Layout[] => {- if (layout.length === 0) {- return [- {- i: widgetId,- x: 0,- y: 0,- w: widgetWidth || 6,- h: widgetHeight || 6,- },- ];- }-- const nextRowIndex = nextRowId- ? layout.findIndex((item) => item.i === nextRowId)- : -1;-- // slice the layout from current row to next row- const sectionWidgets =- nextRowIndex === -1 ? layout : layout.slice(0, nextRowIndex);-- const newWidgetLayout = placeWidgetAtBottom(- widgetId,- sectionWidgets,- widgetWidth,- widgetHeight,- );- const remainingWidgets = nextRowIndex === -1 ? [] : layout.slice(nextRowIndex);-- // add new layout in between the sectionWidgets and the rest of the layout- return [...sectionWidgets, newWidgetLayout, ...remainingWidgets];-};diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/util.ts b/frontend/src/lib/query/populateMultipleResults.tssimilarity index 100%rename from frontend/src/container/NewWidget/LeftContainer/WidgetGraph/util.tsrename to frontend/src/lib/query/populateMultipleResults.tsdiff --git a/frontend/src/lib/uPlotLib/getUplotChartOptions.ts b/frontend/src/lib/uPlotLib/getUplotChartOptions.tsindex 244b494326..a5ad51225d 100644--- a/frontend/src/lib/uPlotLib/getUplotChartOptions.ts+++ b/frontend/src/lib/uPlotLib/getUplotChartOptions.ts@@ -1,20 +1,20 @@// @ts-nocheck/* eslint-disable sonarjs/cognitive-complexity */import { PANEL_TYPES } from 'constants/queryBuilder';-import { FullViewProps } from 'container/GridCardLayout/GridCard/FullView/types';-import { saveLegendEntriesToLocalStorage } from 'container/GridCardLayout/GridCard/FullView/utils';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import { FullViewProps } from 'container/WidgetCard/Card/FullView/types';+import { saveLegendEntriesToLocalStorage } from 'container/WidgetCard/Card/FullView/utils';+import { ThresholdProps } from 'types/api/widgets/threshold';import {applyEnhancedLegendStyling,calculateEnhancedLegendConfig,-} from 'container/PanelWrapper/enhancedLegend';+} from 'container/WidgetCard/Panels/enhancedLegend';import { Dimensions } from 'hooks/useDimensions';import { getLegend } from 'lib/dashboard/getQueryResults';import { convertValue } from 'lib/getConvertedValue';import getLabelName from 'lib/getLabelName';import { cloneDeep, isUndefined } from 'lodash-es';import _noop from 'lodash-es/noop';-import { LegendPosition } from 'types/api/dashboard/getAll';+import { LegendPosition } from 'types/api/widgets/widget';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import { Query } from 'types/api/queryBuilder/queryBuilderData';import { QueryData, QueryDataV3 } from 'types/api/widgets/getQuery';diff --git a/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts b/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.tsindex 17dc0a1781..af582c94bc 100644--- a/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts+++ b/frontend/src/lib/uPlotLib/getUplotHistogramChartOptions.ts@@ -2,7 +2,7 @@import { Dispatch, SetStateAction } from 'react';import { PANEL_TYPES } from 'constants/queryBuilder';import { themeColors } from 'constants/theme';-import { saveLegendEntriesToLocalStorage } from 'container/GridCardLayout/GridCard/FullView/utils';+import { saveLegendEntriesToLocalStorage } from 'container/WidgetCard/Card/FullView/utils';import { Dimensions } from 'hooks/useDimensions';import getLabelName from 'lib/getLabelName';import _noop from 'lodash-es/noop';diff --git a/frontend/src/lib/uPlotLib/utils/getYAxisScale.test.ts b/frontend/src/lib/uPlotLib/utils/getYAxisScale.test.tsindex f9bd8748d2..8739611a2f 100644--- a/frontend/src/lib/uPlotLib/utils/getYAxisScale.test.ts+++ b/frontend/src/lib/uPlotLib/utils/getYAxisScale.test.ts@@ -1,5 +1,5 @@import { PANEL_TYPES } from 'constants/queryBuilder';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import { ThresholdProps } from 'types/api/widgets/threshold';import { QueryDataV3 } from 'types/api/widgets/getQuery';import { GetYAxisScale, getYAxisScale } from './getYAxisScale';diff --git a/frontend/src/lib/uPlotLib/utils/getYAxisScale.ts b/frontend/src/lib/uPlotLib/utils/getYAxisScale.tsindex 2b51e4f9b2..cd98caf856 100644--- a/frontend/src/lib/uPlotLib/utils/getYAxisScale.ts+++ b/frontend/src/lib/uPlotLib/utils/getYAxisScale.ts@@ -1,4 +1,4 @@-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import { ThresholdProps } from 'types/api/widgets/threshold';import { convertValue } from 'lib/getConvertedValue';import { isFinite } from 'lodash-es';import { QueryDataV3 } from 'types/api/widgets/getQuery';diff --git a/frontend/src/lib/uPlotV2/components/__tests__/UPlotChart.test.tsx b/frontend/src/lib/uPlotV2/components/__tests__/UPlotChart.test.tsxindex c85be4dd46..7adcfceb41 100644--- a/frontend/src/lib/uPlotV2/components/__tests__/UPlotChart.test.tsx+++ b/frontend/src/lib/uPlotV2/components/__tests__/UPlotChart.test.tsx@@ -10,13 +10,10 @@ import UPlotChart from '../UPlotChart/UPlotChart';// Mocks// ----------------------------------------------------------------------------jest.mock(- 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils',- () => ({- getStoredSeriesVisibility: jest.fn(),- updateSeriesVisibilityToLocalStorage: jest.fn(),- }),-);+jest.mock('lib/visualization/panels/utils/legendVisibilityUtils', () => ({+ getStoredSeriesVisibility: jest.fn(),+ updateSeriesVisibilityToLocalStorage: jest.fn(),+}));jest.mock('@sentry/react', () => ({ErrorBoundary: ({ children }: { children: ReactNode }): JSX.Element => (diff --git a/frontend/src/lib/uPlotV2/config/UPlotConfigBuilder.ts b/frontend/src/lib/uPlotV2/config/UPlotConfigBuilder.tsindex beab435393..480e503a9f 100644--- a/frontend/src/lib/uPlotV2/config/UPlotConfigBuilder.ts+++ b/frontend/src/lib/uPlotV2/config/UPlotConfigBuilder.ts@@ -1,5 +1,5 @@-import { SeriesVisibilityItem } from 'container/DashboardContainer/visualization/panels/types';-import { getStoredSeriesVisibility } from 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils';+import { SeriesVisibilityItem } from 'lib/visualization/panels/types';+import { getStoredSeriesVisibility } from 'lib/visualization/panels/utils/legendVisibilityUtils';import { ThresholdsDrawHookOptions } from 'lib/uPlotV2/hooks/types';import { thresholdsDrawHook } from 'lib/uPlotV2/hooks/useThresholdsDrawHook';import { resolveSeriesVisibility } from 'lib/uPlotV2/utils/seriesVisibility';diff --git a/frontend/src/lib/uPlotV2/config/__tests__/UPlotConfigBuilder.test.ts b/frontend/src/lib/uPlotV2/config/__tests__/UPlotConfigBuilder.test.tsindex 610c1dc65f..3bc9473bfc 100644--- a/frontend/src/lib/uPlotV2/config/__tests__/UPlotConfigBuilder.test.ts+++ b/frontend/src/lib/uPlotV2/config/__tests__/UPlotConfigBuilder.test.ts@@ -9,12 +9,9 @@ import { DrawStyle, SelectionPreferencesSource, StackMode } from '../types';import { UPlotConfigBuilder } from '../UPlotConfigBuilder';// Mock only the real boundary that hits localStorage-jest.mock(- 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils',- () => ({- getStoredSeriesVisibility: jest.fn(),- }),-);+jest.mock('lib/visualization/panels/utils/legendVisibilityUtils', () => ({+ getStoredSeriesVisibility: jest.fn(),+}));jest.mock('lib/uPlotV2/utils', () => ({calculateWidthBasedOnStepInterval: jest.fn(),@@ -25,7 +22,7 @@ const calculateWidthBasedOnStepIntervalMock = jest.requireMock().calculateWidthBasedOnStepInterval as jest.Mock;const getStoredSeriesVisibilityMock = jest.requireMock(- 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils',+ 'lib/visualization/panels/utils/legendVisibilityUtils',) as {getStoredSeriesVisibility: jest.Mock;};diff --git a/frontend/src/lib/uPlotV2/context/PlotContext.tsx b/frontend/src/lib/uPlotV2/context/PlotContext.tsxindex 07f1f2ed3f..3dac4ec61e 100644--- a/frontend/src/lib/uPlotV2/context/PlotContext.tsx+++ b/frontend/src/lib/uPlotV2/context/PlotContext.tsx@@ -8,8 +8,8 @@ import {useMemo,useRef,} from 'react';-import type { SeriesVisibilityItem } from 'container/DashboardContainer/visualization/panels/types';-import { updateSeriesVisibilityToLocalStorage } from 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils';+import type { SeriesVisibilityItem } from 'lib/visualization/panels/types';+import { updateSeriesVisibilityToLocalStorage } from 'lib/visualization/panels/utils/legendVisibilityUtils';import type uPlot from 'uplot';export interface PlotContextInitialState {uPlotInstance: uPlot | null;diff --git a/frontend/src/lib/uPlotV2/context/__tests__/PlotContext.test.tsx b/frontend/src/lib/uPlotV2/context/__tests__/PlotContext.test.tsxindex 7ff5bdb2e5..e0be6c73dd 100644--- a/frontend/src/lib/uPlotV2/context/__tests__/PlotContext.test.tsx+++ b/frontend/src/lib/uPlotV2/context/__tests__/PlotContext.test.tsx@@ -1,18 +1,15 @@import { render, screen } from '@testing-library/react';import userEvent from '@testing-library/user-event';-import { updateSeriesVisibilityToLocalStorage } from 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils';+import { updateSeriesVisibilityToLocalStorage } from 'lib/visualization/panels/utils/legendVisibilityUtils';import {PlotContextProvider,usePlotContext,} from 'lib/uPlotV2/context/PlotContext';import type uPlot from 'uplot';-jest.mock(- 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils',- () => ({- updateSeriesVisibilityToLocalStorage: jest.fn(),- }),-);+jest.mock('lib/visualization/panels/utils/legendVisibilityUtils', () => ({+ updateSeriesVisibilityToLocalStorage: jest.fn(),+}));const mockUpdateSeriesVisibilityToLocalStorage =updateSeriesVisibilityToLocalStorage as jest.MockedFunction<diff --git a/frontend/src/lib/uPlotV2/utils/dataUtils.ts b/frontend/src/lib/uPlotV2/utils/dataUtils.tsindex 2447524727..3109b11984 100644--- a/frontend/src/lib/uPlotV2/utils/dataUtils.ts+++ b/frontend/src/lib/uPlotV2/utils/dataUtils.ts@@ -1,7 +1,7 @@import {fillMissingXAxisTimestamps,getXAxisTimestamps,-} from 'container/DashboardContainer/visualization/panels/utils';+} from 'lib/visualization/panels/utils';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';/**diff --git a/frontend/src/container/DashboardContainer/visualization/charts/BarChart/BarChart.tsx b/frontend/src/lib/visualization/charts/BarChart/BarChart.tsxsimilarity index 90%rename from frontend/src/container/DashboardContainer/visualization/charts/BarChart/BarChart.tsxrename to frontend/src/lib/visualization/charts/BarChart/BarChart.tsxindex 79ee74650c..6bfc5434d8 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/BarChart/BarChart.tsx+++ b/frontend/src/lib/visualization/charts/BarChart/BarChart.tsx@@ -1,5 +1,5 @@import { useCallback } from 'react';-import ChartWrapper from 'container/DashboardContainer/visualization/charts/ChartWrapper/ChartWrapper';+import ChartWrapper from 'lib/visualization/charts/ChartWrapper/ChartWrapper';import BarChartTooltip from 'lib/uPlotV2/components/Tooltip/BarChartTooltip';import {BarTooltipProps,@@ -8,7 +8,7 @@ import {import { StackMode } from 'lib/uPlotV2/config/types';-import { BarChartProps } from '../types';+import { BarChartProps } from 'lib/visualization/charts/types';export default function BarChart(props: BarChartProps): JSX.Element {const {diff --git a/frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/ChartWrapper.tsx b/frontend/src/lib/visualization/charts/ChartWrapper/ChartWrapper.tsxsimilarity index 93%rename from frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/ChartWrapper.tsxrename to frontend/src/lib/visualization/charts/ChartWrapper/ChartWrapper.tsxindex 38c5558aac..178e9cac5d 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/ChartWrapper.tsx+++ b/frontend/src/lib/visualization/charts/ChartWrapper/ChartWrapper.tsx@@ -1,5 +1,5 @@import { useCallback, useMemo, useRef } from 'react';-import ChartLayout from 'container/DashboardContainer/visualization/layout/ChartLayout/ChartLayout';+import ChartLayout from 'lib/visualization/layout/ChartLayout/ChartLayout';import UPlotLegend from 'lib/uPlotV2/components/Legend/UPlotLegend';import {LegendPosition,@@ -13,8 +13,8 @@ import TooltipPlugin from 'lib/uPlotV2/plugins/TooltipPlugin/TooltipPlugin';import noop from 'lodash-es/noop';import uPlot from 'uplot';-import { ChartWrapperProps } from '../types';-import { useChartStacking } from './useChartStacking';+import { ChartWrapperProps } from 'lib/visualization/charts/types';+import { useChartStacking } from 'lib/visualization/charts/ChartWrapper/useChartStacking';const TOOLTIP_WIDTH_PADDING = 120;const TOOLTIP_MIN_WIDTH = 300;diff --git a/frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/__tests__/useChartStacking.test.ts b/frontend/src/lib/visualization/charts/ChartWrapper/__tests__/useChartStacking.test.tssimilarity index 97%rename from frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/__tests__/useChartStacking.test.tsrename to frontend/src/lib/visualization/charts/ChartWrapper/__tests__/useChartStacking.test.tsindex 74f2ef6a1e..0783312aaa 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/__tests__/useChartStacking.test.ts+++ b/frontend/src/lib/visualization/charts/ChartWrapper/__tests__/useChartStacking.test.ts@@ -3,7 +3,7 @@ import { UPlotConfigBuilder } from 'lib/uPlotV2/config/UPlotConfigBuilder';import { StackMode } from 'lib/uPlotV2/config/types';import uPlot from 'uplot';-import { useChartStacking } from '../useChartStacking';+import { useChartStacking } from 'lib/visualization/charts/ChartWrapper/useChartStacking';type Hooks = Record<string, (...args: unknown[]) => void>;diff --git a/frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/useChartStacking.ts b/frontend/src/lib/visualization/charts/ChartWrapper/useChartStacking.tssimilarity index 97%rename from frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/useChartStacking.tsrename to frontend/src/lib/visualization/charts/ChartWrapper/useChartStacking.tsindex b988c47b85..e936533730 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/ChartWrapper/useChartStacking.ts+++ b/frontend/src/lib/visualization/charts/ChartWrapper/useChartStacking.ts@@ -10,7 +10,7 @@ import { StackMode } from 'lib/uPlotV2/config/types';import { has } from 'lodash-es';import uPlot from 'uplot';-import { stackSeries } from '../utils/stackSeriesUtils';+import { stackSeries } from 'lib/visualization/charts/utils/stackSeriesUtils';/** Returns true if the series at the given index is hidden (e.g. via legend toggle). */function isSeriesHidden(plot: uPlot, seriesIndex: number): boolean {diff --git a/frontend/src/container/DashboardContainer/visualization/charts/Histogram/Histogram.tsx b/frontend/src/lib/visualization/charts/Histogram/Histogram.tsxsimilarity index 88%rename from frontend/src/container/DashboardContainer/visualization/charts/Histogram/Histogram.tsxrename to frontend/src/lib/visualization/charts/Histogram/Histogram.tsxindex 1c3fdf9364..5e7e98e08d 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/Histogram/Histogram.tsx+++ b/frontend/src/lib/visualization/charts/Histogram/Histogram.tsx@@ -1,12 +1,12 @@import { useCallback } from 'react';-import ChartWrapper from 'container/DashboardContainer/visualization/charts/ChartWrapper/ChartWrapper';+import ChartWrapper from 'lib/visualization/charts/ChartWrapper/ChartWrapper';import HistogramTooltip from 'lib/uPlotV2/components/Tooltip/HistogramTooltip';import {HistogramTooltipProps,TooltipRenderArgs,} from 'lib/uPlotV2/components/types';-import { HistogramChartProps } from '../types';+import { HistogramChartProps } from 'lib/visualization/charts/types';export default function Histogram(props: HistogramChartProps): JSX.Element {const {diff --git a/frontend/src/container/DashboardContainer/visualization/charts/Pie/Pie.module.scss b/frontend/src/lib/visualization/charts/Pie/Pie.module.scsssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/charts/Pie/Pie.module.scssrename to frontend/src/lib/visualization/charts/Pie/Pie.module.scssdiff --git a/frontend/src/container/DashboardContainer/visualization/charts/Pie/Pie.tsx b/frontend/src/lib/visualization/charts/Pie/Pie.tsxsimilarity index 91%rename from frontend/src/container/DashboardContainer/visualization/charts/Pie/Pie.tsxrename to frontend/src/lib/visualization/charts/Pie/Pie.tsxindex 4d35ed3d4c..838177bc7c 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/Pie/Pie.tsx+++ b/frontend/src/lib/visualization/charts/Pie/Pie.tsx@@ -9,15 +9,18 @@ import { useResizeObserver } from 'hooks/useDimensions';import Legend from 'lib/uPlotV2/components/Legend/Legend';import { LegendPosition } from 'lib/uPlotV2/components/types';-import { PieChartProps, PieSlice } from '../types';-import { calculateChartDimensions } from '../utils';+import { PieChartProps, PieSlice } from 'lib/visualization/charts/types';+import { calculateChartDimensions } from 'lib/visualization/charts/utils';-import { usePieInteractions } from '../../hooks/usePieInteractions';-import PieArc from './PieArc';-import PieCenterLabel from './PieCenterLabel';-import styles from './Pie.module.scss';-import { PieTooltipData } from './types';-import { getDonutGeometry, getFillColor } from './utils';+import { usePieInteractions } from 'lib/visualization/hooks/usePieInteractions';+import PieArc from 'lib/visualization/charts/Pie/PieArc';+import PieCenterLabel from 'lib/visualization/charts/Pie/PieCenterLabel';+import styles from 'lib/visualization/charts/Pie/Pie.module.scss';+import { PieTooltipData } from 'lib/visualization/charts/Pie/types';+import {+ getDonutGeometry,+ getFillColor,+} from 'lib/visualization/charts/Pie/utils';/*** Donut chart rendered with @visx. Splits its area into chart + legend with thediff --git a/frontend/src/container/DashboardContainer/visualization/charts/Pie/PieArc.tsx b/frontend/src/lib/visualization/charts/Pie/PieArc.tsxsimilarity index 95%rename from frontend/src/container/DashboardContainer/visualization/charts/Pie/PieArc.tsxrename to frontend/src/lib/visualization/charts/Pie/PieArc.tsxindex 65724b392c..873811ca50 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/Pie/PieArc.tsx+++ b/frontend/src/lib/visualization/charts/Pie/PieArc.tsx@@ -2,9 +2,9 @@ import type { MouseEvent as ReactMouseEvent } from 'react';import type { PrecisionOption } from 'components/Graph/types';import { getYAxisFormattedValue } from 'components/Graph/yAxisConfig';-import { PieSlice } from '../types';+import { PieSlice } from 'lib/visualization/charts/types';-import { getArcGeometry } from './utils';+import { getArcGeometry } from 'lib/visualization/charts/Pie/utils';// Slices below this share of the total don't get a leader label (too cramped).const MIN_LABEL_SHARE = 0.03;diff --git a/frontend/src/container/DashboardContainer/visualization/charts/Pie/PieCenterLabel.tsx b/frontend/src/lib/visualization/charts/Pie/PieCenterLabel.tsxsimilarity index 95%rename from frontend/src/container/DashboardContainer/visualization/charts/Pie/PieCenterLabel.tsxrename to frontend/src/lib/visualization/charts/Pie/PieCenterLabel.tsxindex e0faa1c689..f1929dbd4b 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/Pie/PieCenterLabel.tsx+++ b/frontend/src/lib/visualization/charts/Pie/PieCenterLabel.tsx@@ -1,7 +1,7 @@import type { PrecisionOption } from 'components/Graph/types';import { getYAxisFormattedValue } from 'components/Graph/yAxisConfig';-import { getScaledFontSize } from './utils';+import { getScaledFontSize } from 'lib/visualization/charts/Pie/utils';interface PieCenterLabelProps {/** Sum of the visible slice values, shown in the donut hole. */diff --git a/frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/Pie.test.tsx b/frontend/src/lib/visualization/charts/Pie/__tests__/Pie.test.tsxsimilarity index 96%rename from frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/Pie.test.tsxrename to frontend/src/lib/visualization/charts/Pie/__tests__/Pie.test.tsxindex 3bc600fb01..93d55d2820 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/Pie.test.tsx+++ b/frontend/src/lib/visualization/charts/Pie/__tests__/Pie.test.tsx@@ -4,8 +4,8 @@ import { TooltipProvider } from '@signozhq/ui/tooltip';import { LegendPosition } from 'lib/uPlotV2/components/types';import { LegendItem } from 'lib/uPlotV2/config/types';-import { PieSlice } from '../../types';-import Pie from '../Pie';+import { PieSlice } from 'lib/visualization/charts/types';+import Pie from 'lib/visualization/charts/Pie/Pie';jest.mock('hooks/useDimensions', () => ({useResizeObserver: jest.fn().mockReturnValue({ width: 400, height: 300 }),diff --git a/frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/PieArc.test.tsx b/frontend/src/lib/visualization/charts/Pie/__tests__/PieArc.test.tsxsimilarity index 95%rename from frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/PieArc.test.tsxrename to frontend/src/lib/visualization/charts/Pie/__tests__/PieArc.test.tsxindex 6924d1501e..e1883707bc 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/PieArc.test.tsx+++ b/frontend/src/lib/visualization/charts/Pie/__tests__/PieArc.test.tsx@@ -1,7 +1,7 @@import { fireEvent, render, screen } from '@testing-library/react';-import { PieSlice } from '../../types';-import PieArc from '../PieArc';+import { PieSlice } from 'lib/visualization/charts/types';+import PieArc from 'lib/visualization/charts/Pie/PieArc';jest.mock('components/Graph/yAxisConfig', () => ({// Echo the raw value so assertions are deterministic.diff --git a/frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/PieCenterLabel.test.tsx b/frontend/src/lib/visualization/charts/Pie/__tests__/PieCenterLabel.test.tsxsimilarity index 95%rename from frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/PieCenterLabel.test.tsxrename to frontend/src/lib/visualization/charts/Pie/__tests__/PieCenterLabel.test.tsxindex 01b76f16b5..4ecf9d6c31 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/PieCenterLabel.test.tsx+++ b/frontend/src/lib/visualization/charts/Pie/__tests__/PieCenterLabel.test.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react';import { getYAxisFormattedValue } from 'components/Graph/yAxisConfig';-import PieCenterLabel from '../PieCenterLabel';+import PieCenterLabel from 'lib/visualization/charts/Pie/PieCenterLabel';jest.mock('components/Graph/yAxisConfig', () => ({getYAxisFormattedValue: jest.fn(),diff --git a/frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/utils.test.ts b/frontend/src/lib/visualization/charts/Pie/__tests__/utils.test.tssimilarity index 98%rename from frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/utils.test.tsrename to frontend/src/lib/visualization/charts/Pie/__tests__/utils.test.tsindex 214e62112a..4273b6ec4f 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/Pie/__tests__/utils.test.ts+++ b/frontend/src/lib/visualization/charts/Pie/__tests__/utils.test.ts@@ -4,7 +4,7 @@ import {getFillColor,getScaledFontSize,lightenColor,-} from '../utils';+} from 'lib/visualization/charts/Pie/utils';describe('Pie utils', () => {describe('getDonutGeometry', () => {diff --git a/frontend/src/container/DashboardContainer/visualization/charts/Pie/types.ts b/frontend/src/lib/visualization/charts/Pie/types.tssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/charts/Pie/types.tsrename to frontend/src/lib/visualization/charts/Pie/types.tsdiff --git a/frontend/src/container/DashboardContainer/visualization/charts/Pie/utils.ts b/frontend/src/lib/visualization/charts/Pie/utils.tssimilarity index 98%rename from frontend/src/container/DashboardContainer/visualization/charts/Pie/utils.tsrename to frontend/src/lib/visualization/charts/Pie/utils.tsindex 9a53321f7f..381e02afe8 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/Pie/utils.ts+++ b/frontend/src/lib/visualization/charts/Pie/utils.ts@@ -8,7 +8,7 @@ import {DonutGeometry,ParsedRgb,ScaledFontSizeArgs,-} from './types';+} from 'lib/visualization/charts/Pie/types';// Leader-line + two-line label/value drawn outside the donut. `getArcGeometry`// anchors the label at `radius * LABEL_RADIUS_RATIO`; `LABEL_TEXT_ALLOWANCE` isdiff --git a/frontend/src/container/DashboardContainer/visualization/charts/TimeSeries/TimeSeries.tsx b/frontend/src/lib/visualization/charts/TimeSeries/TimeSeries.tsxsimilarity index 89%rename from frontend/src/container/DashboardContainer/visualization/charts/TimeSeries/TimeSeries.tsxrename to frontend/src/lib/visualization/charts/TimeSeries/TimeSeries.tsxindex 2eebdbaff3..d36483883b 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/TimeSeries/TimeSeries.tsx+++ b/frontend/src/lib/visualization/charts/TimeSeries/TimeSeries.tsx@@ -1,5 +1,5 @@import { useCallback } from 'react';-import ChartWrapper from 'container/DashboardContainer/visualization/charts/ChartWrapper/ChartWrapper';+import ChartWrapper from 'lib/visualization/charts/ChartWrapper/ChartWrapper';import TimeSeriesTooltip from 'lib/uPlotV2/components/Tooltip/TimeSeriesTooltip';import {TimeSeriesTooltipProps,@@ -8,7 +8,7 @@ import {import { StackMode } from 'lib/uPlotV2/config/types';-import { TimeSeriesChartProps } from '../types';+import { TimeSeriesChartProps } from 'lib/visualization/charts/types';export default function TimeSeries(props: TimeSeriesChartProps): JSX.Element {const { children, customTooltip, stack = StackMode.None, ...rest } = props;diff --git a/frontend/src/container/DashboardContainer/visualization/charts/__tests__/utils.test.ts b/frontend/src/lib/visualization/charts/__tests__/utils.test.tssimilarity index 97%rename from frontend/src/container/DashboardContainer/visualization/charts/__tests__/utils.test.tsrename to frontend/src/lib/visualization/charts/__tests__/utils.test.tsindex a16b9e9121..4ab1a72711 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/__tests__/utils.test.ts+++ b/frontend/src/lib/visualization/charts/__tests__/utils.test.ts@@ -1,6 +1,6 @@import { LegendPosition } from 'lib/uPlotV2/components/types';-import { calculateChartDimensions } from '../utils';+import { calculateChartDimensions } from 'lib/visualization/charts/utils';const labels = (count: number, length = 20): string[] =>Array.from({ length: count }, (_, i) =>diff --git a/frontend/src/container/DashboardContainer/visualization/charts/types.ts b/frontend/src/lib/visualization/charts/types.tssimilarity index 94%rename from frontend/src/container/DashboardContainer/visualization/charts/types.tsrename to frontend/src/lib/visualization/charts/types.tsindex dad0cc3190..da8bf6da05 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/types.ts+++ b/frontend/src/lib/visualization/charts/types.ts@@ -1,3 +1,4 @@+import uPlot from 'uplot';import type { MouseEvent as ReactMouseEvent } from 'react';import { Timezone } from 'components/CustomTimePicker/timezoneUtils';import { PrecisionOption } from 'components/Graph/types';@@ -109,3 +110,13 @@ export interface PieChartProps {onSliceClick?: (slice: PieSlice, event: ReactMouseEvent) => void;'data-testid'?: string;}++/** A uPlot series enriched with the aggregates the legend table shows. */+export type ExtendedChartDataset = uPlot.Series & {+ show: boolean;+ sum: number;+ avg: number;+ min: number;+ max: number;+ index: number;+};diff --git a/frontend/src/container/DashboardContainer/visualization/charts/utils.ts b/frontend/src/lib/visualization/charts/utils.tssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/charts/utils.tsrename to frontend/src/lib/visualization/charts/utils.tsdiff --git a/frontend/src/container/DashboardContainer/visualization/charts/utils/__tests__/sortByMeanDesc.test.ts b/frontend/src/lib/visualization/charts/utils/__tests__/sortByMeanDesc.test.tssimilarity index 95%rename from frontend/src/container/DashboardContainer/visualization/charts/utils/__tests__/sortByMeanDesc.test.tsrename to frontend/src/lib/visualization/charts/utils/__tests__/sortByMeanDesc.test.tsindex d0670300f5..786b1e1102 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/utils/__tests__/sortByMeanDesc.test.ts+++ b/frontend/src/lib/visualization/charts/utils/__tests__/sortByMeanDesc.test.ts@@ -1,4 +1,4 @@-import { sortByMeanDesc } from '../sortByMeanDesc';+import { sortByMeanDesc } from 'lib/visualization/charts/utils/sortByMeanDesc';interface Item {name: string;diff --git a/frontend/src/container/DashboardContainer/visualization/charts/utils/__tests__/stackSeriesUtils.test.ts b/frontend/src/lib/visualization/charts/utils/__tests__/stackSeriesUtils.test.tssimilarity index 98%rename from frontend/src/container/DashboardContainer/visualization/charts/utils/__tests__/stackSeriesUtils.test.tsrename to frontend/src/lib/visualization/charts/utils/__tests__/stackSeriesUtils.test.tsindex 52a50851f8..678ca17608 100644--- a/frontend/src/container/DashboardContainer/visualization/charts/utils/__tests__/stackSeriesUtils.test.ts+++ b/frontend/src/lib/visualization/charts/utils/__tests__/stackSeriesUtils.test.ts@@ -2,7 +2,7 @@ import { AlignedData } from 'uplot';import { StackMode } from 'lib/uPlotV2/config/types';-import { stackSeries } from '../stackSeriesUtils';+import { stackSeries } from 'lib/visualization/charts/utils/stackSeriesUtils';const includeAll = (): boolean => false;diff --git a/frontend/src/container/DashboardContainer/visualization/charts/utils/sortByMeanDesc.ts b/frontend/src/lib/visualization/charts/utils/sortByMeanDesc.tssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/charts/utils/sortByMeanDesc.tsrename to frontend/src/lib/visualization/charts/utils/sortByMeanDesc.tsdiff --git a/frontend/src/container/DashboardContainer/visualization/charts/utils/stackSeriesUtils.ts b/frontend/src/lib/visualization/charts/utils/stackSeriesUtils.tssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/charts/utils/stackSeriesUtils.tsrename to frontend/src/lib/visualization/charts/utils/stackSeriesUtils.tsdiff --git a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/ChartManager.styles.scss b/frontend/src/lib/visualization/components/ChartManager/ChartManager.styles.scsssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/components/ChartManager/ChartManager.styles.scssrename to frontend/src/lib/visualization/components/ChartManager/ChartManager.styles.scssdiff --git a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/ChartManager.tsx b/frontend/src/lib/visualization/components/ChartManager/ChartManager.tsxsimilarity index 90%rename from frontend/src/container/DashboardContainer/visualization/components/ChartManager/ChartManager.tsxrename to frontend/src/lib/visualization/components/ChartManager/ChartManager.tsxindex edb8180992..cbad04acd5 100644--- a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/ChartManager.tsx+++ b/frontend/src/lib/visualization/components/ChartManager/ChartManager.tsx@@ -6,16 +6,15 @@ import { ResizeTable } from 'components/ResizeTable';import { UPlotConfigBuilder } from 'lib/uPlotV2/config/UPlotConfigBuilder';import { usePlotContext } from 'lib/uPlotV2/context/PlotContext';import useLegendsSync from 'lib/uPlotV2/hooks/useLegendsSync';-import {- selectIsDashboardLocked,- useDashboardStore,-} from 'providers/Dashboard/store/useDashboardStore';import { toast } from '@signozhq/ui/sonner';-import { getChartManagerColumns } from './getChartMangerColumns';-import { ExtendedChartDataset, getDefaultTableDataSet } from './utils';+import { getChartManagerColumns } from 'lib/visualization/components/ChartManager/getChartMangerColumns';+import {+ ExtendedChartDataset,+ getDefaultTableDataSet,+} from 'lib/visualization/components/ChartManager/utils';-import './ChartManager.styles.scss';+import 'lib/visualization/components/ChartManager/ChartManager.styles.scss';interface ChartManagerProps {config: UPlotConfigBuilder;@@ -53,7 +52,6 @@ export default function ChartManager({onToggleSeriesVisibility,syncSeriesVisibilityToLocalStorage,} = usePlotContext();- const isDashboardLocked = useDashboardStore(selectIsDashboardLocked);const [tableDataSet, setTableDataSet] = useState<ExtendedChartDataset[]>(() =>getDefaultTableDataSet(@@ -119,7 +117,6 @@ export default function ChartManager({onToggleSeriesOnOff: handleToggleSeriesOnOff,onToggleSeriesVisibility,yAxisUnit,- isGraphDisabled: isDashboardLocked,decimalPrecision,}),[@@ -128,7 +125,6 @@ export default function ChartManager({handleToggleSeriesOnOff,onToggleSeriesVisibility,yAxisUnit,- isDashboardLocked,decimalPrecision,],);diff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/CustomCheckBox.module.scss b/frontend/src/lib/visualization/components/ChartManager/CustomCheckBox.module.scsssimilarity index 100%rename from frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/CustomCheckBox.module.scssrename to frontend/src/lib/visualization/components/ChartManager/CustomCheckBox.module.scssdiff --git a/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/CustomCheckBox.tsx b/frontend/src/lib/visualization/components/ChartManager/CustomCheckBox.tsxsimilarity index 72%rename from frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/CustomCheckBox.tsxrename to frontend/src/lib/visualization/components/ChartManager/CustomCheckBox.tsxindex 5730c95f3c..f5cab5431c 100644--- a/frontend/src/container/GridCardLayout/GridCard/FullView/TableRender/CustomCheckBox.tsx+++ b/frontend/src/lib/visualization/components/ChartManager/CustomCheckBox.tsx@@ -1,10 +1,21 @@import { grey } from '@ant-design/colors';import { Checkbox } from '@signozhq/ui/checkbox';+import { ExtendedChartDataset } from 'lib/visualization/charts/types';import { CSSProperties } from 'react';-import { CheckBoxProps } from '../types';import styles from './CustomCheckBox.module.scss';+interface CheckBoxProps {+ data: ExtendedChartDataset[];+ index: number;+ graphVisibilityState: boolean[];+ checkBoxOnChangeHandler: (+ checked: boolean | 'indeterminate',+ index: number,+ ) => void;+ disabled?: boolean;+}+function CustomCheckBox({data,index,diff --git a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/SeriesLabel.tsx b/frontend/src/lib/visualization/components/ChartManager/SeriesLabel.tsxsimilarity index 88%rename from frontend/src/container/DashboardContainer/visualization/components/ChartManager/SeriesLabel.tsxrename to frontend/src/lib/visualization/components/ChartManager/SeriesLabel.tsxindex 2980f61d58..af56dfb961 100644--- a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/SeriesLabel.tsx+++ b/frontend/src/lib/visualization/components/ChartManager/SeriesLabel.tsx@@ -1,6 +1,6 @@import { Tooltip } from 'antd';-import './ChartManager.styles.scss';+import 'lib/visualization/components/ChartManager/ChartManager.styles.scss';interface SeriesLabelProps {label: string;diff --git a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/ChartManager.test.tsx b/frontend/src/lib/visualization/components/ChartManager/__tests__/ChartManager.test.tsxsimilarity index 89%rename from frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/ChartManager.test.tsxrename to frontend/src/lib/visualization/components/ChartManager/__tests__/ChartManager.test.tsxindex 75e5103b65..f33e962cb8 100644--- a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/ChartManager.test.tsx+++ b/frontend/src/lib/visualization/components/ChartManager/__tests__/ChartManager.test.tsx@@ -2,7 +2,7 @@ import userEvent from '@testing-library/user-event';import { UPlotConfigBuilder } from 'lib/uPlotV2/config/UPlotConfigBuilder';import { render, screen } from 'tests/test-utils';-import ChartManager from '../ChartManager';+import ChartManager from 'lib/visualization/components/ChartManager/ChartManager';const mockSyncSeriesVisibilityToLocalStorage = jest.fn();const mockToastSuccess = jest.fn();@@ -32,20 +32,6 @@ jest.mock('lib/uPlotV2/hooks/useLegendsSync', () => ({}),}));-jest.mock('providers/Dashboard/store/useDashboardStore', () => ({- useDashboardStore: (- selector?: (s: { dashboardData: { locked: boolean } | undefined }) => {- dashboardData: { locked: boolean };- },- ): { dashboardData: { locked: boolean } } => {- const mockState = { dashboardData: { locked: false } };- return selector ? selector(mockState) : mockState;- },- selectIsDashboardLocked: (s: {- dashboardData: { locked: boolean } | undefined;- }): boolean => s.dashboardData?.locked ?? false,-}));-jest.mock('@signozhq/ui/sonner', () => ({...jest.requireActual('@signozhq/ui/sonner'),toast: {diff --git a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/SeriesLabel.test.tsx b/frontend/src/lib/visualization/components/ChartManager/__tests__/SeriesLabel.test.tsxsimilarity index 93%rename from frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/SeriesLabel.test.tsxrename to frontend/src/lib/visualization/components/ChartManager/__tests__/SeriesLabel.test.tsxindex 4264802a79..0c3a5bb131 100644--- a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/SeriesLabel.test.tsx+++ b/frontend/src/lib/visualization/components/ChartManager/__tests__/SeriesLabel.test.tsx@@ -1,7 +1,7 @@import userEvent from '@testing-library/user-event';import { render, screen } from 'tests/test-utils';-import { SeriesLabel } from '../SeriesLabel';+import { SeriesLabel } from 'lib/visualization/components/ChartManager/SeriesLabel';describe('SeriesLabel', () => {it('renders the label text', () => {diff --git a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/getChartManagerColumns.test.tsx b/frontend/src/lib/visualization/components/ChartManager/__tests__/getChartManagerColumns.test.tsxsimilarity index 95%rename from frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/getChartManagerColumns.test.tsxrename to frontend/src/lib/visualization/components/ChartManager/__tests__/getChartManagerColumns.test.tsxindex 8e2f07757c..67419d6327 100644--- a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/getChartManagerColumns.test.tsx+++ b/frontend/src/lib/visualization/components/ChartManager/__tests__/getChartManagerColumns.test.tsx@@ -2,8 +2,8 @@ import { render } from '@testing-library/react';import { Y_AXIS_UNIT_NAMES } from 'components/YAxisUnitSelector/constants';import { UniversalYAxisUnit } from 'components/YAxisUnitSelector/types';-import { getChartManagerColumns } from '../getChartMangerColumns';-import { ExtendedChartDataset } from '../utils';+import { getChartManagerColumns } from 'lib/visualization/components/ChartManager/getChartMangerColumns';+import { ExtendedChartDataset } from 'lib/visualization/components/ChartManager/utils';const createMockDataset = (index: number,diff --git a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/utils.test.ts b/frontend/src/lib/visualization/components/ChartManager/__tests__/utils.test.tssimilarity index 97%rename from frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/utils.test.tsrename to frontend/src/lib/visualization/components/ChartManager/__tests__/utils.test.tsindex 379b41f066..56ada8f1bc 100644--- a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/__tests__/utils.test.ts+++ b/frontend/src/lib/visualization/components/ChartManager/__tests__/utils.test.ts@@ -4,7 +4,7 @@ import {formatTableValueWithUnit,getDefaultTableDataSet,getTableColumnTitle,-} from '../utils';+} from 'lib/visualization/components/ChartManager/utils';describe('ChartManager utils', () => {describe('getDefaultTableDataSet', () => {diff --git a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/getChartMangerColumns.tsx b/frontend/src/lib/visualization/components/ChartManager/getChartMangerColumns.tsxsimilarity index 89%rename from frontend/src/container/DashboardContainer/visualization/components/ChartManager/getChartMangerColumns.tsxrename to frontend/src/lib/visualization/components/ChartManager/getChartMangerColumns.tsxindex 0d05f2300a..61b23ffd2e 100644--- a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/getChartMangerColumns.tsx+++ b/frontend/src/lib/visualization/components/ChartManager/getChartMangerColumns.tsx@@ -1,13 +1,13 @@import { TableColumnType as ColumnType } from 'antd';import { PrecisionOption, PrecisionOptionsEnum } from 'components/Graph/types';-import CustomCheckBox from 'container/GridCardLayout/GridCard/FullView/TableRender/CustomCheckBox';+import CustomCheckBox from 'lib/visualization/components/ChartManager/CustomCheckBox';-import { SeriesLabel } from './SeriesLabel';+import { SeriesLabel } from 'lib/visualization/components/ChartManager/SeriesLabel';import {ExtendedChartDataset,formatTableValueWithUnit,getTableColumnTitle,-} from './utils';+} from 'lib/visualization/components/ChartManager/utils';export interface GetChartManagerColumnsParams {tableDataSet: ExtendedChartDataset[];@@ -16,7 +16,6 @@ export interface GetChartManagerColumnsParams {onToggleSeriesVisibility: (index: number) => void;yAxisUnit?: string;decimalPrecision?: PrecisionOption;- isGraphDisabled?: boolean;}export function getChartManagerColumns({@@ -26,7 +25,6 @@ export function getChartManagerColumns({onToggleSeriesVisibility,yAxisUnit,decimalPrecision = PrecisionOptionsEnum.TWO,- isGraphDisabled,}: GetChartManagerColumnsParams): ColumnType<ExtendedChartDataset>[] {return [{@@ -39,7 +37,6 @@ export function getChartManagerColumns({data={tableDataSet}graphVisibilityState={graphVisibilityState}index={record.index}- disabled={isGraphDisabled}checkBoxOnChangeHandler={(_e, idx): void => onToggleSeriesOnOff(idx)}/>),@@ -53,7 +50,6 @@ export function getChartManagerColumns({<SeriesLabellabel={label ?? ''}labelIndex={record.index}- disabled={isGraphDisabled}onClick={onToggleSeriesVisibility}/>),diff --git a/frontend/src/container/DashboardContainer/visualization/components/ChartManager/utils.ts b/frontend/src/lib/visualization/components/ChartManager/utils.tssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/components/ChartManager/utils.tsrename to frontend/src/lib/visualization/components/ChartManager/utils.tsdiff --git a/frontend/src/lib/visualization/constants.ts b/frontend/src/lib/visualization/constants.tsnew file mode 100644index 0000000000..219579176f--- /dev/null+++ b/frontend/src/lib/visualization/constants.ts@@ -0,0 +1,30 @@+/** Bucket count used when a histogram panel doesn't specify one. */+export const DEFAULT_BUCKET_COUNT = 30;++// prettier-ignore+export const histogramBucketSizes = [+ 1e-9, 2e-9, 2.5e-9, 4e-9, 5e-9,+ 1e-8, 2e-8, 2.5e-8, 4e-8, 5e-8,+ 1e-7, 2e-7, 2.5e-7, 4e-7, 5e-7,+ 1e-6, 2e-6, 2.5e-6, 4e-6, 5e-6,+ 1e-5, 2e-5, 2.5e-5, 4e-5, 5e-5,+ 1e-4, 2e-4, 2.5e-4, 4e-4, 5e-4,+ 1e-3, 2e-3, 2.5e-3, 4e-3, 5e-3,+ 1e-2, 2e-2, 2.5e-2, 4e-2, 5e-2,+ 1e-1, 2e-1, 2.5e-1, 4e-1, 5e-1,+ 1, 2, 4, 5,+ 1e+1, 2e+1, 2.5e+1, 4e+1, 5e+1,+ 1e+2, 2e+2, 2.5e+2, 4e+2, 5e+2,+ 1e+3, 2e+3, 2.5e+3, 4e+3, 5e+3,+ 1e+4, 2e+4, 2.5e+4, 4e+4, 5e+4,+ 1e+5, 2e+5, 2.5e+5, 4e+5, 5e+5,+ 1e+6, 2e+6, 2.5e+6, 4e+6, 5e+6,+ 1e+7, 2e+7, 2.5e+7, 4e+7, 5e+7,+ 1e+8, 2e+8, 2.5e+8, 4e+8, 5e+8,+ 1e+9, 2e+9, 2.5e+9, 4e+9, 5e+9,+ ];++/** How a null run is rendered: dropped, kept as-is, or expanded to a visible gap. */+export const NULL_REMOVE = 0;+export const NULL_RETAIN = 1;+export const NULL_EXPAND = 2;diff --git a/frontend/src/container/DashboardContainer/visualization/hooks/__tests__/usePieInteractions.test.tsx b/frontend/src/lib/visualization/hooks/__tests__/usePieInteractions.test.tsxsimilarity index 94%rename from frontend/src/container/DashboardContainer/visualization/hooks/__tests__/usePieInteractions.test.tsxrename to frontend/src/lib/visualization/hooks/__tests__/usePieInteractions.test.tsxindex f93734f34f..2e9452def4 100644--- a/frontend/src/container/DashboardContainer/visualization/hooks/__tests__/usePieInteractions.test.tsx+++ b/frontend/src/lib/visualization/hooks/__tests__/usePieInteractions.test.tsx@@ -2,15 +2,13 @@ import { act, renderHook } from '@testing-library/react';import {getStoredSeriesVisibility,updateSeriesVisibilityToLocalStorage,-} from 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils';+} from 'lib/visualization/panels/utils/legendVisibilityUtils';import type { MouseEvent } from 'react';-import { PieSlice } from '../../charts/types';-import { usePieInteractions } from '../usePieInteractions';+import { PieSlice } from 'lib/visualization/charts/types';+import { usePieInteractions } from 'lib/visualization/hooks/usePieInteractions';-jest.mock(- 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils',-);+jest.mock('lib/visualization/panels/utils/legendVisibilityUtils');const mockGetStored = getStoredSeriesVisibility as jest.MockedFunction<typeof getStoredSeriesVisibilitydiff --git a/frontend/src/container/DashboardContainer/visualization/hooks/__tests__/useScrollWidgetIntoView.test.ts b/frontend/src/lib/visualization/hooks/__tests__/useScrollWidgetIntoView.test.tssimilarity index 95%rename from frontend/src/container/DashboardContainer/visualization/hooks/__tests__/useScrollWidgetIntoView.test.tsrename to frontend/src/lib/visualization/hooks/__tests__/useScrollWidgetIntoView.test.tsindex ed0ea15736..eeaf5d6c3d 100644--- a/frontend/src/container/DashboardContainer/visualization/hooks/__tests__/useScrollWidgetIntoView.test.ts+++ b/frontend/src/lib/visualization/hooks/__tests__/useScrollWidgetIntoView.test.ts@@ -1,7 +1,7 @@import { renderHook } from '@testing-library/react';import { useScrollToWidgetIdStore } from 'providers/Dashboard/helpers/scrollToWidgetIdHelper';-import { useScrollWidgetIntoView } from '../useScrollWidgetIntoView';+import { useScrollWidgetIntoView } from 'lib/visualization/hooks/useScrollWidgetIntoView';jest.mock('providers/Dashboard/helpers/scrollToWidgetIdHelper');diff --git a/frontend/src/container/DashboardContainer/visualization/hooks/usePieInteractions.ts b/frontend/src/lib/visualization/hooks/usePieInteractions.tssimilarity index 97%rename from frontend/src/container/DashboardContainer/visualization/hooks/usePieInteractions.tsrename to frontend/src/lib/visualization/hooks/usePieInteractions.tsindex 064f0211d1..9ecc94c446 100644--- a/frontend/src/container/DashboardContainer/visualization/hooks/usePieInteractions.ts+++ b/frontend/src/lib/visualization/hooks/usePieInteractions.ts@@ -5,8 +5,8 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';import {getStoredSeriesVisibility,updateSeriesVisibilityToLocalStorage,-} from '../panels/utils/legendVisibilityUtils';-import { PieSlice } from '../charts/types';+} from 'lib/visualization/panels/utils/legendVisibilityUtils';+import { PieSlice } from 'lib/visualization/charts/types';export interface UsePieInteractionsResult {/** The hovered/focused slice (drives donut dimming + tooltip). */diff --git a/frontend/src/container/DashboardContainer/visualization/hooks/useScrollWidgetIntoView.ts b/frontend/src/lib/visualization/hooks/useScrollWidgetIntoView.tssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/hooks/useScrollWidgetIntoView.tsrename to frontend/src/lib/visualization/hooks/useScrollWidgetIntoView.tsdiff --git a/frontend/src/container/DashboardContainer/visualization/layout/ChartLayout/ChartLayout.styles.scss b/frontend/src/lib/visualization/layout/ChartLayout/ChartLayout.styles.scsssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/layout/ChartLayout/ChartLayout.styles.scssrename to frontend/src/lib/visualization/layout/ChartLayout/ChartLayout.styles.scssdiff --git a/frontend/src/container/DashboardContainer/visualization/layout/ChartLayout/ChartLayout.tsx b/frontend/src/lib/visualization/layout/ChartLayout/ChartLayout.tsxsimilarity index 94%rename from frontend/src/container/DashboardContainer/visualization/layout/ChartLayout/ChartLayout.tsxrename to frontend/src/lib/visualization/layout/ChartLayout/ChartLayout.tsxindex a8a3896beb..963191141d 100644--- a/frontend/src/container/DashboardContainer/visualization/layout/ChartLayout/ChartLayout.tsx+++ b/frontend/src/lib/visualization/layout/ChartLayout/ChartLayout.tsx@@ -1,11 +1,11 @@import { useMemo } from 'react';import cx from 'classnames';-import { calculateChartDimensions } from 'container/DashboardContainer/visualization/charts/utils';+import { calculateChartDimensions } from 'lib/visualization/charts/utils';import { MAX_LEGEND_WIDTH } from 'lib/uPlotV2/components/Legend/Legend';import { LegendConfig, LegendPosition } from 'lib/uPlotV2/components/types';import { UPlotConfigBuilder } from 'lib/uPlotV2/config/UPlotConfigBuilder';-import './ChartLayout.styles.scss';+import 'lib/visualization/layout/ChartLayout/ChartLayout.styles.scss';export interface ChartLayoutProps {showLegend?: boolean;diff --git a/frontend/src/container/DashboardContainer/visualization/panels/components/TooltipFooter.module.scss b/frontend/src/lib/visualization/panels/components/TooltipFooter.module.scsssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/panels/components/TooltipFooter.module.scssrename to frontend/src/lib/visualization/panels/components/TooltipFooter.module.scssdiff --git a/frontend/src/container/DashboardContainer/visualization/panels/components/TooltipFooter.tsx b/frontend/src/lib/visualization/panels/components/TooltipFooter.tsxsimilarity index 95%rename from frontend/src/container/DashboardContainer/visualization/panels/components/TooltipFooter.tsxrename to frontend/src/lib/visualization/panels/components/TooltipFooter.tsxindex b88cf348fd..a31ad5b391 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/components/TooltipFooter.tsx+++ b/frontend/src/lib/visualization/panels/components/TooltipFooter.tsx@@ -2,7 +2,7 @@ import { Button } from '@signozhq/ui/button';import { Kbd } from '@signozhq/ui/kbd';import { DEFAULT_PIN_TOOLTIP_KEY } from 'lib/uPlotV2/plugins/TooltipPlugin/types';-import Styles from './TooltipFooter.module.scss';+import Styles from 'lib/visualization/panels/components/TooltipFooter.module.scss';import { MousePointerClick, X } from '@signozhq/icons';import logEvent from 'api/common/logEvent';import { Events } from 'constants/events';diff --git a/frontend/src/container/DashboardContainer/visualization/panels/components/__tests__/TooltipFooter.test.tsx b/frontend/src/lib/visualization/panels/components/__tests__/TooltipFooter.test.tsxsimilarity index 97%rename from frontend/src/container/DashboardContainer/visualization/panels/components/__tests__/TooltipFooter.test.tsxrename to frontend/src/lib/visualization/panels/components/__tests__/TooltipFooter.test.tsxindex b0a6b04966..0a048164b5 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/components/__tests__/TooltipFooter.test.tsx+++ b/frontend/src/lib/visualization/panels/components/__tests__/TooltipFooter.test.tsx@@ -3,7 +3,7 @@ import { Events } from 'constants/events';import { DEFAULT_PIN_TOOLTIP_KEY } from 'lib/uPlotV2/plugins/TooltipPlugin/types';import { render, screen, userEvent } from 'tests/test-utils';-import TooltipFooter from '../TooltipFooter';+import TooltipFooter from 'lib/visualization/panels/components/TooltipFooter';describe('TooltipFooter', () => {const defaultProps = {diff --git a/frontend/src/container/DashboardContainer/visualization/panels/types.ts b/frontend/src/lib/visualization/panels/types.tssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/panels/types.tsrename to frontend/src/lib/visualization/panels/types.tsdiff --git a/frontend/src/container/DashboardContainer/visualization/panels/utils/__tests__/baseConfigBuilder.test.ts b/frontend/src/lib/visualization/panels/utils/__tests__/baseConfigBuilder.test.tssimilarity index 94%rename from frontend/src/container/DashboardContainer/visualization/panels/utils/__tests__/baseConfigBuilder.test.tsrename to frontend/src/lib/visualization/panels/utils/__tests__/baseConfigBuilder.test.tsindex fb6fb06afd..5ad1974045 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/utils/__tests__/baseConfigBuilder.test.ts+++ b/frontend/src/lib/visualization/panels/utils/__tests__/baseConfigBuilder.test.ts@@ -1,18 +1,18 @@import { PANEL_TYPES } from 'constants/queryBuilder';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import { ThresholdProps } from 'types/api/widgets/threshold';import { STEP_INTERVAL_MULTIPLIER } from 'lib/uPlotV2/constants';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import uPlot from 'uplot';-import { PanelMode } from '../../types';-import { BaseConfigBuilderProps, buildBaseConfig } from '../baseConfigBuilder';+import { PanelMode } from 'lib/visualization/panels/types';+import {+ BaseConfigBuilderProps,+ buildBaseConfig,+} from 'lib/visualization/panels/utils/baseConfigBuilder';-jest.mock(- 'container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils',- () => ({- getStoredSeriesVisibility: jest.fn(),- }),-);+jest.mock('lib/visualization/panels/utils/legendVisibilityUtils', () => ({+ getStoredSeriesVisibility: jest.fn(),+}));jest.mock('lib/uPlotV2/utils', () => ({calculateWidthBasedOnStepInterval: jest.fn(),diff --git a/frontend/src/container/DashboardContainer/visualization/panels/utils/__tests__/legendVisibilityUtils.test.ts b/frontend/src/lib/visualization/panels/utils/__tests__/legendVisibilityUtils.test.tssimilarity index 98%rename from frontend/src/container/DashboardContainer/visualization/panels/utils/__tests__/legendVisibilityUtils.test.tsrename to frontend/src/lib/visualization/panels/utils/__tests__/legendVisibilityUtils.test.tsindex 9e209b4a21..40e6af5e73 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/utils/__tests__/legendVisibilityUtils.test.ts+++ b/frontend/src/lib/visualization/panels/utils/__tests__/legendVisibilityUtils.test.ts@@ -1,10 +1,10 @@import { LOCALSTORAGE } from 'constants/localStorage';-import type { GraphVisibilityState } from '../../types';+import type { GraphVisibilityState } from 'lib/visualization/panels/types';import {getStoredSeriesVisibility,updateSeriesVisibilityToLocalStorage,-} from '../legendVisibilityUtils';+} from 'lib/visualization/panels/utils/legendVisibilityUtils';describe('legendVisibilityUtils', () => {const storageKey = LOCALSTORAGE.GRAPH_VISIBILITY_STATES;diff --git a/frontend/src/container/DashboardContainer/visualization/panels/utils/baseConfigBuilder.ts b/frontend/src/lib/visualization/panels/utils/baseConfigBuilder.tssimilarity index 96%rename from frontend/src/container/DashboardContainer/visualization/panels/utils/baseConfigBuilder.tsrename to frontend/src/lib/visualization/panels/utils/baseConfigBuilder.tsindex b1e482bb81..240e82e002 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/utils/baseConfigBuilder.ts+++ b/frontend/src/lib/visualization/panels/utils/baseConfigBuilder.ts@@ -1,6 +1,6 @@import { Timezone } from 'components/CustomTimePicker/timezoneUtils';import { PANEL_TYPES } from 'constants/queryBuilder';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';+import { ThresholdProps } from 'types/api/widgets/threshold';import onClickPlugin, {OnClickPluginOpts,} from 'lib/uPlotLib/plugins/onClickPlugin';@@ -13,7 +13,7 @@ import { ThresholdsDrawHookOptions } from 'lib/uPlotV2/hooks/types';import { MetricRangePayloadProps } from 'types/api/metrics/getQueryRange';import uPlot from 'uplot';-import { PanelMode } from '../types';+import { PanelMode } from 'lib/visualization/panels/types';export interface BaseConfigBuilderProps {id: string;diff --git a/frontend/src/container/DashboardContainer/visualization/panels/utils/histogram.ts b/frontend/src/lib/visualization/panels/utils/histogram.tssimilarity index 99%rename from frontend/src/container/DashboardContainer/visualization/panels/utils/histogram.tsrename to frontend/src/lib/visualization/panels/utils/histogram.tsindex c3e94ba2f8..ff4e2ae0ef 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/utils/histogram.ts+++ b/frontend/src/lib/visualization/panels/utils/histogram.ts@@ -2,7 +2,7 @@ import {NULL_EXPAND,NULL_REMOVE,NULL_RETAIN,-} from 'container/PanelWrapper/constants';+} from 'lib/visualization/constants';import { AlignedData } from 'uplot';/**diff --git a/frontend/src/container/DashboardContainer/visualization/panels/utils/index.ts b/frontend/src/lib/visualization/panels/utils/index.tssimilarity index 100%rename from frontend/src/container/DashboardContainer/visualization/panels/utils/index.tsrename to frontend/src/lib/visualization/panels/utils/index.tsdiff --git a/frontend/src/container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils.ts b/frontend/src/lib/visualization/panels/utils/legendVisibilityUtils.tssimilarity index 95%rename from frontend/src/container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils.tsrename to frontend/src/lib/visualization/panels/utils/legendVisibilityUtils.tsindex 48f960f486..2c4b4fa3af 100644--- a/frontend/src/container/DashboardContainer/visualization/panels/utils/legendVisibilityUtils.ts+++ b/frontend/src/lib/visualization/panels/utils/legendVisibilityUtils.ts@@ -3,7 +3,10 @@ import removeLocalStorageKey from 'api/browser/localstorage/remove';import setLocalStorageKey from 'api/browser/localstorage/set';import { LOCALSTORAGE } from 'constants/localStorage';-import { GraphVisibilityState, SeriesVisibilityItem } from '../types';+import {+ GraphVisibilityState,+ SeriesVisibilityItem,+} from 'lib/visualization/panels/types';/*** Retrieves the stored series visibility for a specific widget from localStorage by index.diff --git a/frontend/src/mocks-server/__mockdata__/publicDashboard.ts b/frontend/src/mocks-server/__mockdata__/publicDashboard.tsdeleted file mode 100644index 82cadf40e7..0000000000--- a/frontend/src/mocks-server/__mockdata__/publicDashboard.ts+++ /dev/null@@ -1,330 +0,0 @@-import { ReduceOperators } from 'types/common/queryBuilder';--export const publishedPublicDashboardMeta = {- status: 'success',- data: {- timeRangeEnabled: true,- defaultTimeRange: '30m',- publicPath: '/public/dashboard/019ac98e-383f-7e9f-b716-d15bcb6be4bb',- },-};--export const unpublishedPublicDashboardMeta = {- status: 'error',- error: {- code: 'public_dashboard_not_found',- message:- "dashboard with id 019ac4e8-1a35-718e-aa4b-0c9781d7a31c isn't public",- },-};--export const publicDashboardResponse = {- status: 'success',- data: {- dashboard: {- createdAt: '0001-01-01T00:00:00Z',- updatedAt: '0001-01-01T00:00:00Z',- createdBy: '',- updatedBy: '',- id: '',- data: {- description: '',- image:- 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0Ljk0OTQgMTMuOTQyQzE2LjIzMTggMTIuNDI1OCAxNy4zMjY4IDkuNzAyMiAxNi4xOTU2IDYuNTc0ODdDMTUuNjQ0MyA1LjA1MjQ1IDE1LjAyMTkgNC4yMDI0OSAxNC4yOTY5IDMuNjYyNTJDMTMuODU1NyAzLjMzMzc5IDEyLjA5MzMgMi41MDYzMyA5Ljc1OTY1IDIuODY3NTZDOC4wNTM0OSAzLjEzMjU1IDUuNzc0ODcgNC4yMDg3NCA0LjI5MzY5IDUuOTU5OUMyLjg1NzUyIDcuNjYxMDYgMS43NDg4MyA5LjAwNDc0IDEuNjk3NTggMTAuMzA5N0MxLjYzMTMzIDExLjk4ODMgMi44OTYyNyAxMy40MzA4IDMuMDUwMDEgMTMuNjY0NUMzLjMyMzc0IDE0LjA3OTUgNS4xOTExNSAxNi40NTE4IDguNjk5NzEgMTYuNTczMUMxMS43OTcgMTYuNjc5MyAxMy44MTQ0IDE1LjI4NDQgMTQuOTQ5NCAxMy45NDJaIiBmaWxsPSIjNDAzRDNFIi8+CjxwYXRoIGQ9Ik00LjU1MzYzIDIuNzM3NDdDMi45Mzc0NiAzLjg5MTE2IDEuMTIxMzEgNi4yNTEwMyAxLjQ0NzU0IDkuNTYwODZDMS42MDYyOCAxMS4xNzIgMi4wMDI1MSAxMi4xNDk1IDIuNTcxMjMgMTIuODUwN0MyLjkxNzQ2IDEzLjI3ODIgNC40MTk4OCAxNC41NDkzIDYuNzczNTEgMTQuNzM2OEM5LjE0NTg4IDE0LjkyNTYgMTAuOTQ5NSAxNC4zOTQ0IDEyLjgzMzIgMTMuMDg0NEMxNi42NjE3IDEwLjQyMDggMTYuMDk4IDYuMzkzNTMgMTUuOTM0MyA1LjkyNDhDMTUuNzcwNSA1LjQ1NjA3IDE0LjU0NDQgMi42OTYyMiAxMS4xNzMzIDEuNzE1MDJDOC4xOTg0NCAwLjg1MDA2OCA1Ljk4MzU1IDEuNzE1MDIgNC41NTM2MyAyLjczNzQ3WiIgZmlsbD0iIzVFNjM2NyIvPgo8cGF0aCBkPSJNNy4zOTM1MyAyLjk2MTA5QzUuNjE3MzcgMi44OTczNCAzLjkxOTk2IDQuMjg4NTIgMy43NTYyMiA2LjAwNTkzQzMuNTkyNDggNy43MjIwOSA0LjY1NDkyIDkuMDI5NTIgNi4zMDk4MyA5LjI5NTc2QzcuOTY0NzUgOS41NjA3NCA5Ljg3ODM5IDguNTU1OCAxMC4yNjM0IDYuNDUwOTFDMTAuNjYwOSA0LjI4MjI3IDkuMDg5NjkgMy4wMjIzNCA3LjM5MzUzIDIuOTYxMDlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNy45NDIxNyA1LjkwMTE1QzcuOTQyMTcgNS45MDExNSA4LjM2OTY1IDUuODEyNCA4LjQ1NDY1IDUuMTgyNDRDOC41MzgzOSA0LjU2MjQ3IDguMjMwOTEgNC4wMzM3NSA3LjUxMzQ1IDMuODQzNzZDNi43MzM0OSAzLjYzNzUyIDYuMjA0NzcgNC4wNjYyNSA2LjA2NzI3IDQuNTE3NDdDNS44NzYwMyA1LjE0NDk0IDYuMTU4NTIgNS40NDM2NyA2LjE1ODUyIDUuNDQzNjdDNi4xNTg1MiA1LjQ0MzY3IDUuMzkzNTYgNS42Mjc0MSA1LjMzMjMxIDYuNTI5ODdDNS4yNzQ4MSA3LjM4MTA3IDUuODU2MDMgNy44Mzg1NSA2LjQzOTc1IDcuOTc4NTRDNy4xNjA5NiA4LjE1MjI4IDcuOTc4NDIgNy45NTQ3OSA4LjE3ODQxIDcuMDM0ODRDOC4zNDQ2NSA2LjI3NzM4IDcuOTQyMTcgNS45MDExNSA3Ljk0MjE3IDUuOTAxMTVaIiBmaWxsPSIjMzAzMDMwIi8+CjxwYXRoIGQ9Ik02LjczOTgzIDQuNzUzNjJDNi42NzEwOSA1LjAxMjM1IDYuODA4NTggNS4yNjIzNCA3LjA3ODU3IDUuMzMxMDlDNy4zNjk4IDUuNDA0ODMgNy42MzQ3OSA1LjMwODU5IDcuNzA2MDMgNS4wMTExQzcuNzY4NTMgNC43NDczNyA3LjY0MzU0IDQuNTE0ODggNy4zMzYwNSA0LjQzOTg4QzcuMDgzNTcgNC4zNzczOSA2LjgxNDgzIDQuNDcxMTMgNi43Mzk4MyA0Ljc1MzYyWiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZD0iTTYuOTU5NzggNi4wMzk3NEM2LjYzMjMgNS45Mzg0OSA2LjE5OTgyIDYuMDY0NzMgNi4xMzEwNyA2LjUwNDcxQzYuMDYyMzMgNi45NDQ2OSA2LjMyNjA2IDcuMTY5NjggNi42NzEwNCA3LjIzMjE3QzcuMDE2MDMgNy4yOTQ2NyA3LjM0MjI2IDcuMTEzNDMgNy40MDYwMSA2Ljc2MDk1QzcuNDY4NSA2LjQwOTcyIDcuMjg2MDEgNi4xMzk3MyA2Ljk1OTc4IDYuMDM5NzRaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K',- layout: [- {- h: 6,- i: '86590b60-8232-4b41-9744-32cadf2c95fb',- moved: false,- static: false,- w: 6,- x: 0,- y: 0,- },- ],- panelMap: {},- tags: [],- title: 'Public Dashboard 02',- uploadedGrafana: false,- version: 'v5',- widgets: [- {- bucketCount: 30,- bucketWidth: 0,- columnUnits: {},- contextLinks: {- linksData: [],- },- customLegendColors: {},- decimalPrecision: 2,- description: '',- fillSpans: false,- id: '86590b60-8232-4b41-9744-32cadf2c95fb',- isLogScale: false,- legendPosition: 'bottom',- mergeAllActiveQueries: false,- nullZeroValues: 'zero',- opacity: '1',- panelTypes: 'graph',- query: {- builder: {- queryData: [- {- aggregations: [- {- metricName: 'container.cpu.time',- reduceTo: ReduceOperators.AVG,- spaceAggregation: 'sum',- temporality: '',- timeAggregation: 'rate',- },- ],- dataSource: 'metrics',- expression: 'A',- groupBy: [],- legend: '',- queryName: 'A',- },- ],- queryFormulas: [],- queryTraceOperator: [],- },- clickhouse_sql: [- {- legend: '',- name: 'A',- },- ],- promql: [- {- legend: '',- name: 'A',- },- ],- queryType: 'builder',- },- selectedLogFields: [- {- dataType: '',- fieldContext: 'log',- fieldDataType: '',- isIndexed: false,- name: 'timestamp',- signal: 'logs',- type: 'log',- },- {- dataType: '',- fieldContext: 'log',- fieldDataType: '',- isIndexed: false,- name: 'body',- signal: 'logs',- type: 'log',- },- ],- selectedTracesFields: [- {- fieldContext: 'resource',- fieldDataType: 'string',- name: 'service.name',- signal: 'traces',- },- {- fieldContext: 'span',- fieldDataType: 'string',- name: 'name',- signal: 'traces',- },- {- fieldContext: 'span',- fieldDataType: '',- name: 'duration_nano',- signal: 'traces',- },- {- fieldContext: 'span',- fieldDataType: '',- name: 'http_method',- signal: 'traces',- },- {- fieldContext: 'span',- fieldDataType: '',- name: 'response_status_code',- signal: 'traces',- },- ],- softMax: 0,- softMin: 0,- stackedBarChart: false,- thresholds: [],- timePreferance: 'GLOBAL_TIME',- title: '',- yAxisUnit: 'none',- },- ],- },- locked: false,- org_id: '00000000-0000-0000-0000-000000000000',- },- publicDashboard: {- timeRangeEnabled: true,- defaultTimeRange: '30m',- publicPath: '/public/dashboard/019ad04e-8591-7013-879b-a2af376e4708',- },- },-};--export const publicDashboardWidgetData = {- status: 'success',- data: {- type: 'time_series',- meta: {- rowsScanned: 367490,- bytesScanned: 2977076,- durationMs: 330,- },- data: {- results: [- {- queryName: 'A',- aggregations: [- {- index: 0,- alias: '__result_0',- meta: {},- series: [- {- values: [- {- timestamp: 1764429600000,- partial: true,- value: 1.554,- },- {- timestamp: 1764429660000,- value: 1.367,- },- {- timestamp: 1764429720000,- value: 1.641,- },- {- timestamp: 1764429780000,- value: 1.455,- },- {- timestamp: 1764429840000,- value: 1.739,- },- {- timestamp: 1764429900000,- value: 1.318,- },- {- timestamp: 1764429960000,- value: 1.813,- },- {- timestamp: 1764430020000,- value: 1.332,- },- {- timestamp: 1764430080000,- value: 1.521,- },- {- timestamp: 1764430140000,- value: 1.461,- },- {- timestamp: 1764430200000,- value: 1.61,- },- {- timestamp: 1764430260000,- value: 1.747,- },- {- timestamp: 1764430320000,- value: 1.51,- },- {- timestamp: 1764430380000,- value: 1.501,- },- {- timestamp: 1764430440000,- value: 1.524,- },- {- timestamp: 1764430500000,- value: 1.648,- },- {- timestamp: 1764430560000,- value: 1.545,- },- {- timestamp: 1764430620000,- value: 1.47,- },- {- timestamp: 1764430680000,- value: 1.582,- },- {- timestamp: 1764430740000,- value: 1.257,- },- {- timestamp: 1764430800000,- value: 1.726,- },- {- timestamp: 1764430860000,- value: 1.482,- },- {- timestamp: 1764430920000,- value: 1.291,- },- {- timestamp: 1764430980000,- value: 1.741,- },- {- timestamp: 1764431040000,- value: 1.591,- },- {- timestamp: 1764431100000,- value: 1.609,- },- {- timestamp: 1764431160000,- value: 1.177,- },- {- timestamp: 1764431220000,- value: 1.699,- },- {- timestamp: 1764431280000,- value: 1.617,- },- {- timestamp: 1764431340000,- value: 1.515,- },- ],- },- ],- },- ],- },- ],- },- },-};diff --git a/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewDetail/OverviewRightPanelGraph.tsx b/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewDetail/OverviewRightPanelGraph.tsxindex da5b6d2794..340235741c 100644--- a/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewDetail/OverviewRightPanelGraph.tsx+++ b/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewDetail/OverviewRightPanelGraph.tsx@@ -8,15 +8,15 @@ import logEvent from 'api/common/logEvent';import { useGetGraphCustomSeries } from 'components/CeleryTask/useGetGraphCustomSeries';import { useNavigateToExplorer } from 'components/CeleryTask/useNavigateToExplorer';import { QueryParams } from 'constants/query';-import { ViewMenuAction } from 'container/GridCardLayout/config';-import GridCard from 'container/GridCardLayout/GridCard';+import { ViewMenuAction } from 'container/WidgetCard/config';+import GridCard from 'container/WidgetCard/Card';import { Button } from 'container/MetricsApplication/Tabs/styles';import { useGraphClickHandler } from 'container/MetricsApplication/Tabs/util';import useUrlQuery from 'hooks/useUrlQuery';import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';import { UpdateTimeInterval } from 'store/actions';import { AppState } from 'store/reducers';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { BaseAutocompleteData } from 'types/api/queryBuilder/queryAutocompleteResponse';import { TagFilterItem } from 'types/api/queryBuilder/queryBuilderData';import { DataSource } from 'types/common/queryBuilder';diff --git a/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewGraphUtils.ts b/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewGraphUtils.tsindex 277837aa23..66d1e463a7 100644--- a/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewGraphUtils.ts+++ b/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewGraphUtils.ts@@ -2,7 +2,7 @@ import { getStepInterval } from 'components/CeleryTask/CeleryTaskGraph/CeleryTasimport { PANEL_TYPES } from 'constants/queryBuilder';import { getWidgetQueryBuilder } from 'container/MetricsApplication/MetricsApplication.factory';import { getWidgetQuery } from 'pages/MessagingQueues/MQDetails/MetricPage/MetricPageUtil';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import {BaseAutocompleteData,DataTypes,diff --git a/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewUtils.ts b/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewUtils.tsindex ba5a37a5f1..974d4da626 100644--- a/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewUtils.ts+++ b/frontend/src/pages/Celery/CeleryOverview/CeleryOverviewUtils.ts@@ -1,6 +1,6 @@import { PANEL_TYPES } from 'constants/queryBuilder';import { GetQueryResultsProps } from 'lib/dashboard/getQueryResults';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';import { TagFilterItem } from 'types/api/queryBuilder/queryBuilderData';import { v4 as uuidv4 } from 'uuid';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardContainer.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardContainer.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardContainer.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardContainer.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardActions/DashboardActions.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardActions/DashboardActions.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardActions/DashboardActions.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardActions/DashboardActions.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardActions/DashboardActions.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardActions/DashboardActions.tsxsimilarity index 99%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardActions/DashboardActions.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardActions/DashboardActions.tsxindex ed84f2455e..198db48696 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardActions/DashboardActions.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardActions/DashboardActions.tsx@@ -28,7 +28,7 @@ import { cloneDashboardV2 } from 'api/generated/services/dashboard';import type { DashboardtypesGettableDashboardV2DTO } from 'api/generated/services/sigNoz.schemas';import ROUTES from 'constants/routes';import { useSafeNavigate } from 'hooks/useSafeNavigate';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useAppContext } from 'providers/App/App';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardActions/useDeleteDashboardAction.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardActions/useDeleteDashboardAction.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardActions/useDeleteDashboardAction.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardActions/useDeleteDashboardAction.tsxindex 095e985774..cb1051505a 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardActions/useDeleteDashboardAction.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardActions/useDeleteDashboardAction.tsx@@ -11,7 +11,7 @@ import { useDeleteConfirm } from 'components/DeleteConfirmModal/useDeleteConfirmimport ROUTES from 'constants/routes';import { useDashboardPreferencesStore } from 'hooks/dashboard/useDashboardPreference';import history from 'lib/history';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/DashboardInfo.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/DashboardInfo.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/DashboardInfo.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/DashboardInfo.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/DashboardInfo.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/DashboardInfo.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/DashboardInfo.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/DashboardInfo.tsxindex 09b168672e..73c46435c6 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/DashboardInfo.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/DashboardInfo.tsx@@ -15,7 +15,7 @@ import { Typography } from '@signozhq/ui/typography';import logEvent from 'api/common/logEvent';import cx from 'classnames';import { isEmpty } from 'lodash-es';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { linkifyText } from 'utils/linkifyText';import { openInNewTab } from 'utils/navigation';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/TagsOverflowTooltip.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/TagsOverflowTooltip.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/TagsOverflowTooltip.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/TagsOverflowTooltip.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/__tests__/TagsOverflowTooltip.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/__tests__/TagsOverflowTooltip.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/__tests__/TagsOverflowTooltip.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/__tests__/TagsOverflowTooltip.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/useEditableTitle.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/useEditableTitle.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardInfo/useEditableTitle.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardInfo/useEditableTitle.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardPageToolbar.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardPageToolbar.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/DashboardPageToolbar.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/DashboardPageToolbar.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorDrawer.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorDrawer.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorDrawer.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorDrawer.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorDrawer.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorDrawer.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorDrawer.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorDrawer.tsxindex 21f1690761..c6c647b3d2 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorDrawer.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorDrawer.tsx@@ -8,7 +8,7 @@ import cx from 'classnames';import { Drawer } from 'antd';import logEvent from 'api/common/logEvent';import type { DashboardtypesGettableDashboardV2DTO } from 'api/generated/services/sigNoz.schemas';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useCopyToClipboard } from 'react-use';import { toast } from '@signozhq/ui/sonner';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorToolbar.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorToolbar.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorToolbar.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorToolbar.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorToolbar.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorToolbar.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorToolbar.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/JsonEditorToolbar.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/JsonEditorDrawer.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/JsonEditorDrawer.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/JsonEditorDrawer.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/JsonEditorDrawer.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/danglingPanels.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/danglingPanels.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/danglingPanels.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/danglingPanels.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/useJsonEditor.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/useJsonEditor.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/useJsonEditor.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/__tests__/useJsonEditor.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/danglingPanels.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/danglingPanels.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/danglingPanels.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/danglingPanels.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/dashboardToUpdatable.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/dashboardToUpdatable.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/dashboardToUpdatable.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/dashboardToUpdatable.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/editorTheme.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/editorTheme.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/editorTheme.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/editorTheme.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/useJsonEditor.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/useJsonEditor.tssimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/useJsonEditor.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/useJsonEditor.tsindex 18246a2b26..44c862a373 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/useJsonEditor.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/JsonEditorDrawer/useJsonEditor.ts@@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react';import { toast } from '@signozhq/ui/sonner';import logEvent from 'api/common/logEvent';import { updateDashboardV2 } from 'api/generated/services/dashboard';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import type {DashboardtypesDashboardSpecDTO,DashboardtypesGettableDashboardV2DTO,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/SettingsDrawer/SettingsDrawer.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/SettingsDrawer/SettingsDrawer.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/SettingsDrawer/SettingsDrawer.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/SettingsDrawer/SettingsDrawer.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/SettingsDrawer/index.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/SettingsDrawer/index.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/SettingsDrawer/index.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/SettingsDrawer/index.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/index.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/index.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/index.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/index.tsxindex 9d9a9adef2..260281aa2a 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardPageToolbar/index.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardPageToolbar/index.tsx@@ -13,9 +13,9 @@ import type {DashboardtypesJSONPatchOperationDTO,GetDashboardV2200,} from 'api/generated/services/sigNoz.schemas';-import { resolveDashboardImage } from 'pages/DashboardPageV2/DashboardContainer/dashboardIcons';+import { resolveDashboardImage } from 'pages/DashboardPage/DashboardContainer/dashboardIcons';import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useAppContext } from 'providers/App/App';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/DashboardSettings.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/DashboardSettings.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/DashboardSettings.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/DashboardSettings.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/CrossPanelSync/CrossPanelSync.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/CrossPanelSync/CrossPanelSync.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/CrossPanelSync/CrossPanelSync.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/CrossPanelSync/CrossPanelSync.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/CrossPanelSync/CrossPanelSync.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/CrossPanelSync/CrossPanelSync.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/CrossPanelSync/CrossPanelSync.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/CrossPanelSync/CrossPanelSync.tsxindex 45e26a59c7..3eb30be98b 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/CrossPanelSync/CrossPanelSync.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/CrossPanelSync/CrossPanelSync.tsx@@ -3,7 +3,7 @@ import { TooltipSimple } from '@signozhq/ui/tooltip';import { Typography } from '@signozhq/ui/typography';import logEvent from 'api/common/logEvent';import { Events } from 'constants/events';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useDashboardCursorSyncMode } from 'hooks/dashboard/useDashboardCursorSyncMode';import { useSyncTooltipFilterMode } from 'hooks/dashboard/useSyncTooltipFilterMode';import {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker.tsxindex 41a37488ed..3b86f40ab5 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker.tsx@@ -8,7 +8,7 @@ import cx from 'classnames';import {resolveDashboardImage,SYSTEM_ICON_PATHS,-} from 'pages/DashboardPageV2/DashboardContainer/dashboardIcons';+} from 'pages/DashboardPage/DashboardContainer/dashboardIcons';import styles from './DashboardImagePicker.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/DashboardInfoForm/DashboardInfoForm.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/DashboardInfoForm/DashboardInfoForm.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/DashboardInfoForm/DashboardInfoForm.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/DashboardInfoForm/DashboardInfoForm.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/DashboardInfoForm/DashboardInfoForm.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/DashboardInfoForm/DashboardInfoForm.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/DashboardInfoForm/DashboardInfoForm.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/DashboardInfoForm/DashboardInfoForm.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/Overview.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/Overview.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/Overview.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/Overview.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/SegmentedControl/SegmentedControl.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/SegmentedControl/SegmentedControl.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/SegmentedControl/SegmentedControl.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/SegmentedControl/SegmentedControl.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/SegmentedControl/SegmentedControl.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/SegmentedControl/SegmentedControl.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/SegmentedControl/SegmentedControl.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/SegmentedControl/SegmentedControl.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/UnsavedChangesFooter/UnsavedChangesFooter.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/UnsavedChangesFooter/UnsavedChangesFooter.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/UnsavedChangesFooter/UnsavedChangesFooter.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/UnsavedChangesFooter/UnsavedChangesFooter.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/UnsavedChangesFooter/UnsavedChangesFooter.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/UnsavedChangesFooter/UnsavedChangesFooter.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/UnsavedChangesFooter/UnsavedChangesFooter.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/UnsavedChangesFooter/UnsavedChangesFooter.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/index.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/index.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/index.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/index.tsxindex 48e5829ec3..422b40ff69 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/index.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/index.tsx@@ -7,7 +7,7 @@ import type {import { toast } from '@signozhq/ui/sonner';import logEvent from 'api/common/logEvent';import { isEqual } from 'lodash-es';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';@@ -16,7 +16,7 @@ import CrossPanelSync from './CrossPanelSync/CrossPanelSync';import DashboardInfoForm from './DashboardInfoForm/DashboardInfoForm';import UnsavedChangesFooter from './UnsavedChangesFooter/UnsavedChangesFooter';import { stringsToTags, tagsToStrings } from './utils';-import { DEFAULT_DASHBOARD_ICON_PATH } from 'pages/DashboardPageV2/DashboardContainer/dashboardIcons';+import { DEFAULT_DASHBOARD_ICON_PATH } from 'pages/DashboardPage/DashboardContainer/dashboardIcons';import styles from './Overview.module.scss';interface OverviewProps {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/utils.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/utils.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Overview/utils.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Overview/utils.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboard.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboard.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboard.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboard.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardActions/PublicDashboardActions.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardActions/PublicDashboardActions.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardActions/PublicDashboardActions.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardActions/PublicDashboardActions.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardActions/PublicDashboardActions.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardActions/PublicDashboardActions.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardActions/PublicDashboardActions.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardActions/PublicDashboardActions.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardHint/PublicDashboardHint.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardHint/PublicDashboardHint.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardHint/PublicDashboardHint.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardHint/PublicDashboardHint.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardHint/PublicDashboardHint.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardHint/PublicDashboardHint.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardHint/PublicDashboardHint.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardHint/PublicDashboardHint.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardSettingsForm/PublicDashboardSettingsForm.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardSettingsForm/PublicDashboardSettingsForm.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardSettingsForm/PublicDashboardSettingsForm.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardSettingsForm/PublicDashboardSettingsForm.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardSettingsForm/PublicDashboardSettingsForm.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardSettingsForm/PublicDashboardSettingsForm.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardSettingsForm/PublicDashboardSettingsForm.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardSettingsForm/PublicDashboardSettingsForm.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardStatus/PublicDashboardStatus.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardStatus/PublicDashboardStatus.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardStatus/PublicDashboardStatus.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardStatus/PublicDashboardStatus.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardStatus/PublicDashboardStatus.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardStatus/PublicDashboardStatus.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardStatus/PublicDashboardStatus.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardStatus/PublicDashboardStatus.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardUrl/PublicDashboardUrl.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardUrl/PublicDashboardUrl.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardUrl/PublicDashboardUrl.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardUrl/PublicDashboardUrl.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardUrl/PublicDashboardUrl.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardUrl/PublicDashboardUrl.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardUrl/PublicDashboardUrl.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/PublicDashboardUrl/PublicDashboardUrl.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/index.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/index.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/index.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/index.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/usePublicDashboard.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/usePublicDashboard.tssimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/usePublicDashboard.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/usePublicDashboard.tsindex a1cca660ae..9f1411b81d 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/usePublicDashboard.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/usePublicDashboard.ts@@ -10,7 +10,7 @@ import {useUpdatePublicDashboard,} from 'api/generated/services/dashboard';import { DEFAULT_TIME_RANGE } from 'container/TopNav/DateTimeSelectionV2/constants';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useAppContext } from 'providers/App/App';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/usePublicDashboardMeta.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/usePublicDashboardMeta.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/PublicDashboard/usePublicDashboardMeta.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/PublicDashboard/usePublicDashboardMeta.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/DynamicVariableFields.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/DynamicVariableFields.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/DynamicVariableFields.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/DynamicVariableFields.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/ListVariableFields.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/ListVariableFields.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/ListVariableFields.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/ListVariableFields.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/QueryVariableFields.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/QueryVariableFields.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/QueryVariableFields.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/QueryVariableFields.tsxindex 56faa3781e..fa18ffcb83 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/QueryVariableFields.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/QueryVariableFields.tsx@@ -4,7 +4,7 @@ import { Typography } from '@signozhq/ui/typography';import logEvent from 'api/common/logEvent';import dashboardVariablesQuery from 'api/dashboard/variables/dashboardVariablesQuery';import Editor from 'components/Editor';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import type { PayloadVariables } from 'types/api/dashboard/variables/query';import styles from './VariableForm.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableForm.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableForm.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableForm.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableForm.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableForm.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableForm.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableForm.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableForm.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableTypeTabs.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableTypeTabs.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableTypeTabs.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/VariableTypeTabs.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/useVariableForm.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/useVariableForm.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/useVariableForm.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/useVariableForm.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/useVariableForm.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/useVariableForm.tssimilarity index 99%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/useVariableForm.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/useVariableForm.tsindex 8036bd7a8f..d722574275 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/useVariableForm.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/useVariableForm.ts@@ -1,7 +1,7 @@import { useEffect, useMemo, useRef, useState } from 'react';import logEvent from 'api/common/logEvent';import { commaValuesParser } from 'lib/dashboardVariables/customCommaValuesParser';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import type { PayloadVariables } from 'types/api/dashboard/variables/query';import type { VariableSelectionMap } from '../../../VariablesBar/selectionTypes';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/variableValidation.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/variableValidation.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableForm/variableValidation.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableForm/variableValidation.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/VariableImpactDialog.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/VariableImpactDialog.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/VariableImpactDialog.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/VariableImpactDialog.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/VariableImpactDialog.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/VariableImpactDialog.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/VariableImpactDialog.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/VariableImpactDialog.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/useVariableImpactState.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/useVariableImpactState.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/useVariableImpactState.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/VariableImpactDialog/useVariableImpactState.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/Variables.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/Variables.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/Variables.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/Variables.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/__tests__/applyVariableToPanelsPatch.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/__tests__/applyVariableToPanelsPatch.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/__tests__/applyVariableToPanelsPatch.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/__tests__/applyVariableToPanelsPatch.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/__tests__/useVariableListActions.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/__tests__/useVariableListActions.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/__tests__/useVariableListActions.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/__tests__/useVariableListActions.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/__tests__/variableAdapters.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/__tests__/variableAdapters.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/__tests__/variableAdapters.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/__tests__/variableAdapters.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/__tests__/variableUsages.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/__tests__/variableUsages.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/__tests__/variableUsages.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/__tests__/variableUsages.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/AddVariableButton.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/AddVariableButton.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/AddVariableButton.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/AddVariableButton.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/BackToAllVariables/BackToAllVariables.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/BackToAllVariables/BackToAllVariables.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/BackToAllVariables/BackToAllVariables.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/BackToAllVariables/BackToAllVariables.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/BackToAllVariables/BackToAllVariables.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/BackToAllVariables/BackToAllVariables.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/BackToAllVariables/BackToAllVariables.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/BackToAllVariables/BackToAllVariables.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/NoVariablesCard/NoVariables.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/NoVariablesCard/NoVariables.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/NoVariablesCard/NoVariables.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/NoVariablesCard/NoVariables.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/NoVariablesCard/NoVariablesCard.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/NoVariablesCard/NoVariablesCard.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/NoVariablesCard/NoVariablesCard.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/NoVariablesCard/NoVariablesCard.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariableInfoForm/VariableInfoForm.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariableInfoForm/VariableInfoForm.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariableInfoForm/VariableInfoForm.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariableInfoForm/VariableInfoForm.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariableInfoForm/VariableInfoForm.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariableInfoForm/VariableInfoForm.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariableInfoForm/VariableInfoForm.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariableInfoForm/VariableInfoForm.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariableRow/VariableRow.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariableRow/VariableRow.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariableRow/VariableRow.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariableRow/VariableRow.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariableRow/VariableRow.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariableRow/VariableRow.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariableRow/VariableRow.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariableRow/VariableRow.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariablesList/VariablesList.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariablesList/VariablesList.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariablesList/VariablesList.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariablesList/VariablesList.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariablesList/VariablesList.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariablesList/VariablesList.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/components/VariablesList/VariablesList.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/components/VariablesList/VariablesList.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/hooks/useSaveVariables.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/hooks/useSaveVariables.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/hooks/useSaveVariables.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/hooks/useSaveVariables.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/hooks/useVariableListActions.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/hooks/useVariableListActions.tssimilarity index 99%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/hooks/useVariableListActions.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/hooks/useVariableListActions.tsindex 08460558b5..b8cb0285e0 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/hooks/useVariableListActions.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/hooks/useVariableListActions.ts@@ -11,7 +11,7 @@ import type {DashboardtypesGettableDashboardV2DTO,DashboardtypesJSONPatchOperationDTO,} from 'api/generated/services/sigNoz.schemas';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useDashboardStore } from '../../../store/useDashboardStore';import {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/index.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/index.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/index.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/index.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/types.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/types.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/types.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/types.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/__tests__/variableCycleDetection.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/__tests__/variableCycleDetection.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/__tests__/variableCycleDetection.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/__tests__/variableCycleDetection.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/applyVariableToPanelsPatch.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/applyVariableToPanelsPatch.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/applyVariableToPanelsPatch.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/applyVariableToPanelsPatch.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/variableCycleDetection.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/variableCycleDetection.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/variableCycleDetection.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/variableCycleDetection.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/variableImpactPatch.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/variableImpactPatch.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/variableImpactPatch.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/variableImpactPatch.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/variablePatchOps.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/variablePatchOps.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/variablePatchOps.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/variablePatchOps.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/variableUsages.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/variableUsages.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/variableUsages.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/variableUsages.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/variableAdapters.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/variableAdapters.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/variableAdapters.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/variableAdapters.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/variableFormModel.ts b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/variableFormModel.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/variableFormModel.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/variableFormModel.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/index.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/index.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/DashboardSettings/index.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/DashboardSettings/index.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActionRow.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActionRow.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActionRow.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActionRow.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActions.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActions.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActions.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActions.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActions.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActions.tsxsimilarity index 85%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActions.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActions.tsxindex 27b3d5a650..998f3cb241 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActions.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/ConfigActions.tsx@@ -1,7 +1,7 @@import { Flame } from '@signozhq/icons';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';-import { useCreateAlertFromPanel } from 'pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useCreateAlertFromPanel';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';+import { useCreateAlertFromPanel } from 'pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useCreateAlertFromPanel';import ConfigActionRow from './ConfigActionRow';import styles from './ConfigActions.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/__tests__/ConfigActions.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/__tests__/ConfigActions.test.tsxsimilarity index 93%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/__tests__/ConfigActions.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/__tests__/ConfigActions.test.tsxindex de0939b97c..46df4d1d28 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/__tests__/ConfigActions.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigActions/__tests__/ConfigActions.test.tsx@@ -6,7 +6,7 @@ import ConfigActions from '../ConfigActions';const mockCreateAlert = jest.fn();jest.mock(- 'pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useCreateAlertFromPanel',+ 'pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useCreateAlertFromPanel',() => ({useCreateAlertFromPanel: jest.fn(() => mockCreateAlert),}),diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigPane.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigPane.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigPane.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigPane.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigPane.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigPane.tsxsimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigPane.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigPane.tsxindex a682445dc7..de5fee9744 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/ConfigPane.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/ConfigPane.tsx@@ -4,8 +4,8 @@ import type {DashboardtypesPanelDTO,DashboardtypesPanelSpecDTO,} from 'api/generated/services/sigNoz.schemas';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';-import { resolveSignal } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getBuilderQueries';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';+import { resolveSignal } from 'pages/DashboardPage/DashboardContainer/Panels/utils/getBuilderQueries';import type { EQueryType } from 'types/common/dashboard';import type { LegendSeries } from '../utils/legendSeries';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/PanelTypeSwitcher.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/PanelTypeSwitcher.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/PanelTypeSwitcher.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/PanelTypeSwitcher.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/PanelTypeSwitcher.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/PanelTypeSwitcher.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/PanelTypeSwitcher.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/PanelTypeSwitcher.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/__tests__/PanelTypeSwitcher.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/__tests__/PanelTypeSwitcher.test.tsxsimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/__tests__/PanelTypeSwitcher.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/__tests__/PanelTypeSwitcher.test.tsxindex 1ece6dacc8..bcecfeaff6 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/__tests__/PanelTypeSwitcher.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/__tests__/PanelTypeSwitcher.test.tsx@@ -1,11 +1,11 @@import { fireEvent, render, screen } from '@testing-library/react';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';import PanelTypeSwitcher from '../PanelTypeSwitcher';import { TelemetrytypesSignalDTO } from 'api/generated/services/sigNoz.schemas';import { EQueryType } from 'types/common/dashboard';-jest.mock('pages/DashboardPageV2/DashboardContainer/Panels/registry', () => ({+jest.mock('pages/DashboardPage/DashboardContainer/Panels/registry', () => ({getPanelDefinition: jest.fn(),}));diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/__tests__/utils.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/__tests__/utils.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/__tests__/utils.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/__tests__/utils.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/usePanelTypeSelectItems.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/usePanelTypeSelectItems.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/usePanelTypeSelectItems.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/usePanelTypeSelectItems.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/utils.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/utils.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/utils.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/utils.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/SectionHeaderQuickAdd.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/SectionHeaderQuickAdd.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/SectionHeaderQuickAdd.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/SectionHeaderQuickAdd.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/SectionSlot.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/SectionSlot.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/SectionSlot.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/SectionSlot.tsxindex 2025432cea..00edc1dca4 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/SectionSlot.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/SectionSlot.tsx@@ -5,7 +5,7 @@ import {SECTION_METADATA,type SectionConfig,SectionKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import type { SectionEditorContext } from '../sectionContext';import { resolveSectionEditor } from '../sectionRegistry';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/__tests__/SectionSlot.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/__tests__/SectionSlot.test.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/__tests__/SectionSlot.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/__tests__/SectionSlot.test.tsxindex 6bab8ff164..e239397719 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/__tests__/SectionSlot.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SectionSlot/__tests__/SectionSlot.test.tsx@@ -4,7 +4,7 @@ import {type SectionConfig,SectionKind,ThresholdVariant,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import { render, screen, userEvent } from 'tests/test-utils';import SectionSlot from '../SectionSlot';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/SettingsSection.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/SettingsSection.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/SettingsSection.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/SettingsSection.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/SettingsSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/SettingsSection.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/SettingsSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/SettingsSection.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/__tests__/SettingsSection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/__tests__/SettingsSection.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/__tests__/SettingsSection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/SettingsSection/__tests__/SettingsSection.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/__tests__/ConfigPane.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/__tests__/ConfigPane.test.tsxsimilarity index 88%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/__tests__/ConfigPane.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/__tests__/ConfigPane.test.tsxindex 8d64c14ccc..dbb600253f 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/__tests__/ConfigPane.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/__tests__/ConfigPane.test.tsx@@ -8,6 +8,21 @@ import { EQueryType } from 'types/common/dashboard';import ConfigPane from '../ConfigPane';+// ConfigActions seeds alerts from the panel, which reads the loaded dashboard for+// analytics context — always present under the real editor route.+jest.mock(+ 'pages/DashboardPage/DashboardContainer/hooks/useDashboardEventMeta',+ () => ({+ useDashboardEventMeta: (): {+ dashboardId: string;+ dashboardName: string;+ } => ({+ dashboardId: 'dash-1',+ dashboardName: 'Infra overview',+ }),+ }),+);+function spec(unit?: string): DashboardtypesPanelSpecDTO {return {display: { name: 'CPU', description: 'usage' },diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSegmented/ConfigSegmented.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSegmented/ConfigSegmented.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSegmented/ConfigSegmented.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSegmented/ConfigSegmented.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSegmented/ConfigSegmented.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSegmented/ConfigSegmented.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSegmented/ConfigSegmented.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSegmented/ConfigSegmented.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSelect/ConfigSelect.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSelect/ConfigSelect.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSelect/ConfigSelect.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSelect/ConfigSelect.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSelect/ConfigSelect.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSelect/ConfigSelect.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSelect/ConfigSelect.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSelect/ConfigSelect.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSwitch/ConfigSwitch.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSwitch/ConfigSwitch.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSwitch/ConfigSwitch.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSwitch/ConfigSwitch.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSwitch/ConfigSwitch.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSwitch/ConfigSwitch.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSwitch/ConfigSwitch.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSwitch/ConfigSwitch.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColorRow.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColorRow.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColorRow.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColorRow.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColors.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColors.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColors.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColors.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColors.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColors.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColors.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/LegendColors.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/__tests__/LegendColors.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/__tests__/LegendColors.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/__tests__/LegendColors.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/__tests__/LegendColors.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/__tests__/legendColors.utils.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/__tests__/legendColors.utils.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/__tests__/legendColors.utils.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/__tests__/legendColors.utils.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/legendColors.utils.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/legendColors.utils.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/legendColors.utils.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/LegendColors/legendColors.utils.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/segmentIcons.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/segmentIcons.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/segmentIcons.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/segmentIcons.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sectionContext.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sectionContext.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sectionContext.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sectionContext.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sectionRegistry.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sectionRegistry.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sectionRegistry.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sectionRegistry.tsxindex bfc592d82f..ee70d22bc3 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sectionRegistry.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sectionRegistry.tsx@@ -14,7 +14,7 @@ import {type PanelFormattingSlice,type SectionEditorProps,type SectionSpecMap,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import type { SectionEditorContext } from './sectionContext';import AxesSection from './sections/AxesSection/AxesSection';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/AxesSection.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/AxesSection.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/AxesSection.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/AxesSection.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/AxesSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/AxesSection.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/AxesSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/AxesSection.tsxindex b4af64ab51..148e54fb17 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/AxesSection.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/AxesSection.tsx@@ -4,7 +4,7 @@ import { Input } from 'antd';import type {SectionEditorProps,SectionKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import ConfigSegmented from '../../controls/ConfigSegmented/ConfigSegmented';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/__tests__/AxesSection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/__tests__/AxesSection.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/__tests__/AxesSection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/AxesSection/__tests__/AxesSection.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/BucketsSection.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/BucketsSection.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/BucketsSection.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/BucketsSection.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/BucketsSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/BucketsSection.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/BucketsSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/BucketsSection.tsxindex 70ca778184..77c1f8d66f 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/BucketsSection.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/BucketsSection.tsx@@ -5,7 +5,7 @@ import type { DashboardtypesHistogramBucketsDTO } from 'api/generated/services/simport type {SectionEditorProps,SectionKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import ConfigSwitch from '../../controls/ConfigSwitch/ConfigSwitch';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/__tests__/BucketsSection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/__tests__/BucketsSection.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/__tests__/BucketsSection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/BucketsSection/__tests__/BucketsSection.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/ChartAppearanceSection.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/ChartAppearanceSection.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/ChartAppearanceSection.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/ChartAppearanceSection.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/ChartAppearanceSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/ChartAppearanceSection.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/ChartAppearanceSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/ChartAppearanceSection.tsxindex 38922a12db..10cd4fe3c9 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/ChartAppearanceSection.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/ChartAppearanceSection.tsx@@ -7,7 +7,7 @@ import {import type {SectionEditorProps,SectionKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import ConfigSegmented from '../../controls/ConfigSegmented/ConfigSegmented';import ConfigSelect from '../../controls/ConfigSelect/ConfigSelect';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/DisconnectValuesField.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/DisconnectValuesField.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/DisconnectValuesField.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/DisconnectValuesField.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/DisconnectValuesThresholdInput.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/DisconnectValuesThresholdInput.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/DisconnectValuesThresholdInput.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/DisconnectValuesThresholdInput.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/__tests__/ChartAppearanceSection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/__tests__/ChartAppearanceSection.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/__tests__/ChartAppearanceSection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ChartAppearanceSection/__tests__/ChartAppearanceSection.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinkDialog.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinkDialog.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinkDialog.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinkDialog.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinkListItem.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinkListItem.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinkListItem.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinkListItem.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinksSection.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinksSection.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinksSection.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinksSection.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinksSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinksSection.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinksSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinksSection.tsxindex 83b5546989..09cbcf3daf 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinksSection.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/ContextLinksSection.tsx@@ -5,7 +5,7 @@ import type { DashboardtypesLinkDTO } from 'api/generated/services/sigNoz.schemaimport type {SectionEditorProps,SectionKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import type { SectionEditorContext } from '../../sectionContext';import ContextLinkDialog from './ContextLinkDialog';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/VariablesPopover.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/VariablesPopover.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/VariablesPopover.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/VariablesPopover.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/VariablesPopover.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/VariablesPopover.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/VariablesPopover.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/VariablesPopover.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/ContextLinksSection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/ContextLinksSection.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/ContextLinksSection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/ContextLinksSection.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/useContextLinkVariables.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/useContextLinkVariables.test.tsxsimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/useContextLinkVariables.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/useContextLinkVariables.test.tsxindex cd2631b200..b6cacbc09b 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/useContextLinkVariables.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/useContextLinkVariables.test.tsx@@ -6,7 +6,7 @@ const mockUseGetDashboardV2 = jest.fn();const mockUseQueryBuilder = jest.fn();jest.mock(- 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore',+ 'pages/DashboardPage/DashboardContainer/store/useDashboardStore',() => ({useDashboardStore: (selector: (s: { dashboardId: string }) => unknown,@@ -24,7 +24,7 @@ jest.mock('api/generated/services/dashboard', () => ({// dtoToFormModel is exercised by its own suite; here we only need it to surface a name.jest.mock(- 'pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/variableAdapters',+ 'pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/variableAdapters',() => ({dtoToFormModel: (dto: { name: string }): { name: string } => ({name: dto.name,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/utils.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/utils.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/utils.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/__tests__/utils.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/types.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/types.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/types.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/types.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/useContextLinkVariables.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/useContextLinkVariables.tssimilarity index 89%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/useContextLinkVariables.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/useContextLinkVariables.tsindex e8bc6a515a..225dfecd15 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/useContextLinkVariables.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/useContextLinkVariables.ts@@ -1,7 +1,7 @@import { useMemo } from 'react';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { dtoToFormModel } from 'pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/variableAdapters';-import { useDashboardFetchRequired } from 'pages/DashboardPageV2/DashboardContainer/hooks/useDashboardFetchRequired';+import { dtoToFormModel } from 'pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/variableAdapters';+import { useDashboardFetchRequired } from 'pages/DashboardPage/DashboardContainer/hooks/useDashboardFetchRequired';import type { VariableItem } from './types';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/utils.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/utils.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/utils.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ContextLinksSection/utils.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/ColumnUnits.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/ColumnUnits.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/ColumnUnits.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/ColumnUnits.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/FormattingSection.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/FormattingSection.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/FormattingSection.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/FormattingSection.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/FormattingSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/FormattingSection.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/FormattingSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/FormattingSection.tsxindex 3ae1c1e63d..2645e1b2df 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/FormattingSection.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/FormattingSection.tsx@@ -5,7 +5,7 @@ import { YAxisSource } from 'components/YAxisUnitSelector/types';import type {SectionEditorProps,SectionKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import ConfigSelect from '../../controls/ConfigSelect/ConfigSelect';import type { SectionEditorContext } from '../../sectionContext';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/__tests__/FormattingSection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/__tests__/FormattingSection.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/__tests__/FormattingSection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/FormattingSection/__tests__/FormattingSection.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/LegendSection.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/LegendSection.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/LegendSection.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/LegendSection.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/LegendSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/LegendSection.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/LegendSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/LegendSection.tsxindex 29b50dc67c..e43a322e2d 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/LegendSection.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/LegendSection.tsx@@ -3,7 +3,7 @@ import { DashboardtypesLegendPositionDTO } from 'api/generated/services/sigNoz.simport type {SectionEditorProps,SectionKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import ConfigSegmented from '../../controls/ConfigSegmented/ConfigSegmented';import LegendColors from '../../controls/LegendColors/LegendColors';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/__tests__/LegendSection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/__tests__/LegendSection.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/__tests__/LegendSection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/LegendSection/__tests__/LegendSection.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdColorSelect.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdColorSelect.tsxsimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdColorSelect.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdColorSelect.tsxindex 48cd4c0439..ff87737fd8 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdColorSelect.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdColorSelect.tsx@@ -1,6 +1,6 @@import { ChevronDown } from '@signozhq/icons';import { ColorPicker } from 'antd';-import { ThresholdColor } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/threshold';+import { ThresholdColor } from 'pages/DashboardPage/DashboardContainer/Panels/types/threshold';import styles from './ThresholdsSection.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdsSection.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdsSection.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdsSection.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdsSection.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdsSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdsSection.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdsSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdsSection.tsxindex 3430c51bcf..7637d968de 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdsSection.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/ThresholdsSection.tsx@@ -11,8 +11,8 @@ import {import {AnyThreshold,ThresholdVariant,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';-import { ThresholdColor } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/threshold';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';+import { ThresholdColor } from 'pages/DashboardPage/DashboardContainer/Panels/types/threshold';import type { TableColumnOption } from '../../../hooks/useTableColumns';import type { SectionEditorContext } from '../../sectionContext';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.comparison.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.comparison.test.tsxsimilarity index 99%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.comparison.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.comparison.test.tsxindex 768283c68d..50767aff89 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.comparison.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.comparison.test.tsx@@ -7,7 +7,7 @@ import {import {ThresholdVariant,type AnyThreshold,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import { render, screen, userEvent, waitFor } from 'tests/test-utils';import UnifiedThresholdsSection from '../ThresholdsSection';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.test.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.test.tsxindex ca2d07949c..9b85964b6b 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/__tests__/ThresholdsSection.test.tsx@@ -2,7 +2,7 @@ import { useState } from 'react';import { render, screen, waitFor } from '@testing-library/react';import userEvent from '@testing-library/user-event';import type { DashboardtypesThresholdWithLabelDTO } from 'api/generated/services/sigNoz.schemas';-import type { AnyThreshold } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+import type { AnyThreshold } from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import ThresholdsSection from '../ThresholdsSection';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/ComparisonThresholdRow.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/ComparisonThresholdRow.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/ComparisonThresholdRow.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/ComparisonThresholdRow.tsxindex 58bb11af84..f4055a8f63 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/ComparisonThresholdRow.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/ComparisonThresholdRow.tsx@@ -3,7 +3,7 @@ import {type DashboardtypesComparisonThresholdDTO,type DashboardtypesThresholdFormatDTO,} from 'api/generated/services/sigNoz.schemas';-import { formatPanelValue } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/formatPanelValue';+import { formatPanelValue } from 'pages/DashboardPage/DashboardContainer/Panels/utils/formatPanelValue';import {FORMAT_OPTIONS,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/LabelThresholdRow.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/LabelThresholdRow.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/LabelThresholdRow.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/LabelThresholdRow.tsxindex 9fb9d87eaf..d48aa98d2d 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/LabelThresholdRow.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/LabelThresholdRow.tsx@@ -2,7 +2,7 @@ import { useCallback } from 'react';import { Typography } from '@signozhq/ui/typography';import { Input } from 'antd';import type { DashboardtypesThresholdWithLabelDTO } from 'api/generated/services/sigNoz.schemas';-import { formatPanelValue } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/formatPanelValue';+import { formatPanelValue } from 'pages/DashboardPage/DashboardContainer/Panels/utils/formatPanelValue';import ThresholdColorField from './shared/ThresholdColorField';import ThresholdRowShell from './shared/ThresholdRowShell';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/TableThresholdRow.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/TableThresholdRow.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/TableThresholdRow.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/TableThresholdRow.tsxindex 43d6b8660b..d1bac17278 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/TableThresholdRow.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/TableThresholdRow.tsx@@ -3,7 +3,7 @@ import {type DashboardtypesTableThresholdDTO,type DashboardtypesThresholdFormatDTO,} from 'api/generated/services/sigNoz.schemas';-import { formatPanelValue } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/formatPanelValue';+import { formatPanelValue } from 'pages/DashboardPage/DashboardContainer/Panels/utils/formatPanelValue';import type { TableColumnOption } from '../../../../hooks/useTableColumns';import {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdColorField.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdColorField.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdColorField.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdColorField.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdRowShell.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdRowShell.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdRowShell.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdRowShell.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdSelectField.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdSelectField.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdSelectField.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdSelectField.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdUnitField.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdUnitField.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdUnitField.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdUnitField.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdValueField.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdValueField.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdValueField.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/ThresholdValueField.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/useThresholdDraft.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/useThresholdDraft.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/useThresholdDraft.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/rows/shared/useThresholdDraft.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/thresholdOptions.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/thresholdOptions.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/thresholdOptions.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/thresholdOptions.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/thresholdUnitCategories.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/thresholdUnitCategories.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/thresholdUnitCategories.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/ThresholdsSection/thresholdUnitCategories.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/VisualizationSection.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/VisualizationSection.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/VisualizationSection.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/VisualizationSection.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/VisualizationSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/VisualizationSection.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/VisualizationSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/VisualizationSection.tsxindex 9d371f55cc..948498920f 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/VisualizationSection.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/VisualizationSection.tsx@@ -2,7 +2,7 @@ import { Typography } from '@signozhq/ui/typography';import type {SectionEditorProps,SectionKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import { EQueryType } from 'types/common/dashboard';import ConfigSelect from '../../controls/ConfigSelect/ConfigSelect';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/__tests__/VisualizationSection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/__tests__/VisualizationSection.test.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/__tests__/VisualizationSection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/__tests__/VisualizationSection.test.tsxindex b73a5390fe..495f277a7f 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/__tests__/VisualizationSection.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/__tests__/VisualizationSection.test.tsx@@ -6,7 +6,7 @@ import VisualizationSection from '../VisualizationSection';// The type switcher resolves each kind's supported signals + query types; stub it so// the test doesn't pull the whole panel registry (renderers, chart libs).-jest.mock('pages/DashboardPageV2/DashboardContainer/Panels/registry', () => ({+jest.mock('pages/DashboardPage/DashboardContainer/Panels/registry', () => ({getPanelDefinition: jest.fn(() => ({supportedSignals: ['metrics', 'logs', 'traces'],supportedQueryTypes: ['builder', 'clickhouse_sql', 'promql'],diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/timePreferenceOptions.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/timePreferenceOptions.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/timePreferenceOptions.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/sections/VisualizationSection/timePreferenceOptions.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/Header/Header.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/Header/Header.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/Header/Header.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/Header/Header.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/Header/Header.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/Header/Header.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/Header/Header.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/Header/Header.tsxindex 4a949c8122..ea9861e336 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/Header/Header.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/Header/Header.tsx@@ -8,7 +8,7 @@ import { Typography } from '@signozhq/ui/typography';import logEvent from 'api/common/logEvent';import HeaderRightSection from 'components/HeaderRightSection/HeaderRightSection';import { useConfirmableAction } from 'hooks/useConfirmableAction';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import DisabledControlTooltip from '../../components/DisabledControlTooltip/DisabledControlTooltip';import styles from './Header.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/Header/__tests__/Header.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/Header/__tests__/Header.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/Header/__tests__/Header.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/Header/__tests__/Header.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/ListColumnsEditor.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/ListColumnsEditor.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/ListColumnsEditor.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/ListColumnsEditor.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/ListColumnsEditor.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/ListColumnsEditor.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/ListColumnsEditor.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/ListColumnsEditor.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/__tests__/ListColumnsEditor.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/__tests__/ListColumnsEditor.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/__tests__/ListColumnsEditor.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/__tests__/ListColumnsEditor.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/__tests__/selectFields.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/__tests__/selectFields.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/__tests__/selectFields.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/__tests__/selectFields.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/components/AddColumnDropdown/AddColumnDropdown.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/components/AddColumnDropdown/AddColumnDropdown.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/components/AddColumnDropdown/AddColumnDropdown.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/components/AddColumnDropdown/AddColumnDropdown.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/components/AddColumnDropdown/AddColumnDropdown.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/components/AddColumnDropdown/AddColumnDropdown.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/components/AddColumnDropdown/AddColumnDropdown.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/components/AddColumnDropdown/AddColumnDropdown.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/components/SortableColumnChip/SortableColumnChip.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/components/SortableColumnChip/SortableColumnChip.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/components/SortableColumnChip/SortableColumnChip.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/components/SortableColumnChip/SortableColumnChip.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/components/SortableColumnChip/SortableColumnChip.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/components/SortableColumnChip/SortableColumnChip.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/components/SortableColumnChip/SortableColumnChip.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/components/SortableColumnChip/SortableColumnChip.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/hooks/useListColumnSuggestions.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/hooks/useListColumnSuggestions.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/hooks/useListColumnSuggestions.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/hooks/useListColumnSuggestions.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/selectFields.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/selectFields.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/selectFields.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/selectFields.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditor.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditor.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditor.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditor.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder.tsxindex c9d4781492..954ccc7579 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder.tsx@@ -14,8 +14,8 @@ import PromQLIcon from 'assets/Dashboard/PromQl';import { QueryBuilderV2 } from 'components/QueryBuilderV2/QueryBuilderV2';import TextToolTip from 'components/TextToolTip';import { PANEL_TYPES } from 'constants/queryBuilder';-import ClickHouseQueryContainer from 'container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse';-import PromQLQueryContainer from 'container/NewWidget/LeftContainer/QuerySection/QueryBuilder/promQL';+import ClickHouseQueryContainer from 'container/QueryBuilder/rawQueryEditors/ClickHouse';+import PromQLQueryContainer from 'container/QueryBuilder/rawQueryEditors/PromQL';import RunQueryBtn from 'container/QueryBuilder/components/RunQueryBtn/RunQueryBtn';import { QueryBuilderProps } from 'container/QueryBuilder/QueryBuilder.interfaces';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/__tests__/PanelEditorQueryBuilder.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/__tests__/PanelEditorQueryBuilder.test.tsxsimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/__tests__/PanelEditorQueryBuilder.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/__tests__/PanelEditorQueryBuilder.test.tsxindex b6506c3f9b..9be326d792 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/__tests__/PanelEditorQueryBuilder.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/__tests__/PanelEditorQueryBuilder.test.tsx@@ -19,14 +19,14 @@ jest.mock('components/QueryBuilderV2/QueryBuilderV2', () => ({return null;},}));-jest.mock(- 'container/NewWidget/LeftContainer/QuerySection/QueryBuilder/ClickHouse',- () => ({ __esModule: true, default: (): null => null }),-);-jest.mock(- 'container/NewWidget/LeftContainer/QuerySection/QueryBuilder/promQL',- () => ({ __esModule: true, default: (): null => null }),-);+jest.mock('container/QueryBuilder/rawQueryEditors/ClickHouse', () => ({+ __esModule: true,+ default: (): null => null,+}));+jest.mock('container/QueryBuilder/rawQueryEditors/PromQL', () => ({+ __esModule: true,+ default: (): null => null,+}));jest.mock('container/QueryBuilder/components/RunQueryBtn/RunQueryBtn', () => ({__esModule: true,default: (): null => null,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PlotTag.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PlotTag.tsxsimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PlotTag.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PlotTag.tsxindex 78d56ad2fc..4a35c437be 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PlotTag.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PlotTag.tsx@@ -1,6 +1,6 @@import { Spline } from '@signozhq/icons';import { PANEL_TYPES } from 'constants/queryBuilder';-import QueryTypeTag from 'container/NewWidget/LeftContainer/QueryTypeTag';+import QueryTypeTag from 'components/QueryTypeTag/QueryTypeTag';import { EQueryType } from 'types/common/dashboard';interface PlotTagProps {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PreviewPane.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PreviewPane.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PreviewPane.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PreviewPane.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PreviewPane.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PreviewPane.tsxsimilarity index 84%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PreviewPane.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PreviewPane.tsxindex 174ca7b889..61f333e368 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PreviewPane.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PreviewPane.tsx@@ -1,19 +1,19 @@import { useState } from 'react';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';import cx from 'classnames';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';import DateTimeSelectionV2 from 'container/TopNav/DateTimeSelectionV2';-import PanelBody from 'pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody';-import PanelHeader from 'pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader';-import type { AnyPanelInteractionProps } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/interactions';-import type { RenderablePanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';-import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';-import type { DashboardPreference } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/rendererProps';-import { getPanelQueryType } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelQueryType';+import PanelBody from 'pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody';+import PanelHeader from 'pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader';+import type { AnyPanelInteractionProps } from 'pages/DashboardPage/DashboardContainer/Panels/types/interactions';+import type { RenderablePanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';+import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';+import type { DashboardPreference } from 'pages/DashboardPage/DashboardContainer/Panels/types/rendererProps';+import { getPanelQueryType } from 'pages/DashboardPage/DashboardContainer/Panels/utils/getPanelQueryType';import type {PanelPagination,PanelQueryData,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'pages/DashboardPage/DashboardContainer/queryV5/types';import PlotTag from './PlotTag';import styles from './PreviewPane.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/__tests__/PlotTag.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/__tests__/PlotTag.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/__tests__/PlotTag.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/__tests__/PlotTag.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/__tests__/PanelEditorContainer.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/__tests__/PanelEditorContainer.test.tsxsimilarity index 99%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/__tests__/PanelEditorContainer.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/__tests__/PanelEditorContainer.test.tsxindex c3d596abff..f73d691589 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/__tests__/PanelEditorContainer.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/__tests__/PanelEditorContainer.test.tsx@@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event';import { toast } from '@signozhq/ui/sonner';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';import { PANEL_TYPES } from 'constants/queryBuilder';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';import PanelEditorContainer from '../index';import { useScrollIntoViewStore } from '../../store/useScrollIntoViewStore';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/__tests__/getSwitchedPluginSpec.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/__tests__/getSwitchedPluginSpec.test.tssimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/__tests__/getSwitchedPluginSpec.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/__tests__/getSwitchedPluginSpec.test.tsindex 6b9cac7674..4d5904b144 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/__tests__/getSwitchedPluginSpec.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/__tests__/getSwitchedPluginSpec.test.ts@@ -2,12 +2,12 @@ import {type DashboardtypesPanelSpecDTO,TelemetrytypesSignalDTO,} from 'api/generated/services/sigNoz.schemas';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';import { defaultColumnsForSignal } from '../ListColumnsEditor/selectFields';import { getSwitchedPluginSpec } from '../getSwitchedPluginSpec';-jest.mock('pages/DashboardPageV2/DashboardContainer/Panels/registry', () => ({+jest.mock('pages/DashboardPage/DashboardContainer/Panels/registry', () => ({getPanelDefinition: jest.fn(),}));jest.mock('../ListColumnsEditor/selectFields', () => ({diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/__tests__/newPanelRoute.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/__tests__/newPanelRoute.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/__tests__/newPanelRoute.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/__tests__/newPanelRoute.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/__tests__/panelEditorUrlQuery.promql.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/__tests__/panelEditorUrlQuery.promql.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/__tests__/panelEditorUrlQuery.promql.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/__tests__/panelEditorUrlQuery.promql.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/getSwitchedPluginSpec.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/getSwitchedPluginSpec.tssimilarity index 70%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/getSwitchedPluginSpec.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/getSwitchedPluginSpec.tsindex c31bd2c3c7..bfd9acac46 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/getSwitchedPluginSpec.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/getSwitchedPluginSpec.ts@@ -2,12 +2,12 @@ import type {DashboardtypesPanelSpecDTO,TelemetrytypesSignalDTO,} from 'api/generated/services/sigNoz.schemas';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';-import type { PanelKind } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';+import type { PanelKind } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';import {buildPluginSpec,type SeededPluginSpec,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/buildPluginSpec';+} from 'pages/DashboardPage/DashboardContainer/Panels/utils/buildPluginSpec';export type SwitchedPluginSpec = SeededPluginSpec;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useLegendSeries.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useLegendSeries.test.tssimilarity index 86%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useLegendSeries.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useLegendSeries.test.tsindex 208d645fe6..c254bdc207 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useLegendSeries.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useLegendSeries.test.ts@@ -2,10 +2,10 @@ import { renderHook } from '@testing-library/react';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';import { useIsDarkMode } from 'hooks/useDarkMode';import { generateColor } from 'lib/uPlotLib/utils/generateColor';-import { preparePieData } from 'pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/prepareData';-import { resolveSeriesLabelV5 } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/resolveSeriesLabel';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';-import { flattenTimeSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';+import { preparePieData } from 'pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/prepareData';+import { resolveSeriesLabelV5 } from 'pages/DashboardPage/DashboardContainer/Panels/utils/resolveSeriesLabel';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';+import { flattenTimeSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';import { useLegendSeries } from '../useLegendSeries';@@ -18,15 +18,15 @@ jest.mock('constants/theme', () => ({themeColors: { chartcolors: ['dark'], lightModeColor: ['light'] },}));jest.mock(- 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getBuilderQueries',+ 'pages/DashboardPage/DashboardContainer/Panels/utils/getBuilderQueries',() => ({ getBuilderQueries: jest.fn(() => []) }),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/Panels/utils/resolveSeriesLabel',+ 'pages/DashboardPage/DashboardContainer/Panels/utils/resolveSeriesLabel',() => ({ resolveSeriesLabelV5: jest.fn() }),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData',+ 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData',() => ({flattenTimeSeries: jest.fn(),getTimeSeriesResults: jest.fn(() => []),@@ -34,11 +34,11 @@ jest.mock(}),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables',+ 'pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables',() => ({ prepareScalarTables: jest.fn(() => []) }),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/prepareData',+ 'pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/prepareData',() => ({ preparePieData: jest.fn(() => []) }),);diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorDraft.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorDraft.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorDraft.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorDraft.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorQuerySync.integration.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorQuerySync.integration.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorQuerySync.integration.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorQuerySync.integration.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorQuerySync.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorQuerySync.test.tssimilarity index 99%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorQuerySync.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorQuerySync.test.tsindex 2c150f6e4d..56ec22baff 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorQuerySync.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorQuerySync.test.ts@@ -4,7 +4,7 @@ import type {DashboardtypesPanelSpecDTO,} from 'api/generated/services/sigNoz.schemas';import { PANEL_TYPES } from 'constants/queryBuilder';-import { getIsQueryModified } from 'container/NewWidget/utils';+import { getIsQueryModified } from 'lib/query/panelQuery';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { useShareBuilderUrl } from 'hooks/queryBuilder/useShareBuilderUrl';import type { Query } from 'types/api/queryBuilder/queryBuilderData';@@ -18,7 +18,7 @@ jest.mock('hooks/queryBuilder/useQueryBuilder', () => ({jest.mock('hooks/queryBuilder/useShareBuilderUrl', () => ({useShareBuilderUrl: jest.fn(),}));-jest.mock('container/NewWidget/utils', () => ({+jest.mock('lib/query/panelQuery', () => ({getIsQueryModified: jest.fn(),}));jest.mock('../../../queryV5/persesQueryAdapters', () => ({diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorSave.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorSave.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorSave.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelEditorSave.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelTypeSwitch.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelTypeSwitch.test.tssimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelTypeSwitch.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelTypeSwitch.test.tsindex 50a0e0d31a..a59ba35b95 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/usePanelTypeSwitch.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/usePanelTypeSwitch.test.ts@@ -1,7 +1,7 @@import { act, renderHook } from '@testing-library/react';import type { DashboardtypesPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';import { PANEL_TYPES } from 'constants/queryBuilder';-import { handleQueryChange } from 'container/NewWidget/utils';+import { handleQueryChange } from 'lib/query/panelQuery';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import type { Query } from 'types/api/queryBuilder/queryBuilderData';@@ -14,7 +14,7 @@ import { usePanelTypeSwitch } from '../usePanelTypeSwitch';jest.mock('hooks/queryBuilder/useQueryBuilder', () => ({useQueryBuilder: jest.fn(),}));-jest.mock('container/NewWidget/utils', () => ({+jest.mock('lib/query/panelQuery', () => ({handleQueryChange: jest.fn(),}));jest.mock('../../../Panels/capabilities', () => ({diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useSeedMetricUnit.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useSeedMetricUnit.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useSeedMetricUnit.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useSeedMetricUnit.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useSwitchColumnsOnSignalChange.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useSwitchColumnsOnSignalChange.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useSwitchColumnsOnSignalChange.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useSwitchColumnsOnSignalChange.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useSwitchToViewMode.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useSwitchToViewMode.test.tssimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useSwitchToViewMode.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useSwitchToViewMode.test.tsindex e9310f7c17..37381ceda9 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useSwitchToViewMode.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useSwitchToViewMode.test.ts@@ -4,7 +4,7 @@ import { PANEL_TYPES } from 'constants/queryBuilder';import {clearViewPanelHandoff,readViewPanelHandoff,-} from 'pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/viewPanelHandoffStore';+} from 'pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/viewPanelHandoffStore';import type { Query } from 'types/api/queryBuilder/queryBuilderData';import { useSwitchToViewMode } from '../useSwitchToViewMode';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useTableColumns.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useTableColumns.test.tssimilarity index 89%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useTableColumns.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useTableColumns.test.tsindex d5970ae818..3de5a9a3cc 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/__tests__/useTableColumns.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/__tests__/useTableColumns.test.ts@@ -1,16 +1,16 @@import { renderHook } from '@testing-library/react';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import { prepareScalarTables } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import { prepareScalarTables } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { useTableColumns } from '../useTableColumns';jest.mock(- 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables',+ 'pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables',() => ({ prepareScalarTables: jest.fn() }),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData',+ 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData',() => ({ getScalarResults: jest.fn(() => []) }),);diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useLegendSeries.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useLegendSeries.tssimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useLegendSeries.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useLegendSeries.tsindex b57674ef35..db0edcd4de 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useLegendSeries.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useLegendSeries.ts@@ -1,7 +1,7 @@import { useMemo } from 'react';import { useIsDarkMode } from 'hooks/useDarkMode';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import {type LegendSeries,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditSession.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditSession.tssimilarity index 93%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditSession.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditSession.tsindex e4301bfcfe..4ab408b579 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditSession.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditSession.ts@@ -4,17 +4,17 @@ import type {TelemetrytypesSignalDTO,} from 'api/generated/services/sigNoz.schemas';import type { PANEL_TYPES } from 'constants/queryBuilder';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';-import type { RenderablePanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';+import type { RenderablePanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';import {PANEL_KIND_TO_PANEL_TYPE,type PanelKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';import {usePanelQuery,type PanelQueryTimeOverride,type UsePanelQueryResult,-} from 'pages/DashboardPageV2/DashboardContainer/hooks/usePanelQuery';+} from 'pages/DashboardPage/DashboardContainer/hooks/usePanelQuery';import { usePanelEditorDraft } from './usePanelEditorDraft';import { usePanelEditorQuerySync } from './usePanelEditorQuerySync';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditorDraft.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditorDraft.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditorDraft.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditorDraft.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditorQuerySync.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditorQuerySync.tssimilarity index 99%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditorQuerySync.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditorQuerySync.tsindex 8b40034279..8a86500bbd 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditorQuerySync.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditorQuerySync.ts@@ -6,7 +6,7 @@ import type {TelemetrytypesSignalDTO,} from 'api/generated/services/sigNoz.schemas';import { initialQueriesMap, PANEL_TYPES } from 'constants/queryBuilder';-import { getIsQueryModified } from 'container/NewWidget/utils';+import { getIsQueryModified } from 'lib/query/panelQuery';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { useShareBuilderUrl } from 'hooks/queryBuilder/useShareBuilderUrl';import { isEqual } from 'lodash-es';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditorSave.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditorSave.tssimilarity index 88%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditorSave.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditorSave.tsindex ba7396d518..6870a826ea 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditorSave.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditorSave.ts@@ -10,9 +10,10 @@ import {DashboardtypesPatchOpDTO,type GetDashboardV2200,} from 'api/generated/services/sigNoz.schemas';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useOptimisticPatch } from '../../hooks/useOptimisticPatch';+import { transferColumnWidths } from '../../Panels/utils/columnWidthStorage';import { createPanelOps } from '../../patchOps';interface UsePanelEditorSaveArgs {@@ -75,6 +76,11 @@ export function usePanelEditorSave({// Optimistic cache write + settle refetch (replaces the manual invalidate).await patchAsync(ops);+ if (isNew) {+ // Column widths are stored per panel id, and a new panel was authored under+ // the sentinel id — move them so the grid renders at the authored widths.+ transferColumnWidths(panelId, savedPanelId);+ }void logEvent(DashboardDetailEvents.PanelEditorSaved, {panelType: spec.plugin.kind,isNew,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelTypeSwitch.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelTypeSwitch.tssimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelTypeSwitch.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelTypeSwitch.tsindex b837357a6e..f663a05685 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelTypeSwitch.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelTypeSwitch.ts@@ -10,9 +10,9 @@ import { PANEL_TYPES } from 'constants/queryBuilder';import {handleQueryChange,type PartialPanelTypes,-} from 'container/NewWidget/utils';+} from 'lib/query/panelQuery';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import type {OrderByPayload,Query,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useSeedMetricUnit.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useSeedMetricUnit.tssimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useSeedMetricUnit.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useSeedMetricUnit.tsindex a3a94c7cf2..0d7be8db82 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useSeedMetricUnit.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useSeedMetricUnit.ts@@ -4,7 +4,7 @@ import useGetYAxisUnit from 'hooks/useGetYAxisUnit';import type {SectionControls,SectionKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';import { readFormatting, writeFormatting } from '../utils/formattingSpec';import type { TableColumnOption } from './useTableColumns';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useSeedNewListColumns.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useSeedNewListColumns.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useSeedNewListColumns.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useSeedNewListColumns.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useSwitchColumnsOnSignalChange.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useSwitchColumnsOnSignalChange.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useSwitchColumnsOnSignalChange.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useSwitchColumnsOnSignalChange.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useSwitchToViewMode.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useSwitchToViewMode.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useSwitchToViewMode.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useSwitchToViewMode.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useTableColumns.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useTableColumns.tssimilarity index 80%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useTableColumns.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useTableColumns.tsindex f6c5ea8210..46d7a20c2f 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/useTableColumns.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/hooks/useTableColumns.ts@@ -1,10 +1,10 @@import { useMemo } from 'react';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import type { PanelFormattingSlice } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';-import { getColumnUnit } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getColumnUnit';-import { prepareScalarTables } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';-import { getScalarResults } from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';+import type { PanelFormattingSlice } from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';+import { getColumnUnit } from 'pages/DashboardPage/DashboardContainer/Panels/utils/getColumnUnit';+import { prepareScalarTables } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';+import { getScalarResults } from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';export interface TableColumnOption {/**diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/index.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/index.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/index.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/index.tsxindex e3a993f1c7..32a132fe94 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/index.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/index.tsx@@ -12,13 +12,13 @@ import {TelemetrytypesSignalDTO,} from 'api/generated/services/sigNoz.schemas';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';+import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';import {type SectionConfig,type SectionControls,SectionKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';-import { getBuilderQueries } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getBuilderQueries';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';+import { getBuilderQueries } from 'pages/DashboardPage/DashboardContainer/Panels/utils/getBuilderQueries';import { useErrorModal } from 'providers/ErrorModalProvider';import { getExecStats } from '../queryV5/v5ResponseData';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/layoutStorage.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/layoutStorage.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/layoutStorage.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/layoutStorage.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/newPanelRoute.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/newPanelRoute.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/newPanelRoute.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/newPanelRoute.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/panelEditorHandoff.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/panelEditorHandoff.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/panelEditorHandoff.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/panelEditorHandoff.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/types.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/types.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/types.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/types.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/utils/__tests__/formattingSpec.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/utils/__tests__/formattingSpec.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/utils/__tests__/formattingSpec.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/utils/__tests__/formattingSpec.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/utils/formattingSpec.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/utils/formattingSpec.tssimilarity index 90%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/utils/formattingSpec.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/utils/formattingSpec.tsindex 47fc51f5f0..e2dfb00700 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/utils/formattingSpec.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/utils/formattingSpec.ts@@ -1,5 +1,5 @@import type { DashboardtypesPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';-import type { PanelFormattingSlice } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/sections';+import type { PanelFormattingSlice } from 'pages/DashboardPage/DashboardContainer/Panels/types/sections';// `spec.plugin.spec` is a discriminated union over panel kinds; these helpers narrow// to the shared `formatting` slice via a single localized cast at the boundary, sodiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/utils/legendSeries.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/utils/legendSeries.tssimilarity index 81%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/utils/legendSeries.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/utils/legendSeries.tsindex 3497af35ca..1aa152cf9d 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelEditor/utils/legendSeries.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelEditor/utils/legendSeries.ts@@ -2,16 +2,16 @@ import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemimport { themeColors } from 'constants/theme';import getLabelName from 'lib/getLabelName';import { generateColor } from 'lib/uPlotLib/utils/generateColor';-import { preparePieData } from 'pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/prepareData';-import { getBuilderQueries } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getBuilderQueries';-import { resolveSeriesLabelV5 } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/resolveSeriesLabel';-import { prepareScalarTables } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import { preparePieData } from 'pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/prepareData';+import { getBuilderQueries } from 'pages/DashboardPage/DashboardContainer/Panels/utils/getBuilderQueries';+import { resolveSeriesLabelV5 } from 'pages/DashboardPage/DashboardContainer/Panels/utils/resolveSeriesLabel';+import { prepareScalarTables } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import {flattenTimeSeries,getScalarResults,getTimeSeriesResults,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';+} from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';export interface LegendSeries {/** Resolved display label — the key `legend.customColors` is indexed by. */diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/__tests__/capabilities.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/__tests__/capabilities.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/__tests__/capabilities.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/__tests__/capabilities.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/capabilities.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/capabilities.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/capabilities.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/capabilities.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/NoData.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/NoData.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/NoData.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/NoData.tsxindex 973839dd5e..c3a8fca99c 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/NoData.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/NoData.tsx@@ -1,7 +1,7 @@import { CalendarRange, Clock, RotateCw } from '@signozhq/icons';import logEvent from 'api/common/logEvent';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { panelHasFixedTimePreference } from '../../../hooks/resolvePanelTimeWindow';import {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/__tests__/NoData.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/__tests__/NoData.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/__tests__/NoData.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/__tests__/NoData.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/__tests__/useExtendTimeWindow.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/__tests__/useExtendTimeWindow.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/__tests__/useExtendTimeWindow.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/__tests__/useExtendTimeWindow.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/extendWindow.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/extendWindow.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/extendWindow.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/extendWindow.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/useExtendTimeWindow.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/useExtendTimeWindow.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/useExtendTimeWindow.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/NoData/useExtendTimeWindow.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/PanelLoader/PanelLoader.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/PanelLoader/PanelLoader.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/PanelLoader/PanelLoader.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/PanelLoader/PanelLoader.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/PanelLoader/PanelLoader.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/PanelLoader/PanelLoader.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/PanelLoader/PanelLoader.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/PanelLoader/PanelLoader.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/PanelMessage/PanelMessage.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/PanelMessage/PanelMessage.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/PanelMessage/PanelMessage.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/PanelMessage/PanelMessage.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/PanelMessage/PanelMessage.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/PanelMessage/PanelMessage.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/PanelMessage/PanelMessage.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/PanelMessage/PanelMessage.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/PanelMessage/__tests__/PanelMessage.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/PanelMessage/__tests__/PanelMessage.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/PanelMessage/__tests__/PanelMessage.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/PanelMessage/__tests__/PanelMessage.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/ResizableTable/ResizableHeader.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/ResizableTable/ResizableHeader.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/ResizableTable/ResizableHeader.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/ResizableTable/ResizableHeader.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/ResizableTable/ResizableHeader.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/ResizableTable/ResizableHeader.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/components/ResizableTable/ResizableHeader.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/components/ResizableTable/ResizableHeader.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/hooks/__tests__/useResizableColumns.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/hooks/__tests__/useResizableColumns.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/hooks/__tests__/useResizableColumns.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/hooks/__tests__/useResizableColumns.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/hooks/useGroupByPerQuery.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/hooks/useGroupByPerQuery.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/hooks/useGroupByPerQuery.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/hooks/useGroupByPerQuery.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/hooks/useResizableColumns.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/hooks/useResizableColumns.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/hooks/useResizableColumns.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/hooks/useResizableColumns.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/hooks/useResponsiveFontSize.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/hooks/useResponsiveFontSize.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/hooks/useResponsiveFontSize.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/hooks/useResponsiveFontSize.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/BarChartPanel/Renderer.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/BarChartPanel/Renderer.tsxsimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/BarChartPanel/Renderer.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/BarChartPanel/Renderer.tsxindex 27077c6b67..cb5d3be8c2 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/BarChartPanel/Renderer.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/BarChartPanel/Renderer.tsx@@ -1,9 +1,9 @@import { useCallback, useMemo, useRef } from 'react';import type { DashboardtypesBarChartPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';-import BarChart from 'container/DashboardContainer/visualization/charts/BarChart/BarChart';-import ChartManager from 'container/DashboardContainer/visualization/components/ChartManager/ChartManager';-import TooltipFooter from 'container/DashboardContainer/visualization/panels/components/TooltipFooter';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import BarChart from 'lib/visualization/charts/BarChart/BarChart';+import ChartManager from 'lib/visualization/components/ChartManager/ChartManager';+import TooltipFooter from 'lib/visualization/panels/components/TooltipFooter';+import { PanelMode } from 'lib/visualization/panels/types';import { useIsDarkMode } from 'hooks/useDarkMode';import { useResizeObserver } from 'hooks/useDimensions';import { IRenderTooltipFooterArgs } from 'lib/uPlotV2/components/types';@@ -12,8 +12,8 @@ import {flattenTimeSeries,getExecStats,getTimeSeriesResults,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';-import { prepareAlignedData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/uplotData';+} from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';+import { prepareAlignedData } from 'pages/DashboardPage/DashboardContainer/queryV5/uplotData';import { useTimezone } from 'providers/Timezone';import NoData from '../../components/NoData/NoData';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/BarChartPanel/definition.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/BarChartPanel/definition.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/BarChartPanel/definition.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/BarChartPanel/definition.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/BarChartPanel/sections.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/BarChartPanel/sections.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/BarChartPanel/sections.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/BarChartPanel/sections.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/BarChartPanel/utils/buildConfig.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/BarChartPanel/utils/buildConfig.tssimilarity index 86%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/BarChartPanel/utils/buildConfig.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/BarChartPanel/utils/buildConfig.tsindex 3bf78a5090..2cb2f09b33 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/BarChartPanel/utils/buildConfig.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/BarChartPanel/utils/buildConfig.ts@@ -1,11 +1,11 @@import type { DashboardtypesBarChartPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';import { Timezone } from 'components/CustomTimePicker/timezoneUtils';import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import { buildBaseConfig } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/baseConfigBuilder';-import { resolveSeriesLabelV5 } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/resolveSeriesLabel';-import type { PanelSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';-import { toClickPluginPayload } from 'pages/DashboardPageV2/DashboardContainer/queryV5/uplotData';+import { PanelMode } from 'lib/visualization/panels/types';+import { buildBaseConfig } from 'pages/DashboardPage/DashboardContainer/Panels/utils/baseConfigBuilder';+import { resolveSeriesLabelV5 } from 'pages/DashboardPage/DashboardContainer/Panels/utils/resolveSeriesLabel';+import type { PanelSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/types';+import { toClickPluginPayload } from 'pages/DashboardPage/DashboardContainer/queryV5/uplotData';import getLabelName from 'lib/getLabelName';import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';import { DrawStyle } from 'lib/uPlotV2/config/types';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/Renderer.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/Renderer.tsxsimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/Renderer.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/Renderer.tsxindex 39b68849a7..41d6c28746 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/Renderer.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/Renderer.tsx@@ -1,14 +1,14 @@import { useCallback, useMemo, useRef } from 'react';import type { DashboardtypesHistogramPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';-import Histogram from 'container/DashboardContainer/visualization/charts/Histogram/Histogram';-import TooltipFooter from 'container/DashboardContainer/visualization/panels/components/TooltipFooter';+import Histogram from 'lib/visualization/charts/Histogram/Histogram';+import TooltipFooter from 'lib/visualization/panels/components/TooltipFooter';import { useIsDarkMode } from 'hooks/useDarkMode';import { useResizeObserver } from 'hooks/useDimensions';import { IRenderTooltipFooterArgs } from 'lib/uPlotV2/components/types';import {flattenTimeSeries,getTimeSeriesResults,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';+} from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';import { useTimezone } from 'providers/Timezone';import type uPlot from 'uplot';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/definition.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/definition.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/definition.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/definition.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/prepareData.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/prepareData.tssimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/prepareData.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/prepareData.tsindex 1d513e97bd..46b3c3aab4 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/prepareData.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/prepareData.ts@@ -1,12 +1,12 @@import { histogramBucketSizes } from '@grafana/data';-import { DEFAULT_BUCKET_COUNT } from 'container/PanelWrapper/constants';+import { DEFAULT_BUCKET_COUNT } from 'lib/visualization/constants';import {buildHistogramBuckets,mergeAlignedDataTables,prependNullBinToFirstHistogramSeries,replaceUndefinedWithNullInAlignedData,-} from 'container/DashboardContainer/visualization/panels/utils/histogram';-import type { PanelSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'lib/visualization/panels/utils/histogram';+import type { PanelSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { AlignedData } from 'uplot';import { incrRoundDn, roundDecimals } from 'utils/round';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/sections.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/sections.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/sections.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/sections.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/utils/buildConfig.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/utils/buildConfig.tssimilarity index 89%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/utils/buildConfig.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/utils/buildConfig.tsindex 3d31a8cbe1..0bd144b0aa 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/HistogramPanel/utils/buildConfig.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/HistogramPanel/utils/buildConfig.ts@@ -1,10 +1,10 @@import type { DashboardtypesHistogramPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';import { Timezone } from 'components/CustomTimePicker/timezoneUtils';import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import { buildBaseConfig } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/baseConfigBuilder';-import { resolveSeriesLabelV5 } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/resolveSeriesLabel';-import type { PanelSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import { PanelMode } from 'lib/visualization/panels/types';+import { buildBaseConfig } from 'pages/DashboardPage/DashboardContainer/Panels/utils/baseConfigBuilder';+import { resolveSeriesLabelV5 } from 'pages/DashboardPage/DashboardContainer/Panels/utils/resolveSeriesLabel';+import type { PanelSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import getLabelName from 'lib/getLabelName';import { DrawStyle } from 'lib/uPlotV2/config/types';import { UPlotConfigBuilder } from 'lib/uPlotV2/config/UPlotConfigBuilder';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/ListPanel.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/ListPanel.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/ListPanel.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/ListPanel.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/Renderer.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/Renderer.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/Renderer.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/Renderer.tsxindex 0d8335c07e..5a8e3eea84 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/Renderer.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/Renderer.tsx@@ -10,8 +10,8 @@ import {import LogDetail from 'components/LogDetail';import { useResizeObserver } from 'hooks/useDimensions';import { useTimezone } from 'providers/Timezone';-import { prepareRawTable } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareRawTable';-import { getRawResults } from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';+import { prepareRawTable } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareRawTable';+import { getRawResults } from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';import type { IField } from 'types/api/logs/fields';import PanelStyles from '../../panel.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/__tests__/Renderer.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/__tests__/Renderer.test.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/__tests__/Renderer.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/__tests__/Renderer.test.tsxindex adad0fd305..d164b0d97c 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/__tests__/Renderer.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/__tests__/Renderer.test.tsx@@ -2,11 +2,11 @@ import {type DashboardtypesListPanelSpecDTO,type QueryRangeV5200,} from 'api/generated/services/sigNoz.schemas';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';import type {PanelPagination,PanelQueryData,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { fireEvent, render } from 'tests/test-utils';import type {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/__tests__/columns.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/__tests__/columns.test.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/__tests__/columns.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/__tests__/columns.test.tsxindex 776cc886ab..a6a2a3d201 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/__tests__/columns.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/__tests__/columns.test.tsx@@ -2,7 +2,7 @@ import { render } from '@testing-library/react';import type { ColumnType } from 'antd/es/table';import { TelemetrytypesSignalDTO } from 'api/generated/services/sigNoz.schemas';-import type { RawTableRow } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareRawTable';+import type { RawTableRow } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareRawTable';import { buildListColumns } from '../columns';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/__tests__/rawRowToILog.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/__tests__/rawRowToILog.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/__tests__/rawRowToILog.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/__tests__/rawRowToILog.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/columns.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/columns.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/columns.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/columns.tsxindex ba1750ab81..5607551fde 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/columns.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/columns.tsx@@ -12,7 +12,7 @@ import type {import LineClampedText from 'periscope/components/LineClampedText/LineClampedText';import { coerceToString } from 'utils/stringUtils';-import type { RawTableRow } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareRawTable';+import type { RawTableRow } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareRawTable';type ListColumns = NonNullable<TableProps<RawTableRow>['columns']>;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/definition.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/definition.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/definition.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/definition.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/rawRowToILog.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/rawRowToILog.tssimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/rawRowToILog.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/rawRowToILog.tsindex 6798e750c7..8be2a4549b 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/rawRowToILog.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/rawRowToILog.ts@@ -1,5 +1,5 @@import { isPlainObject } from 'lodash-es';-import type { RawTableRow } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareRawTable';+import type { RawTableRow } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareRawTable';import type { ILog } from 'types/api/logs/log';import { toFiniteNumber } from 'utils/numericUtils';import { coerceToString } from 'utils/stringUtils';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/sections.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/sections.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/sections.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/sections.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/useListRowInteraction.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/useListRowInteraction.tssimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/useListRowInteraction.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/useListRowInteraction.tsindex a67e19eed6..eeb473b3d4 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/ListPanel/useListRowInteraction.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/ListPanel/useListRowInteraction.ts@@ -8,7 +8,7 @@ import type { RowData } from 'lib/query/createTableColumnsFromQuery';import type { ILog } from 'types/api/logs/log';import { openInNewTab } from 'utils/navigation';-import type { RawTableRow } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareRawTable';+import type { RawTableRow } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareRawTable';import { rawRowToILog } from './rawRowToILog';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/Renderer.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/Renderer.tsxsimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/Renderer.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/Renderer.tsxindex a5a60b332d..edd5f8faf6 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/Renderer.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/Renderer.tsx@@ -5,8 +5,8 @@ import {type MouseEvent as ReactMouseEvent,} from 'react';import type { DashboardtypesNumberPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';-import { prepareScalarTables } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables';-import { getScalarResults } from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';+import { prepareScalarTables } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables';+import { getScalarResults } from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';import NoData from '../../components/NoData/NoData';import PanelStyles from '../../panel.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/__tests__/Renderer.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/__tests__/Renderer.test.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/__tests__/Renderer.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/__tests__/Renderer.test.tsxindex a28f94e5bd..3b33828d4c 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/__tests__/Renderer.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/__tests__/Renderer.test.tsx@@ -5,8 +5,8 @@ import {DashboardtypesThresholdFormatDTO,type QueryRangeV5200,} from 'api/generated/services/sigNoz.schemas';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import { PanelMode } from 'lib/visualization/panels/types';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { render } from 'tests/test-utils';import { BaseRendererProps } from '../../../types/rendererProps';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/__tests__/prepareData.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/__tests__/prepareData.test.tssimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/__tests__/prepareData.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/__tests__/prepareData.test.tsindex 72446c5d23..7703b1927c 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/__tests__/prepareData.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/__tests__/prepareData.test.ts@@ -1,4 +1,4 @@-import type { PanelTable } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelTable } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { prepareNumberData } from '../prepareData';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/__tests__/utils.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/__tests__/utils.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/__tests__/utils.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/__tests__/utils.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/components/ValueDisplay/ValueDisplay.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/components/ValueDisplay/ValueDisplay.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/components/ValueDisplay/ValueDisplay.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/components/ValueDisplay/ValueDisplay.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/components/ValueDisplay/ValueDisplay.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/components/ValueDisplay/ValueDisplay.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/components/ValueDisplay/ValueDisplay.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/components/ValueDisplay/ValueDisplay.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/components/ValueUnit/ValueUnit.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/components/ValueUnit/ValueUnit.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/components/ValueUnit/ValueUnit.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/components/ValueUnit/ValueUnit.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/components/ValueUnit/ValueUnit.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/components/ValueUnit/ValueUnit.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/components/ValueUnit/ValueUnit.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/components/ValueUnit/ValueUnit.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/definition.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/definition.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/definition.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/definition.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/prepareData.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/prepareData.tssimilarity index 89%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/prepareData.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/prepareData.tsindex 57b61273c7..13d5eed862 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/prepareData.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/prepareData.ts@@ -1,4 +1,4 @@-import type { PanelTable } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelTable } from 'pages/DashboardPage/DashboardContainer/queryV5/types';/*** Reduces the scalar tables of a V5 response to the single number a NumberPaneldiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/sections.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/sections.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/sections.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/sections.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/utils.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/utils.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/NumberPanel/utils.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/NumberPanel/utils.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/Renderer.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/Renderer.tsxsimilarity index 88%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/Renderer.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/Renderer.tsxindex f6e1260737..fa494f9da6 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/Renderer.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/Renderer.tsx@@ -4,11 +4,11 @@ import {type MouseEvent as ReactMouseEvent,} from 'react';import type { DashboardtypesPieChartPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';-import Pie from 'container/DashboardContainer/visualization/charts/Pie/Pie';-import type { PieSlice } from 'container/DashboardContainer/visualization/charts/types';+import Pie from 'lib/visualization/charts/Pie/Pie';+import type { PieSlice } from 'lib/visualization/charts/types';import { useIsDarkMode } from 'hooks/useDarkMode';-import { prepareScalarTables } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables';-import { getScalarResults } from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';+import { prepareScalarTables } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables';+import { getScalarResults } from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';import NoData from '../../components/NoData/NoData';import PanelStyles from '../../panel.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/__tests__/prepareData.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/__tests__/prepareData.test.tssimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/__tests__/prepareData.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/__tests__/prepareData.test.tsindex f41d6347fe..d3f0b519ee 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/__tests__/prepareData.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/__tests__/prepareData.test.ts@@ -1,4 +1,4 @@-import type { PanelTable } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelTable } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { preparePieData } from '../prepareData';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/definition.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/definition.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/definition.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/definition.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/prepareData.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/prepareData.tssimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/prepareData.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/prepareData.tsindex a8cab19ec9..1a39c0ded6 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/prepareData.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/prepareData.ts@@ -1,8 +1,8 @@import { themeColors } from 'constants/theme';-import type { PieSlice } from 'container/DashboardContainer/visualization/charts/types';+import type { PieSlice } from 'lib/visualization/charts/types';import getLabelName from 'lib/getLabelName';import { generateColor } from 'lib/uPlotLib/utils/generateColor';-import type { PanelTable } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelTable } from 'pages/DashboardPage/DashboardContainer/queryV5/types';export interface PreparePieDataArgs {/** Scalar tables from the V5 response (see `prepareScalarTables`). */diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/sections.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/sections.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/PieChartPanel/sections.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/PieChartPanel/sections.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/Renderer.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/Renderer.tsxsimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/Renderer.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/Renderer.tsxindex 2843d454e6..f9aca38a39 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/Renderer.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/Renderer.tsx@@ -9,8 +9,8 @@ import {import { Table } from 'antd';import type { DashboardtypesTablePanelSpecDTO } from 'api/generated/services/sigNoz.schemas';import { useResizeObserver } from 'hooks/useDimensions';-import { prepareScalarTables } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables';-import { getScalarResults } from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';+import { prepareScalarTables } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables';+import { getScalarResults } from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';import PanelStyles from '../../panel.module.scss';import { PanelRendererProps } from '../../types/rendererProps';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/TablePanel.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/TablePanel.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/TablePanel.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/TablePanel.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/__tests__/Renderer.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/__tests__/Renderer.test.tsxsimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/__tests__/Renderer.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/__tests__/Renderer.test.tsxindex 32290dbc09..507de223b3 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/__tests__/Renderer.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/__tests__/Renderer.test.tsx@@ -2,8 +2,8 @@ import {type DashboardtypesTablePanelSpecDTO,type QueryRangeV5200,} from 'api/generated/services/sigNoz.schemas';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import { PanelMode } from 'lib/visualization/panels/types';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { render } from 'tests/test-utils';import type {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableColumns.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableColumns.test.tssimilarity index 93%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableColumns.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableColumns.test.tsindex 42c9087bdf..6dbf469ed0 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableColumns.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableColumns.test.ts@@ -1,4 +1,4 @@-import type { PanelTableColumn } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelTableColumn } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { formatTableCellText } from '../tableColumns';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableCsv.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableCsv.test.tssimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableCsv.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableCsv.test.tsindex dde1937a0f..cf8813f9e6 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableCsv.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/__tests__/tableCsv.test.ts@@ -1,7 +1,7 @@import type {PanelQueryData,PanelTable,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'pages/DashboardPage/DashboardContainer/queryV5/types';import type { PanelOfKind } from '../../../types/rendererProps';import { prepareScalarTables } from '../../../../queryV5/prepareScalarTables';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/definition.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/definition.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/definition.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/definition.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/sections.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/sections.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/sections.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/sections.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/tableColumns.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/tableColumns.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/tableColumns.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/tableColumns.tsxindex 2ae9f34c7a..83a8f9797e 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/tableColumns.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/tableColumns.tsx@@ -4,7 +4,7 @@ import type { PrecisionOption } from 'components/Graph/types';import type {PanelTable,PanelTableColumn,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { coerceToString } from 'utils/stringUtils';import type { PanelThreshold } from '../../types/threshold';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/tableCsv.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/tableCsv.tssimilarity index 88%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/tableCsv.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/tableCsv.tsindex f8c2d6f998..b058be1278 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/tableCsv.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/tableCsv.ts@@ -1,10 +1,10 @@import type { PrecisionOption } from 'components/Graph/types';-import { prepareScalarTables } from 'pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables';+import { prepareScalarTables } from 'pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables';import type {PanelQueryData,PanelTable,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';-import { getScalarResults } from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';+} from 'pages/DashboardPage/DashboardContainer/queryV5/types';+import { getScalarResults } from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';import { resolveDecimalPrecision } from '../../utils/chartAppearance/resolvers';import { getColumnUnit } from '../../utils/getColumnUnit';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/Renderer.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/Renderer.tsxsimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/Renderer.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/Renderer.tsxindex e3e6d87855..7bd9a74ba2 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/Renderer.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/Renderer.tsx@@ -1,9 +1,9 @@import { useCallback, useMemo, useRef } from 'react';import type { DashboardtypesTimeSeriesPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';-import TimeSeries from 'container/DashboardContainer/visualization/charts/TimeSeries/TimeSeries';-import ChartManager from 'container/DashboardContainer/visualization/components/ChartManager/ChartManager';-import TooltipFooter from 'container/DashboardContainer/visualization/panels/components/TooltipFooter';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import TimeSeries from 'lib/visualization/charts/TimeSeries/TimeSeries';+import ChartManager from 'lib/visualization/components/ChartManager/ChartManager';+import TooltipFooter from 'lib/visualization/panels/components/TooltipFooter';+import { PanelMode } from 'lib/visualization/panels/types';import { useIsDarkMode } from 'hooks/useDarkMode';import { useResizeObserver } from 'hooks/useDimensions';import { IRenderTooltipFooterArgs } from 'lib/uPlotV2/components/types';@@ -11,8 +11,8 @@ import {flattenTimeSeries,getExecStats,getTimeSeriesResults,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';-import { prepareAlignedData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/uplotData';+} from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';+import { prepareAlignedData } from 'pages/DashboardPage/DashboardContainer/queryV5/uplotData';import { useTimezone } from 'providers/Timezone';import NoData from '../../components/NoData/NoData';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/definition.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/definition.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/definition.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/definition.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/sections.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/sections.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/sections.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/sections.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/__tests__/buildConfig.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/__tests__/buildConfig.test.tssimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/__tests__/buildConfig.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/__tests__/buildConfig.test.tsindex f92ed67902..f734ade440 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/__tests__/buildConfig.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/__tests__/buildConfig.test.ts@@ -1,7 +1,7 @@import type { DashboardtypesTimeSeriesPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';import { UTC_TIMEZONE } from 'components/CustomTimePicker/timezoneUtils';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import type { PanelSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import { PanelMode } from 'lib/visualization/panels/types';+import type { PanelSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { buildTimeSeriesConfig } from '../buildConfig';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/buildConfig.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/buildConfig.tssimilarity index 88%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/buildConfig.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/buildConfig.tsindex 4167e23d83..8cc944ed5e 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/buildConfig.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/kinds/TimeSeriesPanel/utils/buildConfig.ts@@ -1,23 +1,23 @@import type { DashboardtypesTimeSeriesPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';import { Timezone } from 'components/CustomTimePicker/timezoneUtils';import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';import {buildBaseConfig,minStepInterval,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/baseConfigBuilder';+} from 'pages/DashboardPage/DashboardContainer/Panels/utils/baseConfigBuilder';import {FILL_MODE_MAP,LINE_INTERPOLATION_MAP,LINE_STYLE_MAP,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/chartAppearance/enumMaps';-import { resolveSpanGaps } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/chartAppearance/resolvers';-import { resolveSeriesLabelV5 } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/resolveSeriesLabel';-import type { PanelSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'pages/DashboardPage/DashboardContainer/Panels/utils/chartAppearance/enumMaps';+import { resolveSpanGaps } from 'pages/DashboardPage/DashboardContainer/Panels/utils/chartAppearance/resolvers';+import { resolveSeriesLabelV5 } from 'pages/DashboardPage/DashboardContainer/Panels/utils/resolveSeriesLabel';+import type { PanelSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import {hasSingleVisiblePoint,toClickPluginPayload,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/uplotData';+} from 'pages/DashboardPage/DashboardContainer/queryV5/uplotData';import getLabelName from 'lib/getLabelName';import { OnClickPluginOpts } from 'lib/uPlotLib/plugins/onClickPlugin';import {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/panel.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/panel.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/panel.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/panel.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/registry.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/registry.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/registry.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/registry.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/drilldown.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/drilldown.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/drilldown.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/drilldown.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/interactions.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/interactions.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/interactions.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/interactions.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/panelCapabilities.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/panelCapabilities.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/panelCapabilities.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/panelCapabilities.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/panelKind.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/panelKind.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/rendererProps.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/rendererProps.tssimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/rendererProps.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/rendererProps.tsindex 9582096c78..5a89b1cee2 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/rendererProps.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/rendererProps.ts@@ -7,11 +7,11 @@ import type {DashboardCursorSync,SyncTooltipFilterMode,} from 'lib/uPlotV2/plugins/TooltipPlugin/types';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';import type {PanelPagination,PanelQueryData,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'pages/DashboardPage/DashboardContainer/queryV5/types';import type { PanelInteractionMap } from './interactions';import type { PanelKind } from './panelKind';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/sections.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/sections.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/sections.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/sections.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/threshold.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/threshold.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/types/threshold.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/types/threshold.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/buildDefaultQueries.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/buildDefaultQueries.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/buildDefaultQueries.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/buildDefaultQueries.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/buildPluginSpec.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/buildPluginSpec.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/buildPluginSpec.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/buildPluginSpec.test.tsdiff --git a/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/columnWidthStorage.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/columnWidthStorage.test.tsnew file mode 100644index 0000000000..adb36bc681--- /dev/null+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/columnWidthStorage.test.ts@@ -0,0 +1,67 @@+import {+ clearColumnWidths,+ readColumnWidths,+ transferColumnWidths,+ writeColumnWidths,+} from '../columnWidthStorage';++describe('columnWidthStorage', () => {+ beforeEach(() => {+ localStorage.clear();+ });++ it('returns an empty map when nothing is stored', () => {+ expect(readColumnWidths('panel-1')).toStrictEqual({});+ });++ it('round-trips widths for a panel', () => {+ writeColumnWidths('panel-1', { name: 200, status: 80 });+ expect(readColumnWidths('panel-1')).toStrictEqual({ name: 200, status: 80 });+ });++ it('keeps each panel isolated', () => {+ writeColumnWidths('panel-1', { a: 100 });+ writeColumnWidths('panel-2', { b: 300 });++ expect(readColumnWidths('panel-1')).toStrictEqual({ a: 100 });+ expect(readColumnWidths('panel-2')).toStrictEqual({ b: 300 });+ });++ it('overwrites a panel without touching the others', () => {+ writeColumnWidths('panel-1', { a: 100 });+ writeColumnWidths('panel-2', { b: 300 });+ writeColumnWidths('panel-1', { a: 150, c: 50 });++ expect(readColumnWidths('panel-1')).toStrictEqual({ a: 150, c: 50 });+ expect(readColumnWidths('panel-2')).toStrictEqual({ b: 300 });+ });++ it('clears one panel without touching the others', () => {+ writeColumnWidths('panel-1', { a: 100 });+ writeColumnWidths('panel-2', { b: 300 });++ clearColumnWidths('panel-1');++ expect(readColumnWidths('panel-1')).toStrictEqual({});+ expect(readColumnWidths('panel-2')).toStrictEqual({ b: 300 });+ });++ it('transfers widths to the new id and drops the old entry', () => {+ writeColumnWidths('new', { a: 100 });+ writeColumnWidths('panel-2', { b: 300 });++ transferColumnWidths('new', 'panel-1');++ expect(readColumnWidths('new')).toStrictEqual({});+ expect(readColumnWidths('panel-1')).toStrictEqual({ a: 100 });+ expect(readColumnWidths('panel-2')).toStrictEqual({ b: 300 });+ });++ it('leaves the target untouched when the source has no widths', () => {+ writeColumnWidths('panel-1', { a: 100 });++ transferColumnWidths('new', 'panel-1');++ expect(readColumnWidths('panel-1')).toStrictEqual({ a: 100 });+ });+});diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/countEnabledQueries.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/countEnabledQueries.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/countEnabledQueries.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/countEnabledQueries.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/evaluateThresholds.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/evaluateThresholds.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/evaluateThresholds.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/evaluateThresholds.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/formatPanelValue.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/formatPanelValue.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/formatPanelValue.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/formatPanelValue.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/getBuilderQueries.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/getBuilderQueries.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/getBuilderQueries.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/getBuilderQueries.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/getPanelQueryType.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/getPanelQueryType.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/getPanelQueryType.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/getPanelQueryType.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/getPanelTimeRange.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/getPanelTimeRange.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/getPanelTimeRange.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/getPanelTimeRange.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/getTableColumnKeys.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/getTableColumnKeys.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/getTableColumnKeys.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/getTableColumnKeys.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/groupThousands.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/groupThousands.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/groupThousands.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/groupThousands.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/parseFormattedValue.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/parseFormattedValue.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/parseFormattedValue.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/parseFormattedValue.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/resolveSeriesLabel.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/resolveSeriesLabel.test.tssimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/resolveSeriesLabel.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/resolveSeriesLabel.test.tsindex 6b8217726d..88a66366e9 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/resolveSeriesLabel.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/resolveSeriesLabel.test.ts@@ -1,4 +1,4 @@-import type { PanelSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import type { BuilderQuery } from 'types/api/v5/queryRange';import { resolveSeriesLabelV5 } from '../resolveSeriesLabel';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/sortSeriesByMean.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/sortSeriesByMean.test.tssimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/sortSeriesByMean.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/sortSeriesByMean.test.tsindex 99904d8f24..352fc2ff68 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/sortSeriesByMean.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/__tests__/sortSeriesByMean.test.ts@@ -1,4 +1,4 @@-import type { PanelSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { sortSeriesByMeanDesc } from '../sortSeriesByMean';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/baseConfigBuilder.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/baseConfigBuilder.tssimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/baseConfigBuilder.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/baseConfigBuilder.tsindex ee13795b01..442214a678 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/baseConfigBuilder.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/baseConfigBuilder.ts@@ -4,7 +4,7 @@ import type {} from 'api/generated/services/sigNoz.schemas';import { Timezone } from 'components/CustomTimePicker/timezoneUtils';import { PANEL_TYPES } from 'constants/queryBuilder';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';import onClickPlugin, {OnClickPluginOpts,} from 'lib/uPlotLib/plugins/onClickPlugin';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/buildDefaultQueries.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/buildDefaultQueries.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/buildDefaultQueries.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/buildDefaultQueries.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/buildPluginSpec.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/buildPluginSpec.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/buildPluginSpec.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/buildPluginSpec.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/chartAppearance/__tests__/resolvers.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/chartAppearance/__tests__/resolvers.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/chartAppearance/__tests__/resolvers.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/chartAppearance/__tests__/resolvers.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/chartAppearance/enumMaps.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/chartAppearance/enumMaps.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/chartAppearance/enumMaps.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/chartAppearance/enumMaps.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/chartAppearance/resolvers.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/chartAppearance/resolvers.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/chartAppearance/resolvers.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/chartAppearance/resolvers.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/columnWidthStorage.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/columnWidthStorage.tssimilarity index 61%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/columnWidthStorage.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/columnWidthStorage.tsindex 57e31a26d8..5056c631a4 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/columnWidthStorage.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/columnWidthStorage.ts@@ -25,6 +25,13 @@ function readStore(): ColumnWidthStore {}}+function writeStore(store: ColumnWidthStore): void {+ setLocalStorageApi(+ LOCALSTORAGE.DASHBOARD_V2_PANEL_COLUMN_WIDTHS,+ JSON.stringify(store),+ );+}+/** Reads the stored widths for one panel (empty when none persisted yet). */export function readColumnWidths(panelId: string): ColumnWidths {return readStore()[panelId] ?? {};@@ -34,8 +41,37 @@ export function readColumnWidths(panelId: string): ColumnWidths {export function writeColumnWidths(panelId: string, widths: ColumnWidths): void {const store = readStore();store[panelId] = widths;- setLocalStorageApi(- LOCALSTORAGE.DASHBOARD_V2_PANEL_COLUMN_WIDTHS,- JSON.stringify(store),- );+ writeStore(store);+}++/** Drops one panel's entry (e.g. an abandoned new-panel draft). */+export function clearColumnWidths(panelId: string): void {+ const store = readStore();+ if (!(panelId in store)) {+ return;+ }+ delete store[panelId];+ writeStore(store);+}++/**+ * Re-keys one panel's widths and drops the source entry. A new panel is authored+ * under the new-panel sentinel id and only gets its real id on save, so without+ * this the widths set while authoring would be stranded under the sentinel.+ */+export function transferColumnWidths(+ fromPanelId: string,+ toPanelId: string,+): void {+ if (fromPanelId === toPanelId) {+ return;+ }+ const store = readStore();+ const widths = store[fromPanelId];+ if (!widths) {+ return;+ }+ delete store[fromPanelId];+ store[toPanelId] = widths;+ writeStore(store);}diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/countEnabledQueries.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/countEnabledQueries.tssimilarity index 76%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/countEnabledQueries.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/countEnabledQueries.tsindex 2b6f319db0..a8cfca469f 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/countEnabledQueries.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/countEnabledQueries.ts@@ -1,5 +1,5 @@import type { DashboardtypesQueryDTO } from 'api/generated/services/sigNoz.schemas';-import { toQueryEnvelopes } from 'pages/DashboardPageV2/DashboardContainer/queryV5/buildQueryRangeRequest';+import { toQueryEnvelopes } from 'pages/DashboardPage/DashboardContainer/queryV5/buildQueryRangeRequest';/** Counts enabled queries, unwrapping the single `signoz/CompositeQuery` wrapper. */export function countEnabledQueries(queries: DashboardtypesQueryDTO[]): number {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/downloadCsv.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/downloadCsv.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/downloadCsv.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/downloadCsv.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/__tests__/buildViewPanelSpec.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/__tests__/buildViewPanelSpec.test.tssimilarity index 83%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/__tests__/buildViewPanelSpec.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/__tests__/buildViewPanelSpec.test.tsindex e85035aa60..0de331f0d0 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/__tests__/buildViewPanelSpec.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/__tests__/buildViewPanelSpec.test.ts@@ -1,8 +1,8 @@import type { DashboardtypesPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';import { PANEL_TYPES } from 'constants/queryBuilder';-import { getSwitchedPluginSpec } from 'pages/DashboardPageV2/DashboardContainer/PanelEditor/getSwitchedPluginSpec';-import { PANEL_TYPE_TO_PANEL_KIND } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';-import { toPerses } from 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters';+import { getSwitchedPluginSpec } from 'pages/DashboardPage/DashboardContainer/PanelEditor/getSwitchedPluginSpec';+import { PANEL_TYPE_TO_PANEL_KIND } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';+import { toPerses } from 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters';import type { Query } from 'types/api/queryBuilder/queryBuilderData';import { buildViewPanelSpec } from '../buildViewPanelSpec';@@ -10,11 +10,11 @@ import { buildViewPanelSpec } from '../buildViewPanelSpec';// The query conversion + kind-switch spec builder are tested in their own suites; here we// isolate buildViewPanelSpec's branching (same kind vs. kind switch).jest.mock(- 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters',+ 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters',() => ({ toPerses: jest.fn(() => [{ kind: 'mock-query' }]) }),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/PanelEditor/getSwitchedPluginSpec',+ 'pages/DashboardPage/DashboardContainer/PanelEditor/getSwitchedPluginSpec',() => ({ getSwitchedPluginSpec: jest.fn(() => ({ switched: true })) }),);diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/__tests__/drilldown.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/__tests__/drilldown.test.tssimilarity index 99%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/__tests__/drilldown.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/__tests__/drilldown.test.tsindex 9d8d28c44d..967bed7fc2 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/__tests__/drilldown.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/__tests__/drilldown.test.ts@@ -3,7 +3,7 @@ import type { ChartClickData } from 'lib/uPlotV2/plugins/TooltipPlugin/types';import type {PanelSeries,PanelTable,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'pages/DashboardPage/DashboardContainer/queryV5/types';import type { BuilderQuery } from 'types/api/v5/queryRange';import type { DrilldownContext } from '../../../types/drilldown';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/__tests__/resolveContextLinkUrl.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/__tests__/resolveContextLinkUrl.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/__tests__/resolveContextLinkUrl.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/__tests__/resolveContextLinkUrl.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/buildAggregateData.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/buildAggregateData.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/buildAggregateData.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/buildAggregateData.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/buildViewPanelSpec.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/buildViewPanelSpec.tssimilarity index 84%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/buildViewPanelSpec.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/buildViewPanelSpec.tsindex 0d19e9301c..3008cb1529 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/buildViewPanelSpec.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/buildViewPanelSpec.ts@@ -4,12 +4,12 @@ import type {TelemetrytypesSignalDTO,} from 'api/generated/services/sigNoz.schemas';import type { PANEL_TYPES } from 'constants/queryBuilder';-import { getSwitchedPluginSpec } from 'pages/DashboardPageV2/DashboardContainer/PanelEditor/getSwitchedPluginSpec';+import { getSwitchedPluginSpec } from 'pages/DashboardPage/DashboardContainer/PanelEditor/getSwitchedPluginSpec';import {PANEL_TYPE_TO_PANEL_KIND,type PanelKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';-import { toPerses } from 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';+import { toPerses } from 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters';import type { Query } from 'types/api/queryBuilder/queryBuilderData';import { getBuilderQueries } from '../getBuilderQueries';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/chartClickTimeRange.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/chartClickTimeRange.tssimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/chartClickTimeRange.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/chartClickTimeRange.tsindex 34c91a5531..5a1d8d3727 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/chartClickTimeRange.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/chartClickTimeRange.ts@@ -1,7 +1,7 @@import {getTimeRangeFromStepInterval,isApmMetric,-} from 'container/PanelWrapper/utils';+} from 'container/WidgetCard/Panels/utils';import type { BuilderQuery, MetricAggregation } from 'types/api/v5/queryRange';/** Fallback step (seconds) when the response carries no per-query step interval (V1 parity). */diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichChartClick.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichChartClick.tssimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichChartClick.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichChartClick.tsindex ce9c6e641d..516c4e76e3 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichChartClick.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichChartClick.ts@@ -1,6 +1,6 @@import { isValidQueryName } from 'container/QueryTable/Drilldown/drilldownUtils';import type { ChartClickData } from 'lib/uPlotV2/plugins/TooltipPlugin/types';-import type { PanelSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import type { BuilderQuery } from 'types/api/v5/queryRange';import type { DrilldownClickPayload } from '../../types/drilldown';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichNumberClick.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichNumberClick.tssimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichNumberClick.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichNumberClick.tsindex 69c55ffbd3..85ed061f28 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichNumberClick.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichNumberClick.ts@@ -1,5 +1,5 @@import { isValidQueryName } from 'container/QueryTable/Drilldown/drilldownUtils';-import type { PanelTable } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelTable } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import type { BuilderQuery } from 'types/api/v5/queryRange';import type { DrilldownClickPayload } from '../../types/drilldown';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichPieClick.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichPieClick.tssimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichPieClick.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichPieClick.tsindex f73bcc94f5..c973a6405a 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichPieClick.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichPieClick.ts@@ -1,4 +1,4 @@-import type { PieSlice } from 'container/DashboardContainer/visualization/charts/types';+import type { PieSlice } from 'lib/visualization/charts/types';import { isValidQueryName } from 'container/QueryTable/Drilldown/drilldownUtils';import type { BuilderQuery } from 'types/api/v5/queryRange';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichTableClick.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichTableClick.tssimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichTableClick.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichTableClick.tsindex dc7f91e1ee..74bc0710fb 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/enrichTableClick.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/enrichTableClick.ts@@ -3,7 +3,7 @@ import {type FilterData,isValidQueryName,} from 'container/QueryTable/Drilldown/drilldownUtils';-import type { PanelTable } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelTable } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import type { BuilderQuery } from 'types/api/v5/queryRange';import type { DrilldownClickPayload } from '../../types/drilldown';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/getDataLinks.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/getDataLinks.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/getDataLinks.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/getDataLinks.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/getGroupByFilters.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/getGroupByFilters.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/getGroupByFilters.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/getGroupByFilters.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/resolveContextLinkUrl.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/resolveContextLinkUrl.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/resolveContextLinkUrl.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/resolveContextLinkUrl.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/resolvePanelContextLinks.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/resolvePanelContextLinks.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/resolvePanelContextLinks.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/resolvePanelContextLinks.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/signal.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/signal.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/signal.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/signal.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/evaluateThresholds.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/evaluateThresholds.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/evaluateThresholds.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/evaluateThresholds.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/formatPanelValue.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/formatPanelValue.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/formatPanelValue.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/formatPanelValue.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getBuilderQueries.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getBuilderQueries.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getBuilderQueries.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getBuilderQueries.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getColumnUnit.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getColumnUnit.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getColumnUnit.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getColumnUnit.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelBuilderQuery.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getPanelBuilderQuery.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelBuilderQuery.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getPanelBuilderQuery.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelQueryType.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getPanelQueryType.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelQueryType.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getPanelQueryType.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelTimeRange.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getPanelTimeRange.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelTimeRange.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getPanelTimeRange.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getTableColumnKeys.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getTableColumnKeys.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/getTableColumnKeys.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/getTableColumnKeys.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/groupThousands.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/groupThousands.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/groupThousands.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/groupThousands.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/mapComparisonThreshold.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/mapComparisonThreshold.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/mapComparisonThreshold.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/mapComparisonThreshold.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/parseFormattedValue.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/parseFormattedValue.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/parseFormattedValue.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/parseFormattedValue.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/recordTable.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/recordTable.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/recordTable.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/recordTable.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/resolveSeriesLabel.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/resolveSeriesLabel.tssimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/resolveSeriesLabel.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/resolveSeriesLabel.tsindex 1d248d6b2e..26b8bc3615 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/resolveSeriesLabel.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/resolveSeriesLabel.ts@@ -1,5 +1,5 @@import type { BuilderQuery } from 'types/api/v5/queryRange';-import type { PanelSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/types';/*** Identity of one series for label resolution: which query produced it anddiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/selectionPreferences.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/selectionPreferences.tssimilarity index 91%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/selectionPreferences.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/selectionPreferences.tsindex 3cd6f82012..a5c7c999f9 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/selectionPreferences.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/selectionPreferences.ts@@ -1,4 +1,4 @@-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';import { SelectionPreferencesSource } from 'lib/uPlotV2/config/types';// Drag-to-zoom "selection preference" wiring, driven by the render context.diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/sortSeriesByMean.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/sortSeriesByMean.tssimilarity index 74%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/sortSeriesByMean.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/sortSeriesByMean.tsindex b6be2e7ac4..ebbedea5d3 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/sortSeriesByMean.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/sortSeriesByMean.ts@@ -1,5 +1,5 @@-import { sortByMeanDesc } from 'container/DashboardContainer/visualization/charts/utils/sortByMeanDesc';-import type { PanelSeries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import { sortByMeanDesc } from 'lib/visualization/charts/utils/sortByMeanDesc';+import type { PanelSeries } from 'pages/DashboardPage/DashboardContainer/queryV5/types';function seriesKey(series: PanelSeries): string {const labels = Object.keys(series.labels)diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/toSafeFileName.ts b/frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/toSafeFileName.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/toSafeFileName.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/Panels/utils/toSafeFileName.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/DashboardEmptyState/DashboardEmptyState.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/DashboardEmptyState/DashboardEmptyState.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/DashboardEmptyState/DashboardEmptyState.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/DashboardEmptyState/DashboardEmptyState.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/DashboardEmptyState/DashboardEmptyState.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/DashboardEmptyState/DashboardEmptyState.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/DashboardEmptyState/DashboardEmptyState.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/DashboardEmptyState/DashboardEmptyState.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownAggregateMenu.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownAggregateMenu.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownAggregateMenu.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownAggregateMenu.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownAggregateMenu.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownAggregateMenu.tsxsimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownAggregateMenu.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownAggregateMenu.tsxindex 56326af345..741a016877 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownAggregateMenu.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownAggregateMenu.tsx@@ -11,10 +11,10 @@ import logEvent from 'api/common/logEvent';import type { DashboardtypesPanelSpecDTO } from 'api/generated/services/sigNoz.schemas';import { getAggregateColumnHeader } from 'container/QueryTable/Drilldown/drilldownUtils';import ContextMenu from 'periscope/components/ContextMenu';-import type { DrilldownContext } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/drilldown';-import { getDataLinks } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/getDataLinks';-import { resolvePanelContextLinks } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/resolvePanelContextLinks';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import type { DrilldownContext } from 'pages/DashboardPage/DashboardContainer/Panels/types/drilldown';+import { getDataLinks } from 'pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/getDataLinks';+import { resolvePanelContextLinks } from 'pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/resolvePanelContextLinks';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import type { Query } from 'types/api/queryBuilder/queryBuilderData';import { openInNewTab } from 'utils/navigation';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownBreakoutMenu.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownBreakoutMenu.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownBreakoutMenu.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownBreakoutMenu.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownBreakoutMenu.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownBreakoutMenu.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownBreakoutMenu.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownBreakoutMenu.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownDashboardVariablesMenu.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownDashboardVariablesMenu.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownDashboardVariablesMenu.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownDashboardVariablesMenu.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownDashboardVariablesMenu.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownDashboardVariablesMenu.tsxsimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownDashboardVariablesMenu.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownDashboardVariablesMenu.tsxindex 1c4f4320a2..3936badffe 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownDashboardVariablesMenu.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownDashboardVariablesMenu.tsx@@ -3,7 +3,7 @@ import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';import {type DrilldownVariableAction,DrilldownVariableActionKind,-} from 'pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownDashboardVariables';+} from 'pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownDashboardVariables';import ContextMenu from 'periscope/components/ContextMenu';import styles from './DrilldownDashboardVariablesMenu.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownFilterMenu.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownFilterMenu.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownFilterMenu.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/DrilldownMenu/DrilldownFilterMenu.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/Panel.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/Panel.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/Panel.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/Panel.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/Panel.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/Panel.tsxsimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/Panel.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/Panel.tsxindex a52312e098..1a3cefb5ee 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/Panel.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/Panel.tsx@@ -1,12 +1,12 @@import { useState } from 'react';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';import ContextMenu from 'periscope/components/ContextMenu';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';import {getPanelTimePreference,panelTimePreferenceLabel,-} from 'pages/DashboardPageV2/DashboardContainer/hooks/resolvePanelTimeWindow';-import { usePanelQuery } from 'pages/DashboardPageV2/DashboardContainer/hooks/usePanelQuery';+} from 'pages/DashboardPage/DashboardContainer/hooks/resolvePanelTimeWindow';+import { usePanelQuery } from 'pages/DashboardPage/DashboardContainer/hooks/usePanelQuery';import type { DashboardSection } from '../../utils';import { useDrilldown } from './hooks/useDrilldown';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/PanelActionsMenu.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/PanelActionsMenu.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/PanelActionsMenu.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/PanelActionsMenu.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/PanelActionsMenu.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/PanelActionsMenu.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/PanelActionsMenu.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/PanelActionsMenu.tsxindex 1b46da1459..1ec6678bf8 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/PanelActionsMenu.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/PanelActionsMenu.tsx@@ -2,7 +2,7 @@ import { EllipsisVertical } from '@signozhq/icons';import { Button } from '@signozhq/ui/button';import { DropdownMenuSimple } from '@signozhq/ui/dropdown-menu';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import ConfirmDeleteDialog from '../../../components/ConfirmDeleteDialog/ConfirmDeleteDialog';import type { PanelActionsConfig } from '../Panel';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/__tests__/usePanelActionItems.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/__tests__/usePanelActionItems.test.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/__tests__/usePanelActionItems.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/__tests__/usePanelActionItems.test.tsxindex 81c8576c7a..39dbbc7d2e 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/__tests__/usePanelActionItems.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/__tests__/usePanelActionItems.test.tsx@@ -1,6 +1,6 @@import { act, renderHook } from '@testing-library/react';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import type { ROLES } from 'types/roles';import type { DashboardSection } from '../../../../utils';@@ -18,7 +18,7 @@ function disabledKeys(const mockOpenEditor = jest.fn();jest.mock(- 'pages/DashboardPageV2/DashboardContainer/hooks/useOpenPanelEditor',+ 'pages/DashboardPage/DashboardContainer/hooks/useOpenPanelEditor',() => ({useOpenPanelEditor: (): jest.Mock => mockOpenEditor,}),diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/panelActionMeta.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/panelActionMeta.tssimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/panelActionMeta.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/panelActionMeta.tsindex 4888943454..6a9807a5bd 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/panelActionMeta.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/panelActionMeta.ts@@ -1,4 +1,4 @@-import type { PanelActionCapabilities } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';+import type { PanelActionCapabilities } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';import type { ComponentTypes } from 'utils/permission';/**diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/usePanelActionItems.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/usePanelActionItems.tsxsimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/usePanelActionItems.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/usePanelActionItems.tsxindex 6ba8277fe7..6ecab5694a 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/usePanelActionItems.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelActionsMenu/usePanelActionItems.tsx@@ -14,10 +14,10 @@ import {type ConfirmableAction,useConfirmableAction,} from 'hooks/useConfirmableAction';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';-import { useOpenPanelEditor } from 'pages/DashboardPageV2/DashboardContainer/hooks/useOpenPanelEditor';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';-import { useDashboardStore } from 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';+import { useOpenPanelEditor } from 'pages/DashboardPage/DashboardContainer/hooks/useOpenPanelEditor';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';+import { useDashboardStore } from 'pages/DashboardPage/DashboardContainer/store/useDashboardStore';import { useAppContext } from 'providers/App/App';import type { DashboardSection } from '../../../utils';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody.tsxsimilarity index 84%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody.tsxindex cfe43db7bf..93d7eb93fb 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody.tsx@@ -1,17 +1,17 @@import { RotateCw, SquarePlus, TriangleAlert } from '@signozhq/icons';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import PanelLoader from 'pages/DashboardPageV2/DashboardContainer/Panels/components/PanelLoader/PanelLoader';-import PanelMessage from 'pages/DashboardPageV2/DashboardContainer/Panels/components/PanelMessage/PanelMessage';-import type { AnyPanelInteractionProps } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/interactions';-import type { RenderablePanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';-import type { DashboardPreference } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/rendererProps';-import { hasRunnableQueries } from 'pages/DashboardPageV2/DashboardContainer/queryV5/buildQueryRangeRequest';-import { getResponseType } from 'pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData';+import { PanelMode } from 'lib/visualization/panels/types';+import PanelLoader from 'pages/DashboardPage/DashboardContainer/Panels/components/PanelLoader/PanelLoader';+import PanelMessage from 'pages/DashboardPage/DashboardContainer/Panels/components/PanelMessage/PanelMessage';+import type { AnyPanelInteractionProps } from 'pages/DashboardPage/DashboardContainer/Panels/types/interactions';+import type { RenderablePanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';+import type { DashboardPreference } from 'pages/DashboardPage/DashboardContainer/Panels/types/rendererProps';+import { hasRunnableQueries } from 'pages/DashboardPage/DashboardContainer/queryV5/buildQueryRangeRequest';+import { getResponseType } from 'pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData';import type {PanelPagination,PanelQueryData,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { panelStatusFromError } from '../PanelStatus/utils';import styles from './PanelBody.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/__tests__/PanelBody.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/__tests__/PanelBody.test.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/__tests__/PanelBody.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/__tests__/PanelBody.test.tsxindex c889fc2868..4841f6aaea 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/__tests__/PanelBody.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/__tests__/PanelBody.test.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import type { RenderablePanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { RenderablePanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import PanelBody from '../PanelBody';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader.tsxindex 9dac2289a1..c219d7454b 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader.tsx@@ -6,8 +6,8 @@ import type {Querybuildertypesv5QueryWarnDataDTO as WarningDTO,} from 'api/generated/services/sigNoz.schemas';import cx from 'classnames';-import type { PanelTimePreferenceLabel } from 'pages/DashboardPageV2/DashboardContainer/hooks/resolvePanelTimeWindow';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelTimePreferenceLabel } from 'pages/DashboardPage/DashboardContainer/hooks/resolvePanelTimeWindow';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import type { PanelActionsConfig } from '../Panel';import PanelActionsMenu from '../PanelActionsMenu/PanelActionsMenu';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeaderSearch.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeaderSearch.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeaderSearch.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeaderSearch.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeaderSearch.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeaderSearch.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeaderSearch.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeaderSearch.tsxindex 8237411e74..5941829805 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeaderSearch.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeaderSearch.tsx@@ -3,7 +3,7 @@ import { Input } from '@signozhq/ui/input';import { Search, X } from '@signozhq/icons';import { TooltipSimple } from '@signozhq/ui/tooltip';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import styles from './PanelHeaderSearch.module.scss';import { Button } from '@signozhq/ui/button';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusContent.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusContent.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusContent.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusContent.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusPopover.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusPopover.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusPopover.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusPopover.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusPopover.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusPopover.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusPopover.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/PanelStatusPopover.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/__tests__/utils.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/__tests__/utils.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/__tests__/utils.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/__tests__/utils.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/types.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/types.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/types.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/types.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/utils.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/utils.tssimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/utils.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/utils.tsindex 86ddc2b725..2e1620b081 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/utils.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelStatus/utils.ts@@ -5,7 +5,7 @@ import type {RenderErrorResponseDTO,} from 'api/generated/services/sigNoz.schemas';import type { AxiosError } from 'axios';-import { countEnabledQueries } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/countEnabledQueries';+import { countEnabledQueries } from 'pages/DashboardPage/DashboardContainer/Panels/utils/countEnabledQueries';import type { PanelStatusDetail } from './types';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModal.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModal.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModal.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModal.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModal.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModal.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModal.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModal.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModalFooter.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModalFooter.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModalFooter.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/PanelTypeSelectionModalFooter.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/SectionPicker.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/SectionPicker.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/SectionPicker.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/SectionPicker.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/SectionPicker.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/SectionPicker.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/SectionPicker.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/SectionPicker.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/constants.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/constants.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/constants.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/constants.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/types.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/types.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/types.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/types.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/utils.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/utils.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/utils.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelTypeSelectionModal/utils.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModal.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModal.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModal.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModal.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModal.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModal.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModal.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModal.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalContent.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalContent.tsxsimilarity index 87%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalContent.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalContent.tsxindex 9431ee5400..f2f7b6c43e 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalContent.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalContent.tsx@@ -1,14 +1,14 @@import { useCallback, useEffect, useMemo } from 'react';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';+import { PanelMode } from 'lib/visualization/panels/types';import { DashboardCursorSync } from 'lib/uPlotV2/plugins/TooltipPlugin/types';import ContextMenu from 'periscope/components/ContextMenu';-import ListColumnsEditor from 'pages/DashboardPageV2/DashboardContainer/PanelEditor/ListColumnsEditor/ListColumnsEditor';-import PanelEditorQueryBuilder from 'pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder';-import PreviewPane from 'pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PreviewPane';-import type { DashboardPreference } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/rendererProps';-import { useViewPanelStore } from 'pages/DashboardPageV2/DashboardContainer/store/useViewPanelStore';-import { useOpenPanelEditor } from 'pages/DashboardPageV2/DashboardContainer/hooks/useOpenPanelEditor';+import ListColumnsEditor from 'pages/DashboardPage/DashboardContainer/PanelEditor/ListColumnsEditor/ListColumnsEditor';+import PanelEditorQueryBuilder from 'pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder';+import PreviewPane from 'pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PreviewPane';+import type { DashboardPreference } from 'pages/DashboardPage/DashboardContainer/Panels/types/rendererProps';+import { useViewPanelStore } from 'pages/DashboardPage/DashboardContainer/store/useViewPanelStore';+import { useOpenPanelEditor } from 'pages/DashboardPage/DashboardContainer/hooks/useOpenPanelEditor';import { useDrilldown } from '../hooks/useDrilldown';import { usePanelInteractions } from '../hooks/usePanelInteractions';@@ -20,7 +20,7 @@ import logEvent from 'api/common/logEvent';import {DashboardDetailEvents,DashboardEvents,-} from 'pages/DashboardPageV2/constants/events';+} from 'pages/DashboardPage/constants/events';interface ViewPanelModalContentProps {panel: DashboardtypesPanelDTO;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalHeader.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalHeader.tsxsimilarity index 88%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalHeader.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalHeader.tsxindex 08c4104fa5..39cb655161 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalHeader.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelModalHeader.tsx@@ -7,13 +7,13 @@ import type {CustomTimeType,Time,} from 'container/TopNav/DateTimeSelectionV2/types';-import { usePanelTypeSelectItems } from 'pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/usePanelTypeSelectItems';-import ConfigSelect from 'pages/DashboardPageV2/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSelect/ConfigSelect';-import type { PanelKind } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';+import { usePanelTypeSelectItems } from 'pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/PanelTypeSwitcher/usePanelTypeSelectItems';+import ConfigSelect from 'pages/DashboardPage/DashboardContainer/PanelEditor/ConfigPane/controls/ConfigSelect/ConfigSelect';+import type { PanelKind } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';import type { EQueryType } from 'types/common/dashboard';import styles from './ViewPanelModal.module.scss';-import { useDashboardStore } from 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore';+import { useDashboardStore } from 'pages/DashboardPage/DashboardContainer/store/useDashboardStore';interface ViewPanelModalHeaderProps {selectedInterval: Time | CustomTimeType;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelQueryBuilder.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelQueryBuilder.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelQueryBuilder.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/ViewPanelQueryBuilder.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelMode.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelMode.tssimilarity index 87%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelMode.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelMode.tsindex 726e1ec4e0..8fac814f0c 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelMode.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelMode.ts@@ -9,21 +9,21 @@ import { PANEL_TYPES } from 'constants/queryBuilder';import { useGetCompositeQueryParam } from 'hooks/queryBuilder/useGetCompositeQueryParam';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import useUrlQuery from 'hooks/useUrlQuery';-import { usePanelEditSession } from 'pages/DashboardPageV2/DashboardContainer/PanelEditor/hooks/usePanelEditSession';-import type { OpenDrilldownView } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/drilldown';-import type { RenderablePanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';+import { usePanelEditSession } from 'pages/DashboardPage/DashboardContainer/PanelEditor/hooks/usePanelEditSession';+import type { OpenDrilldownView } from 'pages/DashboardPage/DashboardContainer/Panels/types/drilldown';+import type { RenderablePanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';import {PANEL_KIND_TO_PANEL_TYPE,type PanelKind,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';-import { resolveSignal } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getBuilderQueries';-import { buildViewPanelSpec } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/buildViewPanelSpec';-import { fromPerses } from 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';+import { resolveSignal } from 'pages/DashboardPage/DashboardContainer/Panels/utils/getBuilderQueries';+import { buildViewPanelSpec } from 'pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/buildViewPanelSpec';+import { fromPerses } from 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters';import {type PanelQueryTimeOverride,type UsePanelQueryResult,-} from 'pages/DashboardPageV2/DashboardContainer/hooks/usePanelQuery';-import { useDashboardStore } from 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore';+} from 'pages/DashboardPage/DashboardContainer/hooks/usePanelQuery';+import { useDashboardStore } from 'pages/DashboardPage/DashboardContainer/store/useDashboardStore';import type { EQueryType } from 'types/common/dashboard';import { readViewPanelHandoff } from './viewPanelHandoffStore';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelTimeWindow.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelTimeWindow.tssimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelTimeWindow.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelTimeWindow.tsindex aab5750602..c0b85772dd 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelTimeWindow.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/useViewPanelTimeWindow.ts@@ -9,9 +9,9 @@ import GetMinMax from 'lib/getMinMax';import {buildExtendWindow,ExtendTimeWindow,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/components/NoData/extendWindow';+} from 'pages/DashboardPage/DashboardContainer/Panels/components/NoData/extendWindow';import { getNextZoomOutRange } from 'lib/zoomOutUtils';-import type { PanelQueryTimeOverride } from 'pages/DashboardPageV2/DashboardContainer/hooks/usePanelQuery';+import type { PanelQueryTimeOverride } from 'pages/DashboardPage/DashboardContainer/hooks/usePanelQuery';import { AppState } from 'store/reducers';import { GlobalReducer } from 'types/reducer/globalTime';import { NANO_SECOND_MULTIPLIER } from '@/store/globalTime';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/viewPanelHandoffStore.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/viewPanelHandoffStore.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/viewPanelHandoffStore.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/ViewPanelModal/viewPanelHandoffStore.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/DrilldownDashboardVariablesMenu.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/DrilldownDashboardVariablesMenu.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/DrilldownDashboardVariablesMenu.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/DrilldownDashboardVariablesMenu.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/PanelHeader.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/PanelHeader.test.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/PanelHeader.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/PanelHeader.test.tsxindex 1ed41d393f..d9770b0108 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/PanelHeader.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/PanelHeader.test.tsx@@ -2,7 +2,7 @@ import { TooltipProvider } from '@signozhq/ui/tooltip';import { render, screen } from '@testing-library/react';import userEvent from '@testing-library/user-event';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import type { ReactElement } from 'react';import type { Warning } from 'types/api';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/ViewPanelModal.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/ViewPanelModal.test.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/ViewPanelModal.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/ViewPanelModal.test.tsxindex 5ba040442e..d46140e791 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/ViewPanelModal.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/ViewPanelModal.test.tsx@@ -12,7 +12,7 @@ import ViewPanelModal from '../ViewPanelModal/ViewPanelModal';// threads down, not the preview internals (PreviewPane/PanelHeader own those).const mockPreviewPaneRender = jest.fn();jest.mock(- 'pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PreviewPane',+ 'pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PreviewPane',() =>function MockPreviewPane(props: Record<string, unknown>): ReactElement {mockPreviewPaneRender(props);@@ -72,7 +72,7 @@ jest.mock('../hooks/useDrilldown', () => ({// The View modal reuses the edit page's query builder, which reads the global// QueryBuilder context and pulls in the ClickHouse/PromQL editors; stub it here.jest.mock(- 'pages/DashboardPageV2/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder',+ 'pages/DashboardPage/DashboardContainer/PanelEditor/PanelEditorQueryBuilder/PanelEditorQueryBuilder',() =>function MockPanelEditorQueryBuilder(): ReactElement {return <div data-testid="panel-editor-v2-query-builder" />;@@ -109,7 +109,7 @@ jest.mock('../ViewPanelModal/useViewPanelTimeWindow', () => ({const mockOpenEditor = jest.fn();jest.mock(- 'pages/DashboardPageV2/DashboardContainer/hooks/useOpenPanelEditor',+ 'pages/DashboardPage/DashboardContainer/hooks/useOpenPanelEditor',() => ({useOpenPanelEditor: (): jest.Mock => mockOpenEditor,}),diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldown.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldown.test.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldown.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldown.test.tsxindex 0e17ec6103..2d79af2f4a 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldown.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldown.test.tsx@@ -5,7 +5,7 @@ import {TelemetrytypesSignalDTO,} from 'api/generated/services/sigNoz.schemas';import { PANEL_TYPES } from 'constants/queryBuilder';-import type { DrilldownContext } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/drilldown';+import type { DrilldownContext } from 'pages/DashboardPage/DashboardContainer/Panels/types/drilldown';import { EQueryType } from 'types/common/dashboard';import { useDrilldown } from '../hooks/useDrilldown';@@ -84,21 +84,21 @@ jest.mock('container/QueryTable/Drilldown/drilldownUtils', () => ({isNumberDataType: (): boolean => false,}));jest.mock(- 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters',+ 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters',() => ({fromPerses: (): string => 'V1_QUERY',toPerses: jest.fn(() => [{ kind: 'REFINED' }]),}),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getBuilderQueries',+ 'pages/DashboardPage/DashboardContainer/Panels/utils/getBuilderQueries',() => ({getBuilderQueries: (...args: unknown[]): unknown =>mockGetBuilderQueries(...args),}),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelQueryType',+ 'pages/DashboardPage/DashboardContainer/Panels/utils/getPanelQueryType',() => ({getPanelQueryType: (...args: unknown[]): unknown =>mockGetPanelQueryType(...args),@@ -106,7 +106,7 @@ jest.mock();// Capability lookup mocked (its per-kind values are data in the definitions); avoids// importing the whole renderer registry into the test.-jest.mock('pages/DashboardPageV2/DashboardContainer/Panels/registry', () => ({+jest.mock('pages/DashboardPage/DashboardContainer/Panels/registry', () => ({getPanelDefinition: (kind: string): unknown => ({actions: { drilldown: kind !== 'signoz/ListPanel' },}),diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldownDashboardVariables.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldownDashboardVariables.test.tsxsimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldownDashboardVariables.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldownDashboardVariables.test.tsxindex a9e7fcd5d8..88e676523c 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldownDashboardVariables.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useDrilldownDashboardVariables.test.tsx@@ -30,13 +30,13 @@ jest.mock('api/generated/services/dashboard', () => ({}),}));jest.mock(- 'pages/DashboardPageV2/DashboardContainer/hooks/useOptimisticPatch',+ 'pages/DashboardPage/DashboardContainer/hooks/useOptimisticPatch',() => ({useOptimisticPatch: (): unknown => ({ patchAsync: mockPatchAsync }),}),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore',+ 'pages/DashboardPage/DashboardContainer/store/useDashboardStore',() => ({useDashboardStore: (selector: (state: unknown) => unknown): unknown =>selector({@@ -47,7 +47,7 @@ jest.mock(}),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/variableAdapters',+ 'pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/variableAdapters',() => ({dtoToFormModel: (dto: {spec?: { plugin?: { kind?: string } };@@ -60,7 +60,7 @@ jest.mock(}),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/variableFormModel',+ 'pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/variableFormModel',() => ({emptyVariableFormModel: (): unknown => ({}),}),diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.addons.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.addons.test.tsxsimilarity index 93%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.addons.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.addons.test.tsxindex e8b4f8e26f..4a11c9d7ab 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.addons.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.addons.test.tsx@@ -63,23 +63,20 @@ jest.mock('api/querySuggestions/getValueSuggestion', () => ({}),}));-jest.mock(- 'pages/DashboardPageV2/DashboardContainer/hooks/usePanelQuery',- () => ({- usePanelQuery: (): unknown => ({- data: undefined,- isFetching: false,- isPreviousData: false,- error: null,- refetch: jest.fn(),- cancelQuery: jest.fn(),- pagination: undefined,- }),+jest.mock('pages/DashboardPage/DashboardContainer/hooks/usePanelQuery', () => ({+ usePanelQuery: (): unknown => ({+ data: undefined,+ isFetching: false,+ isPreviousData: false,+ error: null,+ refetch: jest.fn(),+ cancelQuery: jest.fn(),+ pagination: undefined,}),-);+}));jest.mock(- 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore',+ 'pages/DashboardPage/DashboardContainer/store/useDashboardStore',() => ({useDashboardStore: (selector: (s: unknown) => unknown): unknown =>selector({ dashboardId: 'dash-1' }),@@ -87,7 +84,7 @@ jest.mock();jest.mock(- 'pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PreviewPane',+ 'pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PreviewPane',() =>function MockPreviewPane(): ReactElement {return <div data-testid="preview-pane" />;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.promql.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.promql.test.tsxsimilarity index 90%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.promql.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.promql.test.tsxindex fac6759718..2bd6cd5b9c 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.promql.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.promql.test.tsx@@ -22,23 +22,20 @@ jest.mock('hooks/useSafeNavigate', () =>.createBrowserHistorySafeNavigateMock(),);-jest.mock(- 'pages/DashboardPageV2/DashboardContainer/hooks/usePanelQuery',- () => ({- usePanelQuery: (): unknown => ({- data: undefined,- isFetching: false,- isPreviousData: false,- error: null,- refetch: jest.fn(),- cancelQuery: jest.fn(),- pagination: undefined,- }),+jest.mock('pages/DashboardPage/DashboardContainer/hooks/usePanelQuery', () => ({+ usePanelQuery: (): unknown => ({+ data: undefined,+ isFetching: false,+ isPreviousData: false,+ error: null,+ refetch: jest.fn(),+ cancelQuery: jest.fn(),+ pagination: undefined,}),-);+}));jest.mock(- 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore',+ 'pages/DashboardPage/DashboardContainer/store/useDashboardStore',() => ({useDashboardStore: (selector: (s: unknown) => unknown): unknown =>selector({ dashboardId: 'dash-1' }),@@ -46,7 +43,7 @@ jest.mock();jest.mock(- 'pages/DashboardPageV2/DashboardContainer/PanelEditor/PreviewPane/PreviewPane',+ 'pages/DashboardPage/DashboardContainer/PanelEditor/PreviewPane/PreviewPane',() =>function MockPreviewPane(): ReactElement {return <div data-testid="preview-pane" />;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.test.tsxsimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.test.tsxindex 8ef95f7256..0f32bc1daa 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanel.test.tsx@@ -6,7 +6,7 @@ import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemimport { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';-import { fromPerses } from 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters';+import { fromPerses } from 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters';import { QueryBuilderProvider } from 'providers/QueryBuilder';import type { Query } from 'types/api/queryBuilder/queryBuilderData';@@ -20,23 +20,20 @@ jest.mock('hooks/useSafeNavigate', () =>.createBrowserHistorySafeNavigateMock(),);-jest.mock(- 'pages/DashboardPageV2/DashboardContainer/hooks/usePanelQuery',- () => ({- usePanelQuery: (): unknown => ({- data: undefined,- isFetching: false,- isPreviousData: false,- error: null,- refetch: jest.fn(),- cancelQuery: jest.fn(),- pagination: undefined,- }),+jest.mock('pages/DashboardPage/DashboardContainer/hooks/usePanelQuery', () => ({+ usePanelQuery: (): unknown => ({+ data: undefined,+ isFetching: false,+ isPreviousData: false,+ error: null,+ refetch: jest.fn(),+ cancelQuery: jest.fn(),+ pagination: undefined,}),-);+}));jest.mock(- 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore',+ 'pages/DashboardPage/DashboardContainer/store/useDashboardStore',() => ({useDashboardStore: (selector: (s: unknown) => unknown): unknown =>selector({ dashboardId: 'dash-1' }),diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanelTimeWindow.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanelTimeWindow.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanelTimeWindow.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/__tests__/useViewPanelTimeWindow.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useClonePanel.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useClonePanel.test.tssimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useClonePanel.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useClonePanel.test.tsindex d2f25077fe..73dfe5f230 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useClonePanel.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useClonePanel.test.ts@@ -20,6 +20,13 @@ jest.mock('@signozhq/ui/sonner', () => ({jest.mock('uuid', () => ({ v4: (): string => 'cloned-id' }));+jest.mock('../../../../hooks/useDashboardEventMeta', () => ({+ useDashboardEventMeta: (): { dashboardId: string; dashboardName: string } => ({+ dashboardId: 'dash-1',+ dashboardName: 'Infra overview',+ }),+}));+const sourcePanel = {kind: 'Panel',spec: {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useCreateAlertFromPanel.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useCreateAlertFromPanel.test.tssimilarity index 89%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useCreateAlertFromPanel.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useCreateAlertFromPanel.test.tsindex 7451f19f0f..793ef8d14b 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useCreateAlertFromPanel.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useCreateAlertFromPanel.test.ts@@ -3,7 +3,7 @@ import logEvent from 'api/common/logEvent';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';import { Querybuildertypesv5VariableTypeDTO } from 'api/generated/services/sigNoz.schemas';import { PANEL_TYPES } from 'constants/queryBuilder';-import { useDashboardStore } from 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore';+import { useDashboardStore } from 'pages/DashboardPage/DashboardContainer/store/useDashboardStore';import { useCreateAlertFromPanel } from '../useCreateAlertFromPanel';@@ -12,6 +12,19 @@ jest.mock('api/common/logEvent', () => ({default: jest.fn(),}));+jest.mock(+ 'pages/DashboardPage/DashboardContainer/hooks/useDashboardEventMeta',+ () => ({+ useDashboardEventMeta: (): {+ dashboardId: string;+ dashboardName: string;+ } => ({+ dashboardId: 'dash-1',+ dashboardName: 'Infra overview',+ }),+ }),+);+const mockSafeNavigate = jest.fn();jest.mock('hooks/useSafeNavigate', () => ({useSafeNavigate: (): { safeNavigate: jest.Mock } => ({@@ -58,10 +71,10 @@ const mockBuildQueryRangeRequest = jest.fn((_args?: unknown) => ({request: 'payload',}));jest.mock(- 'pages/DashboardPageV2/DashboardContainer/queryV5/buildQueryRangeRequest',+ 'pages/DashboardPage/DashboardContainer/queryV5/buildQueryRangeRequest',() => ({...jest.requireActual(- 'pages/DashboardPageV2/DashboardContainer/queryV5/buildQueryRangeRequest',+ 'pages/DashboardPage/DashboardContainer/queryV5/buildQueryRangeRequest',),buildQueryRangeRequest: (args: unknown): unknown =>mockBuildQueryRangeRequest(args),@@ -69,10 +82,10 @@ jest.mock();jest.mock(- 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters',+ 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters',() => ({...jest.requireActual(- 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters',+ 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters',),envelopesToQuery: (): unknown => ({ resolved: 'query' }),}),@@ -106,6 +119,7 @@ describe('useCreateAlertFromPanel', () => {action: 'createAlerts',panelType: PANEL_TYPES.TIME_SERIES,dashboardId: 'dash-1',+ dashboardName: 'Infra overview',widgetId: 'panel-1',}),);diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelCsv.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelCsv.test.tssimilarity index 80%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelCsv.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelCsv.test.tsindex a2349cb2db..aa842f8b16 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelCsv.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelCsv.test.ts@@ -1,17 +1,17 @@import { renderHook } from '@testing-library/react';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import { getTableCsvRows } from 'pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/tableCsv';-import { downloadCsv } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/downloadCsv';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import { getTableCsvRows } from 'pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/tableCsv';+import { downloadCsv } from 'pages/DashboardPage/DashboardContainer/Panels/utils/downloadCsv';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { useDownloadPanelCsv } from '../useDownloadPanelCsv';jest.mock(- 'pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/tableCsv',+ 'pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/tableCsv',() => ({ getTableCsvRows: jest.fn() }),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/Panels/utils/downloadCsv',+ 'pages/DashboardPage/DashboardContainer/Panels/utils/downloadCsv',() => ({ downloadCsv: jest.fn() }),);diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelImage.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelImage.test.tsxsimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelImage.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelImage.test.tsxindex 2c6ae3e8ab..f9e3e2d3c4 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelImage.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelImage.test.tsx@@ -1,6 +1,6 @@import { renderHook } from '@testing-library/react';import { toast } from '@signozhq/ui/sonner';-import { DownloadFormat } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';+import { DownloadFormat } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';import { downloadElementAsImage } from '../../utils/downloadPanelImage';import { useDownloadPanelImage } from '../useDownloadPanelImage';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelMenuItem.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelMenuItem.test.tsxsimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelMenuItem.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelMenuItem.test.tsxindex 8889256abf..17392a58f0 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelMenuItem.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/__tests__/useDownloadPanelMenuItem.test.tsx@@ -1,7 +1,7 @@import { renderHook } from '@testing-library/react';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import type { PanelActionCapabilities } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import type { PanelActionCapabilities } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { useDownloadPanelMenuItem } from '../useDownloadPanelMenuItem';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useClonePanel.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useClonePanel.tssimilarity index 87%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useClonePanel.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useClonePanel.tsindex 3100d5bc02..3c9a9a36f9 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useClonePanel.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useClonePanel.ts@@ -2,10 +2,11 @@ import { useCallback } from 'react';import { toast } from '@signozhq/ui/sonner';import logEvent from 'api/common/logEvent';import { cloneDeep } from 'lodash-es';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';-import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';+import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';import { v4 as uuid } from 'uuid';+import { useDashboardEventMeta } from '../../../hooks/useDashboardEventMeta';import { useOptimisticPatch } from '../../../hooks/useOptimisticPatch';import {addPanelToSectionOps,@@ -35,6 +36,7 @@ export function useClonePanel({sections,}: Params): (args: ClonePanelArgs) => Promise<void> {const dashboardId = useDashboardStore((s) => s.dashboardId);+ const eventMeta = useDashboardEventMeta();const { patchAsync } = useOptimisticPatch();const setScrollTargetId = useScrollIntoViewStore((s) => s.setScrollTargetId);@@ -82,12 +84,12 @@ export function useClonePanel({action: 'clone',panelType: PANEL_KIND_TO_PANEL_TYPE[source.panel.spec.plugin.kind],panelId,- dashboardId,+ ...eventMeta,});} catch {// no-op}},- [sections, dashboardId, patchAsync, setScrollTargetId],+ [sections, dashboardId, eventMeta, patchAsync, setScrollTargetId],);}diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useCreateAlertFromPanel.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useCreateAlertFromPanel.tssimilarity index 74%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useCreateAlertFromPanel.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useCreateAlertFromPanel.tsindex 5ab44ce8e7..fdafd615de 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useCreateAlertFromPanel.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useCreateAlertFromPanel.ts@@ -6,13 +6,15 @@ import logEvent from 'api/common/logEvent';import { useReplaceVariables } from 'api/generated/services/querier';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';import { SOMETHING_WENT_WRONG } from 'constants/api';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useSafeNavigate } from 'hooks/useSafeNavigate';-import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';-import { getPanelQueryType } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelQueryType';-import { buildQueryRangeRequest } from 'pages/DashboardPageV2/DashboardContainer/queryV5/buildQueryRangeRequest';-import { envelopesToQuery } from 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters';-import { selectResolvedVariables } from 'pages/DashboardPageV2/DashboardContainer/store/slices/variableSelectionSlice';-import { useDashboardStore } from 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore';+import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';+import { getPanelQueryType } from 'pages/DashboardPage/DashboardContainer/Panels/utils/getPanelQueryType';+import { useDashboardEventMeta } from 'pages/DashboardPage/DashboardContainer/hooks/useDashboardEventMeta';+import { buildQueryRangeRequest } from 'pages/DashboardPage/DashboardContainer/queryV5/buildQueryRangeRequest';+import { envelopesToQuery } from 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters';+import { selectResolvedVariables } from 'pages/DashboardPage/DashboardContainer/store/slices/variableSelectionSlice';+import { useDashboardStore } from 'pages/DashboardPage/DashboardContainer/store/useDashboardStore';import { AppState } from 'store/reducers';import { GlobalReducer } from 'types/reducer/globalTime';@@ -37,6 +39,7 @@ export function useCreateAlertFromPanel(): (const { safeNavigate } = useSafeNavigate();const dashboardId = useDashboardStore((s) => s.dashboardId);const variables = useDashboardStore(selectResolvedVariables(dashboardId));+ const eventMeta = useDashboardEventMeta();const { maxTime, minTime } = useSelector<AppState, GlobalReducer>((state) => state.globalTime,);@@ -46,10 +49,10 @@ export function useCreateAlertFromPanel(): ((panel: DashboardtypesPanelDTO, panelId: string): void => {const panelType = PANEL_KIND_TO_PANEL_TYPE[panel.spec.plugin.kind];- void logEvent('Dashboard Detail: Panel action', {+ void logEvent(DashboardDetailEvents.PanelAction, {action: 'createAlerts',panelType,- dashboardId,+ ...eventMeta,widgetId: panelId,queryType: getPanelQueryType(panel),});@@ -93,6 +96,6 @@ export function useCreateAlertFromPanel(): (},);},- [dashboardId, variables, minTime, maxTime, substituteVars, safeNavigate],+ [eventMeta, variables, minTime, maxTime, substituteVars, safeNavigate],);}diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDeletePanel.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDeletePanel.tssimilarity index 81%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDeletePanel.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDeletePanel.tsindex a3a0225085..b1ee375f13 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDeletePanel.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDeletePanel.ts@@ -1,11 +1,12 @@import { useCallback } from 'react';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';-import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';+import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';+import { useDashboardEventMeta } from '../../../hooks/useDashboardEventMeta';import { useOptimisticPatch } from '../../../hooks/useOptimisticPatch';import { removePanelOp, replaceSectionItemsOp } from '../../../patchOps';import { useDashboardStore } from '../../../store/useDashboardStore';@@ -28,6 +29,7 @@ export function useDeletePanel({sections,}: Params): (args: DeletePanelArgs) => Promise<void> {const dashboardId = useDashboardStore((s) => s.dashboardId);+ const eventMeta = useDashboardEventMeta();const { patchAsync } = useOptimisticPatch();const { showErrorModal } = useErrorModal();@@ -54,12 +56,12 @@ export function useDeletePanel({? PANEL_KIND_TO_PANEL_TYPE[removed.panel.spec.plugin.kind]: undefined,panelId,- dashboardId,+ ...eventMeta,});} catch (error) {showErrorModal(error as APIError);}},- [sections, dashboardId, patchAsync, showErrorModal],+ [sections, dashboardId, eventMeta, patchAsync, showErrorModal],);}diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelCsv.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelCsv.tssimilarity index 68%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelCsv.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelCsv.tsindex 1addb26e7f..b07a813c02 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelCsv.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelCsv.ts@@ -1,12 +1,12 @@import { useCallback } from 'react';import logEvent from 'api/common/logEvent';import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';-import { getTableCsvRows } from 'pages/DashboardPageV2/DashboardContainer/Panels/kinds/TablePanel/tableCsv';-import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';-import type { PanelOfKind } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/rendererProps';-import { downloadCsv } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/downloadCsv';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';+import { getTableCsvRows } from 'pages/DashboardPage/DashboardContainer/Panels/kinds/TablePanel/tableCsv';+import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';+import type { PanelOfKind } from 'pages/DashboardPage/DashboardContainer/Panels/types/rendererProps';+import { downloadCsv } from 'pages/DashboardPage/DashboardContainer/Panels/utils/downloadCsv';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';interface UseDownloadPanelCsvArgs {panel: DashboardtypesPanelDTO;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelImage.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelImage.tssimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelImage.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelImage.tsindex f7399fbe48..99197af242 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelImage.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelImage.ts@@ -1,7 +1,7 @@import { useCallback } from 'react';import { toast } from '@signozhq/ui/sonner';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import {downloadElementAsImage,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelMenuItem.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelMenuItem.tsxsimilarity index 89%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelMenuItem.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelMenuItem.tsxindex 486c552a14..a9e87b6b58 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelMenuItem.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDownloadPanelMenuItem.tsx@@ -4,8 +4,8 @@ import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemimport {DownloadFormat,type PanelActionCapabilities,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';-import type { PanelQueryData } from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';+import type { PanelQueryData } from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { buildDownloadMenuItem } from '../utils/buildDownloadMenuItem';import { useDownloadPanelCsv } from './useDownloadPanelCsv';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldown.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldown.tsxsimilarity index 89%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldown.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldown.tsxindex 0a604911ed..a833dddfe8 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldown.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldown.tsx@@ -12,15 +12,15 @@ import type {DrilldownClickPayload,DrilldownContext,OpenDrilldownView,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/drilldown';-import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';-import { buildAggregateData } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/buildAggregateData';-import { getBuilderQueries } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getBuilderQueries';-import { getPanelQueryType } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelQueryType';-import { fromPerses } from 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters';-import { dynamicSignalFromQuerySignal } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/drilldown/signal';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/drilldown';+import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';+import { buildAggregateData } from 'pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/buildAggregateData';+import { getBuilderQueries } from 'pages/DashboardPage/DashboardContainer/Panels/utils/getBuilderQueries';+import { getPanelQueryType } from 'pages/DashboardPage/DashboardContainer/Panels/utils/getPanelQueryType';+import { fromPerses } from 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters';+import { dynamicSignalFromQuerySignal } from 'pages/DashboardPage/DashboardContainer/Panels/utils/drilldown/signal';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { EQueryType } from 'types/common/dashboard';import DrilldownAggregateMenu from '../DrilldownMenu/DrilldownAggregateMenu';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownBreakout.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownBreakout.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownBreakout.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownBreakout.tsxindex 6a1035019a..3354c33314 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownBreakout.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownBreakout.tsx@@ -8,7 +8,7 @@ import {} from 'container/QueryTable/Drilldown/tableDrilldownUtils';import type { BreakoutAttributeType } from 'container/QueryTable/Drilldown/types';import type { AggregateData } from 'container/QueryTable/Drilldown/useAggregateDrilldown';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import type {IBuilderQuery,Query,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownContextVariables.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownContextVariables.tssimilarity index 91%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownContextVariables.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownContextVariables.tsindex 298e8ae356..1d7af872d5 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownContextVariables.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownContextVariables.ts@@ -1,8 +1,8 @@import { useMemo } from 'react';// eslint-disable-next-line no-restricted-imports -- context links resolve global-time variables off redux (V1 parity)import { useSelector } from 'react-redux';-import type { DrilldownContext } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/drilldown';-import { useDashboardStore } from 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore';+import type { DrilldownContext } from 'pages/DashboardPage/DashboardContainer/Panels/types/drilldown';+import { useDashboardStore } from 'pages/DashboardPage/DashboardContainer/store/useDashboardStore';import type { AppState } from 'store/reducers';import type { GlobalReducer } from 'types/reducer/globalTime';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownCoordinates.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownCoordinates.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownCoordinates.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownCoordinates.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownDashboardVariables.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownDashboardVariables.tsxsimilarity index 85%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownDashboardVariables.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownDashboardVariables.tsxindex ea0573878c..0ca47914a5 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownDashboardVariables.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownDashboardVariables.tsx@@ -6,18 +6,18 @@ import type { FilterData } from 'container/QueryTable/Drilldown/drilldownUtils';import {dtoToFormModel,formModelToDto,-} from 'pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/variableAdapters';+} from 'pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/variableAdapters';import {emptyVariableFormModel,type VariableFormModel,-} from 'pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/variableFormModel';-import { buildVariablesPatch } from 'pages/DashboardPageV2/DashboardContainer/DashboardSettings/Variables/utils/variablePatchOps';-import { useDashboardFetchRequired } from 'pages/DashboardPageV2/DashboardContainer/hooks/useDashboardFetchRequired';-import { useOptimisticPatch } from 'pages/DashboardPageV2/DashboardContainer/hooks/useOptimisticPatch';-import { selectVariableValues } from 'pages/DashboardPageV2/DashboardContainer/store/slices/variableSelectionSlice';-import { useDashboardStore } from 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore';-import type { VariableSelection } from 'pages/DashboardPageV2/DashboardContainer/VariablesBar/selectionTypes';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+} from 'pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/variableFormModel';+import { buildVariablesPatch } from 'pages/DashboardPage/DashboardContainer/DashboardSettings/Variables/utils/variablePatchOps';+import { useDashboardFetchRequired } from 'pages/DashboardPage/DashboardContainer/hooks/useDashboardFetchRequired';+import { useOptimisticPatch } from 'pages/DashboardPage/DashboardContainer/hooks/useOptimisticPatch';+import { selectVariableValues } from 'pages/DashboardPage/DashboardContainer/store/slices/variableSelectionSlice';+import { useDashboardStore } from 'pages/DashboardPage/DashboardContainer/store/useDashboardStore';+import type { VariableSelection } from 'pages/DashboardPage/DashboardContainer/VariablesBar/selectionTypes';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';interface UseDrilldownDashboardVariablesArgs {/** Group-by field filters from the clicked point (empty when the click has no group-by). */diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownFilter.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownFilter.tssimilarity index 93%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownFilter.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownFilter.tsindex 4e95599f17..c3fb601e18 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownFilter.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useDrilldownFilter.ts@@ -6,8 +6,8 @@ import {getBaseMeta,isNumberDataType,} from 'container/QueryTable/Drilldown/drilldownUtils';-import type { DrilldownContext } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/drilldown';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import type { DrilldownContext } from 'pages/DashboardPage/DashboardContainer/Panels/types/drilldown';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import type { Query } from 'types/api/queryBuilder/queryBuilderData';interface UseDrilldownFilterArgs {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useMovePanelToSection.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useMovePanelToSection.tssimilarity index 86%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useMovePanelToSection.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useMovePanelToSection.tsindex 25a734d237..59ccb5b98b 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useMovePanelToSection.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useMovePanelToSection.ts@@ -1,11 +1,12 @@import { useCallback } from 'react';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';-import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';+import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';+import { useDashboardEventMeta } from '../../../hooks/useDashboardEventMeta';import { useOptimisticPatch } from '../../../hooks/useOptimisticPatch';import { bottomRowSlot, movePanelBetweenSectionsOps } from '../../../patchOps';import { useDashboardStore } from '../../../store/useDashboardStore';@@ -30,6 +31,7 @@ export function useMovePanelToSection({sections,}: Params): (args: MovePanelArgs) => Promise<void> {const dashboardId = useDashboardStore((s) => s.dashboardId);+ const eventMeta = useDashboardEventMeta();const { patchAsync } = useOptimisticPatch();const { showErrorModal } = useErrorModal();@@ -75,12 +77,12 @@ export function useMovePanelToSection({? PANEL_KIND_TO_PANEL_TYPE[moved.panel.spec.plugin.kind]: undefined,panelId,- dashboardId,+ ...eventMeta,});} catch (error) {showErrorModal(error as APIError);}},- [sections, dashboardId, patchAsync, showErrorModal],+ [sections, dashboardId, eventMeta, patchAsync, showErrorModal],);}diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/usePanelInteractions.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/usePanelInteractions.tssimilarity index 89%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/usePanelInteractions.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/usePanelInteractions.tsindex 7b5f1827bc..99542494fb 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/usePanelInteractions.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/usePanelInteractions.ts@@ -3,14 +3,14 @@ import { useCallback, useMemo } from 'react';import { useDispatch } from 'react-redux';import { useLocation, useParams } from 'react-router-dom';import { QueryParams } from 'constants/query';-import { PanelMode } from 'container/DashboardContainer/visualization/panels/types';-import type { DashboardPreference } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/rendererProps';+import { PanelMode } from 'lib/visualization/panels/types';+import type { DashboardPreference } from 'pages/DashboardPage/DashboardContainer/Panels/types/rendererProps';import { useDashboardCursorSyncMode } from 'hooks/dashboard/useDashboardCursorSyncMode';import { useSyncTooltipFilterMode } from 'hooks/dashboard/useSyncTooltipFilterMode';import { useSafeNavigate } from 'hooks/useSafeNavigate';import useUrlQuery from 'hooks/useUrlQuery';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { UpdateTimeInterval } from 'store/actions';export interface PanelInteractions {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useResolvedDrilldownQuery.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useResolvedDrilldownQuery.tssimilarity index 87%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useResolvedDrilldownQuery.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useResolvedDrilldownQuery.tsindex b958896e4f..02620e8f63 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useResolvedDrilldownQuery.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useResolvedDrilldownQuery.ts@@ -4,10 +4,10 @@ import { useSelector } from 'react-redux';import { useReplaceVariables } from 'api/generated/services/querier';import type { DashboardtypesQueryDTO } from 'api/generated/services/sigNoz.schemas';import { PANEL_TYPES } from 'constants/queryBuilder';-import { buildQueryRangeRequest } from 'pages/DashboardPageV2/DashboardContainer/queryV5/buildQueryRangeRequest';-import { envelopesToQuery } from 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters';-import { selectResolvedVariables } from 'pages/DashboardPageV2/DashboardContainer/store/slices/variableSelectionSlice';-import { useDashboardStore } from 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore';+import { buildQueryRangeRequest } from 'pages/DashboardPage/DashboardContainer/queryV5/buildQueryRangeRequest';+import { envelopesToQuery } from 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters';+import { selectResolvedVariables } from 'pages/DashboardPage/DashboardContainer/store/slices/variableSelectionSlice';+import { useDashboardStore } from 'pages/DashboardPage/DashboardContainer/store/useDashboardStore';import { AppState } from 'store/reducers';import { Query } from 'types/api/queryBuilder/queryBuilderData';import { GlobalReducer } from 'types/reducer/globalTime';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useViewPanel.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useViewPanel.tssimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useViewPanel.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useViewPanel.tsindex 61bc3e0992..c0e69baac4 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useViewPanel.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/hooks/useViewPanel.ts@@ -7,8 +7,8 @@ import type { PANEL_TYPES } from 'constants/queryBuilder';import { useQueryBuilder } from 'hooks/queryBuilder/useQueryBuilder';import { useSafeNavigate } from 'hooks/useSafeNavigate';import useUrlQuery from 'hooks/useUrlQuery';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';-import { getPanelBuilderQuery } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/getPanelBuilderQuery';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';+import { getPanelBuilderQuery } from 'pages/DashboardPage/DashboardContainer/Panels/utils/getPanelBuilderQuery';import type { Query } from 'types/api/queryBuilder/queryBuilderData';import { clearViewPanelHandoff } from '../ViewPanelModal/viewPanelHandoffStore';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/buildCreateAlertUrl.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/buildCreateAlertUrl.test.tssimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/buildCreateAlertUrl.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/buildCreateAlertUrl.test.tsindex 67e26b7bba..5bb1076d6e 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/buildCreateAlertUrl.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/buildCreateAlertUrl.test.ts@@ -3,7 +3,7 @@ import { ENTITY_VERSION_V5 } from 'constants/app';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';import ROUTES from 'constants/routes';-import { fromPerses } from 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters';+import { fromPerses } from 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters';import type { Query } from 'types/api/queryBuilder/queryBuilderData';import { EQueryType } from 'types/common/dashboard';@@ -12,7 +12,7 @@ import { buildCreateAlertUrl } from '../buildCreateAlertUrl';// The V5→V1 translation has its own coverage; stub it so this asserts only the// URL assembly (params, encoding, unit) buildCreateAlertUrl owns.jest.mock(- 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters',+ 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters',() => ({fromPerses: jest.fn(),}),diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/calculatePopoverPosition.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/calculatePopoverPosition.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/calculatePopoverPosition.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/calculatePopoverPosition.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/deriveAlertPrefill.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/deriveAlertPrefill.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/deriveAlertPrefill.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/deriveAlertPrefill.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/downloadPanelImage.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/downloadPanelImage.test.tssimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/downloadPanelImage.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/downloadPanelImage.test.tsindex 69879b09fe..25d8d15ada 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/downloadPanelImage.test.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/__tests__/downloadPanelImage.test.ts@@ -1,5 +1,5 @@import { toPng, toSvg } from 'html-to-image';-import { DownloadFormat } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';+import { DownloadFormat } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';import { downloadElementAsImage } from '../downloadPanelImage';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildCreateAlertUrl.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildCreateAlertUrl.tssimilarity index 92%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildCreateAlertUrl.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildCreateAlertUrl.tsindex d6a93110e0..a498c047a9 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildCreateAlertUrl.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildCreateAlertUrl.ts@@ -7,8 +7,8 @@ import { ENTITY_VERSION_V5 } from 'constants/app';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';import ROUTES from 'constants/routes';-import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';-import { fromPerses } from 'pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters';+import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';+import { fromPerses } from 'pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters';import type { Query } from 'types/api/queryBuilder/queryBuilderData';import { deriveAlertPrefill, PanelAlertPrefill } from './deriveAlertPrefill';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildDownloadMenuItem.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildDownloadMenuItem.tsxsimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildDownloadMenuItem.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildDownloadMenuItem.tsxindex 5e14c67e79..96c716cd7f 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildDownloadMenuItem.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildDownloadMenuItem.tsx@@ -8,7 +8,7 @@ import type { MenuItem } from '@signozhq/ui/dropdown-menu';import {DownloadFormat,type PanelActionCapabilities,-} from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';+} from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';const DOWNLOAD_FORMAT_OPTIONS: {format: DownloadFormat;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildMoveItems.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildMoveItems.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildMoveItems.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/buildMoveItems.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/calculatePopoverPosition.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/calculatePopoverPosition.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/calculatePopoverPosition.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/calculatePopoverPosition.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/deriveAlertPrefill.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/deriveAlertPrefill.tssimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/deriveAlertPrefill.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/deriveAlertPrefill.tsindex 6a9b4ff555..e99f31209b 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/deriveAlertPrefill.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/deriveAlertPrefill.ts@@ -11,7 +11,7 @@ import {AlertThresholdOperator,Threshold,} from 'container/CreateAlertV2/context/types';-import { THRESHOLD_COLOR_DANGER_ORDER } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/threshold';+import { THRESHOLD_COLOR_DANGER_ORDER } from 'pages/DashboardPage/DashboardContainer/Panels/types/threshold';import type { MetricAggregation } from 'types/api/v5/queryRange';import type { Query } from 'types/api/queryBuilder/queryBuilderData';import { ReduceOperators } from 'types/common/queryBuilder';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/downloadPanelImage.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/downloadPanelImage.tssimilarity index 91%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/downloadPanelImage.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/downloadPanelImage.tsindex 01673ad9a0..e0cf0a0647 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/downloadPanelImage.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/utils/downloadPanelImage.ts@@ -1,6 +1,6 @@import { toPng, toSvg } from 'html-to-image';-import { DownloadFormat } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelDefinition';-import { toSafeFileName } from 'pages/DashboardPageV2/DashboardContainer/Panels/utils/toSafeFileName';+import { DownloadFormat } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelDefinition';+import { toSafeFileName } from 'pages/DashboardPage/DashboardContainer/Panels/utils/toSafeFileName';/** Image formats a panel can be exported to (both via html-to-image). */export type PanelImageFormat = DownloadFormat.PNG | DownloadFormat.SVG;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/PanelsAndSectionsLayout.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/PanelsAndSectionsLayout.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/PanelsAndSectionsLayout.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/PanelsAndSectionsLayout.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/AddSectionControl/AddSectionControl.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/AddSectionControl/AddSectionControl.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/AddSectionControl/AddSectionControl.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/AddSectionControl/AddSectionControl.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/AddSectionControl/AddSectionControl.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/AddSectionControl/AddSectionControl.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/AddSectionControl/AddSectionControl.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/AddSectionControl/AddSectionControl.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/FirstSectionMigrationModal.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/FirstSectionMigrationModal.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/FirstSectionMigrationModal.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/FirstSectionMigrationModal.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/Section/Section.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/Section/Section.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/Section/Section.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/Section/Section.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/Section/Section.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/Section/Section.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/Section/Section.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/Section/Section.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionActionsMenu/SectionActionsMenu.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionActionsMenu/SectionActionsMenu.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionActionsMenu/SectionActionsMenu.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionActionsMenu/SectionActionsMenu.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionActionsMenu/SectionActionsMenu.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionActionsMenu/SectionActionsMenu.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionActionsMenu/SectionActionsMenu.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionActionsMenu/SectionActionsMenu.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionDragPreview/SectionDragPreview.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionDragPreview/SectionDragPreview.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionDragPreview/SectionDragPreview.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionDragPreview/SectionDragPreview.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionDragPreview/SectionDragPreview.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionDragPreview/SectionDragPreview.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionDragPreview/SectionDragPreview.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionDragPreview/SectionDragPreview.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGrid.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGrid.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGrid.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGrid.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGrid.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGrid.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGrid.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGrid.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGridItem.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGridItem.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGridItem.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionGrid/SectionGridItem.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionHeader/SectionHeader.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionHeader/SectionHeader.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionHeader/SectionHeader.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionHeader/SectionHeader.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionHeader/SectionHeader.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionHeader/SectionHeader.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionHeader/SectionHeader.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionHeader/SectionHeader.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionList.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionList.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionList.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionList.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionTitleModal.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionTitleModal.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionTitleModal.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionTitleModal.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionTitleModal.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionTitleModal.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SectionTitleModal.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SectionTitleModal.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SortableSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SortableSection.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/SortableSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/SortableSection.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/__tests__/useScrollIntoView.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/__tests__/useScrollIntoView.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/__tests__/useScrollIntoView.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/__tests__/useScrollIntoView.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useAddSection.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useAddSection.tssimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useAddSection.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useAddSection.tsindex da76d75083..0aaf992f09 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useAddSection.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useAddSection.ts@@ -2,7 +2,7 @@ import { useCallback, useState } from 'react';import logEvent from 'api/common/logEvent';import type { DashboardtypesLayoutDTO } from 'api/generated/services/sigNoz.schemas';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useCloneSection.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useCloneSection.tssimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useCloneSection.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useCloneSection.tsindex 7d2554cd75..01528a3c32 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useCloneSection.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useCloneSection.ts@@ -4,7 +4,7 @@ import { cloneDeep } from 'lodash-es';import { v4 as uuid } from 'uuid';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useOptimisticPatch } from '../../../hooks/useOptimisticPatch';import { cloneSectionOps } from '../../../patchOps';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useDeleteSection.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useDeleteSection.tssimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useDeleteSection.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useDeleteSection.tsindex b428b4e4ad..9f8b6c7c4e 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useDeleteSection.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useDeleteSection.ts@@ -2,7 +2,7 @@ import { useCallback, useState } from 'react';import logEvent from 'api/common/logEvent';import type { DashboardtypesJSONPatchOperationDTO } from 'api/generated/services/sigNoz.schemas';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useFirstSectionMigration.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useFirstSectionMigration.tssimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useFirstSectionMigration.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useFirstSectionMigration.tsindex 00c9146ad5..9785c57c29 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useFirstSectionMigration.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useFirstSectionMigration.ts@@ -2,7 +2,7 @@ import { useCallback, useState } from 'react';import logEvent from 'api/common/logEvent';import type { DashboardtypesJSONPatchOperationDTO } from 'api/generated/services/sigNoz.schemas';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/usePersistLayout.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/usePersistLayout.tssimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/usePersistLayout.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/usePersistLayout.tsindex bdc3da9801..5934f0caaf 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/usePersistLayout.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/usePersistLayout.ts@@ -2,7 +2,7 @@ import { useCallback, useState } from 'react';import type { Layout } from 'react-grid-layout';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useRenameSection.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useRenameSection.tssimilarity index 94%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useRenameSection.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useRenameSection.tsindex 5ebc0f5347..3d0bd318e5 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useRenameSection.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useRenameSection.ts@@ -1,7 +1,7 @@import { useCallback, useState } from 'react';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useScrollIntoView.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useScrollIntoView.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useScrollIntoView.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useScrollIntoView.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useSectionDragReorder.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useSectionDragReorder.tssimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useSectionDragReorder.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useSectionDragReorder.tsindex a98d62417b..46c4386684 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useSectionDragReorder.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useSectionDragReorder.ts@@ -11,7 +11,7 @@ import { arrayMove, sortableKeyboardCoordinates } from '@dnd-kit/sortable';import logEvent from 'api/common/logEvent';import type { DashboardtypesLayoutDTO } from 'api/generated/services/sigNoz.schemas';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useToggleSectionCollapse.ts b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useToggleSectionCollapse.tssimilarity index 93%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useToggleSectionCollapse.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useToggleSectionCollapse.tsindex 95037d1af3..1a9c342800 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useToggleSectionCollapse.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Section/hooks/useToggleSectionCollapse.ts@@ -1,7 +1,7 @@import { useCallback } from 'react';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import {selectIsSectionOpen,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/index.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/index.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/index.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/index.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/VariablesBar.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/VariablesBar.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/VariablesBar.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/VariablesBar.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/VariablesBar.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/VariablesBar.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/VariablesBar.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/VariablesBar.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/HiddenVariablesTooltip.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/HiddenVariablesTooltip.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/HiddenVariablesTooltip.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/HiddenVariablesTooltip.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/TextSelector.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/TextSelector.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/TextSelector.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/TextSelector.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/ValueSelector.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/ValueSelector.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/ValueSelector.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/ValueSelector.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/resolveVariableSelection.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/resolveVariableSelection.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/resolveVariableSelection.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/resolveVariableSelection.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/selectionDisplay.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/selectionDisplay.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/selectionDisplay.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/selectionDisplay.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/selectionUtils.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/selectionUtils.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/selectionUtils.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/selectionUtils.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/useAutoSelect.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/useAutoSelect.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/useAutoSelect.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/useAutoSelect.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/useFetchedVariableOptions.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/useFetchedVariableOptions.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/useFetchedVariableOptions.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/useFetchedVariableOptions.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/useSeedVariableSelection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/useSeedVariableSelection.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/useSeedVariableSelection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/useSeedVariableSelection.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/useVariableSelection.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/useVariableSelection.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/__tests__/useVariableSelection.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/__tests__/useVariableSelection.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/AddVariable/AddVariable.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/AddVariable/AddVariable.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/AddVariable/AddVariable.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/AddVariable/AddVariable.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/AddVariable/AddVariableFull.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/AddVariable/AddVariableFull.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/AddVariable/AddVariableFull.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/AddVariable/AddVariableFull.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/AddVariable/AddVariableIcon.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/AddVariable/AddVariableIcon.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/AddVariable/AddVariableIcon.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/AddVariable/AddVariableIcon.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/HiddenVariablesTooltip.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/HiddenVariablesTooltip.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/HiddenVariablesTooltip.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/HiddenVariablesTooltip.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/HiddenVariablesTooltip.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/HiddenVariablesTooltip.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/HiddenVariablesTooltip.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/HiddenVariablesTooltip.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/SelectionValue.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/SelectionValue.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/SelectionValue.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/HiddenVariablesTooltip/SelectionValue.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/VariableSelector/VariableSelector.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/VariableSelector/VariableSelector.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/VariableSelector/VariableSelector.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/VariableSelector/VariableSelector.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/VariableSelector/VariableSelector.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/VariableSelector/VariableSelector.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/VariableSelector/VariableSelector.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/VariableSelector/VariableSelector.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/VariableTooltip/TooltipRefSection.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/VariableTooltip/TooltipRefSection.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/VariableTooltip/TooltipRefSection.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/VariableTooltip/TooltipRefSection.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/VariableTooltip/VariableTooltip.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/VariableTooltip/VariableTooltip.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/VariableTooltip/VariableTooltip.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/VariableTooltip/VariableTooltip.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/VariableTooltip/VariableTooltip.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/VariableTooltip/VariableTooltip.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/VariableTooltip/VariableTooltip.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/VariableTooltip/VariableTooltip.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/selectors/OverflowValuesTooltip.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/selectors/OverflowValuesTooltip.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/selectors/OverflowValuesTooltip.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/selectors/OverflowValuesTooltip.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/selectors/TextSelector.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/selectors/TextSelector.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/selectors/TextSelector.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/selectors/TextSelector.tsxindex 9e852886fb..a93d6dbea0 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/selectors/TextSelector.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/selectors/TextSelector.tsx@@ -3,7 +3,7 @@ import type { InputRef } from 'antd';// eslint-disable-next-line signoz/no-antd-components -- match V1 textbox behaviour (commit on blur/Enter, borderless)import { Input } from 'antd';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import type { VariableSelection } from '../../selectionTypes';import styles from '../../VariablesBar.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/selectors/ValueSelector.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/selectors/ValueSelector.tsxsimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/selectors/ValueSelector.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/selectors/ValueSelector.tsxindex 8a801b363f..94d5dbb6fd 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/selectors/ValueSelector.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/selectors/ValueSelector.tsx@@ -2,7 +2,7 @@ import { useMemo, useState } from 'react';import logEvent from 'api/common/logEvent';import { CustomMultiSelect, CustomSelect } from 'components/NewSelect';import type { OptionData } from 'components/NewSelect/types';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import type { VariableSelection } from '../../selectionTypes';import { areSelectionsEqual } from '../../utils/resolveVariableSelection';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/selectors/VariableValueControl.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/selectors/VariableValueControl.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/components/selectors/VariableValueControl.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/components/selectors/VariableValueControl.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useAutoSelect.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useAutoSelect.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useAutoSelect.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useAutoSelect.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useFetchedVariableOptions.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useFetchedVariableOptions.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useFetchedVariableOptions.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useFetchedVariableOptions.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useSeedVariableSelection.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useSeedVariableSelection.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useSeedVariableSelection.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useSeedVariableSelection.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useVariableFetchState.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useVariableFetchState.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useVariableFetchState.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useVariableFetchState.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useVariableOptions.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useVariableOptions.tssimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useVariableOptions.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useVariableOptions.tsindex d26c7b7387..be23451cbe 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useVariableOptions.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useVariableOptions.ts@@ -1,6 +1,6 @@import { useEffect, useMemo } from 'react';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { VARIABLE_TYPE_EVENT_LABEL } from '../../DashboardSettings/Variables/variableFormModel';import type { VariableFormModel } from '../../DashboardSettings/Variables/variableFormModel';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useVariableSelection.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useVariableSelection.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/hooks/useVariableSelection.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/hooks/useVariableSelection.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/selectionTypes.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/selectionTypes.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/selectionTypes.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/selectionTypes.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/dynamicFilter.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/dynamicFilter.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/dynamicFilter.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/dynamicFilter.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/knownVariableOptions.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/knownVariableOptions.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/knownVariableOptions.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/knownVariableOptions.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/resolveVariableSelection.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/resolveVariableSelection.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/resolveVariableSelection.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/resolveVariableSelection.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/selectionDisplay.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/selectionDisplay.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/selectionDisplay.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/selectionDisplay.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/selectionUtils.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/selectionUtils.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/selectionUtils.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/selectionUtils.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/variableDependencies.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/variableDependencies.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/variableDependencies.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/variableDependencies.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/variablesUrlState.ts b/frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/variablesUrlState.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/VariablesBar/utils/variablesUrlState.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/VariablesBar/utils/variablesUrlState.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/__tests__/layoutCompaction.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/__tests__/layoutCompaction.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/__tests__/layoutCompaction.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/__tests__/layoutCompaction.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/__tests__/patchOps.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/__tests__/patchOps.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/__tests__/patchOps.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/__tests__/patchOps.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/ConfirmDeleteDialog/ConfirmDeleteDialog.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/components/ConfirmDeleteDialog/ConfirmDeleteDialog.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/ConfirmDeleteDialog/ConfirmDeleteDialog.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/components/ConfirmDeleteDialog/ConfirmDeleteDialog.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/ConfirmDeleteDialog/ConfirmDeleteDialog.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/components/ConfirmDeleteDialog/ConfirmDeleteDialog.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/ConfirmDeleteDialog/ConfirmDeleteDialog.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/components/ConfirmDeleteDialog/ConfirmDeleteDialog.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardChangedDialog/DashboardChangedDialog.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardChangedDialog/DashboardChangedDialog.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardChangedDialog/DashboardChangedDialog.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardChangedDialog/DashboardChangedDialog.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardChangedDialog/DashboardChangedDialog.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardChangedDialog/DashboardChangedDialog.tsxsimilarity index 95%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardChangedDialog/DashboardChangedDialog.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardChangedDialog/DashboardChangedDialog.tsxindex 450781a60f..2bc3265c91 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardChangedDialog/DashboardChangedDialog.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardChangedDialog/DashboardChangedDialog.tsx@@ -2,7 +2,7 @@ import { RotateCcw } from '@signozhq/icons';import { Button } from '@signozhq/ui/button';import { DialogWrapper } from '@signozhq/ui/dialog';import logEvent from 'api/common/logEvent';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import { useDashboardStore } from '../../store/useDashboardStore';import styles from './DashboardChangedDialog.module.scss';diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardPageHeader/DashboardPageBreadcrumbs.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardPageHeader/DashboardPageBreadcrumbs.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardPageHeader/DashboardPageBreadcrumbs.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardPageHeader/DashboardPageBreadcrumbs.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardPageHeader/DashboardPageBreadcrumbs.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardPageHeader/DashboardPageBreadcrumbs.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardPageHeader/DashboardPageBreadcrumbs.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardPageHeader/DashboardPageBreadcrumbs.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardPageHeader/DashboardPageHeader.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardPageHeader/DashboardPageHeader.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardPageHeader/DashboardPageHeader.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardPageHeader/DashboardPageHeader.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardPageHeader/DashboardPageHeader.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardPageHeader/DashboardPageHeader.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardPageHeader/DashboardPageHeader.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardPageHeader/DashboardPageHeader.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardPageHeader/useShareVariablesOption.ts b/frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardPageHeader/useShareVariablesOption.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DashboardPageHeader/useShareVariablesOption.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DashboardPageHeader/useShareVariablesOption.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DisabledControlTooltip/DisabledControlTooltip.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/components/DisabledControlTooltip/DisabledControlTooltip.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DisabledControlTooltip/DisabledControlTooltip.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DisabledControlTooltip/DisabledControlTooltip.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DisabledControlTooltip/DisabledControlTooltip.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/components/DisabledControlTooltip/DisabledControlTooltip.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DisabledControlTooltip/DisabledControlTooltip.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DisabledControlTooltip/DisabledControlTooltip.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DisabledMenuItemLabel/DisabledMenuItemLabel.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/components/DisabledMenuItemLabel/DisabledMenuItemLabel.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DisabledMenuItemLabel/DisabledMenuItemLabel.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DisabledMenuItemLabel/DisabledMenuItemLabel.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/DisabledMenuItemLabel/DisabledMenuItemLabel.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/components/DisabledMenuItemLabel/DisabledMenuItemLabel.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/DisabledMenuItemLabel/DisabledMenuItemLabel.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/components/DisabledMenuItemLabel/DisabledMenuItemLabel.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/LockedIndicator/LockedIndicator.module.scss b/frontend/src/pages/DashboardPage/DashboardContainer/components/LockedIndicator/LockedIndicator.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/LockedIndicator/LockedIndicator.module.scssrename to frontend/src/pages/DashboardPage/DashboardContainer/components/LockedIndicator/LockedIndicator.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/components/LockedIndicator/LockedIndicator.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/components/LockedIndicator/LockedIndicator.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/components/LockedIndicator/LockedIndicator.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/components/LockedIndicator/LockedIndicator.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/constants.ts b/frontend/src/pages/DashboardPage/DashboardContainer/constants.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/constants.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/constants.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/dashboardIcons.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/dashboardIcons.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/dashboardIcons.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/dashboardIcons.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/dashboardIcons.ts b/frontend/src/pages/DashboardPage/DashboardContainer/dashboardIcons.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/dashboardIcons.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/dashboardIcons.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/resolvePanelTimeWindow.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/resolvePanelTimeWindow.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/resolvePanelTimeWindow.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/resolvePanelTimeWindow.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useCreatePanel.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useCreatePanel.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useCreatePanel.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useCreatePanel.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useDashboardFetchRequired.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useDashboardFetchRequired.test.tsxsimilarity index 96%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useDashboardFetchRequired.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useDashboardFetchRequired.test.tsxindex e5ad2776b8..f5b4847ec9 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useDashboardFetchRequired.test.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useDashboardFetchRequired.test.tsx@@ -5,7 +5,7 @@ import { useDashboardFetchRequired } from '../useDashboardFetchRequired';const mockUseGetDashboardV2 = jest.fn();jest.mock(- 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore',+ 'pages/DashboardPage/DashboardContainer/store/useDashboardStore',() => ({useDashboardStore: (selector: (s: { dashboardId: string }) => unknown,diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useDashboardStaleCheck.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useDashboardStaleCheck.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useDashboardStaleCheck.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useDashboardStaleCheck.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useOpenPanelEditor.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useOpenPanelEditor.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useOpenPanelEditor.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useOpenPanelEditor.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useOptimisticPatch.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useOptimisticPatch.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useOptimisticPatch.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useOptimisticPatch.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/usePanelQuery.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/usePanelQuery.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/usePanelQuery.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/usePanelQuery.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useResolvedVariables.test.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useResolvedVariables.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useResolvedVariables.test.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useResolvedVariables.test.tsxdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useTimeSearchParams.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useTimeSearchParams.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/__tests__/useTimeSearchParams.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/__tests__/useTimeSearchParams.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/resolvePanelTimeWindow.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/resolvePanelTimeWindow.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/resolvePanelTimeWindow.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/resolvePanelTimeWindow.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useCreatePanel.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useCreatePanel.tssimilarity index 88%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useCreatePanel.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useCreatePanel.tsindex 6af5cad466..d7e3388223 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useCreatePanel.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useCreatePanel.ts@@ -2,6 +2,7 @@ import { useCallback, useState } from 'react';import { newPanelSearch, NEW_PANEL_ID } from '../PanelEditor/newPanelRoute';import type { PanelKind } from '../Panels/types/panelKind';+import { clearColumnWidths } from '../Panels/utils/columnWidthStorage';import { useOpenPanelEditor } from './useOpenPanelEditor';interface UseCreatePanelResult {@@ -40,6 +41,9 @@ export function useCreatePanel(): UseCreatePanelResult {(panelKind: PanelKind, targetIndex?: number): void => {setIsPickerOpen(false);const target = targetIndex ?? layoutIndex;+ // Every draft shares the sentinel id, so an abandoned draft's column widths+ // would otherwise seed this one.+ clearColumnWidths(NEW_PANEL_ID);openPanelEditor(NEW_PANEL_ID, {search: newPanelSearch(panelKind, target),});diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardEditGuard.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardEditGuard.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardEditGuard.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardEditGuard.tsdiff --git a/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardEventMeta.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardEventMeta.tsnew file mode 100644index 0000000000..694c69f020--- /dev/null+++ b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardEventMeta.ts@@ -0,0 +1,24 @@+import { useMemo } from 'react';++import { useDashboardFetchRequired } from './useDashboardFetchRequired';++export interface DashboardEventMeta {+ dashboardId: string;+ dashboardName: string;+}++/**+ * Dashboard identity for analytics payloads, sent as a pair: `dashboardId` joins the+ * event back to the record, `dashboardName` is what makes it readable in the funnel.+ */+export function useDashboardEventMeta(): DashboardEventMeta {+ const { dashboard } = useDashboardFetchRequired();++ return useMemo(+ () => ({+ dashboardId: dashboard.id,+ dashboardName: dashboard.spec.display.name,+ }),+ [dashboard.id, dashboard.spec.display.name],+ );+}diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardFetch.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardFetch.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardFetch.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardFetch.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardFetchRequired.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardFetchRequired.tssimilarity index 91%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardFetchRequired.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardFetchRequired.tsindex 8663f37238..e1984f9ceb 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardFetchRequired.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardFetchRequired.ts@@ -3,7 +3,7 @@ import type {DashboardtypesGettableDashboardV2DTO,DashboardtypesVariableDTO,} from 'api/generated/services/sigNoz.schemas';-import { useDashboardStore } from 'pages/DashboardPageV2/DashboardContainer/store/useDashboardStore';+import { useDashboardStore } from 'pages/DashboardPage/DashboardContainer/store/useDashboardStore';import { useDashboardFetch } from './useDashboardFetch';import type { UseDashboardFetchResult } from './useDashboardFetch';@@ -39,7 +39,7 @@ export function useDashboardFetchRequired(): UseDashboardFetchRequiredResult {throw new Error('useDashboardFetchRequired was used outside a loaded dashboard subtree — the ' +'dashboard is undefined. Only call it below a root page that gates rendering ' +- 'on useDashboardFetch (DashboardPageV2 / PanelEditorPage).',+ 'on useDashboardFetch (DashboardPage / PanelEditorPage).',);}diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardSections.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardSections.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardSections.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardSections.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardStaleCheck.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardStaleCheck.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useDashboardStaleCheck.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useDashboardStaleCheck.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useGetQueryRangeV5.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useGetQueryRangeV5.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useGetQueryRangeV5.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useGetQueryRangeV5.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useIsPanelWaitingOnVariable.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useIsPanelWaitingOnVariable.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useIsPanelWaitingOnVariable.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useIsPanelWaitingOnVariable.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useOpenPanelEditor.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useOpenPanelEditor.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useOpenPanelEditor.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useOpenPanelEditor.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useOptimisticPatch.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useOptimisticPatch.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useOptimisticPatch.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useOptimisticPatch.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/usePanelQuery.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/usePanelQuery.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/usePanelQuery.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/usePanelQuery.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useResolvedVariables.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useResolvedVariables.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useResolvedVariables.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useResolvedVariables.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useSyncVariablesForSuggestions.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useSyncVariablesForSuggestions.tssimilarity index 98%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useSyncVariablesForSuggestions.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useSyncVariablesForSuggestions.tsindex 9238616ee7..0b86f39e19 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useSyncVariablesForSuggestions.ts+++ b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useSyncVariablesForSuggestions.ts@@ -7,7 +7,7 @@ import { setDashboardVariablesStore } from 'providers/Dashboard/store/dashboardVimport type {IDashboardVariable,TVariableQueryType,-} from 'types/api/dashboard/getAll';+} from 'types/api/dashboard/variables';import { dtoToFormModel } from '../DashboardSettings/Variables/variableAdapters';import {diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useTimeSearchParams.ts b/frontend/src/pages/DashboardPage/DashboardContainer/hooks/useTimeSearchParams.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/hooks/useTimeSearchParams.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/hooks/useTimeSearchParams.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/iconAssets.ts b/frontend/src/pages/DashboardPage/DashboardContainer/iconAssets.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/iconAssets.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/iconAssets.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/index.tsx b/frontend/src/pages/DashboardPage/DashboardContainer/index.tsxsimilarity index 97%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/index.tsxrename to frontend/src/pages/DashboardPage/DashboardContainer/index.tsxindex c443ba8a2c..6443916bf8 100644--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/index.tsx+++ b/frontend/src/pages/DashboardPage/DashboardContainer/index.tsx@@ -14,7 +14,7 @@ import DashboardPageHeader from './components/DashboardPageHeader/DashboardPageHimport LockedIndicator from './components/LockedIndicator/LockedIndicator';import DashboardChangedDialog from './components/DashboardChangedDialog/DashboardChangedDialog';import { useDashboardStaleCheck } from './hooks/useDashboardStaleCheck';-import { resolveDashboardImage } from 'pages/DashboardPageV2/DashboardContainer/dashboardIcons';+import { resolveDashboardImage } from 'pages/DashboardPage/DashboardContainer/dashboardIcons';interface DashboardContainerProps {dashboard: DashboardtypesGettableDashboardV2DTO;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/layoutCompaction.ts b/frontend/src/pages/DashboardPage/DashboardContainer/layoutCompaction.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/layoutCompaction.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/layoutCompaction.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/optimistic/__tests__/applyJsonPatch.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/optimistic/__tests__/applyJsonPatch.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/optimistic/__tests__/applyJsonPatch.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/optimistic/__tests__/applyJsonPatch.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/optimistic/applyJsonPatch.ts b/frontend/src/pages/DashboardPage/DashboardContainer/optimistic/applyJsonPatch.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/optimistic/applyJsonPatch.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/optimistic/applyJsonPatch.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/patchOps.ts b/frontend/src/pages/DashboardPage/DashboardContainer/patchOps.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/patchOps.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/patchOps.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/buildQueryRangeRequest.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/buildQueryRangeRequest.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/buildQueryRangeRequest.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/buildQueryRangeRequest.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/buildVariablesPayload.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/buildVariablesPayload.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/buildVariablesPayload.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/buildVariablesPayload.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/getReferencedVariables.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/getReferencedVariables.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/getReferencedVariables.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/getReferencedVariables.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/persesQueryAdapters.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/persesQueryAdapters.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/persesQueryAdapters.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/persesQueryAdapters.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/prepareRawTable.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/prepareRawTable.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/prepareRawTable.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/prepareRawTable.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/prepareScalarTables.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/prepareScalarTables.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/prepareScalarTables.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/prepareScalarTables.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/uplotData.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/uplotData.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/uplotData.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/uplotData.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/v5ResponseData.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/v5ResponseData.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/__tests__/v5ResponseData.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/__tests__/v5ResponseData.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/buildQueryRangeRequest.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/buildQueryRangeRequest.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/buildQueryRangeRequest.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/buildQueryRangeRequest.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/buildVariablesPayload.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/buildVariablesPayload.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/buildVariablesPayload.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/buildVariablesPayload.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/getReferencedVariables.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/getReferencedVariables.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/getReferencedVariables.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/getReferencedVariables.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/persesQueryAdapters.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/persesQueryAdapters.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/prepareRawTable.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/prepareRawTable.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/prepareRawTable.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/prepareRawTable.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/prepareScalarTables.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/prepareScalarTables.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/types.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/types.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/types.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/types.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/uplotData.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/uplotData.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/uplotData.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/uplotData.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData.ts b/frontend/src/pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/queryV5/v5ResponseData.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/queryV5/v5ResponseData.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/__tests__/variableFetchSlice.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/store/slices/__tests__/variableFetchSlice.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/__tests__/variableFetchSlice.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/store/slices/__tests__/variableFetchSlice.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/collapseSlice.ts b/frontend/src/pages/DashboardPage/DashboardContainer/store/slices/collapseSlice.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/collapseSlice.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/store/slices/collapseSlice.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/editContextSlice.ts b/frontend/src/pages/DashboardPage/DashboardContainer/store/slices/editContextSlice.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/editContextSlice.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/store/slices/editContextSlice.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/settingsRequestSlice.ts b/frontend/src/pages/DashboardPage/DashboardContainer/store/slices/settingsRequestSlice.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/settingsRequestSlice.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/store/slices/settingsRequestSlice.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/variableFetchSlice.ts b/frontend/src/pages/DashboardPage/DashboardContainer/store/slices/variableFetchSlice.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/variableFetchSlice.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/store/slices/variableFetchSlice.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/variableFetchSlice.utils.ts b/frontend/src/pages/DashboardPage/DashboardContainer/store/slices/variableFetchSlice.utils.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/variableFetchSlice.utils.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/store/slices/variableFetchSlice.utils.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/variableSelectionSlice.ts b/frontend/src/pages/DashboardPage/DashboardContainer/store/slices/variableSelectionSlice.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/store/slices/variableSelectionSlice.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/store/slices/variableSelectionSlice.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/store/useDashboardStore.ts b/frontend/src/pages/DashboardPage/DashboardContainer/store/useDashboardStore.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/store/useDashboardStore.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/store/useDashboardStore.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/store/useScrollIntoViewStore.ts b/frontend/src/pages/DashboardPage/DashboardContainer/store/useScrollIntoViewStore.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/store/useScrollIntoViewStore.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/store/useScrollIntoViewStore.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/store/useViewPanelStore.ts b/frontend/src/pages/DashboardPage/DashboardContainer/store/useViewPanelStore.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/store/useViewPanelStore.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/store/useViewPanelStore.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/utils.ts b/frontend/src/pages/DashboardPage/DashboardContainer/utils.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/utils.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/utils.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/utils/__tests__/timeUrlParams.test.ts b/frontend/src/pages/DashboardPage/DashboardContainer/utils/__tests__/timeUrlParams.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/utils/__tests__/timeUrlParams.test.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/utils/__tests__/timeUrlParams.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/utils/timeUrlParams.ts b/frontend/src/pages/DashboardPage/DashboardContainer/utils/timeUrlParams.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardContainer/utils/timeUrlParams.tsrename to frontend/src/pages/DashboardPage/DashboardContainer/utils/timeUrlParams.tsdiff --git a/frontend/src/pages/DashboardPageV2/DashboardPageV2.module.scss b/frontend/src/pages/DashboardPage/DashboardPage.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/DashboardPageV2.module.scssrename to frontend/src/pages/DashboardPage/DashboardPage.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/DashboardPageV2.tsx b/frontend/src/pages/DashboardPage/DashboardPage.tsxsimilarity index 87%rename from frontend/src/pages/DashboardPageV2/DashboardPageV2.tsxrename to frontend/src/pages/DashboardPage/DashboardPage.tsxindex 46240b175c..dbe3f575a5 100644--- a/frontend/src/pages/DashboardPageV2/DashboardPageV2.tsx+++ b/frontend/src/pages/DashboardPage/DashboardPage.tsx@@ -4,13 +4,13 @@ import { useParams } from 'react-router-dom';import { Typography } from '@signozhq/ui/typography';import logEvent from 'api/common/logEvent';import Spinner from 'components/Spinner';-import { DashboardDetailEvents } from 'pages/DashboardPageV2/constants/events';+import { DashboardDetailEvents } from 'pages/DashboardPage/constants/events';import DashboardContainer from './DashboardContainer';import { useDashboardFetch } from './DashboardContainer/hooks/useDashboardFetch';-import styles from './DashboardPageV2.module.scss';+import styles from './DashboardPage.module.scss';-function DashboardPageV2(): JSX.Element {+function DashboardPage(): JSX.Element {const { dashboardId } = useParams<{ dashboardId: string }>();const { dashboard, isLoading, isError, error, refetch } =@@ -49,4 +49,4 @@ function DashboardPageV2(): JSX.Element {return <DashboardContainer dashboard={dashboard} refetch={refetch} />;}-export default DashboardPageV2;+export default DashboardPage;diff --git a/frontend/src/pages/DashboardPageV2/PanelEditorPage/PanelEditorPage.module.scss b/frontend/src/pages/DashboardPage/PanelEditorPage/PanelEditorPage.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/PanelEditorPage/PanelEditorPage.module.scssrename to frontend/src/pages/DashboardPage/PanelEditorPage/PanelEditorPage.module.scssdiff --git a/frontend/src/pages/DashboardPageV2/PanelEditorPage/PanelEditorPage.tsx b/frontend/src/pages/DashboardPage/PanelEditorPage/PanelEditorPage.tsxsimilarity index 100%rename from frontend/src/pages/DashboardPageV2/PanelEditorPage/PanelEditorPage.tsxrename to frontend/src/pages/DashboardPage/PanelEditorPage/PanelEditorPage.tsxdiff --git a/frontend/src/pages/DashboardPageV2/PanelEditorPage/newPanelSeed.test.ts b/frontend/src/pages/DashboardPage/PanelEditorPage/newPanelSeed.test.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/PanelEditorPage/newPanelSeed.test.tsrename to frontend/src/pages/DashboardPage/PanelEditorPage/newPanelSeed.test.tsdiff --git a/frontend/src/pages/DashboardPageV2/PanelEditorPage/newPanelSeed.ts b/frontend/src/pages/DashboardPage/PanelEditorPage/newPanelSeed.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/PanelEditorPage/newPanelSeed.tsrename to frontend/src/pages/DashboardPage/PanelEditorPage/newPanelSeed.tsdiff --git a/frontend/src/pages/DashboardPageV2/constants/events.ts b/frontend/src/pages/DashboardPage/constants/events.tssimilarity index 100%rename from frontend/src/pages/DashboardPageV2/constants/events.tsrename to frontend/src/pages/DashboardPage/constants/events.tsdiff --git a/frontend/src/pages/DashboardPage/index.tsx b/frontend/src/pages/DashboardPage/index.tsxnew file mode 100644index 0000000000..1b30cb0919--- /dev/null+++ b/frontend/src/pages/DashboardPage/index.tsx@@ -0,0 +1,3 @@+import DashboardPage from './DashboardPage';++export default DashboardPage;diff --git a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/columnWidthStorage.test.ts b/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/columnWidthStorage.test.tsdeleted file mode 100644index 82ee4c96d0..0000000000--- a/frontend/src/pages/DashboardPageV2/DashboardContainer/Panels/utils/__tests__/columnWidthStorage.test.ts+++ /dev/null@@ -1,33 +0,0 @@-import { readColumnWidths, writeColumnWidths } from '../columnWidthStorage';--describe('columnWidthStorage', () => {- beforeEach(() => {- localStorage.clear();- });-- it('returns an empty map when nothing is stored', () => {- expect(readColumnWidths('panel-1')).toStrictEqual({});- });-- it('round-trips widths for a panel', () => {- writeColumnWidths('panel-1', { name: 200, status: 80 });- expect(readColumnWidths('panel-1')).toStrictEqual({ name: 200, status: 80 });- });-- it('keeps each panel isolated', () => {- writeColumnWidths('panel-1', { a: 100 });- writeColumnWidths('panel-2', { b: 300 });-- expect(readColumnWidths('panel-1')).toStrictEqual({ a: 100 });- expect(readColumnWidths('panel-2')).toStrictEqual({ b: 300 });- });-- it('overwrites a panel without touching the others', () => {- writeColumnWidths('panel-1', { a: 100 });- writeColumnWidths('panel-2', { b: 300 });- writeColumnWidths('panel-1', { a: 150, c: 50 });-- expect(readColumnWidths('panel-1')).toStrictEqual({ a: 150, c: 50 });- expect(readColumnWidths('panel-2')).toStrictEqual({ b: 300 });- });-});diff --git a/frontend/src/pages/DashboardPageV2/index.tsx b/frontend/src/pages/DashboardPageV2/index.tsxdeleted file mode 100644index 3a8fdecf1d..0000000000--- a/frontend/src/pages/DashboardPageV2/index.tsx+++ /dev/null@@ -1,3 +0,0 @@-import DashboardPageV2 from './DashboardPageV2';--export default DashboardPageV2;diff --git a/frontend/src/pages/DashboardWidget/__tests__/DashboardWidget.test.tsx b/frontend/src/pages/DashboardWidget/__tests__/DashboardWidget.test.tsxdeleted file mode 100644index 46afcd55dd..0000000000--- a/frontend/src/pages/DashboardWidget/__tests__/DashboardWidget.test.tsx+++ /dev/null@@ -1,143 +0,0 @@-import { Route } from 'react-router-dom';-import * as getDashboardModule from 'api/v1/dashboards/id/get';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { rest, server } from 'mocks-server/server';-import { render, screen, waitFor } from 'tests/test-utils';--import DashboardWidget from '../index';--const DASHBOARD_ID = 'dash-1';-const WIDGET_ID = 'widget-abc';--const mockDashboardResponse = {- status: 'success',- data: {- id: DASHBOARD_ID,- createdAt: '2024-01-01T00:00:00Z',- createdBy: 'test',- updatedAt: '2024-01-01T00:00:00Z',- updatedBy: 'test',- isLocked: false,- data: {- collapsableRowsMigrated: true,- description: '',- name: '',- panelMap: {},- tags: [],- title: 'Test Dashboard',- uploadedGrafana: false,- uuid: '',- version: '',- variables: {},- widgets: [],- layout: [],- },- },-};--const mockSafeNavigate = jest.fn();--jest.mock('hooks/useSafeNavigate', () => ({- useSafeNavigate: (): { safeNavigate: jest.Mock } => ({- safeNavigate: mockSafeNavigate,- }),-}));--jest.mock('container/NewWidget', () => ({- __esModule: true,- default: (): JSX.Element => <div data-testid="new-widget">NewWidget</div>,-}));--// Wrap component in a Route so useParams can resolve dashboardId.-// Query params are passed via the URL so useUrlQuery (react-router) can read them.-function renderAtRoute(- queryState: Record<string, string | null> = {},-): ReturnType<typeof render> {- const params = new URLSearchParams();- Object.entries(queryState).forEach(([k, v]) => {- if (v !== null) {- params.set(k, v);- }- });- const search = params.toString() ? `?${params.toString()}` : '';- return render(- <Route path="/dashboard/:dashboardId/new">- <DashboardWidget />- </Route>,- undefined,- { initialRoute: `/dashboard/${DASHBOARD_ID}/new${search}` },- );-}--beforeEach(() => {- mockSafeNavigate.mockClear();-});--afterEach(() => {- jest.restoreAllMocks();-});--describe('DashboardWidget', () => {- it('redirects to dashboard when widgetId is missing', async () => {- renderAtRoute({ graphType: PANEL_TYPES.TIME_SERIES });-- await waitFor(() => {- expect(mockSafeNavigate).toHaveBeenCalled();- });-- const [navigatedTo] = mockSafeNavigate.mock.calls[0];- expect(navigatedTo).toContain(`/dashboard/${DASHBOARD_ID}`);- });-- it('redirects to dashboard when graphType is missing', async () => {- renderAtRoute({ widgetId: WIDGET_ID });-- await waitFor(() => {- expect(mockSafeNavigate).toHaveBeenCalled();- });-- const [navigatedTo] = mockSafeNavigate.mock.calls[0];- expect(navigatedTo).toContain(`/dashboard/${DASHBOARD_ID}`);- });-- it('shows spinner while dashboard is loading', () => {- // Spy instead of MSW delay('infinite') to avoid leaving an open network handle.- jest- .spyOn(getDashboardModule, 'default')- .mockReturnValue(new Promise(() => {}));-- renderAtRoute({ widgetId: WIDGET_ID, graphType: PANEL_TYPES.TIME_SERIES });-- expect(screen.getByLabelText('loading')).toBeInTheDocument();- });-- it('shows error message when dashboard fetch fails', async () => {- server.use(- rest.get(- `http://localhost/api/v1/dashboards/${DASHBOARD_ID}`,- (_req, res, ctx) => res(ctx.status(500), ctx.json({ status: 'error' })),- ),- );-- renderAtRoute({ widgetId: WIDGET_ID, graphType: PANEL_TYPES.TIME_SERIES });-- await waitFor(() => {- expect(screen.getByText('Something went wrong')).toBeInTheDocument();- });- });-- it('renders NewWidget when dashboard loads successfully', async () => {- server.use(- rest.get(- `http://localhost/api/v1/dashboards/${DASHBOARD_ID}`,- (_req, res, ctx) => res(ctx.status(200), ctx.json(mockDashboardResponse)),- ),- );-- renderAtRoute({ widgetId: WIDGET_ID, graphType: PANEL_TYPES.TIME_SERIES });-- await waitFor(() => {- expect(screen.getByTestId('new-widget')).toBeInTheDocument();- });- });-});diff --git a/frontend/src/pages/DashboardWidget/index.tsx b/frontend/src/pages/DashboardWidget/index.tsxdeleted file mode 100644index 65a2db5db9..0000000000--- a/frontend/src/pages/DashboardWidget/index.tsx+++ /dev/null@@ -1,115 +0,0 @@-import { useEffect, useMemo, useState } from 'react';-import { useQuery } from 'react-query';-import { generatePath, useParams } from 'react-router-dom';-import { Card } from 'antd';-import { Typography } from '@signozhq/ui/typography';-import getDashboard from 'api/v1/dashboards/id/get';-import Spinner from 'components/Spinner';-import { SOMETHING_WENT_WRONG } from 'constants/api';-import { QueryParams } from 'constants/query';-import { PANEL_TYPES } from 'constants/queryBuilder';-import { DASHBOARD_CACHE_TIME } from 'constants/queryCacheTime';-import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';-import ROUTES from 'constants/routes';-import NewWidget from 'container/NewWidget';-import { isDrilldownEnabled } from 'container/QueryTable/Drilldown/drilldownUtils';-import { useTransformDashboardVariables } from 'hooks/dashboard/useTransformDashboardVariables';-import { useSafeNavigate } from 'hooks/useSafeNavigate';-import useUrlQuery from 'hooks/useUrlQuery';-import { setDashboardVariablesStore } from 'providers/Dashboard/store/dashboardVariables/dashboardVariablesStore';-import { Dashboard } from 'types/api/dashboard/getAll';--function DashboardWidget(): JSX.Element | null {- const { dashboardId } = useParams<{- dashboardId: string;- }>();- const query = useUrlQuery();- const { graphType, widgetId } = useMemo(() => {- return {- graphType: query.get(QueryParams.graphType) as PANEL_TYPES,- widgetId: query.get(QueryParams.widgetId),- };- }, [query]);-- const { safeNavigate } = useSafeNavigate();-- useEffect(() => {- if (!graphType || !widgetId) {- safeNavigate(generatePath(ROUTES.DASHBOARD, { dashboardId }));- } else if (!dashboardId) {- safeNavigate(ROUTES.HOME);- }- }, [graphType, widgetId, dashboardId, safeNavigate]);-- if (!widgetId || !graphType) {- return null;- }-- return (- <DashboardWidgetInternal- dashboardId={dashboardId}- widgetId={widgetId}- graphType={graphType}- />- );-}--function DashboardWidgetInternal({- dashboardId,- widgetId,- graphType,-}: {- dashboardId: string;- widgetId: string;- graphType: PANEL_TYPES;-}): JSX.Element | null {- const [dashboardData, setDashboardData] = useState<Dashboard | undefined>(- undefined,- );-- const { transformDashboardVariables } =- useTransformDashboardVariables(dashboardId);-- const {- isFetching: isFetchingDashboardResponse,- isError: isErrorDashboardResponse,- } = useQuery([REACT_QUERY_KEY.DASHBOARD_BY_ID, dashboardId, widgetId], {- enabled: true,- queryFn: async () =>- await getDashboard({- id: dashboardId,- }),- refetchOnWindowFocus: false,- cacheTime: DASHBOARD_CACHE_TIME,- onSuccess: (response) => {- const updatedDashboardData = transformDashboardVariables(response.data);- setDashboardData(updatedDashboardData);- setDashboardVariablesStore({- dashboardId,- variables: updatedDashboardData.data.variables ?? {},- });- },- });-- if (isFetchingDashboardResponse) {- return <Spinner tip="Loading.." />;- }-- if (isErrorDashboardResponse) {- return (- <Card>- <Typography>{SOMETHING_WENT_WRONG}</Typography>- </Card>- );- }-- return (- <NewWidget- dashboardId={dashboardId}- selectedGraph={graphType}- enableDrillDown={isDrilldownEnabled()}- dashboardData={dashboardData}- />- );-}-export default DashboardWidget;diff --git a/frontend/src/pages/DashboardsListPageV2/DashboardsListPageV2.module.scss b/frontend/src/pages/DashboardsListPage/DashboardsListPage.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/DashboardsListPageV2.module.scssrename to frontend/src/pages/DashboardsListPage/DashboardsListPage.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/DashboardsListPageV2.tsx b/frontend/src/pages/DashboardsListPage/DashboardsListPage.tsxsimilarity index 81%rename from frontend/src/pages/DashboardsListPageV2/DashboardsListPageV2.tsxrename to frontend/src/pages/DashboardsListPage/DashboardsListPage.tsxindex 3ff6deb937..d4f6349d04 100644--- a/frontend/src/pages/DashboardsListPageV2/DashboardsListPageV2.tsx+++ b/frontend/src/pages/DashboardsListPage/DashboardsListPage.tsx@@ -3,10 +3,10 @@ import { LayoutGrid } from '@signozhq/icons';import HeaderRightSection from 'components/HeaderRightSection/HeaderRightSection';import DashboardsList from './components/DashboardsList/DashboardsList';-import styles from './DashboardsListPageV2.module.scss';+import styles from './DashboardsListPage.module.scss';import { BreadcrumbLink } from '@signozhq/ui/breadcrumb';-function DashboardsListPageV2(): JSX.Element {+function DashboardsListPage(): JSX.Element {return (<div className={styles.page}><div className={styles.header}>@@ -24,4 +24,4 @@ function DashboardsListPageV2(): JSX.Element {);}-export default DashboardsListPageV2;+export default DashboardsListPage;diff --git a/frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/ActionsPopover.module.scss b/frontend/src/pages/DashboardsListPage/components/ActionsPopover/ActionsPopover.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/ActionsPopover.module.scssrename to frontend/src/pages/DashboardsListPage/components/ActionsPopover/ActionsPopover.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/ActionsPopover.test.tsx b/frontend/src/pages/DashboardsListPage/components/ActionsPopover/ActionsPopover.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/ActionsPopover.test.tsxrename to frontend/src/pages/DashboardsListPage/components/ActionsPopover/ActionsPopover.test.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/ActionsPopover.tsx b/frontend/src/pages/DashboardsListPage/components/ActionsPopover/ActionsPopover.tsxsimilarity index 99%rename from frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/ActionsPopover.tsxrename to frontend/src/pages/DashboardsListPage/components/ActionsPopover/ActionsPopover.tsxindex d6565c7a94..743a477ce1 100644--- a/frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/ActionsPopover.tsx+++ b/frontend/src/pages/DashboardsListPage/components/ActionsPopover/ActionsPopover.tsx@@ -26,7 +26,7 @@ import {import type { GetDashboardV2200 } from 'api/generated/services/sigNoz.schemas';import ROUTES from 'constants/routes';import { useSafeNavigate } from 'hooks/useSafeNavigate';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import { useAppContext } from 'providers/App/App';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/DeleteActionItem.tsx b/frontend/src/pages/DashboardsListPage/components/ActionsPopover/DeleteActionItem.tsxsimilarity index 97%rename from frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/DeleteActionItem.tsxrename to frontend/src/pages/DashboardsListPage/components/ActionsPopover/DeleteActionItem.tsxindex 1c5d82f623..78893019ab 100644--- a/frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/DeleteActionItem.tsx+++ b/frontend/src/pages/DashboardsListPage/components/ActionsPopover/DeleteActionItem.tsx@@ -13,7 +13,7 @@ import {invalidateListDashboardsForUserV2,} from 'api/generated/services/dashboard';import { useDeleteConfirm } from 'components/DeleteConfirmModal/useDeleteConfirm';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import { useAppContext } from 'providers/App/App';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/EditTagsModal.tsx b/frontend/src/pages/DashboardsListPage/components/ActionsPopover/EditTagsModal.tsxsimilarity index 97%rename from frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/EditTagsModal.tsxrename to frontend/src/pages/DashboardsListPage/components/ActionsPopover/EditTagsModal.tsxindex 1dc3057577..d0d35f1223 100644--- a/frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/EditTagsModal.tsx+++ b/frontend/src/pages/DashboardsListPage/components/ActionsPopover/EditTagsModal.tsx@@ -11,7 +11,7 @@ import {} from 'api/generated/services/dashboard';import type { DashboardtypesJSONPatchOperationDTO } from 'api/generated/services/sigNoz.schemas';import TagKeyValueInput from 'components/TagKeyValueInput/TagKeyValueInput';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';diff --git a/frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/RenameDashboardModal.tsx b/frontend/src/pages/DashboardsListPage/components/ActionsPopover/RenameDashboardModal.tsxsimilarity index 96%rename from frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/RenameDashboardModal.tsxrename to frontend/src/pages/DashboardsListPage/components/ActionsPopover/RenameDashboardModal.tsxindex da8ed90e48..ddce17724b 100644--- a/frontend/src/pages/DashboardsListPageV2/components/ActionsPopover/RenameDashboardModal.tsx+++ b/frontend/src/pages/DashboardsListPage/components/ActionsPopover/RenameDashboardModal.tsx@@ -11,11 +11,11 @@ import {patchDashboardV2,} from 'api/generated/services/dashboard';import type { DashboardtypesJSONPatchOperationDTO } from 'api/generated/services/sigNoz.schemas';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import { useErrorModal } from 'providers/ErrorModalProvider';import APIError from 'types/api/error';-import { DASHBOARD_NAME_MAX_LENGTH } from '../../../DashboardPageV2/DashboardContainer/constants';+import { DASHBOARD_NAME_MAX_LENGTH } from '../../../DashboardPage/DashboardContainer/constants';import styles from './ActionsPopover.module.scss';interface Props {diff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRow.module.scss b/frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRow.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRow.module.scssrename to frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRow.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRow.test.tsx b/frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRow.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRow.test.tsxrename to frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRow.test.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRow.tsx b/frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRow.tsxsimilarity index 97%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRow.tsxrename to frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRow.tsxindex e5421078e5..85894022a1 100644--- a/frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRow.tsx+++ b/frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRow.tsx@@ -7,11 +7,11 @@ import { CalendarClock, LockKeyhole, Pin, PinOff } from '@signozhq/icons';import cx from 'classnames';import logEvent from 'api/common/logEvent';import { generatePath } from 'react-router-dom';-import { resolveDashboardImage } from 'pages/DashboardPageV2/DashboardContainer/dashboardIcons';+import { resolveDashboardImage } from 'pages/DashboardPage/DashboardContainer/dashboardIcons';import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';import ROUTES from 'constants/routes';import { useSafeNavigate } from 'hooks/useSafeNavigate';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import { useTimezone } from 'providers/Timezone';import { isModifierKeyPressed } from 'utils/app';diff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRowTags/DashboardRowTags.module.scss b/frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRowTags/DashboardRowTags.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRowTags/DashboardRowTags.module.scssrename to frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRowTags/DashboardRowTags.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRowTags/DashboardRowTags.tsx b/frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRowTags/DashboardRowTags.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardRow/DashboardRowTags/DashboardRowTags.tsxrename to frontend/src/pages/DashboardsListPage/components/DashboardRow/DashboardRowTags/DashboardRowTags.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardsList/CommandHeader.tsx b/frontend/src/pages/DashboardsListPage/components/DashboardsList/CommandHeader.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardsList/CommandHeader.tsxrename to frontend/src/pages/DashboardsListPage/components/DashboardsList/CommandHeader.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardsList/DashboardsList.module.scss b/frontend/src/pages/DashboardsListPage/components/DashboardsList/DashboardsList.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardsList/DashboardsList.module.scssrename to frontend/src/pages/DashboardsListPage/components/DashboardsList/DashboardsList.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardsList/DashboardsList.tsx b/frontend/src/pages/DashboardsListPage/components/DashboardsList/DashboardsList.tsxsimilarity index 99%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardsList/DashboardsList.tsxrename to frontend/src/pages/DashboardsListPage/components/DashboardsList/DashboardsList.tsxindex 7f7a174073..1febb4e90a 100644--- a/frontend/src/pages/DashboardsListPageV2/components/DashboardsList/DashboardsList.tsx+++ b/frontend/src/pages/DashboardsListPage/components/DashboardsList/DashboardsList.tsx@@ -7,7 +7,7 @@ import {} from 'api/generated/services/sigNoz.schemas';import useComponentPermission from 'hooks/useComponentPermission';import { useGetTenantLicense } from 'hooks/useGetTenantLicense';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import { useAppContext } from 'providers/App/App';import { toAPIError } from 'utils/errorUtils';diff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardsList/DashboardsListContent.tsx b/frontend/src/pages/DashboardsListPage/components/DashboardsList/DashboardsListContent.tsxsimilarity index 95%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardsList/DashboardsListContent.tsxrename to frontend/src/pages/DashboardsListPage/components/DashboardsList/DashboardsListContent.tsxindex 8589e75564..be387fdb09 100644--- a/frontend/src/pages/DashboardsListPageV2/components/DashboardsList/DashboardsListContent.tsx+++ b/frontend/src/pages/DashboardsListPage/components/DashboardsList/DashboardsListContent.tsx@@ -3,7 +3,7 @@ import { Table } from 'antd';import type { TableProps } from 'antd/lib';import logEvent from 'api/common/logEvent';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import type { DashboardListItem } from '../../utils/helpers';import DashboardRow from '../DashboardRow/DashboardRow';diff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardsList/DashboardsResults.tsx b/frontend/src/pages/DashboardsListPage/components/DashboardsList/DashboardsResults.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardsList/DashboardsResults.tsxrename to frontend/src/pages/DashboardsListPage/components/DashboardsList/DashboardsResults.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardsList/NewDashboardButton.tsx b/frontend/src/pages/DashboardsListPage/components/DashboardsList/NewDashboardButton.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardsList/NewDashboardButton.tsxrename to frontend/src/pages/DashboardsListPage/components/DashboardsList/NewDashboardButton.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/DashboardsList/WorkspaceEmptyState.tsx b/frontend/src/pages/DashboardsListPage/components/DashboardsList/WorkspaceEmptyState.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/DashboardsList/WorkspaceEmptyState.tsxrename to frontend/src/pages/DashboardsListPage/components/DashboardsList/WorkspaceEmptyState.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/FilterZone/FilterChips.tsx b/frontend/src/pages/DashboardsListPage/components/FilterZone/FilterChips.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/FilterZone/FilterChips.tsxrename to frontend/src/pages/DashboardsListPage/components/FilterZone/FilterChips.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/FilterZone/FilterZone.module.scss b/frontend/src/pages/DashboardsListPage/components/FilterZone/FilterZone.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/FilterZone/FilterZone.module.scssrename to frontend/src/pages/DashboardsListPage/components/FilterZone/FilterZone.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/FilterZone/FilterZone.tsx b/frontend/src/pages/DashboardsListPage/components/FilterZone/FilterZone.tsxsimilarity index 98%rename from frontend/src/pages/DashboardsListPageV2/components/FilterZone/FilterZone.tsxrename to frontend/src/pages/DashboardsListPage/components/FilterZone/FilterZone.tsxindex e860a4682f..6983334bc2 100644--- a/frontend/src/pages/DashboardsListPageV2/components/FilterZone/FilterZone.tsx+++ b/frontend/src/pages/DashboardsListPage/components/FilterZone/FilterZone.tsx@@ -10,7 +10,7 @@ import { Button } from '@signozhq/ui/button';import { Typography } from '@signozhq/ui/typography';import { X } from '@signozhq/icons';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import type { SuggestionSource } from '../../utils/dslSuggestions';import {diff --git a/frontend/src/pages/DashboardsListPageV2/components/LegacyDashboardDialog/LegacyDashboardDialog.module.scss b/frontend/src/pages/DashboardsListPage/components/LegacyDashboardDialog/LegacyDashboardDialog.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/LegacyDashboardDialog/LegacyDashboardDialog.module.scssrename to frontend/src/pages/DashboardsListPage/components/LegacyDashboardDialog/LegacyDashboardDialog.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/LegacyDashboardDialog/LegacyDashboardDialog.test.tsx b/frontend/src/pages/DashboardsListPage/components/LegacyDashboardDialog/LegacyDashboardDialog.test.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/LegacyDashboardDialog/LegacyDashboardDialog.test.tsxrename to frontend/src/pages/DashboardsListPage/components/LegacyDashboardDialog/LegacyDashboardDialog.test.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/LegacyDashboardDialog/LegacyDashboardDialog.tsx b/frontend/src/pages/DashboardsListPage/components/LegacyDashboardDialog/LegacyDashboardDialog.tsxsimilarity index 98%rename from frontend/src/pages/DashboardsListPageV2/components/LegacyDashboardDialog/LegacyDashboardDialog.tsxrename to frontend/src/pages/DashboardsListPage/components/LegacyDashboardDialog/LegacyDashboardDialog.tsxindex e81d7611f2..ad80deb30b 100644--- a/frontend/src/pages/DashboardsListPageV2/components/LegacyDashboardDialog/LegacyDashboardDialog.tsx+++ b/frontend/src/pages/DashboardsListPage/components/LegacyDashboardDialog/LegacyDashboardDialog.tsx@@ -7,7 +7,7 @@ import { toast } from '@signozhq/ui/sonner';import logEvent from 'api/common/logEvent';import { handleContactSupport } from 'container/Integrations/utils';import { useGetTenantLicense } from 'hooks/useGetTenantLicense';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import { useRetryMigration } from '../../hooks/useRetryMigration';diff --git a/frontend/src/pages/DashboardsListPageV2/components/ListHeader/ListHeader.module.scss b/frontend/src/pages/DashboardsListPage/components/ListHeader/ListHeader.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/ListHeader/ListHeader.module.scssrename to frontend/src/pages/DashboardsListPage/components/ListHeader/ListHeader.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/ListHeader/ListHeader.tsx b/frontend/src/pages/DashboardsListPage/components/ListHeader/ListHeader.tsxsimilarity index 98%rename from frontend/src/pages/DashboardsListPageV2/components/ListHeader/ListHeader.tsxrename to frontend/src/pages/DashboardsListPage/components/ListHeader/ListHeader.tsxindex c82a934851..23f5b7cc21 100644--- a/frontend/src/pages/DashboardsListPageV2/components/ListHeader/ListHeader.tsx+++ b/frontend/src/pages/DashboardsListPage/components/ListHeader/ListHeader.tsx@@ -10,7 +10,7 @@ import {DashboardtypesListOrderDTO,DashboardtypesListSortDTO,} from 'api/generated/services/sigNoz.schemas';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import {type DashboardDynamicColumns,diff --git a/frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/BlankDashboardPanel.tsx b/frontend/src/pages/DashboardsListPage/components/NewDashboardModal/BlankDashboardPanel.tsxsimilarity index 94%rename from frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/BlankDashboardPanel.tsxrename to frontend/src/pages/DashboardsListPage/components/NewDashboardModal/BlankDashboardPanel.tsxindex d70f913bf4..f3f9579e7a 100644--- a/frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/BlankDashboardPanel.tsx+++ b/frontend/src/pages/DashboardsListPage/components/NewDashboardModal/BlankDashboardPanel.tsx@@ -12,15 +12,15 @@ import { createDashboardV2 } from 'api/generated/services/dashboard';import ROUTES from 'constants/routes';import { useSafeNavigate } from 'hooks/useSafeNavigate';import { useErrorModal } from 'providers/ErrorModalProvider';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import APIError from 'types/api/error';import TagKeyValueInput from 'components/TagKeyValueInput/TagKeyValueInput';import { keyValueStringsToTags } from '../../utils/helpers';-import DashboardImagePicker from '../../../DashboardPageV2/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker';-import { DEFAULT_DASHBOARD_ICON_PATH } from 'pages/DashboardPageV2/DashboardContainer/dashboardIcons';-import { DASHBOARD_NAME_MAX_LENGTH } from '../../../DashboardPageV2/DashboardContainer/constants';+import DashboardImagePicker from '../../../DashboardPage/DashboardContainer/DashboardSettings/Overview/DashboardImagePicker/DashboardImagePicker';+import { DEFAULT_DASHBOARD_ICON_PATH } from 'pages/DashboardPage/DashboardContainer/dashboardIcons';+import { DASHBOARD_NAME_MAX_LENGTH } from '../../../DashboardPage/DashboardContainer/constants';import styles from './NewDashboardModal.module.scss';const DEFAULT_NAME = 'Sample Dashboard';diff --git a/frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/ImportJsonPanel.tsx b/frontend/src/pages/DashboardsListPage/components/NewDashboardModal/ImportJsonPanel.tsxsimilarity index 96%rename from frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/ImportJsonPanel.tsxrename to frontend/src/pages/DashboardsListPage/components/NewDashboardModal/ImportJsonPanel.tsxindex 23b171dd93..d70a13ee8f 100644--- a/frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/ImportJsonPanel.tsx+++ b/frontend/src/pages/DashboardsListPage/components/NewDashboardModal/ImportJsonPanel.tsx@@ -13,10 +13,10 @@ import { createDashboardV2 } from 'api/generated/services/dashboard';import ROUTES from 'constants/routes';import { useSafeNavigate } from 'hooks/useSafeNavigate';import { useErrorModal } from 'providers/ErrorModalProvider';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import APIError from 'types/api/error';-import { isValidDashboardImage } from 'pages/DashboardPageV2/DashboardContainer/dashboardIcons';+import { isValidDashboardImage } from 'pages/DashboardPage/DashboardContainer/dashboardIcons';import { normalizeToPostable } from './importUtils';import JsonEditor from './JsonEditor';diff --git a/frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/JsonEditor.tsx b/frontend/src/pages/DashboardsListPage/components/NewDashboardModal/JsonEditor.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/JsonEditor.tsxrename to frontend/src/pages/DashboardsListPage/components/NewDashboardModal/JsonEditor.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/NewDashboardModal.module.scss b/frontend/src/pages/DashboardsListPage/components/NewDashboardModal/NewDashboardModal.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/NewDashboardModal.module.scssrename to frontend/src/pages/DashboardsListPage/components/NewDashboardModal/NewDashboardModal.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/NewDashboardModal.tsx b/frontend/src/pages/DashboardsListPage/components/NewDashboardModal/NewDashboardModal.tsxsimilarity index 94%rename from frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/NewDashboardModal.tsxrename to frontend/src/pages/DashboardsListPage/components/NewDashboardModal/NewDashboardModal.tsxindex 764df57879..d3da23413a 100644--- a/frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/NewDashboardModal.tsx+++ b/frontend/src/pages/DashboardsListPage/components/NewDashboardModal/NewDashboardModal.tsx@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react';import { DialogWrapper } from '@signozhq/ui/dialog';import { Tabs } from '@signozhq/ui/tabs';import logEvent from 'api/common/logEvent';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import BlankDashboardPanel from './BlankDashboardPanel';import ImportJsonPanel from './ImportJsonPanel';diff --git a/frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/TemplatesPanel.tsx b/frontend/src/pages/DashboardsListPage/components/NewDashboardModal/TemplatesPanel.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/TemplatesPanel.tsxrename to frontend/src/pages/DashboardsListPage/components/NewDashboardModal/TemplatesPanel.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/importUtils.ts b/frontend/src/pages/DashboardsListPage/components/NewDashboardModal/importUtils.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/NewDashboardModal/importUtils.tsrename to frontend/src/pages/DashboardsListPage/components/NewDashboardModal/importUtils.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/components/SearchBar/SearchBar.module.scss b/frontend/src/pages/DashboardsListPage/components/SearchBar/SearchBar.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/SearchBar/SearchBar.module.scssrename to frontend/src/pages/DashboardsListPage/components/SearchBar/SearchBar.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/SearchBar/SearchBar.tsx b/frontend/src/pages/DashboardsListPage/components/SearchBar/SearchBar.tsxsimilarity index 98%rename from frontend/src/pages/DashboardsListPageV2/components/SearchBar/SearchBar.tsxrename to frontend/src/pages/DashboardsListPage/components/SearchBar/SearchBar.tsxindex d026bbdc8e..cda3ba89f7 100644--- a/frontend/src/pages/DashboardsListPageV2/components/SearchBar/SearchBar.tsx+++ b/frontend/src/pages/DashboardsListPage/components/SearchBar/SearchBar.tsx@@ -15,7 +15,7 @@ import CodeMirror, {type ReactCodeMirrorRef,} from '@uiw/react-codemirror';import logEvent from 'api/common/logEvent';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import { getUserOperatingSystem, UserOperatingSystem } from 'utils/getUserOS';import type { SuggestionSource } from '../../utils/dslSuggestions';diff --git a/frontend/src/pages/DashboardsListPageV2/components/SearchBar/dslCompletions.ts b/frontend/src/pages/DashboardsListPage/components/SearchBar/dslCompletions.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/SearchBar/dslCompletions.tsrename to frontend/src/pages/DashboardsListPage/components/SearchBar/dslCompletions.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/components/SearchBar/dslHighlight.ts b/frontend/src/pages/DashboardsListPage/components/SearchBar/dslHighlight.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/SearchBar/dslHighlight.tsrename to frontend/src/pages/DashboardsListPage/components/SearchBar/dslHighlight.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/components/StatusBar/StatusBar.module.scss b/frontend/src/pages/DashboardsListPage/components/StatusBar/StatusBar.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/StatusBar/StatusBar.module.scssrename to frontend/src/pages/DashboardsListPage/components/StatusBar/StatusBar.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/StatusBar/StatusBar.tsx b/frontend/src/pages/DashboardsListPage/components/StatusBar/StatusBar.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/StatusBar/StatusBar.tsxrename to frontend/src/pages/DashboardsListPage/components/StatusBar/StatusBar.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/ViewsRail/ViewNamePopover.tsx b/frontend/src/pages/DashboardsListPage/components/ViewsRail/ViewNamePopover.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/ViewsRail/ViewNamePopover.tsxrename to frontend/src/pages/DashboardsListPage/components/ViewsRail/ViewNamePopover.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/ViewsRail/ViewsRail.module.scss b/frontend/src/pages/DashboardsListPage/components/ViewsRail/ViewsRail.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/ViewsRail/ViewsRail.module.scssrename to frontend/src/pages/DashboardsListPage/components/ViewsRail/ViewsRail.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/ViewsRail/ViewsRail.tsx b/frontend/src/pages/DashboardsListPage/components/ViewsRail/ViewsRail.tsxsimilarity index 99%rename from frontend/src/pages/DashboardsListPageV2/components/ViewsRail/ViewsRail.tsxrename to frontend/src/pages/DashboardsListPage/components/ViewsRail/ViewsRail.tsxindex 75ba05cf0c..65e2b8a223 100644--- a/frontend/src/pages/DashboardsListPageV2/components/ViewsRail/ViewsRail.tsx+++ b/frontend/src/pages/DashboardsListPage/components/ViewsRail/ViewsRail.tsx@@ -7,7 +7,7 @@ import { Bookmark, PenLine, Plus, Search, Trash2 } from '@signozhq/icons';import cx from 'classnames';import { useDeleteConfirm } from 'components/DeleteConfirmModal/useDeleteConfirm';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import type { SavedView } from '../../types';import { type BuiltinView } from '../../utils/views';diff --git a/frontend/src/pages/DashboardsListPageV2/components/states/EmptyState/EmptyState.module.scss b/frontend/src/pages/DashboardsListPage/components/states/EmptyState/EmptyState.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/states/EmptyState/EmptyState.module.scssrename to frontend/src/pages/DashboardsListPage/components/states/EmptyState/EmptyState.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/states/EmptyState/EmptyState.tsx b/frontend/src/pages/DashboardsListPage/components/states/EmptyState/EmptyState.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/states/EmptyState/EmptyState.tsxrename to frontend/src/pages/DashboardsListPage/components/states/EmptyState/EmptyState.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/states/ErrorState/ErrorState.module.scss b/frontend/src/pages/DashboardsListPage/components/states/ErrorState/ErrorState.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/states/ErrorState/ErrorState.module.scssrename to frontend/src/pages/DashboardsListPage/components/states/ErrorState/ErrorState.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/states/ErrorState/ErrorState.tsx b/frontend/src/pages/DashboardsListPage/components/states/ErrorState/ErrorState.tsxsimilarity index 96%rename from frontend/src/pages/DashboardsListPageV2/components/states/ErrorState/ErrorState.tsxrename to frontend/src/pages/DashboardsListPage/components/states/ErrorState/ErrorState.tsxindex 671fa8c13b..30c4b43435 100644--- a/frontend/src/pages/DashboardsListPageV2/components/states/ErrorState/ErrorState.tsx+++ b/frontend/src/pages/DashboardsListPage/components/states/ErrorState/ErrorState.tsx@@ -3,7 +3,7 @@ import { Typography } from '@signozhq/ui/typography';import { ArrowUpRight, RotateCw } from '@signozhq/icons';import logEvent from 'api/common/logEvent';import { handleContactSupport } from 'container/Integrations/utils';-import { DashboardListEvents } from 'pages/DashboardsListPageV2/constants/events';+import { DashboardListEvents } from 'pages/DashboardsListPage/constants/events';import awwSnapUrl from '@/assets/Icons/awwSnap.svg';diff --git a/frontend/src/pages/DashboardsListPageV2/components/states/LoadingState/LoadingState.module.scss b/frontend/src/pages/DashboardsListPage/components/states/LoadingState/LoadingState.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/states/LoadingState/LoadingState.module.scssrename to frontend/src/pages/DashboardsListPage/components/states/LoadingState/LoadingState.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/states/LoadingState/LoadingState.tsx b/frontend/src/pages/DashboardsListPage/components/states/LoadingState/LoadingState.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/states/LoadingState/LoadingState.tsxrename to frontend/src/pages/DashboardsListPage/components/states/LoadingState/LoadingState.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/states/NoResultsState/NoResultsState.module.scss b/frontend/src/pages/DashboardsListPage/components/states/NoResultsState/NoResultsState.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/states/NoResultsState/NoResultsState.module.scssrename to frontend/src/pages/DashboardsListPage/components/states/NoResultsState/NoResultsState.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/components/states/NoResultsState/NoResultsState.tsx b/frontend/src/pages/DashboardsListPage/components/states/NoResultsState/NoResultsState.tsxsimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/states/NoResultsState/NoResultsState.tsxrename to frontend/src/pages/DashboardsListPage/components/states/NoResultsState/NoResultsState.tsxdiff --git a/frontend/src/pages/DashboardsListPageV2/components/states/states.module.scss b/frontend/src/pages/DashboardsListPage/components/states/states.module.scsssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/components/states/states.module.scssrename to frontend/src/pages/DashboardsListPage/components/states/states.module.scssdiff --git a/frontend/src/pages/DashboardsListPageV2/constants/events.ts b/frontend/src/pages/DashboardsListPage/constants/events.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/constants/events.tsrename to frontend/src/pages/DashboardsListPage/constants/events.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/hooks/__tests__/useRetryMigration.test.ts b/frontend/src/pages/DashboardsListPage/hooks/__tests__/useRetryMigration.test.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/hooks/__tests__/useRetryMigration.test.tsrename to frontend/src/pages/DashboardsListPage/hooks/__tests__/useRetryMigration.test.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/hooks/useAccumulatedTags.ts b/frontend/src/pages/DashboardsListPage/hooks/useAccumulatedTags.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/hooks/useAccumulatedTags.tsrename to frontend/src/pages/DashboardsListPage/hooks/useAccumulatedTags.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/hooks/useActiveView.ts b/frontend/src/pages/DashboardsListPage/hooks/useActiveView.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/hooks/useActiveView.tsrename to frontend/src/pages/DashboardsListPage/hooks/useActiveView.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/hooks/useCreatorOptions.ts b/frontend/src/pages/DashboardsListPage/hooks/useCreatorOptions.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/hooks/useCreatorOptions.tsrename to frontend/src/pages/DashboardsListPage/hooks/useCreatorOptions.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/hooks/useDashboardFilters.ts b/frontend/src/pages/DashboardsListPage/hooks/useDashboardFilters.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/hooks/useDashboardFilters.tsrename to frontend/src/pages/DashboardsListPage/hooks/useDashboardFilters.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/hooks/useDashboardsListQueryParams.ts b/frontend/src/pages/DashboardsListPage/hooks/useDashboardsListQueryParams.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/hooks/useDashboardsListQueryParams.tsrename to frontend/src/pages/DashboardsListPage/hooks/useDashboardsListQueryParams.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/hooks/usePinDashboard.ts b/frontend/src/pages/DashboardsListPage/hooks/usePinDashboard.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/hooks/usePinDashboard.tsrename to frontend/src/pages/DashboardsListPage/hooks/usePinDashboard.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/hooks/useRetryMigration.ts b/frontend/src/pages/DashboardsListPage/hooks/useRetryMigration.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/hooks/useRetryMigration.tsrename to frontend/src/pages/DashboardsListPage/hooks/useRetryMigration.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/hooks/useSavedViews.ts b/frontend/src/pages/DashboardsListPage/hooks/useSavedViews.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/hooks/useSavedViews.tsrename to frontend/src/pages/DashboardsListPage/hooks/useSavedViews.tsdiff --git a/frontend/src/pages/DashboardsListPage/index.tsx b/frontend/src/pages/DashboardsListPage/index.tsxnew file mode 100644index 0000000000..e0007017e4--- /dev/null+++ b/frontend/src/pages/DashboardsListPage/index.tsx@@ -0,0 +1,3 @@+import DashboardsListPage from './DashboardsListPage';++export default DashboardsListPage;diff --git a/frontend/src/pages/DashboardsListPageV2/store/useDashboardViewsStore.ts b/frontend/src/pages/DashboardsListPage/store/useDashboardViewsStore.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/store/useDashboardViewsStore.tsrename to frontend/src/pages/DashboardsListPage/store/useDashboardViewsStore.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/store/useVisibleColumnsStore.ts b/frontend/src/pages/DashboardsListPage/store/useVisibleColumnsStore.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/store/useVisibleColumnsStore.tsrename to frontend/src/pages/DashboardsListPage/store/useVisibleColumnsStore.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/types.ts b/frontend/src/pages/DashboardsListPage/types.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/types.tsrename to frontend/src/pages/DashboardsListPage/types.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/utils/dslGrammar.ts b/frontend/src/pages/DashboardsListPage/utils/dslGrammar.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/utils/dslGrammar.tsrename to frontend/src/pages/DashboardsListPage/utils/dslGrammar.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/utils/dslSuggestions.test.ts b/frontend/src/pages/DashboardsListPage/utils/dslSuggestions.test.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/utils/dslSuggestions.test.tsrename to frontend/src/pages/DashboardsListPage/utils/dslSuggestions.test.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/utils/dslSuggestions.ts b/frontend/src/pages/DashboardsListPage/utils/dslSuggestions.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/utils/dslSuggestions.tsrename to frontend/src/pages/DashboardsListPage/utils/dslSuggestions.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/utils/dslTokenizer.test.ts b/frontend/src/pages/DashboardsListPage/utils/dslTokenizer.test.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/utils/dslTokenizer.test.tsrename to frontend/src/pages/DashboardsListPage/utils/dslTokenizer.test.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/utils/dslTokenizer.ts b/frontend/src/pages/DashboardsListPage/utils/dslTokenizer.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/utils/dslTokenizer.tsrename to frontend/src/pages/DashboardsListPage/utils/dslTokenizer.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/utils/filterQuery.test.ts b/frontend/src/pages/DashboardsListPage/utils/filterQuery.test.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/utils/filterQuery.test.tsrename to frontend/src/pages/DashboardsListPage/utils/filterQuery.test.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/utils/filterQuery.ts b/frontend/src/pages/DashboardsListPage/utils/filterQuery.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/utils/filterQuery.tsrename to frontend/src/pages/DashboardsListPage/utils/filterQuery.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/utils/helpers.ts b/frontend/src/pages/DashboardsListPage/utils/helpers.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/utils/helpers.tsrename to frontend/src/pages/DashboardsListPage/utils/helpers.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/utils/views.ts b/frontend/src/pages/DashboardsListPage/utils/views.tssimilarity index 100%rename from frontend/src/pages/DashboardsListPageV2/utils/views.tsrename to frontend/src/pages/DashboardsListPage/utils/views.tsdiff --git a/frontend/src/pages/DashboardsListPageV2/index.tsx b/frontend/src/pages/DashboardsListPageV2/index.tsxdeleted file mode 100644index 78e64878f8..0000000000--- a/frontend/src/pages/DashboardsListPageV2/index.tsx+++ /dev/null@@ -1,3 +0,0 @@-import DashboardsListPageV2 from './DashboardsListPageV2';--export default DashboardsListPageV2;diff --git a/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricColumnGraphs.tsx b/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricColumnGraphs.tsxindex 7e0a7f3cf4..0907458892 100644--- a/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricColumnGraphs.tsx+++ b/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricColumnGraphs.tsx@@ -1,8 +1,8 @@import { useTranslation } from 'react-i18next';import { Typography } from '@signozhq/ui/typography';-import { CardContainer } from 'container/GridCardLayout/styles';+import { CardContainer } from 'container/WidgetCard/styles';import { useIsDarkMode } from 'hooks/useDarkMode';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import MetricPageGridGraph from './MetricPageGraph';import {diff --git a/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPage.tsx b/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPage.tsxindex c35763f368..74312b6c01 100644--- a/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPage.tsx+++ b/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPage.tsx@@ -3,10 +3,10 @@ import { useTranslation } from 'react-i18next';import { Typography } from '@signozhq/ui/typography';import logEvent from 'api/common/logEvent';import cx from 'classnames';-import { CardContainer } from 'container/GridCardLayout/styles';+import { CardContainer } from 'container/WidgetCard/styles';import { useIsDarkMode } from 'hooks/useDarkMode';import { ChevronDown, ChevronUp } from '@signozhq/icons';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import MetricColumnGraphs from './MetricColumnGraphs';import MetricPageGridGraph from './MetricPageGraph';diff --git a/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPageGraph.tsx b/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPageGraph.tsxindex 695f9c7b71..c15cd3792d 100644--- a/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPageGraph.tsx+++ b/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPageGraph.tsx@@ -4,13 +4,13 @@ import { useDispatch } from 'react-redux';import { useHistory, useLocation } from 'react-router-dom';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { ViewMenuAction } from 'container/GridCardLayout/config';-import GridCard from 'container/GridCardLayout/GridCard';-import { Card } from 'container/GridCardLayout/styles';+import { ViewMenuAction } from 'container/WidgetCard/config';+import GridCard from 'container/WidgetCard/Card';+import { Card } from 'container/WidgetCard/styles';import { useIsDarkMode } from 'hooks/useDarkMode';import useUrlQuery from 'hooks/useUrlQuery';import { UpdateTimeInterval } from 'store/actions';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import './MetricPage.styles.scss';diff --git a/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPageUtil.ts b/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPageUtil.tsindex 3bd5be4fb2..741cd373b1 100644--- a/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPageUtil.ts+++ b/frontend/src/pages/MessagingQueues/MQDetails/MetricPage/MetricPageUtil.ts@@ -1,6 +1,6 @@import { PANEL_TYPES } from 'constants/queryBuilder';import { GetWidgetQueryBuilderProps } from 'container/MetricsApplication/types';-import { Widgets } from 'types/api/dashboard/getAll';+import { Widgets } from 'types/api/widgets/widget';import { DataTypes } from 'types/api/queryBuilder/queryAutocompleteResponse';import {IBuilderFormula,diff --git a/frontend/src/pages/MessagingQueues/MQGraph/MQGraph.tsx b/frontend/src/pages/MessagingQueues/MQGraph/MQGraph.tsxindex e80eb3fc10..e3ee48b14a 100644--- a/frontend/src/pages/MessagingQueues/MQGraph/MQGraph.tsx+++ b/frontend/src/pages/MessagingQueues/MQGraph/MQGraph.tsx@@ -5,9 +5,9 @@ import { useHistory, useLocation } from 'react-router-dom';import logEvent from 'api/common/logEvent';import { QueryParams } from 'constants/query';import { PANEL_TYPES } from 'constants/queryBuilder';-import { ViewMenuAction } from 'container/GridCardLayout/config';-import GridCard from 'container/GridCardLayout/GridCard';-import { Card } from 'container/GridCardLayout/styles';+import { ViewMenuAction } from 'container/WidgetCard/config';+import GridCard from 'container/WidgetCard/Card';+import { Card } from 'container/WidgetCard/styles';import { getWidgetQueryBuilder } from 'container/MetricsApplication/MetricsApplication.factory';import { useIsDarkMode } from 'hooks/useDarkMode';import useUrlQuery from 'hooks/useUrlQuery';diff --git a/frontend/src/pages/PublicDashboard/PublicDashboardMessage.tsx b/frontend/src/pages/PublicDashboard/PublicDashboardMessage.tsxnew file mode 100644index 0000000000..379c19de40--- /dev/null+++ b/frontend/src/pages/PublicDashboard/PublicDashboardMessage.tsx@@ -0,0 +1,59 @@+import { ReactNode } from 'react';+import { Typography } from '@signozhq/ui/typography';++import signozBrandLogoUrl from '@/assets/Logos/signoz-brand-logo.svg';++interface PublicDashboardMessageProps {+ icon: ReactNode;+ title: string;+ description: string;+ testId: string;+}++/**+ * Branded full-page state for a public dashboard that can't be rendered. Public+ * viewers are anonymous, so every variant can only point them at the dashboard+ * owner — there are no in-app recovery actions.+ */+function PublicDashboardMessage({+ icon,+ title,+ description,+ testId,+}: PublicDashboardMessageProps): JSX.Element {+ return (+ <div className="public-dashboard-error-container" data-testid={testId}>+ <div className="perilin-bg" />++ <div className="public-dashboard-error-content-header">+ <div className="brand">+ <img src={signozBrandLogoUrl} alt="SigNoz" className="brand-logo" />++ <Typography.Title level={2} className="brand-title">+ SigNoz+ </Typography.Title>+ </div>++ <div className="brand-tagline">+ <Typography.Text>+ OpenTelemetry-Native Logs, Metrics and Traces in a single pane+ </Typography.Text>+ </div>+ </div>++ <div className="public-dashboard-error-content">+ <Typography.Title level={4} className="public-dashboard-error-message-icon">+ {icon}+ </Typography.Title>+ <Typography.Title level={4} className="public-dashboard-error-message">+ {title}+ </Typography.Title>+ <Typography.Text className="public-dashboard-error-message-description">+ {description}+ </Typography.Text>+ </div>+ </div>+ );+}++export default PublicDashboardMessage;diff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicAutoRefresh/PublicAutoRefresh.module.scss b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicAutoRefresh/PublicAutoRefresh.module.scsssimilarity index 100%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicAutoRefresh/PublicAutoRefresh.module.scssrename to frontend/src/pages/PublicDashboard/PublicDashboardView/PublicAutoRefresh/PublicAutoRefresh.module.scssdiff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicAutoRefresh/PublicAutoRefresh.tsx b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicAutoRefresh/PublicAutoRefresh.tsxsimilarity index 100%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicAutoRefresh/PublicAutoRefresh.tsxrename to frontend/src/pages/PublicDashboard/PublicDashboardView/PublicAutoRefresh/PublicAutoRefresh.tsxdiff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicAutoRefresh/__tests__/PublicAutoRefresh.test.tsx b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicAutoRefresh/__tests__/PublicAutoRefresh.test.tsxsimilarity index 100%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicAutoRefresh/__tests__/PublicAutoRefresh.test.tsxrename to frontend/src/pages/PublicDashboard/PublicDashboardView/PublicAutoRefresh/__tests__/PublicAutoRefresh.test.tsxdiff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicDashboardV2.module.scss b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicDashboardView.module.scsssimilarity index 100%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicDashboardV2.module.scssrename to frontend/src/pages/PublicDashboard/PublicDashboardView/PublicDashboardView.module.scssdiff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicDashboardV2.tsx b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicDashboardView.tsxsimilarity index 94%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicDashboardV2.tsxrename to frontend/src/pages/PublicDashboard/PublicDashboardView/PublicDashboardView.tsxindex fd0ad3a98a..838f7bbb7c 100644--- a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicDashboardV2.tsx+++ b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicDashboardView.tsx@@ -8,7 +8,7 @@ import type {Time,} from 'container/TopNav/DateTimeSelectionV2/types';import GetMinMax from 'lib/getMinMax';-import { layoutsToSections } from 'pages/DashboardPageV2/DashboardContainer/utils';+import { layoutsToSections } from 'pages/DashboardPage/DashboardContainer/utils';import { useMemo, useState } from 'react';import { useInterval } from 'react-use';import { NANO_SECOND_MULTIPLIER } from 'store/globalTime/utils';@@ -18,19 +18,19 @@ import signozBrandLogoUrl from '@/assets/Logos/signoz-brand-logo.svg';import PublicAutoRefresh from './PublicAutoRefresh/PublicAutoRefresh';import PublicSectionGrid from './PublicSectionGrid/PublicSectionGrid';import { getStartTimeAndEndTimeFromTimeRange } from './utils';-import styles from './PublicDashboardV2.module.scss';+import styles from './PublicDashboardView.module.scss';-interface PublicDashboardV2Props {+interface PublicDashboardViewProps {publicDashboardId: string;data: DashboardtypesGettablePublicDashboardDataV2DTO;}// Read-only viewer for a v2 (Perses-spec) public dashboard; reuses the V2 panel renderers.// Variables aren't rendered — the public endpoint doesn't substitute them.-function PublicDashboardV2({+function PublicDashboardView({publicDashboardId,data,-}: PublicDashboardV2Props): JSX.Element {+}: PublicDashboardViewProps): JSX.Element {const { dashboard, publicDashboard } = data;const sections = useMemo(@@ -156,4 +156,4 @@ function PublicDashboardV2({);}-export default PublicDashboardV2;+export default PublicDashboardView;diff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicPanel/PublicPanel.module.scss b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicPanel/PublicPanel.module.scsssimilarity index 100%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicPanel/PublicPanel.module.scssrename to frontend/src/pages/PublicDashboard/PublicDashboardView/PublicPanel/PublicPanel.module.scssdiff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicPanel/PublicPanel.tsx b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicPanel/PublicPanel.tsxsimilarity index 80%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicPanel/PublicPanel.tsxrename to frontend/src/pages/PublicDashboard/PublicDashboardView/PublicPanel/PublicPanel.tsxindex d91778985a..0d42aa9a80 100644--- a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicPanel/PublicPanel.tsx+++ b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicPanel/PublicPanel.tsx@@ -1,10 +1,10 @@import type { DashboardtypesPanelDTO } from 'api/generated/services/sigNoz.schemas';import { DashboardCursorSync } from 'lib/uPlotV2/plugins/TooltipPlugin/types';import { noop } from 'lodash-es';-import PanelBody from 'pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody';-import PanelHeader from 'pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader';-import type { DashboardPreference } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/rendererProps';-import { getPanelDefinition } from 'pages/DashboardPageV2/DashboardContainer/Panels/registry';+import PanelBody from 'pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody';+import PanelHeader from 'pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader';+import type { DashboardPreference } from 'pages/DashboardPage/DashboardContainer/Panels/types/rendererProps';+import { getPanelDefinition } from 'pages/DashboardPage/DashboardContainer/Panels/registry';import { usePublicPanelQuery } from '../hooks/usePublicPanelQuery';import styles from './PublicPanel.module.scss';diff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicPanel/__tests__/PublicPanel.test.tsx b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicPanel/__tests__/PublicPanel.test.tsxsimilarity index 93%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicPanel/__tests__/PublicPanel.test.tsxrename to frontend/src/pages/PublicDashboard/PublicDashboardView/PublicPanel/__tests__/PublicPanel.test.tsxindex e5408701d7..b335c54d56 100644--- a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicPanel/__tests__/PublicPanel.test.tsx+++ b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicPanel/__tests__/PublicPanel.test.tsx@@ -10,7 +10,7 @@ jest.mock('../../hooks/usePublicPanelQuery', () => ({// Stub the reused V2 renderers so the test targets PublicPanel's own wiring, not uPlot/timezone.jest.mock(- 'pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader',+ 'pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelHeader/PanelHeader',() => ({__esModule: true,default: ({ hideActions }: { hideActions?: boolean }): JSX.Element => (@@ -19,7 +19,7 @@ jest.mock(}),);jest.mock(- 'pages/DashboardPageV2/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody',+ 'pages/DashboardPage/DashboardContainer/PanelsAndSectionsLayout/Panel/PanelBody/PanelBody',() => ({__esModule: true,default: ({diff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicSectionGrid/PublicSectionGrid.tsx b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicSectionGrid/PublicSectionGrid.tsxsimilarity index 94%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicSectionGrid/PublicSectionGrid.tsxrename to frontend/src/pages/PublicDashboard/PublicDashboardView/PublicSectionGrid/PublicSectionGrid.tsxindex 4f47c8bf62..b32d1dea7c 100644--- a/frontend/src/pages/PublicDashboard/PublicDashboardV2/PublicSectionGrid/PublicSectionGrid.tsx+++ b/frontend/src/pages/PublicDashboard/PublicDashboardView/PublicSectionGrid/PublicSectionGrid.tsx@@ -1,4 +1,4 @@-import type { GridItem } from 'pages/DashboardPageV2/DashboardContainer/utils';+import type { GridItem } from 'pages/DashboardPage/DashboardContainer/utils';import GridLayout, { type Layout, WidthProvider } from 'react-grid-layout';import PublicPanel from '../PublicPanel/PublicPanel';diff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/__tests__/PublicDashboardV2.test.tsx b/frontend/src/pages/PublicDashboard/PublicDashboardView/__tests__/PublicDashboardView.test.tsxsimilarity index 89%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/__tests__/PublicDashboardV2.test.tsxrename to frontend/src/pages/PublicDashboard/PublicDashboardView/__tests__/PublicDashboardView.test.tsxindex 0b9ffc81ba..3fe9706d71 100644--- a/frontend/src/pages/PublicDashboard/PublicDashboardV2/__tests__/PublicDashboardV2.test.tsx+++ b/frontend/src/pages/PublicDashboard/PublicDashboardView/__tests__/PublicDashboardView.test.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react';import type { DashboardtypesGettablePublicDashboardDataV2DTO } from 'api/generated/services/sigNoz.schemas';-import PublicDashboardV2 from '../PublicDashboardV2';+import PublicDashboardView from '../PublicDashboardView';const mockGrid = jest.fn();@@ -63,12 +63,12 @@ function buildData(} as unknown as DashboardtypesGettablePublicDashboardDataV2DTO;}-describe('PublicDashboardV2', () => {+describe('PublicDashboardView', () => {beforeEach(() => mockGrid.mockReset());it('renders the dashboard title, section title, and a grid per section', () => {render(- <PublicDashboardV2 publicDashboardId="pub-1" data={buildData(true)} />,+ <PublicDashboardView publicDashboardId="pub-1" data={buildData(true)} />,);expect(screen.getByText('My V2 Dashboard')).toBeInTheDocument();@@ -87,13 +87,13 @@ describe('PublicDashboardV2', () => {it('shows the time controls only when the publisher enabled the time range', () => {const { rerender } = render(- <PublicDashboardV2 publicDashboardId="pub-1" data={buildData(true)} />,+ <PublicDashboardView publicDashboardId="pub-1" data={buildData(true)} />,);expect(screen.getByTestId('datetime-selection')).toBeInTheDocument();expect(screen.getByTestId('auto-refresh')).toBeInTheDocument();rerender(- <PublicDashboardV2 publicDashboardId="pub-1" data={buildData(false)} />,+ <PublicDashboardView publicDashboardId="pub-1" data={buildData(false)} />,);expect(screen.queryByTestId('datetime-selection')).not.toBeInTheDocument();expect(screen.queryByTestId('auto-refresh')).not.toBeInTheDocument();diff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/hooks/__tests__/usePublicPanelQuery.test.tsx b/frontend/src/pages/PublicDashboard/PublicDashboardView/hooks/__tests__/usePublicPanelQuery.test.tsxsimilarity index 100%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/hooks/__tests__/usePublicPanelQuery.test.tsxrename to frontend/src/pages/PublicDashboard/PublicDashboardView/hooks/__tests__/usePublicPanelQuery.test.tsxdiff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/hooks/usePublicPanelQuery.ts b/frontend/src/pages/PublicDashboard/PublicDashboardView/hooks/usePublicPanelQuery.tssimilarity index 91%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/hooks/usePublicPanelQuery.tsrename to frontend/src/pages/PublicDashboard/PublicDashboardView/hooks/usePublicPanelQuery.tsindex a3dd9997d3..9488d7283e 100644--- a/frontend/src/pages/PublicDashboard/PublicDashboardV2/hooks/usePublicPanelQuery.ts+++ b/frontend/src/pages/PublicDashboard/PublicDashboardView/hooks/usePublicPanelQuery.ts@@ -5,17 +5,17 @@ import type {} from 'api/generated/services/sigNoz.schemas';import { PANEL_TYPES } from 'constants/queryBuilder';import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';-import { retryUnlessClientError } from 'pages/DashboardPageV2/DashboardContainer/hooks/useGetQueryRangeV5';-import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPageV2/DashboardContainer/Panels/types/panelKind';+import { retryUnlessClientError } from 'pages/DashboardPage/DashboardContainer/hooks/useGetQueryRangeV5';+import { PANEL_KIND_TO_PANEL_TYPE } from 'pages/DashboardPage/DashboardContainer/Panels/types/panelKind';import {buildQueryRangeRequest,extractLegendMap,hasRunnableQueries,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/buildQueryRangeRequest';+} from 'pages/DashboardPage/DashboardContainer/queryV5/buildQueryRangeRequest';import type {PanelQueryData,PanelPagination,-} from 'pages/DashboardPageV2/DashboardContainer/queryV5/types';+} from 'pages/DashboardPage/DashboardContainer/queryV5/types';import { useCallback, useMemo } from 'react';import { useQuery, useQueryClient } from 'react-query';diff --git a/frontend/src/pages/PublicDashboard/PublicDashboardV2/utils.ts b/frontend/src/pages/PublicDashboard/PublicDashboardView/utils.tssimilarity index 100%rename from frontend/src/pages/PublicDashboard/PublicDashboardV2/utils.tsrename to frontend/src/pages/PublicDashboard/PublicDashboardView/utils.tsdiff --git a/frontend/src/pages/PublicDashboard/__tests__/PublicDashboardPage.test.tsx b/frontend/src/pages/PublicDashboard/__tests__/PublicDashboardPage.test.tsxnew file mode 100644index 0000000000..154a8ac0fe--- /dev/null+++ b/frontend/src/pages/PublicDashboard/__tests__/PublicDashboardPage.test.tsx@@ -0,0 +1,96 @@+import { render, screen } from '@testing-library/react';+import {+ PublicDashboardSchema,+ useGetResolvedPublicDashboard,+} from 'hooks/dashboard/useGetResolvedPublicDashboard';++import PublicDashboardPage from '..';++jest.mock('react-router-dom', () => ({+ useParams: (): { dashboardId: string } => ({ dashboardId: 'dash-1' }),+}));++jest.mock('hooks/dashboard/useGetResolvedPublicDashboard', () => ({+ PublicDashboardSchema: { Legacy: 'legacy', V2: 'v2' },+ useGetResolvedPublicDashboard: jest.fn(),+}));++jest.mock('../PublicDashboardView/PublicDashboardView', () => ({+ __esModule: true,+ default: (): JSX.Element => <div data-testid="public-dashboard-view" />,+}));++const mockResolved = useGetResolvedPublicDashboard as jest.Mock;++const resolvedAs = (+ overrides: Record<string, unknown>,+): Record<string, unknown> => ({+ data: undefined,+ isLoading: false,+ isFetching: false,+ isError: false,+ ...overrides,+});++describe('PublicDashboardPage', () => {+ beforeEach(() => {+ mockResolved.mockReset();+ });++ it('renders the V2 dashboard when the schema resolves to v2', () => {+ mockResolved.mockReturnValue(+ resolvedAs({+ data: { schema: PublicDashboardSchema.V2, data: { dashboard: {} } },+ }),+ );++ render(<PublicDashboardPage />);++ expect(screen.getByTestId('public-dashboard-view')).toBeInTheDocument();+ expect(+ screen.queryByTestId('public-dashboard-legacy'),+ ).not.toBeInTheDocument();+ });++ it('renders the legacy notice for an unmigrated dashboard', () => {+ mockResolved.mockReturnValue(+ resolvedAs({ data: { schema: PublicDashboardSchema.Legacy } }),+ );++ render(<PublicDashboardPage />);++ expect(screen.getByTestId('public-dashboard-legacy')).toBeInTheDocument();+ expect(+ screen.getByText(/hasn't been migrated to the new dashboard experience/i),+ ).toBeInTheDocument();+ expect(screen.queryByTestId('public-dashboard-view')).not.toBeInTheDocument();+ });++ it('renders the unavailable state on error', () => {+ mockResolved.mockReturnValue(resolvedAs({ isError: true }));++ render(<PublicDashboardPage />);++ expect(+ screen.getByTestId('public-dashboard-unavailable'),+ ).toBeInTheDocument();+ expect(+ screen.queryByTestId('public-dashboard-legacy'),+ ).not.toBeInTheDocument();+ });++ it('renders nothing while the resolve is still in flight', () => {+ mockResolved.mockReturnValue(+ resolvedAs({ isLoading: true, isFetching: true, isError: true }),+ );++ render(<PublicDashboardPage />);++ expect(+ screen.queryByTestId('public-dashboard-unavailable'),+ ).not.toBeInTheDocument();+ expect(+ screen.queryByTestId('public-dashboard-legacy'),+ ).not.toBeInTheDocument();+ });+});diff --git a/frontend/src/pages/PublicDashboard/index.tsx b/frontend/src/pages/PublicDashboard/index.tsxindex 75b7fddae6..dd677507af 100644--- a/frontend/src/pages/PublicDashboard/index.tsx+++ b/frontend/src/pages/PublicDashboard/index.tsx@@ -1,15 +1,12 @@import { useParams } from 'react-router-dom';-import { Typography } from '@signozhq/ui/typography';import {PublicDashboardSchema,useGetResolvedPublicDashboard,} from 'hooks/dashboard/useGetResolvedPublicDashboard';-import { Frown } from '@signozhq/icons';+import { Frown, TriangleAlert } from '@signozhq/icons';-import signozBrandLogoUrl from '@/assets/Logos/signoz-brand-logo.svg';--import PublicDashboardContainer from '../../container/PublicDashboardContainer';-import PublicDashboardV2 from './PublicDashboardV2/PublicDashboardV2';+import PublicDashboardMessage from './PublicDashboardMessage';+import PublicDashboardView from './PublicDashboardView/PublicDashboardView';import './PublicDashboard.styles.scss';@@ -29,52 +26,25 @@ function PublicDashboardPage(): JSX.Element {return (<div className="public-dashboard-page">{resolved?.schema === PublicDashboardSchema.V2 && (- <PublicDashboardV2 publicDashboardId={dashboardId} data={resolved.data} />+ <PublicDashboardView publicDashboardId={dashboardId} data={resolved.data} />)}- {resolved?.schema === PublicDashboardSchema.V1 && (- <PublicDashboardContainer- publicDashboardId={dashboardId}- publicDashboardData={{ httpStatusCode: 200, data: resolved.data }}+ {resolved?.schema === PublicDashboardSchema.Legacy && (+ <PublicDashboardMessage+ testId="public-dashboard-legacy"+ icon={<TriangleAlert size={36} />}+ title="This dashboard isn't available in the new experience"+ description="It hasn't been migrated to the new dashboard experience yet, so it can't be shown here. Reach out to the owner of the dashboard — they can migrate it and re-share the link."/>)}{isError && !isBusy && (- <div className="public-dashboard-error-container">- <div className="perilin-bg" />-- <div className="public-dashboard-error-content-header">- <div className="brand">- <img src={signozBrandLogoUrl} alt="SigNoz" className="brand-logo" />-- <Typography.Title level={2} className="brand-title">- SigNoz- </Typography.Title>- </div>-- <div className="brand-tagline">- <Typography.Text>- OpenTelemetry-Native Logs, Metrics and Traces in a single pane- </Typography.Text>- </div>- </div>-- <div className="public-dashboard-error-content">- <Typography.Title- level={4}- className="public-dashboard-error-message-icon"- >- <Frown size={36} />- </Typography.Title>- <Typography.Title level={4} className="public-dashboard-error-message">- The public dashboard you are looking for does not exist or has been- unpublished.- </Typography.Title>- <Typography.Text className="public-dashboard-error-message-description">- Please reach out to the owner of the dashboard to get access.- </Typography.Text>- </div>- </div>+ <PublicDashboardMessage+ testId="public-dashboard-unavailable"+ icon={<Frown size={36} />}+ title="The public dashboard you are looking for does not exist or has been unpublished."+ description="Please reach out to the owner of the dashboard to get access."+ />)}</div>);diff --git a/frontend/src/pages/TracesFunnelDetails/TracesFunnelDetails.tsx b/frontend/src/pages/TracesFunnelDetails/TracesFunnelDetails.tsxindex fa8b9fa714..a58e60285d 100644--- a/frontend/src/pages/TracesFunnelDetails/TracesFunnelDetails.tsx+++ b/frontend/src/pages/TracesFunnelDetails/TracesFunnelDetails.tsx@@ -1,7 +1,7 @@import { useParams } from 'react-router-dom';import { Typography } from '@signozhq/ui/typography';import Spinner from 'components/Spinner';-import { NotFoundContainer } from 'container/GridCardLayout/GridCard/FullView/styles';+import { NotFoundContainer } from 'container/WidgetCard/Card/FullView/styles';import { useFunnelDetails } from 'hooks/TracesFunnels/useFunnels';import { FunnelProvider } from 'pages/TracesFunnels/FunnelContext';diff --git a/frontend/src/periscope/components/ContextMenu/types.ts b/frontend/src/periscope/components/ContextMenu/types.tsindex e8458c9dbd..ad82daa0d1 100644--- a/frontend/src/periscope/components/ContextMenu/types.ts+++ b/frontend/src/periscope/components/ContextMenu/types.ts@@ -1,4 +1,4 @@-import { CustomDataColumnType } from 'container/GridTableComponent/utils';+import { CustomDataColumnType } from 'container/WidgetCard/Panels/TablePanel/utils';import { RowData } from 'lib/query/createTableColumnsFromQuery';export interface ClickedData {diff --git a/frontend/src/providers/Dashboard/__tests__/initializeDefaultVariables.test.ts b/frontend/src/providers/Dashboard/__tests__/initializeDefaultVariables.test.tsdeleted file mode 100644index c4402bcea4..0000000000--- a/frontend/src/providers/Dashboard/__tests__/initializeDefaultVariables.test.ts+++ /dev/null@@ -1,369 +0,0 @@-import { ALL_SELECTED_VALUE } from 'components/NewSelect/utils';-import { IDashboardVariable } from 'types/api/dashboard/getAll';--import { initializeDefaultVariables } from '../initializeDefaultVariables';--describe('initializeDefaultVariables', () => {- let mockGetUrlVariables: jest.Mock;- let mockUpdateUrlVariable: jest.Mock;-- beforeEach(() => {- mockGetUrlVariables = jest.fn();- mockUpdateUrlVariable = jest.fn();- });-- afterEach(() => {- jest.clearAllMocks();- });-- const createMockVariable = (- overrides: Partial<IDashboardVariable> = {},- ): IDashboardVariable => ({- id: 'test-id',- name: 'test-var',- description: '',- type: 'QUERY',- sort: 'DISABLED',- showALLOption: false,- multiSelect: false,- order: 0,- allSelected: false,- customValue: '',- textboxValue: '',- selectedValue: 'default',- defaultValue: 'default',- ...overrides,- });-- describe('Variable initialization', () => {- it('should initialize variables when not present in URL and verify URL state', () => {- const variables = {- environment: createMockVariable({- id: 'env-id',- name: 'environment',- selectedValue: 'production',- allSelected: false,- showALLOption: false,- }),- };-- mockGetUrlVariables.mockReturnValue({});-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- // Verify the correct URL update was called- expect(mockUpdateUrlVariable).toHaveBeenCalledWith(- 'environment',- 'production',- );- expect(mockUpdateUrlVariable).toHaveBeenCalledTimes(1);-- // Verify the correct parameters were passed- const callArgs = mockUpdateUrlVariable.mock.calls[0];- expect(callArgs[0]).toBe('environment'); // Variable name as key- expect(callArgs[1]).toBe('production'); // selectedValue as value- });-- it('should not initialize variables when already present in URL by name', () => {- const variables = {- environment: createMockVariable({- id: 'env-id',- name: 'environment',- selectedValue: 'production',- }),- };-- mockGetUrlVariables.mockReturnValue({- environment: 'development',- });-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- expect(mockUpdateUrlVariable).not.toHaveBeenCalled();- });-- it('should not initialize variables when already present in URL by ID', () => {- const variables = {- environment: createMockVariable({- id: 'env-id',- name: 'environment',- selectedValue: 'production',- }),- };-- mockGetUrlVariables.mockReturnValue({- 'env-id': 'development',- });-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- expect(mockUpdateUrlVariable).not.toHaveBeenCalled();- });-- it('should handle variables with showALLOption when allSelected is true', () => {- const variables = {- services: createMockVariable({- id: 'svc-id',- name: 'services',- multiSelect: true,- selectedValue: ['api', 'web'],- allSelected: true,- showALLOption: true,- }),- };-- mockGetUrlVariables.mockReturnValue({});-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- expect(mockUpdateUrlVariable).toHaveBeenCalledWith(- 'services',- ALL_SELECTED_VALUE,- );- });-- it('should use selectedValue when allSelected is false', () => {- const variables = {- services: createMockVariable({- id: 'svc-id',- name: 'services',- multiSelect: true,- selectedValue: ['api', 'web'],- allSelected: false,- showALLOption: true,- }),- };-- mockGetUrlVariables.mockReturnValue({});-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- expect(mockUpdateUrlVariable).toHaveBeenCalledWith('services', [- 'api',- 'web',- ]);- });- });-- describe('CUSTOM variable type', () => {- it('should use parsed customValue for CUSTOM type variables', () => {- const variables = {- customVar: createMockVariable({- id: 'custom-id',- name: 'customVar',- type: 'CUSTOM',- customValue: 'value1,value2,value3',- selectedValue: 'ignored',- }),- };-- mockGetUrlVariables.mockReturnValue({});-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- expect(mockUpdateUrlVariable).toHaveBeenCalledWith('customVar', [- 'value1',- 'value2',- 'value3',- ]);- });-- it('should handle empty customValue for CUSTOM type variables', () => {- const variables = {- customVar: createMockVariable({- id: 'custom-id',- name: 'customVar',- type: 'CUSTOM',- customValue: '',- selectedValue: 'fallback',- }),- };-- mockGetUrlVariables.mockReturnValue({});-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- expect(mockUpdateUrlVariable).toHaveBeenCalledWith('customVar', []);- });- });-- describe('Fallback to defaultValue', () => {- it('should use defaultValue when selectedValue is not available', () => {- const variables = {- environment: createMockVariable({- id: 'env-id',- name: 'environment',- selectedValue: undefined,- defaultValue: 'staging',- }),- };-- mockGetUrlVariables.mockReturnValue({});-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- expect(mockUpdateUrlVariable).toHaveBeenCalledWith('environment', 'staging');- });-- it('should prefer selectedValue over defaultValue when available', () => {- const variables = {- environment: createMockVariable({- id: 'env-id',- name: 'environment',- selectedValue: 'production',- defaultValue: 'staging',- }),- };-- mockGetUrlVariables.mockReturnValue({});-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- expect(mockUpdateUrlVariable).toHaveBeenCalledWith(- 'environment',- 'production',- );- });- });-- describe('Edge cases', () => {- it('should handle undefined variables gracefully', () => {- expect(() => {- initializeDefaultVariables(- undefined as any,- mockGetUrlVariables,- mockUpdateUrlVariable,- );- }).not.toThrow();-- expect(mockUpdateUrlVariable).not.toHaveBeenCalled();- });-- it('should prefer name over id for URL variable key', () => {- const variables = {- environment: createMockVariable({- id: 'env-id',- name: 'environment',- selectedValue: 'production',- }),- };-- mockGetUrlVariables.mockReturnValue({});-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- // Should use name as the key- expect(mockUpdateUrlVariable).toHaveBeenCalledWith(- 'environment',- 'production',- );- });-- it('should use id as fallback when name is not available', () => {- const variables = {- environment: createMockVariable({- id: 'env-id',- name: undefined as any,- selectedValue: 'production',- }),- };-- mockGetUrlVariables.mockReturnValue({});-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- // Should use id as the key when name is not available- expect(mockUpdateUrlVariable).toHaveBeenCalledWith('env-id', 'production');- });- });-- describe('Multiple variables handling', () => {- it('should initialize multiple variables correctly', () => {- const variables = {- environment: createMockVariable({- id: 'env-id',- name: 'environment',- selectedValue: 'production',- }),- services: createMockVariable({- id: 'svc-id',- name: 'services',- multiSelect: true,- selectedValue: ['api', 'web'],- }),- region: createMockVariable({- id: 'region-id',- name: 'region',- selectedValue: 'us-east-1',- }),- };-- mockGetUrlVariables.mockReturnValue({- environment: 'development', // This one exists in URL- // services and region don't exist in URL- });-- initializeDefaultVariables(- variables,- mockGetUrlVariables,- mockUpdateUrlVariable,- );-- // Should only initialize variables not in URL- expect(mockUpdateUrlVariable).toHaveBeenCalledTimes(2);- expect(mockUpdateUrlVariable).toHaveBeenCalledWith('services', [- 'api',- 'web',- ]);- expect(mockUpdateUrlVariable).toHaveBeenCalledWith('region', 'us-east-1');- expect(mockUpdateUrlVariable).not.toHaveBeenCalledWith(- 'environment',- expect.anything(),- );- });- });-});diff --git a/frontend/src/providers/Dashboard/__tests__/normalizeUrlValue.test.ts b/frontend/src/providers/Dashboard/__tests__/normalizeUrlValue.test.tsdeleted file mode 100644index b317e70a3b..0000000000--- a/frontend/src/providers/Dashboard/__tests__/normalizeUrlValue.test.ts+++ /dev/null@@ -1,142 +0,0 @@-import { IDashboardVariable } from 'types/api/dashboard/getAll';--import { normalizeUrlValueForVariable } from '../normalizeUrlValue';--// Mock variable configurations-const singleSelectVariable: Partial<IDashboardVariable> = {- id: 'env',- name: 'environment',- multiSelect: false,-};--const multiSelectVariable: Partial<IDashboardVariable> = {- id: 'services',- name: 'service_names',- multiSelect: true,-};--describe('normalizeUrlValueForVariable', () => {- describe('Single select variable', () => {- it('should keep single string value as is', () => {- const result = normalizeUrlValueForVariable(- 'production',- singleSelectVariable as IDashboardVariable,- );- expect(result).toBe('production');- });-- it('should keep single number value as is', () => {- const result = normalizeUrlValueForVariable(- 123,- singleSelectVariable as IDashboardVariable,- );- expect(result).toBe(123);- });-- it('should take first element from array', () => {- const result = normalizeUrlValueForVariable(- ['production', 'staging'],- singleSelectVariable as IDashboardVariable,- );- expect(result).toBe('production');- });-- it('should return null for empty array', () => {- const result = normalizeUrlValueForVariable(- [],- singleSelectVariable as IDashboardVariable,- );- expect(result).toBeNull();- });-- it('should handle null/undefined values', () => {- expect(- normalizeUrlValueForVariable(- null,- singleSelectVariable as IDashboardVariable,- ),- ).toBeNull();- expect(- normalizeUrlValueForVariable(- undefined,- singleSelectVariable as IDashboardVariable,- ),- ).toBeUndefined();- });- });-- describe('Multi select variable', () => {- it('should convert string to array', () => {- const result = normalizeUrlValueForVariable(- 'production',- multiSelectVariable as IDashboardVariable,- );- expect(result).toStrictEqual(['production']);- });-- it('should convert number to array', () => {- const result = normalizeUrlValueForVariable(- 123,- multiSelectVariable as IDashboardVariable,- );- expect(result).toStrictEqual([123]);- });-- it('should keep array as is', () => {- const result = normalizeUrlValueForVariable(- ['production', 'staging'],- multiSelectVariable as IDashboardVariable,- );- expect(result).toStrictEqual(['production', 'staging']);- });-- it('should keep empty array as is', () => {- const result = normalizeUrlValueForVariable(- [],- multiSelectVariable as IDashboardVariable,- );- expect(result).toStrictEqual([]);- });-- it('should handle null/undefined values', () => {- expect(- normalizeUrlValueForVariable(- null,- multiSelectVariable as IDashboardVariable,- ),- ).toBeNull();- expect(- normalizeUrlValueForVariable(- undefined,- multiSelectVariable as IDashboardVariable,- ),- ).toBeUndefined();- });- });-- describe('Real world scenarios', () => {- it('URL has array ["test", "prod"] for single select variable -> should take "test"', () => {- const result = normalizeUrlValueForVariable(- ['test', 'prod'],- singleSelectVariable as IDashboardVariable,- );- expect(result).toBe('test');- });-- it('URL has string "test" for multi select variable -> should convert to ["test"]', () => {- const result = normalizeUrlValueForVariable(- 'test',- multiSelectVariable as IDashboardVariable,- );- expect(result).toStrictEqual(['test']);- });-- it('Handles mixed types in array for single select', () => {- const result = normalizeUrlValueForVariable(- ['test', 123, true],- singleSelectVariable as IDashboardVariable,- );- expect(result).toBe('test');- });- });-});diff --git a/frontend/src/providers/Dashboard/helpers/selectedRowWidgetIdHelper.ts b/frontend/src/providers/Dashboard/helpers/selectedRowWidgetIdHelper.tsdeleted file mode 100644index 8b5e15abba..0000000000--- a/frontend/src/providers/Dashboard/helpers/selectedRowWidgetIdHelper.ts+++ /dev/null@@ -1,37 +0,0 @@-import getSessionStorageApi from 'api/browser/sessionstorage/get';-import removeSessionStorageApi from 'api/browser/sessionstorage/remove';-import setSessionStorageApi from 'api/browser/sessionstorage/set';-import { getScopedKey } from 'utils/storage';--const PREFIX = 'dashboard_row_widget_';--function getKey(dashboardId: string): string {- return `${PREFIX}${dashboardId}`;-}--export function setSelectedRowWidgetId(- dashboardId: string,- widgetId: string,-): void {- const unscopedKey = getKey(dashboardId);- const scopedPrefix = getScopedKey(PREFIX);- const scopedKey = getScopedKey(unscopedKey);-- // Object.keys returns the raw/already-scoped keys from the browser.- // Direct sessionStorage.removeItem is intentional here — k is already fully scoped.- // oxlint-disable-next-line no-restricted-globals- Object.keys(sessionStorage)- .filter((k) => k.startsWith(scopedPrefix) && k !== scopedKey)- // oxlint-disable-next-line no-restricted-globals- .forEach((k) => sessionStorage.removeItem(k));-- setSessionStorageApi(unscopedKey, widgetId);-}--export function getSelectedRowWidgetId(dashboardId: string): string | null {- return getSessionStorageApi(getKey(dashboardId));-}--export function clearSelectedRowWidgetId(dashboardId: string): void {- removeSessionStorageApi(getKey(dashboardId));-}diff --git a/frontend/src/providers/Dashboard/initializeDefaultVariables.ts b/frontend/src/providers/Dashboard/initializeDefaultVariables.tsdeleted file mode 100644index 197cfb739c..0000000000--- a/frontend/src/providers/Dashboard/initializeDefaultVariables.ts+++ /dev/null@@ -1,50 +0,0 @@-import { ALL_SELECTED_VALUE } from 'components/NewSelect/utils';-import { IDashboardVariable } from 'types/api/dashboard/getAll';--import { commaValuesParser } from '../../lib/dashboardVariables/customCommaValuesParser';--interface UrlVariables {- [key: string]: any;-}--/**- * Initializes default values for dashboard variables if not already in URL- * Handles cases where variables might be keyed by either id or name- *- * @param variables Dashboard variables object- * @param getUrlVariables Function to get variables from URL- * @param updateUrlVariable Function to update URL with variable values- */-export const initializeDefaultVariables = (- variables: Record<string, IDashboardVariable>,- getUrlVariables: () => UrlVariables | undefined,- updateUrlVariable: (- name: string,- selectedValue: IDashboardVariable['selectedValue'],- ) => void,-): void => {- if (!variables) {- return;- }-- Object.values(variables).forEach((variable) => {- const { id, name, allSelected, showALLOption } = variable;- const urlVariables = getUrlVariables();-- // Check if either id or name is available in URL variables- const existsInUrl =- (id && urlVariables?.[id]) || (name && urlVariables?.[name]);-- const value =- variable.type === 'CUSTOM'- ? commaValuesParser(variable?.customValue || '')- : (variable?.selectedValue ?? variable?.defaultValue);-- if (!existsInUrl) {- updateUrlVariable(- name || id,- allSelected && showALLOption ? ALL_SELECTED_VALUE : value,- );- }- });-};diff --git a/frontend/src/providers/Dashboard/normalizeUrlValue.ts b/frontend/src/providers/Dashboard/normalizeUrlValue.tsdeleted file mode 100644index 21b0d46204..0000000000--- a/frontend/src/providers/Dashboard/normalizeUrlValue.ts+++ /dev/null@@ -1,46 +0,0 @@-import { IDashboardVariable } from 'types/api/dashboard/getAll';--// Type representing a single URL variable value (from LocalStoreDashboardVariables)-type UrlVariableValue =- | IDashboardVariable['selectedValue'][]- | IDashboardVariable['selectedValue'];--/**- * Normalizes URL values to match the variable's multiSelect configuration- *- * Rules:- * - If variable is single-select and URL value is array: take first element- * - If variable is multi-select and URL value is string/number: convert to array- * - If variable is multi-select and URL value is array: keep as array- * - If variable is single-select and URL value is string/number: keep as is- *- * @param urlValue The raw value from URL- * @param variable The variable configuration- * @returns Normalized value that matches the variable's multiSelect setting- */-export const normalizeUrlValueForVariable = (- urlValue: UrlVariableValue,- variable: IDashboardVariable,-): IDashboardVariable['selectedValue'] => {- if (urlValue === undefined || urlValue === null) {- return urlValue;- }-- const isMultiSelect = variable.multiSelect;- const isUrlValueArray = Array.isArray(urlValue);-- if (isMultiSelect) {- // Variable expects array, ensure we return array- if (isUrlValueArray) {- return urlValue as IDashboardVariable['selectedValue'];- }- return [urlValue] as IDashboardVariable['selectedValue']; // Convert single value to array- }- // Variable expects single value- if (isUrlValueArray) {- // URL has array but variable is single-select, take first element- const arrayValue = urlValue;- return arrayValue.length > 0 ? arrayValue[0] : null;- }- return urlValue as IDashboardVariable['selectedValue']; // Already single value, keep as is-};diff --git a/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStore.test.ts b/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStore.test.tsindex 9ab900638b..48ba70d9dd 100644--- a/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStore.test.ts+++ b/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStore.test.ts@@ -1,4 +1,4 @@-import { IDashboardVariable } from 'types/api/dashboard/getAll';+import { IDashboardVariable } from 'types/api/dashboard/variables';import {dashboardVariablesStore,diff --git a/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStoreUtils.test.ts b/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStoreUtils.test.tsindex 7286ce5e3e..b203fc325b 100644--- a/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStoreUtils.test.ts+++ b/frontend/src/providers/Dashboard/store/dashboardVariables/__tests__/dashboardVariablesStoreUtils.test.ts@@ -1,4 +1,4 @@-import { IDashboardVariable } from 'types/api/dashboard/getAll';+import { IDashboardVariable } from 'types/api/dashboard/variables';import { IDashboardVariables } from '../dashboardVariablesStoreTypes';import {diff --git a/frontend/src/providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreTypes.ts b/frontend/src/providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreTypes.tsindex b0f493dd66..f859c5ab0b 100644--- a/frontend/src/providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreTypes.ts+++ b/frontend/src/providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreTypes.ts@@ -1,7 +1,7 @@import {IDashboardVariable,TVariableQueryType,-} from 'types/api/dashboard/getAll';+} from 'types/api/dashboard/variables';export type VariableGraph = Record<string, string[]>;diff --git a/frontend/src/providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreUtils.ts b/frontend/src/providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreUtils.tsindex 969263f5a1..7833c6b7b8 100644--- a/frontend/src/providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreUtils.ts+++ b/frontend/src/providers/Dashboard/store/dashboardVariables/dashboardVariablesStoreUtils.ts@@ -5,7 +5,7 @@ import {import {IDashboardVariable,TVariableQueryType,-} from 'types/api/dashboard/getAll';+} from 'types/api/dashboard/variables';import {IDashboardVariables,@@ -25,7 +25,10 @@ export function buildSortedVariablesArray(sortedVariablesArray.push({ ...value });});- sortedVariablesArray.sort((a, b) => a.order - b.order);+ // `order` is optional because nothing sets it any more: the v2 API orders+ // variables by array position, so the sort is a stable no-op that preserves it.+ // Drop the sort along with `order` when IDashboardVariable goes.+ sortedVariablesArray.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));return sortedVariablesArray;}diff --git a/frontend/src/providers/Dashboard/store/slices/dashboardLayoutSlice.ts b/frontend/src/providers/Dashboard/store/slices/dashboardLayoutSlice.tsdeleted file mode 100644index ea7338cbea..0000000000--- a/frontend/src/providers/Dashboard/store/slices/dashboardLayoutSlice.ts+++ /dev/null@@ -1,51 +0,0 @@-import type { Layout } from 'react-grid-layout';-import type { StateCreator } from 'zustand';--import type { DashboardStore } from '../useDashboardStore';--export interface DashboardLayoutSlice {- //- layouts: Layout[];- setLayouts: (updater: Layout[] | ((prev: Layout[]) => Layout[])) => void;- //- panelMap: Record<string, { widgets: Layout[]; collapsed: boolean }>;- setPanelMap: (- updater:- | Record<string, { widgets: Layout[]; collapsed: boolean }>- | ((- prev: Record<string, { widgets: Layout[]; collapsed: boolean }>,- ) => Record<string, { widgets: Layout[]; collapsed: boolean }>),- ) => void;- // resetDashboardLayout: () => void;-}--export const initialDashboardLayoutState = {- layouts: [] as Layout[],- panelMap: {} as Record<string, { widgets: Layout[]; collapsed: boolean }>,-};--export const createDashboardLayoutSlice: StateCreator<- DashboardStore,- [['zustand/immer', never]],- [],- DashboardLayoutSlice-> = (set) => ({- ...initialDashboardLayoutState,-- setLayouts: (updater): void =>- set((state) => {- state.layouts =- typeof updater === 'function' ? updater(state.layouts) : updater;- }),-- setPanelMap: (updater): void =>- set((state) => {- state.panelMap =- typeof updater === 'function' ? updater(state.panelMap) : updater;- }),-- // resetDashboardLayout: () =>- // set((state) => {- // Object.assign(state, initialDashboardLayoutState);- // }),-});diff --git a/frontend/src/providers/Dashboard/store/slices/dashboardUISlice.ts b/frontend/src/providers/Dashboard/store/slices/dashboardUISlice.tsdeleted file mode 100644index 14209ad6c6..0000000000--- a/frontend/src/providers/Dashboard/store/slices/dashboardUISlice.ts+++ /dev/null@@ -1,57 +0,0 @@-import type { Dashboard } from 'types/api/dashboard/getAll';-import type { StateCreator } from 'zustand';--import type { DashboardStore } from '../useDashboardStore';--export type WidgetColumnWidths = {- [widgetId: string]: Record<string, number>;-};--export interface DashboardUISlice {- //- dashboardData: Dashboard | undefined;- setDashboardData: (- updater:- | Dashboard- | undefined- | ((prev: Dashboard | undefined) => Dashboard | undefined),- ) => void;- //- columnWidths: WidgetColumnWidths;- setColumnWidths: (- updater:- | WidgetColumnWidths- | ((prev: WidgetColumnWidths) => WidgetColumnWidths),- ) => void;-}--export const initialDashboardUIState = {- dashboardData: undefined as Dashboard | undefined,- columnWidths: {} as WidgetColumnWidths,-};--export const createDashboardUISlice: StateCreator<- DashboardStore,- [['zustand/immer', never]],- [],- DashboardUISlice-> = (set) => ({- ...initialDashboardUIState,-- setDashboardData: (updater): void =>- set((state: DashboardUISlice): void => {- state.dashboardData =- typeof updater === 'function' ? updater(state.dashboardData) : updater;- }),-- setColumnWidths: (updater): void =>- set((state: DashboardUISlice): void => {- state.columnWidths =- typeof updater === 'function' ? updater(state.columnWidths) : updater;- }),-- resetDashboardUI: (): void =>- set((state: DashboardUISlice): void => {- Object.assign(state, initialDashboardUIState);- }),-});diff --git a/frontend/src/providers/Dashboard/store/useDashboardStore.ts b/frontend/src/providers/Dashboard/store/useDashboardStore.tsdeleted file mode 100644index 7ff325dfa2..0000000000--- a/frontend/src/providers/Dashboard/store/useDashboardStore.ts+++ /dev/null@@ -1,50 +0,0 @@-import type { Layout } from 'react-grid-layout';-import type { Dashboard } from 'types/api/dashboard/getAll';-import { create } from 'zustand';-import { immer } from 'zustand/middleware/immer';--import {- createDashboardLayoutSlice,- DashboardLayoutSlice,- initialDashboardLayoutState,-} from './slices/dashboardLayoutSlice';-import {- createDashboardUISlice,- DashboardUISlice,- initialDashboardUIState,-} from './slices/dashboardUISlice';--export type DashboardStore = DashboardUISlice &- DashboardLayoutSlice & {- resetDashboardStore: () => void;- };--/**- * 'select*' is a redux naming convention that can be carried over to zustand.- * It is used to select a piece of state from the store.- * In this case, we are selecting the locked state of the selected dashboard.- * */-export const selectIsDashboardLocked = (s: DashboardStore): boolean =>- s.dashboardData?.locked ?? false;--export const useDashboardStore = create<DashboardStore>()(- immer((set, get, api) => ({- ...createDashboardUISlice(set, get, api),- ...createDashboardLayoutSlice(set, get, api),-- resetDashboardStore: (): void =>- set((state: DashboardStore) => {- Object.assign(state, initialDashboardUIState, initialDashboardLayoutState);- }),- })),-);--// Standalone imperative accessors — use these instead of calling useDashboardStore.getState() at call sites.-export const getDashboardData = (): Dashboard | undefined =>- useDashboardStore.getState().dashboardData;--export const getDashboardLayouts = (): Layout[] =>- useDashboardStore.getState().layouts;--export const resetDashboard = (): void =>- useDashboardStore.getState().resetDashboardStore();diff --git a/frontend/src/providers/Dashboard/store/variableFetchStoreUtils.ts b/frontend/src/providers/Dashboard/store/variableFetchStoreUtils.tsindex ec6faaa692..e4f52000fc 100644--- a/frontend/src/providers/Dashboard/store/variableFetchStoreUtils.ts+++ b/frontend/src/providers/Dashboard/store/variableFetchStoreUtils.ts@@ -1,4 +1,4 @@-import { TVariableQueryType } from 'types/api/dashboard/getAll';+import { TVariableQueryType } from 'types/api/dashboard/variables';import {IVariableFetchStoreState,diff --git a/frontend/src/providers/Dashboard/util.ts b/frontend/src/providers/Dashboard/util.tsdeleted file mode 100644index 3b39a84bb5..0000000000--- a/frontend/src/providers/Dashboard/util.ts+++ /dev/null@@ -1,34 +0,0 @@-import { Layout } from 'react-grid-layout';-import { Dashboard, Widgets } from 'types/api/dashboard/getAll';--export const getPreviousWidgets = (- dashboardData: Dashboard,- selectedWidgetIndex: number,-): Widgets[] =>- (dashboardData.data.widgets?.slice(- 0,- selectedWidgetIndex || 0,- ) as Widgets[]) || [];--export const getNextWidgets = (- dashboardData: Dashboard,- selectedWidgetIndex: number,-): Widgets[] =>- (dashboardData.data.widgets?.slice(- (selectedWidgetIndex || 0) + 1, // this is never undefined- dashboardData.data.widgets?.length,- ) as Widgets[]) || [];--export const getSelectedWidgetIndex = (- dashboardData: Dashboard,- widgetId: string | null,-): number =>- dashboardData.data.widgets?.findIndex((e) => e.id === widgetId) || 0;--export const sortLayout = (layout: Layout[]): Layout[] =>- [...layout].sort((a, b) => {- if (a.y === b.y) {- return a.x - b.x;- }- return a.y - b.y;- });diff --git a/frontend/src/providers/QueryBuilder.tsx b/frontend/src/providers/QueryBuilder.tsxindex fbadfdaa2c..ddaad6f740 100644--- a/frontend/src/providers/QueryBuilder.tsx+++ b/frontend/src/providers/QueryBuilder.tsx@@ -32,7 +32,7 @@ import ROUTES from 'constants/routes';import {panelTypeDataSourceFormValuesMap,PartialPanelTypes,-} from 'container/NewWidget/utils';+} from 'lib/query/panelQuery';import { OptionsQuery } from 'container/OptionsMenu/types';import { useGetCompositeQueryParam } from 'hooks/queryBuilder/useGetCompositeQueryParam';import { updateStepInterval } from 'hooks/queryBuilder/useStepInterval';diff --git a/frontend/src/types/api/dashboard/get.ts b/frontend/src/types/api/dashboard/get.tsdeleted file mode 100644index 37a7381021..0000000000--- a/frontend/src/types/api/dashboard/get.ts+++ /dev/null@@ -1,10 +0,0 @@-import { Dashboard } from './getAll';--export type Props = {- id: Dashboard['id'];-};--export interface PayloadProps {- data: Dashboard;- status: string;-}diff --git a/frontend/src/types/api/dashboard/getAll.ts b/frontend/src/types/api/dashboard/getAll.tsdeleted file mode 100644index 7127554092..0000000000--- a/frontend/src/types/api/dashboard/getAll.ts+++ /dev/null@@ -1,173 +0,0 @@-import { ReactNode } from 'react';-import { Layout } from 'react-grid-layout';-import { PrecisionOption } from 'components/Graph/types';-import { PANEL_GROUP_TYPES, PANEL_TYPES } from 'constants/queryBuilder';-import { ThresholdProps } from 'container/NewWidget/RightContainer/Threshold/types';-import { timePreferenceType } from 'container/NewWidget/RightContainer/timeItems';-import { QueryTableProps } from 'container/QueryTable/QueryTable.intefaces';-import {- FillMode,- LineInterpolation,- LineStyle,-} from 'lib/uPlotV2/config/types';-import { Query } from 'types/api/queryBuilder/queryBuilderData';--import { IField } from '../logs/fields';-import { TelemetryFieldKey } from '../v5/queryRange';--export const VariableQueryTypeArr = [- 'QUERY',- 'TEXTBOX',- 'CUSTOM',- 'DYNAMIC',-] as const;-export type TVariableQueryType = (typeof VariableQueryTypeArr)[number];--export const VariableSortTypeArr = ['DISABLED', 'ASC', 'DESC'] as const;-export type TSortVariableValuesType = (typeof VariableSortTypeArr)[number];--export enum LegendPosition {- BOTTOM = 'bottom',- RIGHT = 'right',-}--export interface IDashboardVariable {- id: string;- order?: any;- name?: string; // key will be the source of truth- description: string;- type: TVariableQueryType;- // Query- queryValue?: string;- // Custom- customValue?: string;- // Textbox- // special case of variable where defaultValue is same as this. Otherwise, defaultValue is a single field- textboxValue?: string;-- sort: TSortVariableValuesType;- multiSelect: boolean;- showALLOption: boolean;- selectedValue?:- | null- | string- | number- | boolean- | (string | number | boolean)[];- // Internal use- modificationUUID?: string;- allSelected?: boolean;- change?: boolean;- defaultValue?: string;- dynamicVariablesAttribute?: string;- dynamicVariablesSource?: string;- haveCustomValuesSelected?: boolean;-}-export interface Dashboard {- id: string;- createdAt: string;- updatedAt: string;- createdBy: string;- updatedBy: string;- data: DashboardData;- locked?: boolean;-}--export interface PayloadProps {- data: Dashboard[];- status: string;-}--export interface DashboardTemplate {- name: string;- icon: React.ReactElement;- id: string;- description: string;- previewImage: string;-}--export interface DashboardData {- // uuid?: string;- description?: string;- tags?: string[];- name?: string;- widgets?: Array<WidgetRow | Widgets>;- title: string;- layout?: Layout[];- panelMap?: Record<string, { widgets: Layout[]; collapsed: boolean }>;- variables?: Record<string, IDashboardVariable>;- version?: string;- image?: string;-}--export interface WidgetRow {- id: string;- panelTypes: PANEL_GROUP_TYPES;- title: ReactNode;- description: string;-}--export interface ColumnUnit {- [key: string]: string;-}-export interface IBaseWidget {- id: string;- panelTypes: PANEL_TYPES;- title: ReactNode;- description: string;- opacity: string;- nullZeroValues: string;- timePreferance: timePreferenceType;- stepSize?: number;- yAxisUnit?: string;- decimalPrecision?: PrecisionOption; // number of decimals or 'full precision'- stackedBarChart?: boolean;- bucketCount?: number;- bucketWidth?: number;- mergeAllActiveQueries?: boolean;- thresholds?: ThresholdProps[];- softMin: number | null;- softMax: number | null;- fillSpans?: boolean;- columnUnits?: ColumnUnit;- selectedLogFields: IField[] | null;- selectedTracesFields: TelemetryFieldKey[] | null;- isLogScale?: boolean;- columnWidths?: Record<string, number>;- legendPosition?: LegendPosition;- customLegendColors?: Record<string, string>;- contextLinks?: ContextLinksData;- lineInterpolation?: LineInterpolation;- showPoints?: boolean;- lineStyle?: LineStyle;- fillMode?: FillMode;- spanGaps?: boolean | number;-}-export interface Widgets extends IBaseWidget {- query: Query;- renderColumnCell?: QueryTableProps['renderColumnCell'];- customColTitles?: Record<string, string>;- hiddenColumns?: string[];-}--export interface PromQLWidgets extends IBaseWidget {- query: { query: string; legend: string }[];-}--export interface IQueryBuilderTagFilterItems {- id: string;- key: string;- op: string;- value: string[];-}--export interface ContextLinkProps {- id: string;- url: string;- label: string;- // openInNewTab: boolean;-}--export interface ContextLinksData {- linksData: ContextLinkProps[];-}diff --git a/frontend/src/types/api/dashboard/public/get.ts b/frontend/src/types/api/dashboard/public/get.tsdeleted file mode 100644index 182370e489..0000000000--- a/frontend/src/types/api/dashboard/public/get.ts+++ /dev/null@@ -1,16 +0,0 @@-import { Dashboard } from "../getAll";-import { PublicDashboardMetaProps } from "./getMeta";--export interface PublicDashboardDataProps {- dashboard: Dashboard;- publicDashboard: PublicDashboardMetaProps;-}--export type GetPublicDashboardDataProps = {- id: string;-};--export interface PayloadProps {- data: PublicDashboardDataProps;- status: string;-}diff --git a/frontend/src/types/api/dashboard/public/getMeta.ts b/frontend/src/types/api/dashboard/public/getMeta.tsdeleted file mode 100644index aa6b12a9ed..0000000000--- a/frontend/src/types/api/dashboard/public/getMeta.ts+++ /dev/null@@ -1,14 +0,0 @@-export interface PublicDashboardMetaProps {- timeRangeEnabled: boolean;- defaultTimeRange: string;- publicPath: string;-}--export type GetPublicDashboardMetaProps = {- id: string;-};--export interface PayloadProps {- data: PublicDashboardMetaProps;- status: string;-}diff --git a/frontend/src/types/api/dashboard/public/getWidgetData.ts b/frontend/src/types/api/dashboard/public/getWidgetData.tsdeleted file mode 100644index b07c28e37c..0000000000--- a/frontend/src/types/api/dashboard/public/getWidgetData.ts+++ /dev/null@@ -1,7 +0,0 @@-export type GetPublicDashboardWidgetDataProps = {- id: string;- index: number;- startTime: number;- endTime: number;-};-diff --git a/frontend/src/types/api/dashboard/update.ts b/frontend/src/types/api/dashboard/update.tsdeleted file mode 100644index 38a481a876..0000000000--- a/frontend/src/types/api/dashboard/update.ts+++ /dev/null@@ -1,11 +0,0 @@-import { Dashboard, DashboardData } from './getAll';--export type Props = {- id: Dashboard['id'];- data: DashboardData;-};--export interface PayloadProps {- data: Dashboard;- status: string;-}diff --git a/frontend/src/types/api/dashboard/variables.ts b/frontend/src/types/api/dashboard/variables.tsnew file mode 100644index 0000000000..e18743ca9b--- /dev/null+++ b/frontend/src/types/api/dashboard/variables.ts@@ -0,0 +1,38 @@+export const VariableQueryTypeArr = [+ 'QUERY',+ 'TEXTBOX',+ 'CUSTOM',+ 'DYNAMIC',+] as const;+export type TVariableQueryType = (typeof VariableQueryTypeArr)[number];++export const VariableSortTypeArr = ['DISABLED', 'ASC', 'DESC'] as const;+export type TSortVariableValuesType = (typeof VariableSortTypeArr)[number];++export interface IDashboardVariable {+ id: string;+ /** Display position. Nothing sets it now that the v2 API orders variables by array position. */+ order?: number;+ name?: string; // key will be the source of truth+ description: string;+ type: TVariableQueryType;+ // Query+ queryValue?: string;+ // Custom+ customValue?: string;+ // Textbox+ textboxValue?: string;++ sort: TSortVariableValuesType;+ multiSelect: boolean;+ showALLOption: boolean;+ selectedValue?:+ | null+ | string+ | number+ | boolean+ | (string | number | boolean)[];+ allSelected?: boolean;+ dynamicVariablesAttribute?: string;+ dynamicVariablesSource?: string;+}diff --git a/frontend/src/types/api/dashboard/variables/query.ts b/frontend/src/types/api/dashboard/variables/query.tsindex 6f4589a413..e335093c21 100644--- a/frontend/src/types/api/dashboard/variables/query.ts+++ b/frontend/src/types/api/dashboard/variables/query.ts@@ -1,4 +1,4 @@-import { IDashboardVariable } from '../getAll';+import { IDashboardVariable } from 'types/api/dashboard/variables';export type PayloadVariables = Record<string,diff --git a/frontend/src/types/api/queryBuilder/queryBuilderData.ts b/frontend/src/types/api/queryBuilder/queryBuilderData.tsindex 45db8c4f27..346a7bf5c0 100644--- a/frontend/src/types/api/queryBuilder/queryBuilderData.ts+++ b/frontend/src/types/api/queryBuilder/queryBuilderData.ts@@ -1,5 +1,5 @@import { TelemetryFieldKey } from 'api/v5/v5';-import { Format } from 'container/NewWidget/RightContainer/types';+import { Format } from 'constants/formats/types';import { EQueryType } from 'types/common/dashboard';import {DataSource,diff --git a/frontend/src/types/api/widgets/columnUnit.ts b/frontend/src/types/api/widgets/columnUnit.tsnew file mode 100644index 0000000000..294400cfc2--- /dev/null+++ b/frontend/src/types/api/widgets/columnUnit.ts@@ -0,0 +1,4 @@+/** Per-column unit overrides for table panels, keyed by column name. */+export interface ColumnUnit {+ [key: string]: string;+}diff --git a/frontend/src/container/NewWidget/RightContainer/Threshold/types.ts b/frontend/src/types/api/widgets/threshold.tssimilarity index 95%rename from frontend/src/container/NewWidget/RightContainer/Threshold/types.tsrename to frontend/src/types/api/widgets/threshold.tsindex 92dccedf2d..9b1cade88c 100644--- a/frontend/src/container/NewWidget/RightContainer/Threshold/types.ts+++ b/frontend/src/types/api/widgets/threshold.ts@@ -1,6 +1,6 @@import { Dispatch, ReactNode, SetStateAction } from 'react';import { PANEL_TYPES } from 'constants/queryBuilder';-import { ColumnUnit } from 'types/api/dashboard/getAll';+import { ColumnUnit } from 'types/api/widgets/columnUnit';export type ThresholdOperators = '>' | '<' | '>=' | '<=' | '=';diff --git a/frontend/src/types/api/widgets/widget.ts b/frontend/src/types/api/widgets/widget.tsnew file mode 100644index 0000000000..a2af2ba657--- /dev/null+++ b/frontend/src/types/api/widgets/widget.ts@@ -0,0 +1,73 @@+import { ReactNode } from 'react';+import { PrecisionOption } from 'components/Graph/types';+import { PANEL_TYPES } from 'constants/queryBuilder';+import { timePreferenceType } from 'constants/timePreference';+import { QueryTableProps } from 'container/QueryTable/QueryTable.intefaces';+import {+ FillMode,+ LineInterpolation,+ LineStyle,+} from 'lib/uPlotV2/config/types';+import { Query } from 'types/api/queryBuilder/queryBuilderData';+import { ColumnUnit } from 'types/api/widgets/columnUnit';+import { ThresholdProps } from 'types/api/widgets/threshold';++import { IField } from '../logs/fields';+import { TelemetryFieldKey } from '../v5/queryRange';++export enum LegendPosition {+ BOTTOM = 'bottom',+ RIGHT = 'right',+}++export interface ContextLinkProps {+ id: string;+ url: string;+ label: string;+ // openInNewTab: boolean;+}++export interface ContextLinksData {+ linksData: ContextLinkProps[];+}++export interface IBaseWidget {+ id: string;+ panelTypes: PANEL_TYPES;+ title: ReactNode;+ description: string;+ opacity: string;+ nullZeroValues: string;+ timePreferance: timePreferenceType;+ stepSize?: number;+ yAxisUnit?: string;+ decimalPrecision?: PrecisionOption; // number of decimals or 'full precision'+ stackedBarChart?: boolean;+ bucketCount?: number;+ bucketWidth?: number;+ mergeAllActiveQueries?: boolean;+ thresholds?: ThresholdProps[];+ softMin: number | null;+ softMax: number | null;+ fillSpans?: boolean;+ columnUnits?: ColumnUnit;+ selectedLogFields: IField[] | null;+ selectedTracesFields: TelemetryFieldKey[] | null;+ isLogScale?: boolean;+ columnWidths?: Record<string, number>;+ legendPosition?: LegendPosition;+ customLegendColors?: Record<string, string>;+ contextLinks?: ContextLinksData;+ lineInterpolation?: LineInterpolation;+ showPoints?: boolean;+ lineStyle?: LineStyle;+ fillMode?: FillMode;+ spanGaps?: boolean | number;+}++export interface Widgets extends IBaseWidget {+ query: Query;+ renderColumnCell?: QueryTableProps['renderColumnCell'];+ customColTitles?: Record<string, string>;+ hiddenColumns?: string[];+}diff --git a/frontend/src/types/common/queryBuilder.ts b/frontend/src/types/common/queryBuilder.tsindex 91c186bc0f..afafde129f 100644--- a/frontend/src/types/common/queryBuilder.ts+++ b/frontend/src/types/common/queryBuilder.ts@@ -1,7 +1,7 @@import { Dispatch, SetStateAction } from 'react';import { PANEL_TYPES } from 'constants/queryBuilder';import ROUTES from 'constants/routes';-import { Format } from 'container/NewWidget/RightContainer/types';+import { Format } from 'constants/formats/types';import { OptionsQuery } from 'container/OptionsMenu/types';import {IBuilderFormula,diff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/constants.ts b/frontend/src/utils/contextLinks/constants.tssimilarity index 100%rename from frontend/src/container/NewWidget/RightContainer/ContextLinks/constants.tsrename to frontend/src/utils/contextLinks/constants.tsdiff --git a/frontend/src/container/NewWidget/RightContainer/ContextLinks/utils.tsx b/frontend/src/utils/contextLinks/utils.tsxsimilarity index 97%rename from frontend/src/container/NewWidget/RightContainer/ContextLinks/utils.tsxrename to frontend/src/utils/contextLinks/utils.tsxindex 3245ae0b2a..049b063c87 100644--- a/frontend/src/container/NewWidget/RightContainer/ContextLinks/utils.tsx+++ b/frontend/src/utils/contextLinks/utils.tsx@@ -1,6 +1,6 @@-import { CONTEXT_LINK_FIELDS } from 'container/NewWidget/RightContainer/ContextLinks/constants';+import { CONTEXT_LINK_FIELDS } from 'utils/contextLinks/constants';import { resolveTexts } from 'hooks/dashboard/useContextVariables';-import { ContextLinkProps } from 'types/api/dashboard/getAll';+import { ContextLinkProps } from 'types/api/widgets/widget';import { v4 as uuid } from 'uuid';// Configuration for variable source typesdiff --git a/frontend/src/utils/dashboard/generateExportToDashboardLink.ts b/frontend/src/utils/dashboard/generateExportToDashboardLink.tsdeleted file mode 100644index 484617953c..0000000000--- a/frontend/src/utils/dashboard/generateExportToDashboardLink.ts+++ /dev/null@@ -1,26 +0,0 @@-import { generatePath } from 'react-router-dom';-import { QueryParams } from 'constants/query';-import { PANEL_TYPES } from 'constants/queryBuilder';-import ROUTES from 'constants/routes';-import { Query } from 'types/api/queryBuilder/queryBuilderData';--type GenerateExportToDashboardLinkParams = {- dashboardId: string;- panelType: PANEL_TYPES;- query: Query;- widgetId: string;-};--export const generateExportToDashboardLink = ({- query,- dashboardId,- panelType,- widgetId,-}: GenerateExportToDashboardLinkParams): string =>- `${generatePath(ROUTES.DASHBOARD, {- dashboardId,- })}/new?${QueryParams.graphType}=${panelType}&${- QueryParams.widgetId- }=${widgetId}&${QueryParams.compositeQuery}=${encodeURIComponent(- JSON.stringify(query),- )}`;diff --git a/frontend/src/container/GridPanelSwitch/utils.ts b/frontend/src/utils/generateGridTitle.tssimilarity index 100%rename from frontend/src/container/GridPanelSwitch/utils.tsrename to frontend/src/utils/generateGridTitle.tsdiff --git a/frontend/src/utils/permission/index.ts b/frontend/src/utils/permission/index.tsindex bab004986b..fe954e31c2 100644--- a/frontend/src/utils/permission/index.ts+++ b/frontend/src/utils/permission/index.ts@@ -72,7 +72,6 @@ export const routePermission: Record<keyof typeof ROUTES, ROLES[]> = {CHANNELS_EDIT: ['ADMIN'],CHANNELS_NEW: ['ADMIN'],DASHBOARD: ['ADMIN', 'EDITOR', 'VIEWER'],- DASHBOARD_WIDGET: ['ADMIN', 'EDITOR', 'VIEWER'],DASHBOARD_PANEL_EDITOR: ['ADMIN', 'EDITOR', 'VIEWER'],EDIT_ALERTS: ['ADMIN', 'EDITOR'],ERROR_DETAIL: ['ADMIN', 'EDITOR', 'VIEWER'],