use update trigger
This commit is contained in:
1 parent
a8aeed341a
commit
32f7306a6d
1 file changed
+3
-4
@@ -24,14 +24,12 @@ import { useState, useCallback } from "react";
|
|||||||
import { useIsAdmin } from "../../../Hooks/useIsAdmin";
|
import { useIsAdmin } from "../../../Hooks/useIsAdmin";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import useMonitorsFetch from "./Hooks/useMonitorsFetch";
|
|
||||||
import { useSelector, useDispatch } from "react-redux";
|
import { useSelector, useDispatch } from "react-redux";
|
||||||
import { setRowsPerPage } from "../../../Features/UI/uiSlice";
|
import { setRowsPerPage } from "../../../Features/UI/uiSlice";
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import useFetchMonitorsWithSummary from "../../../Hooks/useFetchMonitorsWithSummary";
|
import useFetchMonitorsWithSummary from "../../../Hooks/useFetchMonitorsWithSummary";
|
||||||
import useFetchMonitorsWithChecks from "../../../Hooks/useFetchMonitorsWithChecks";
|
import useFetchMonitorsWithChecks from "../../../Hooks/useFetchMonitorsWithChecks";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
const BREADCRUMBS = [{ name: `Uptime`, path: "/uptime" }];
|
const BREADCRUMBS = [{ name: `Uptime`, path: "/uptime" }];
|
||||||
const TYPES = ["http", "ping", "docker", "port"];
|
const TYPES = ["http", "ping", "docker", "port"];
|
||||||
const CreateMonitorButton = ({ shouldRender }) => {
|
const CreateMonitorButton = ({ shouldRender }) => {
|
||||||
@@ -103,6 +101,7 @@ const UptimeMonitors = () => {
|
|||||||
useFetchMonitorsWithSummary({
|
useFetchMonitorsWithSummary({
|
||||||
teamId,
|
teamId,
|
||||||
types: TYPES,
|
types: TYPES,
|
||||||
|
monitorUpdateTrigger,
|
||||||
});
|
});
|
||||||
|
|
||||||
const [
|
const [
|
||||||
@@ -119,11 +118,10 @@ const UptimeMonitors = () => {
|
|||||||
filter: search,
|
filter: search,
|
||||||
field: sort?.field,
|
field: sort?.field,
|
||||||
order: sort?.order,
|
order: sort?.order,
|
||||||
triggerUpdate,
|
monitorUpdateTrigger,
|
||||||
});
|
});
|
||||||
|
|
||||||
const isLoading = monitorsWithSummaryIsLoading || monitorsWithChecksIsLoading;
|
const isLoading = monitorsWithSummaryIsLoading || monitorsWithChecksIsLoading;
|
||||||
|
|
||||||
if (networkError) {
|
if (networkError) {
|
||||||
return (
|
return (
|
||||||
<GenericFallback>
|
<GenericFallback>
|
||||||
@@ -194,6 +192,7 @@ const UptimeMonitors = () => {
|
|||||||
sort={sort}
|
sort={sort}
|
||||||
setSort={setSort}
|
setSort={setSort}
|
||||||
monitorsAreLoading={monitorsWithChecksIsLoading}
|
monitorsAreLoading={monitorsWithChecksIsLoading}
|
||||||
|
triggerUpdate={triggerUpdate}
|
||||||
/>
|
/>
|
||||||
<Pagination
|
<Pagination
|
||||||
itemCount={monitorsWithChecksCount}
|
itemCount={monitorsWithChecksCount}
|
||||||
|
|||||||
Reference in new issue
Block a user