From 2fca16e7b446f577ad5b82511d7b05b958d4de0d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 11 Jul 2025 20:52:29 +0000 Subject: [PATCH] Update metric routes from metric_files to metrics Co-authored-by: dallin --- .../src/context/Assets/useGetFileLink.test.tsx | 10 +++++----- .../src/routes/busterRoutes/busterAppRoutes.ts | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/web/src/context/Assets/useGetFileLink.test.tsx b/apps/web/src/context/Assets/useGetFileLink.test.tsx index 4b386a0fa..b4afc0f25 100644 --- a/apps/web/src/context/Assets/useGetFileLink.test.tsx +++ b/apps/web/src/context/Assets/useGetFileLink.test.tsx @@ -50,7 +50,7 @@ describe('useGetFileLink', () => { secondaryView: string; }) => { if (type === 'metric') { - return `/metric_files/${assetId}${versionNumber ? `/v${versionNumber}` : ''}${secondaryView ? `/${secondaryView}` : ''}`; + return `/metrics/${assetId}${versionNumber ? `/v${versionNumber}` : ''}${secondaryView ? `/${secondaryView}` : ''}`; } if (type === 'dashboard') { return `/dashboards/${assetId}${versionNumber ? `/v${versionNumber}` : ''}${secondaryView ? `/${secondaryView}` : ''}`; @@ -81,7 +81,7 @@ describe('useGetFileLink', () => { versionNumber: 3, secondaryView: undefined }); - expect(link).toBe(`/metric_files/${mockMetricId}/v3`); + expect(link).toBe(`/metrics/${mockMetricId}/v3`); }); it('should generate correct file link for dashboard', () => { @@ -121,7 +121,7 @@ describe('useGetFileLink', () => { versionNumber: 3, secondaryView: 'version-history' }); - expect(link).toBe(`/metric_files/${mockMetricId}/v3/version-history`); + expect(link).toBe(`/metrics/${mockMetricId}/v3/version-history`); }); }); @@ -220,7 +220,7 @@ describe('useGetFileLink', () => { }); expect(meta).toEqual({ - link: `/metric_files/${mockMetricId}/v${mockMetricVersionNumber}`, + link: `/metrics/${mockMetricId}/v${mockMetricVersionNumber}`, isSelected: true, selectedVersionNumber: mockMetricVersionNumber }); @@ -253,7 +253,7 @@ describe('useGetFileLink', () => { }); expect(meta).toEqual({ - link: '/metric_files/different-metric/v999', + link: '/metrics/different-metric/v999', isSelected: false, selectedVersionNumber: mockMetricVersionNumber }); diff --git a/apps/web/src/routes/busterRoutes/busterAppRoutes.ts b/apps/web/src/routes/busterRoutes/busterAppRoutes.ts index 74d592fb4..4c9a3f61b 100644 --- a/apps/web/src/routes/busterRoutes/busterAppRoutes.ts +++ b/apps/web/src/routes/busterRoutes/busterAppRoutes.ts @@ -4,10 +4,10 @@ export enum BusterAppRoutes { APP_HOME = '/app/home', APP_COLLECTIONS = '/app/collections', APP_COLLECTIONS_ID = '/app/collections/:collectionId', - APP_METRIC = '/app/metric_files', - APP_METRIC_ID_CHART = '/app/metric_files/:metricId/chart?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', - APP_METRIC_ID_RESULTS = '/app/metric_files/:metricId/results?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', - APP_METRIC_ID_SQL = '/app/metric_files/:metricId/sql?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', + APP_METRIC = '/app/metrics', + APP_METRIC_ID_CHART = '/app/metrics/:metricId/chart?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', + APP_METRIC_ID_RESULTS = '/app/metrics/:metricId/results?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', + APP_METRIC_ID_SQL = '/app/metrics/:metricId/sql?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', APP_DASHBOARDS = '/app/dashboards', APP_DASHBOARD_ID = '/app/dashboards/:dashboardId?secondary_view=:secondaryView&dashboard_version_number=:dashboardVersionNumber', APP_DASHBOARD_ID_FILE = '/app/dashboards/:dashboardId/file?dashboard_version_number=:dashboardVersionNumber&secondary_view=:secondaryView', @@ -26,14 +26,14 @@ export enum BusterAppRoutes { APP_CHAT = '/app/chats', APP_CHAT_ID = '/app/chats/:chatId', APP_CHAT_ID_REASONING_ID = '/app/chats/:chatId/reasoning/:messageId', - APP_CHAT_ID_METRIC_ID = '/app/chats/:chatId/metric_files/:metricId?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', - APP_CHAT_ID_METRIC_ID_CHART = '/app/chats/:chatId/metric_files/:metricId/chart?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', - APP_CHAT_ID_METRIC_ID_SQL = '/app/chats/:chatId/metric_files/:metricId/sql?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', - APP_CHAT_ID_METRIC_ID_RESULTS = '/app/chats/:chatId/metric_files/:metricId/results?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', + APP_CHAT_ID_METRIC_ID = '/app/chats/:chatId/metrics/:metricId?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', + APP_CHAT_ID_METRIC_ID_CHART = '/app/chats/:chatId/metrics/:metricId/chart?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', + APP_CHAT_ID_METRIC_ID_SQL = '/app/chats/:chatId/metrics/:metricId/sql?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', + APP_CHAT_ID_METRIC_ID_RESULTS = '/app/chats/:chatId/metrics/:metricId/results?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber', APP_CHAT_ID_COLLECTION_ID = '/app/chats/:chatId/collections/:collectionId', APP_CHAT_ID_DASHBOARD_ID = '/app/chats/:chatId/dashboards/:dashboardId?secondary_view=:secondaryView&dashboard_version_number=:dashboardVersionNumber', APP_CHAT_ID_DASHBOARD_ID_FILE = '/app/chats/:chatId/dashboards/:dashboardId/file?secondary_view=:secondaryView&dashboard_version_number=:dashboardVersionNumber', - APP_CHAT_ID_DASHBOARD_ID_METRIC_ID = '/app/chats/:chatId/dashboards/:dashboardId/metrics/:metricId?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber&dashboard_version_number=:dashboardVersionNumber', + APP_CHAT_ID_DASHBOARD_ID_METRIC_ID = '/app/chats/:chatId/dashboards/:dashboardId/metric_files/:metricId?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber&dashboard_version_number=:dashboardVersionNumber', APP_CHAT_ID_DASHBOARD_ID_METRIC_ID_CHART = '/app/chats/:chatId/dashboards/:dashboardId/metrics/:metricId/chart?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber&dashboard_version_number=:dashboardVersionNumber', APP_CHAT_ID_DASHBOARD_ID_METRIC_ID_SQL = '/app/chats/:chatId/dashboards/:dashboardId/metrics/:metricId/sql?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber&dashboard_version_number=:dashboardVersionNumber', APP_CHAT_ID_DASHBOARD_ID_METRIC_ID_RESULTS = '/app/chats/:chatId/dashboards/:dashboardId/metrics/:metricId/results?secondary_view=:secondaryView&metric_version_number=:metricVersionNumber&dashboard_version_number=:dashboardVersionNumber',