This commit is contained in:
Juergen Kunz
2025-07-03 01:50:46 +00:00
parent 95cb5d7840
commit ee561c0823
4 changed files with 22 additions and 11 deletions

View File

@@ -415,7 +415,7 @@ async function dispatchCombinedRefreshAction() {
email: true,
dns: true,
security: true,
network: currentView === 'network' || currentView === 'Network', // Only fetch network if on network view
network: currentView === 'network', // Only fetch network if on network view
},
});
@@ -432,7 +432,7 @@ async function dispatchCombinedRefreshAction() {
});
// Update network stats if included
if (combinedResponse.metrics.network && (currentView === 'network' || currentView === 'Network')) {
if (combinedResponse.metrics.network && currentView === 'network') {
const network = combinedResponse.metrics.network;
const connectionsByIP: { [ip: string]: number } = {};
@@ -505,6 +505,13 @@ let currentRefreshRate = 1000; // Track current refresh rate to avoid unnecessar
refreshInterval = setInterval(() => {
// Use combined refresh action for efficiency
dispatchCombinedRefreshAction();
// If network view is active, also ensure we have fresh network data
const currentView = uiStatePart.getState().activeView;
if (currentView === 'network') {
// Network view needs more frequent updates, fetch directly
networkStatePart.dispatchAction(fetchNetworkStatsAction, null);
}
}, uiState.refreshInterval);
}
} else {