fix: running formatting script on both client and server directories
This commit is contained in:
1 parent
7189c19d55
commit
800fd4792d
6 files changed
+22
-15
No files matched your search
@@ -17,7 +17,13 @@ import { useNavigate } from "react-router-dom";
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
const MonitorsTable = ({ shouldRender, monitors, isAdmin, handleActionMenuDelete, isSearching }) => {
|
const MonitorsTable = ({
|
||||||
|
shouldRender,
|
||||||
|
monitors,
|
||||||
|
isAdmin,
|
||||||
|
handleActionMenuDelete,
|
||||||
|
isSearching,
|
||||||
|
}) => {
|
||||||
// Utils
|
// Utils
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
|
|
||||||
const useDebounce = (value, delay) => {
|
const useDebounce = (value, delay) => {
|
||||||
const [debouncedValue, setDebouncedValue] = useState(value);
|
const [debouncedValue, setDebouncedValue] = useState(value);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handler = setTimeout(() => {
|
const handler = setTimeout(() => {
|
||||||
setDebouncedValue(value);
|
setDebouncedValue(value);
|
||||||
}, delay);
|
}, delay);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
clearTimeout(handler);
|
clearTimeout(handler);
|
||||||
};
|
};
|
||||||
}, [value, delay]);
|
}, [value, delay]);
|
||||||
return debouncedValue;
|
return debouncedValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default useDebounce;
|
export default useDebounce;
|
||||||
@@ -24,7 +24,7 @@ const useMonitorFetch = ({ page, field, filter, rowsPerPage, updateTrigger, sear
|
|||||||
types: ["hardware"],
|
types: ["hardware"],
|
||||||
page: page,
|
page: page,
|
||||||
rowsPerPage: rowsPerPage,
|
rowsPerPage: rowsPerPage,
|
||||||
search: search
|
search: search,
|
||||||
});
|
});
|
||||||
setMonitors(response?.data?.data?.filteredMonitors ?? []);
|
setMonitors(response?.data?.data?.filteredMonitors ?? []);
|
||||||
setSummary(response?.data?.data?.summary ?? {});
|
setSummary(response?.data?.data?.summary ?? {});
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ const InfrastructureMonitors = () => {
|
|||||||
filter: toFilterStatus,
|
filter: toFilterStatus,
|
||||||
rowsPerPage,
|
rowsPerPage,
|
||||||
updateTrigger,
|
updateTrigger,
|
||||||
search
|
search,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (networkError === true) {
|
if (networkError === true) {
|
||||||
|
|||||||
@@ -187,7 +187,8 @@ class NetworkService {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
async getMonitorsByTeamId(config) {
|
async getMonitorsByTeamId(config) {
|
||||||
const { teamId, limit, types, page, rowsPerPage, filter, field, order, search } = config;
|
const { teamId, limit, types, page, rowsPerPage, filter, field, order, search } =
|
||||||
|
config;
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
|
|
||||||
if (limit) params.append("limit", limit);
|
if (limit) params.append("limit", limit);
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ const getMonitorsByTeamIdQueryValidation = joi.object({
|
|||||||
filter: joi.string(),
|
filter: joi.string(),
|
||||||
field: joi.string(),
|
field: joi.string(),
|
||||||
order: joi.string().valid("asc", "desc"),
|
order: joi.string().valid("asc", "desc"),
|
||||||
search: joi.string()
|
search: joi.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const getMonitorStatsByIdParamValidation = joi.object({
|
const getMonitorStatsByIdParamValidation = joi.object({
|
||||||
|
|||||||
Reference in new issue
Block a user