diff --git a/web/src/app/app/(primary_layout)/(chat_experience)/dashboards/[dashboardId]/metrics/[metricId]/page.tsx b/web/src/app/app/(primary_layout)/(chat_experience)/dashboards/[dashboardId]/metrics/[metricId]/page.tsx new file mode 100644 index 000000000..247a2a399 --- /dev/null +++ b/web/src/app/app/(primary_layout)/(chat_experience)/dashboards/[dashboardId]/metrics/[metricId]/page.tsx @@ -0,0 +1,15 @@ +import { MetricController } from '@/controllers/MetricController'; +import { AppAssetCheckLayout } from '@/layouts/AppAssetCheckLayout'; + +export default async function MetricPage(props: { + params: Promise<{ metricId: string; dashboardId: string }>; +}) { + const params = await props.params; + const { metricId, dashboardId } = params; + + return ( + + + + ); +} diff --git a/web/src/app/app/(primary_layout)/(chat_experience)/metrics/[metricId]/page.tsx b/web/src/app/app/(primary_layout)/(chat_experience)/metrics/[metricId]/page.tsx index 98ae9f0de..bd6112f25 100644 --- a/web/src/app/app/(primary_layout)/(chat_experience)/metrics/[metricId]/page.tsx +++ b/web/src/app/app/(primary_layout)/(chat_experience)/metrics/[metricId]/page.tsx @@ -1,10 +1,7 @@ import { MetricController } from '@/controllers/MetricController'; import { AppAssetCheckLayout } from '@/layouts/AppAssetCheckLayout'; -export default async function MetricPage(props: { - params: Promise<{ metricId: string }>; - searchParams: Promise<{ embed?: string }>; -}) { +export default async function MetricPage(props: { params: Promise<{ metricId: string }> }) { const params = await props.params; const { metricId } = params; diff --git a/web/src/components/ui/sidebar/SidebarCollapsible.tsx b/web/src/components/ui/sidebar/SidebarCollapsible.tsx index b5515b58a..8ca1ed237 100644 --- a/web/src/components/ui/sidebar/SidebarCollapsible.tsx +++ b/web/src/components/ui/sidebar/SidebarCollapsible.tsx @@ -21,6 +21,7 @@ import { DragStartEvent, DragEndEvent } from '@dnd-kit/core'; +import { restrictToVerticalAxis } from '@dnd-kit/modifiers'; import { arrayMove, SortableContext, @@ -31,6 +32,8 @@ import { import { CSS } from '@dnd-kit/utilities'; import { useMemoizedFn } from '@/hooks'; +const modifiers = [restrictToVerticalAxis]; + interface SidebarTriggerProps { label: string; isOpen: boolean; @@ -181,7 +184,8 @@ export const SidebarCollapsible: React.FC< sensors={sensors} collisionDetection={closestCenter} onDragStart={handleDragStart} - onDragEnd={handleDragEnd}> + onDragEnd={handleDragEnd} + modifiers={modifiers}> item.id)} strategy={verticalListSortingStrategy}> diff --git a/web/src/controllers/DashboardController/DashboardViewDashboardController/DashboardContentController/DashboardMetricItem/MetricTitle.tsx b/web/src/controllers/DashboardController/DashboardViewDashboardController/DashboardContentController/DashboardMetricItem/MetricTitle.tsx index af0ee053a..0a23ddea8 100644 --- a/web/src/controllers/DashboardController/DashboardViewDashboardController/DashboardContentController/DashboardMetricItem/MetricTitle.tsx +++ b/web/src/controllers/DashboardController/DashboardViewDashboardController/DashboardContentController/DashboardMetricItem/MetricTitle.tsx @@ -45,7 +45,7 @@ export const MetricTitle: React.FC<{ }, [title, useEllipsis]); return ( - +
{ + setSelectedFile(initializeSelectedFile(params)); + }, [Object.keys(params).join('')]); + return useMemo( () => ({ onSetSelectedFile,