From b3364c53efdae676838687b055c6493ffa1168a1 Mon Sep 17 00:00:00 2001 From: ajnart Date: Fri, 6 Jan 2023 11:19:07 +0900 Subject: [PATCH] remove refreshInterval from dashdot options --- src/widgets/dashDot/DashDotTile.tsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/widgets/dashDot/DashDotTile.tsx b/src/widgets/dashDot/DashDotTile.tsx index 33687365b..fcf8271c1 100644 --- a/src/widgets/dashDot/DashDotTile.tsx +++ b/src/widgets/dashDot/DashDotTile.tsx @@ -13,13 +13,6 @@ const definition = defineWidget({ id: 'dashdot', icon: 'https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons/png/dashdot.png', options: { - refreshInterval: { - type: 'slider', - defaultValue: 5, - min: 1, - max: 60, - step: 1, - }, cpuMultiView: { type: 'switch', defaultValue: false, @@ -65,7 +58,6 @@ function DashDotTile({ widget }: DashDotTileProps) { const { data: info } = useDashDotInfo({ dashDotUrl, - refreshInterval: widget.properties.refreshInterval, }); const graphs = widget?.properties.graphs.map((g) => ({ @@ -119,16 +111,10 @@ function DashDotTile({ widget }: DashDotTileProps) { ); } -const useDashDotInfo = ({ - dashDotUrl, - refreshInterval, -}: { - dashDotUrl: string; - refreshInterval: number; -}) => { +const useDashDotInfo = ({ dashDotUrl }: { dashDotUrl: string }) => { const { name: configName } = useConfigContext(); return useQuery({ - refetchInterval: refreshInterval * 1000 ?? 50000, + refetchInterval: 50000, queryKey: [ 'dashdot/info', {