feat (ui): aantal netwerken weergeven in netwerk knop in linker menu
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user