This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user