working on vtl features: pending drive creation, media changer creation, iscsi mapping
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user