mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-11-09 00:18:16 +00:00
fixed rate limits into env
This commit is contained in:
@@ -92,8 +92,8 @@ const Dashboard = () => {
|
||||
const { data: stats, isLoading, error, refetch } = useQuery({
|
||||
queryKey: ['dashboardStats'],
|
||||
queryFn: () => dashboardAPI.getStats().then(res => res.data),
|
||||
refetchInterval: 60000, // Refresh every minute
|
||||
staleTime: 30000, // Consider data stale after 30 seconds
|
||||
refetchInterval: 300000, // Refresh every 5 minutes instead of 1 minute
|
||||
staleTime: 120000, // Consider data stale after 2 minutes
|
||||
})
|
||||
|
||||
// Fetch settings to get the agent update interval
|
||||
|
||||
@@ -735,8 +735,8 @@ const Hosts = () => {
|
||||
const { data: hosts, isLoading, error, refetch } = useQuery({
|
||||
queryKey: ['hosts'],
|
||||
queryFn: () => dashboardAPI.getHosts().then(res => res.data),
|
||||
refetchInterval: 60000,
|
||||
staleTime: 30000,
|
||||
refetchInterval: 300000, // Refresh every 5 minutes instead of 1 minute
|
||||
staleTime: 120000, // Consider data stale after 2 minutes
|
||||
})
|
||||
|
||||
const { data: hostGroups } = useQuery({
|
||||
|
||||
@@ -101,16 +101,16 @@ const Packages = () => {
|
||||
const { data: packages, isLoading, error, refetch } = useQuery({
|
||||
queryKey: ['packages'],
|
||||
queryFn: () => dashboardAPI.getPackages().then(res => res.data),
|
||||
refetchInterval: 60000,
|
||||
staleTime: 30000,
|
||||
refetchInterval: 300000, // Refresh every 5 minutes instead of 1 minute
|
||||
staleTime: 120000, // Consider data stale after 2 minutes
|
||||
})
|
||||
|
||||
// Fetch hosts data to get total packages count
|
||||
const { data: hosts } = useQuery({
|
||||
queryKey: ['hosts'],
|
||||
queryFn: () => dashboardAPI.getHosts().then(res => res.data),
|
||||
refetchInterval: 60000,
|
||||
staleTime: 30000,
|
||||
refetchInterval: 300000, // Refresh every 5 minutes instead of 1 minute
|
||||
staleTime: 120000, // Consider data stale after 2 minutes
|
||||
})
|
||||
|
||||
// Filter and sort packages
|
||||
|
||||
@@ -471,12 +471,12 @@ const Settings = () => {
|
||||
<div className="mt-4 p-4 bg-secondary-50 dark:bg-secondary-700 rounded-md">
|
||||
<h4 className="text-sm font-medium text-secondary-900 dark:text-white mb-2">Server URL</h4>
|
||||
<p className="text-sm text-secondary-600 dark:text-secondary-300 font-mono">
|
||||
{formData.serverProtocol}://{formData.serverHost}:{formData.serverPort}
|
||||
{formData.serverProtocol}://{formData.serverHost}{formData.serverProtocol === 'https' ? ':443' : `:${formData.serverPort}`}
|
||||
</p>
|
||||
<p className="text-xs text-secondary-500 dark:text-secondary-400 mt-1">
|
||||
This URL will be used in installation scripts and agent communications.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Update Interval */}
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user