fixing UI and iscsi sync
Some checks failed
CI / test-build (push) Has been cancelled

This commit is contained in:
2025-12-20 19:16:50 +00:00
parent 2bb892dfdc
commit 6202ef8e83
12 changed files with 1436 additions and 116 deletions

View File

@@ -2,6 +2,7 @@ package httpapp
import (
"fmt"
"log"
"net/http"
)
@@ -64,6 +65,14 @@ func (a *App) handleDashboardAPI(w http.ResponseWriter, r *http.Request) {
}
// Service statistics
// Sync from OS first to ensure accurate counts
if err := a.syncSMBSharesFromOS(); err != nil {
log.Printf("warning: failed to sync SMB shares from OS in dashboard: %v", err)
}
if err := a.syncNFSExportsFromOS(); err != nil {
log.Printf("warning: failed to sync NFS exports from OS in dashboard: %v", err)
}
smbShares := a.smbStore.List()
data.Services.SMBShares = len(smbShares)