api: expose host.repo_status in /api/hosts JSON
CI / Test (rest) (pull_request) Successful in 11s
CI / Test (store) (pull_request) Successful in 10s
CI / Build (windows/amd64) (pull_request) Successful in 15s
CI / Lint (pull_request) Successful in 19s
CI / Build (linux/arm64) (pull_request) Successful in 7s
CI / Build (linux/amd64) (pull_request) Successful in 15s
CI / Test (server-http) (pull_request) Successful in 1m30s
e2e / Playwright vs docker-compose (pull_request) Failing after 6m36s
CI / Test (rest) (pull_request) Successful in 11s
CI / Test (store) (pull_request) Successful in 10s
CI / Build (windows/amd64) (pull_request) Successful in 15s
CI / Lint (pull_request) Successful in 19s
CI / Build (linux/arm64) (pull_request) Successful in 7s
CI / Build (linux/amd64) (pull_request) Successful in 15s
CI / Test (server-http) (pull_request) Successful in 1m30s
e2e / Playwright vs docker-compose (pull_request) Failing after 6m36s
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"`
|
CurrentJobID *string `json:"current_job_id,omitempty"`
|
||||||
LastBackupAt *string `json:"last_backup_at,omitempty"`
|
LastBackupAt *string `json:"last_backup_at,omitempty"`
|
||||||
LastBackupStatus *string `json:"last_backup_status,omitempty"`
|
LastBackupStatus *string `json:"last_backup_status,omitempty"`
|
||||||
|
RepoStatus string `json:"repo_status,omitempty"`
|
||||||
RepoSizeBytes int64 `json:"repo_size_bytes"`
|
RepoSizeBytes int64 `json:"repo_size_bytes"`
|
||||||
SnapshotCount int `json:"snapshot_count"`
|
SnapshotCount int `json:"snapshot_count"`
|
||||||
OpenAlertCount int `json:"open_alert_count"`
|
OpenAlertCount int `json:"open_alert_count"`
|
||||||
@@ -85,6 +86,7 @@ func hostToView(h store.Host) hostView {
|
|||||||
Tags: h.Tags,
|
Tags: h.Tags,
|
||||||
CurrentJobID: h.CurrentJobID,
|
CurrentJobID: h.CurrentJobID,
|
||||||
LastBackupStatus: h.LastBackupStatus,
|
LastBackupStatus: h.LastBackupStatus,
|
||||||
|
RepoStatus: h.RepoStatus,
|
||||||
RepoSizeBytes: h.RepoSizeBytes,
|
RepoSizeBytes: h.RepoSizeBytes,
|
||||||
SnapshotCount: h.SnapshotCount,
|
SnapshotCount: h.SnapshotCount,
|
||||||
OpenAlertCount: h.OpenAlertCount,
|
OpenAlertCount: h.OpenAlertCount,
|
||||||
|
|||||||
Reference in New Issue
Block a user