feat (ui): aantal netwerken weergeven in netwerk knop in linker menu

This commit is contained in:
kodi
2026-03-04 15:30:48 +01:00
parent a1609c8ea7
commit 8045fdc869
+5 -2
View File
@@ -620,9 +620,10 @@
try {
if (currentTab === 'containers') await fetchContainers();
else {
const [pods, containers] = await Promise.all([
const [pods, containers, networks] = await Promise.all([
api('/pods-dashboard','GET'),
api('/containers-dashboard','GET')
api('/containers-dashboard','GET'),
api('/networks','GET').catch(() => ({ networks: [] }))
]);
document.getElementById('countPods').textContent = (pods || []).length;
@@ -630,6 +631,8 @@
const cCount = list.length;
document.getElementById('countContainers').textContent = cCount;
updateNavCount('countNavContainers', cCount);
const nCount = Array.isArray(networks?.networks) ? networks.networks.length : 0;
updateNavCount('countNavNetworks', nCount);
}
setApiState(true, 'API: OK');
setLastRefreshNow();