mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-25 10:12:35 +00:00
increase refresh rate
This commit is contained in:
@@ -36,7 +36,7 @@ import { useTranslations } from "next-intl";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { Selectedsite, SitesSelector } from "@app/components/site-selector";
|
import { Selectedsite, SitesSelector } from "@app/components/site-selector";
|
||||||
import { useMemo, useState, useTransition } from "react";
|
import { useEffect, useMemo, useState, useTransition } from "react";
|
||||||
|
|
||||||
import CreateInternalResourceDialog from "@app/components/CreateInternalResourceDialog";
|
import CreateInternalResourceDialog from "@app/components/CreateInternalResourceDialog";
|
||||||
import EditInternalResourceDialog from "@app/components/EditInternalResourceDialog";
|
import EditInternalResourceDialog from "@app/components/EditInternalResourceDialog";
|
||||||
@@ -144,6 +144,13 @@ export default function ClientResourcesTable({
|
|||||||
|
|
||||||
const [isRefreshing, startTransition] = useTransition();
|
const [isRefreshing, startTransition] = useTransition();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const interval = setInterval(() => {
|
||||||
|
router.refresh();
|
||||||
|
}, 30_000);
|
||||||
|
return () => clearInterval(interval);
|
||||||
|
}, [router]);
|
||||||
|
|
||||||
const siteIdQ = searchParams.get("siteId");
|
const siteIdQ = searchParams.get("siteId");
|
||||||
const siteIdNum = siteIdQ ? parseInt(siteIdQ, 10) : NaN;
|
const siteIdNum = siteIdQ ? parseInt(siteIdQ, 10) : NaN;
|
||||||
const selectedSite: Selectedsite | null = useMemo(() => {
|
const selectedSite: Selectedsite | null = useMemo(() => {
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ export default function HealthChecksTable({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
router.refresh();
|
router.refresh();
|
||||||
}, 10_000);
|
}, 30_000);
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, [router]);
|
}, [router]);
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ export default function ProxyResourcesTable({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
router.refresh();
|
router.refresh();
|
||||||
}, 10_000);
|
}, 30_000);
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, [router]);
|
}, [router]);
|
||||||
|
|
||||||
@@ -387,8 +387,7 @@ export default function ProxyResourcesTable({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "sites",
|
id: "sites",
|
||||||
accessorFn: (row) =>
|
accessorFn: (row) => row.sites.map((s) => s.siteName).join(", "),
|
||||||
row.sites.map((s) => s.siteName).join(", "),
|
|
||||||
friendlyName: t("sites"),
|
friendlyName: t("sites"),
|
||||||
header: () => (
|
header: () => (
|
||||||
<Popover open={siteFilterOpen} onOpenChange={setSiteFilterOpen}>
|
<Popover open={siteFilterOpen} onOpenChange={setSiteFilterOpen}>
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ export default function SitesTable({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
router.refresh();
|
router.refresh();
|
||||||
}, 10_000);
|
}, 30_000);
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user