working on vtl features: pending drive creation, media changer creation, iscsi mapping

This commit is contained in:
2025-12-22 19:35:55 +00:00
parent 268af8d691
commit 6a5ead9dbf
8 changed files with 2350 additions and 78 deletions

View File

@@ -24,6 +24,9 @@ type DashboardData struct {
SMBStatus bool `json:"smb_status"`
NFSStatus bool `json:"nfs_status"`
ISCSIStatus bool `json:"iscsi_status"`
VTLStatus bool `json:"vtl_status"`
VTLDrives int `json:"vtl_drives"`
VTLTapes int `json:"vtl_tapes"`
} `json:"services"`
Jobs struct {
Total int `json:"total"`
@@ -93,6 +96,16 @@ func (a *App) handleDashboardAPI(w http.ResponseWriter, r *http.Request) {
data.Services.ISCSIStatus, _ = a.iscsiService.GetStatus()
}
// VTL status
if a.vtlService != nil {
vtlStatus, err := a.vtlService.GetStatus()
if err == nil {
data.Services.VTLStatus = vtlStatus.ServiceRunning
data.Services.VTLDrives = vtlStatus.DrivesOnline
data.Services.VTLTapes = vtlStatus.TapesAvailable
}
}
// Job statistics
allJobs := a.jobManager.List("")
data.Jobs.Total = len(allJobs)