api: expose host.repo_status in /api/hosts JSON
The dashboard renders init_running / init_failed / ready state based on host.repo_status, but the JSON endpoint dropped the field on its way out. The e2e test couldn't poll for repo readiness; reflect the same projection the UI uses.
This commit is contained in:
@@ -25,6 +25,7 @@ type hostView struct {
|
||||
CurrentJobID *string `json:"current_job_id,omitempty"`
|
||||
LastBackupAt *string `json:"last_backup_at,omitempty"`
|
||||
LastBackupStatus *string `json:"last_backup_status,omitempty"`
|
||||
RepoStatus string `json:"repo_status,omitempty"`
|
||||
RepoSizeBytes int64 `json:"repo_size_bytes"`
|
||||
SnapshotCount int `json:"snapshot_count"`
|
||||
OpenAlertCount int `json:"open_alert_count"`
|
||||
@@ -85,6 +86,7 @@ func hostToView(h store.Host) hostView {
|
||||
Tags: h.Tags,
|
||||
CurrentJobID: h.CurrentJobID,
|
||||
LastBackupStatus: h.LastBackupStatus,
|
||||
RepoStatus: h.RepoStatus,
|
||||
RepoSizeBytes: h.RepoSizeBytes,
|
||||
SnapshotCount: h.SnapshotCount,
|
||||
OpenAlertCount: h.OpenAlertCount,
|
||||
|
||||
Reference in New Issue
Block a user