diff --git a/ui/src/components/QueueSizeChart.tsx b/ui/src/components/QueueSizeChart.tsx index 63ae21e..19c842b 100644 --- a/ui/src/components/QueueSizeChart.tsx +++ b/ui/src/components/QueueSizeChart.tsx @@ -9,6 +9,8 @@ import { Legend, ResponsiveContainer, } from "recharts"; +import { useHistory } from "react-router-dom"; +import { queueDetailsPath } from "../paths"; interface Props { data: TaskBreakdown[]; @@ -24,9 +26,25 @@ interface TaskBreakdown { } function QueueSizeChart(props: Props) { + const handleClick = (params: { activeLabel?: string } | null) => { + const allQueues = props.data.map((b) => b.queue); + if ( + params && + params.activeLabel && + allQueues.includes(params.activeLabel) + ) { + history.push(queueDetailsPath(params.activeLabel)); + } + }; + const history = useHistory(); return ( - + diff --git a/ui/src/components/QueuesOverviewTable.tsx b/ui/src/components/QueuesOverviewTable.tsx index c964897..4a172a1 100644 --- a/ui/src/components/QueuesOverviewTable.tsx +++ b/ui/src/components/QueuesOverviewTable.tsx @@ -196,6 +196,7 @@ export default function QueuesOverviewTable(props: Props) { {sortQueues(props.queues, cmpFunc).map((q) => ( props.onPauseClick(q.queue)} onResumeClick={() => props.onResumeClick(q.queue)}