From 1b2290c131887c1a371c1f9d33b8c4498ca3e857 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Tue, 23 Jul 2024 11:35:37 +0200 Subject: [PATCH] Remove unused imports in new UI to fix build Signed-off-by: Julius Volz --- web/ui/mantine-ui/src/pages/query/QueryPanel.tsx | 2 -- web/ui/mantine-ui/src/pages/query/UPlotChart.tsx | 4 ++-- web/ui/mantine-ui/src/state/queryPageSlice.ts | 7 +------ 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/web/ui/mantine-ui/src/pages/query/QueryPanel.tsx b/web/ui/mantine-ui/src/pages/query/QueryPanel.tsx index f887c2af3..6dac332af 100644 --- a/web/ui/mantine-ui/src/pages/query/QueryPanel.tsx +++ b/web/ui/mantine-ui/src/pages/query/QueryPanel.tsx @@ -33,8 +33,6 @@ import ExpressionInput from "./ExpressionInput"; import Graph from "./Graph"; import { formatPrometheusDuration, - formatTimestamp, - now, parsePrometheusDuration, } from "../../lib/formatTime"; diff --git a/web/ui/mantine-ui/src/pages/query/UPlotChart.tsx b/web/ui/mantine-ui/src/pages/query/UPlotChart.tsx index d6c37881d..ba72de775 100644 --- a/web/ui/mantine-ui/src/pages/query/UPlotChart.tsx +++ b/web/ui/mantine-ui/src/pages/query/UPlotChart.tsx @@ -12,7 +12,6 @@ import { computePosition, shift, flip, offset } from "@floating-ui/dom"; import { colorPool } from "./ColorPool"; import { useSettings } from "../../state/settingsSlice"; import { useComputedColorScheme } from "@mantine/core"; -import { fill } from "lodash"; const formatYAxisTickValue = (y: number | null): string => { if (y === null) { @@ -127,7 +126,8 @@ const tooltipPlugin = (useLocalTime: boolean) => { boundingTop = bbox.top; }, // When a series is selected by hovering close to it, store the - // index of the selected series. + // index of the selected series, so we can update the hover tooltip + // in setCursor. setSeries: (_u: uPlot, seriesIdx: number | null, _opts: Series) => { selectedSeriesIdx = seriesIdx; }, diff --git a/web/ui/mantine-ui/src/state/queryPageSlice.ts b/web/ui/mantine-ui/src/state/queryPageSlice.ts index 375ba770d..d68ef5a2e 100644 --- a/web/ui/mantine-ui/src/state/queryPageSlice.ts +++ b/web/ui/mantine-ui/src/state/queryPageSlice.ts @@ -1,11 +1,6 @@ import { randomId } from "@mantine/hooks"; -import { - PayloadAction, - createListenerMiddleware, - createSlice, -} from "@reduxjs/toolkit"; +import { PayloadAction, createSlice } from "@reduxjs/toolkit"; import { encodePanelOptionsToURLParams } from "../pages/query/urlStateEncoding"; -import { update } from "lodash"; export enum GraphDisplayMode { Lines = "lines",