This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function useTableQuery(queryFn, columnDefs, formatApiData, formatParamsToQueryKey) { | |
| const [queryKey, setQueryKey] = useState(''); | |
| const {data, isLoading} = useQuery(queryKey, () => queryFn({ordering: queryKey.sortBy})); | |
| const tableData = useMemo(() => formatApiData(data), [data]); | |
| const columns = useMemo(() => columnDefs, [columnDefs]); | |
| const fetchData = useCallback((params) => { | |
| const paramsToQK = formatParamsToQueryKey(params); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (type == 'node-down' || type == 'cluster-balance') { | |
| this['thresholdNode'].set('disabled', true); | |
| this['comparatorNode'].set('disabled', true); | |
| } |