mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-12 12:46:23 +01:00
vmui: update package-lock.json (#6532)
1. Updated `package-lock.json` to resolve [Dependabot
alerts](https://github.com/VictoriaMetrics/VictoriaMetrics/security/dependabot).
2. Updated types to align with the latest `Preact` update.
(cherry picked from commit 6cab811134
)
This commit is contained in:
parent
6ad66b3317
commit
25f3e700a6
3548
app/vmui/packages/vmui/package-lock.json
generated
3548
app/vmui/packages/vmui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,4 @@
|
||||
import { useCallback, useEffect, useMemo, useState } from "preact/compat";
|
||||
import { StateUpdater } from "preact/hooks";
|
||||
import { Dispatch, SetStateAction, useCallback, useEffect, useMemo, useState } from "preact/compat";
|
||||
import { getQueryRangeUrl, getQueryUrl } from "../api/query-range";
|
||||
import { useAppState } from "../state/common/StateContext";
|
||||
import { InstantMetricResult, MetricBase, MetricResult, QueryStats } from "../api/types";
|
||||
@ -31,7 +30,7 @@ interface FetchQueryReturn {
|
||||
liveData?: InstantMetricResult[],
|
||||
error?: ErrorTypes | string,
|
||||
queryErrors: (ErrorTypes | string)[],
|
||||
setQueryErrors: StateUpdater<string[]>,
|
||||
setQueryErrors: Dispatch<SetStateAction<string[]>>,
|
||||
queryStats: QueryStats[],
|
||||
warning?: string,
|
||||
traces?: Trace[],
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React, { useEffect, useState, useRef } from "preact/compat";
|
||||
import { StateUpdater } from "preact/hooks";
|
||||
import React, { useEffect, useState, useRef, Dispatch, SetStateAction } from "preact/compat";
|
||||
import { useAppState } from "../state/common/StateContext";
|
||||
import { AutocompleteOptions } from "../components/Main/Autocomplete/Autocomplete";
|
||||
import { LabelIcon, MetricIcon, ValueIcon } from "../components/Main/Icons";
|
||||
@ -21,7 +20,7 @@ enum TypeData {
|
||||
type FetchDataArgs = {
|
||||
value: string;
|
||||
urlSuffix: string;
|
||||
setter: StateUpdater<AutocompleteOptions[]>;
|
||||
setter: Dispatch<SetStateAction<AutocompleteOptions[]>>
|
||||
type: TypeData;
|
||||
params?: URLSearchParams;
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { useState, useEffect } from "preact/compat";
|
||||
import { StateUpdater } from "preact/hooks";
|
||||
import { Dispatch, useState, useEffect, SetStateAction } from "preact/compat";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
|
||||
const useStateSearchParams = <T>(defaultState: T, key: string): [T, StateUpdater<T>] => {
|
||||
const useStateSearchParams = <T>(defaultState: T, key: string): [T, Dispatch<SetStateAction<T>>] => {
|
||||
const [searchParams] = useSearchParams();
|
||||
const currentValue = searchParams.get(key) ? searchParams.get(key) as unknown as T : defaultState;
|
||||
const [state, setState] = useState<T>(currentValue);
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React, { FC, useEffect, useState } from "preact/compat";
|
||||
import { StateUpdater } from "preact/hooks";
|
||||
import React, { Dispatch, FC, SetStateAction, useEffect, useState } from "preact/compat";
|
||||
import QueryEditor from "../../../components/Configurators/QueryEditor/QueryEditor";
|
||||
import AdditionalSettings from "../../../components/Configurators/AdditionalSettings/AdditionalSettings";
|
||||
import usePrevious from "../../../hooks/usePrevious";
|
||||
@ -28,8 +27,8 @@ import AnomalyConfig from "../../../components/ExploreAnomaly/AnomalyConfig";
|
||||
|
||||
export interface QueryConfiguratorProps {
|
||||
queryErrors: string[];
|
||||
setQueryErrors: StateUpdater<string[]>;
|
||||
setHideError: StateUpdater<boolean>;
|
||||
setQueryErrors: Dispatch<SetStateAction<string[]>>;
|
||||
setHideError: Dispatch<SetStateAction<boolean>>;
|
||||
stats: QueryStats[];
|
||||
onHideQuery?: (queries: number[]) => void
|
||||
onRunQuery: () => void;
|
||||
|
Loading…
Reference in New Issue
Block a user