This commit is contained in:
parent
77d7a8624c
commit
b03e85db0b
7 changed files with 77 additions and 2 deletions
|
@ -16,8 +16,10 @@ type IndexData struct {
|
|||
}
|
||||
|
||||
type IndexWorker struct {
|
||||
ID string
|
||||
Worker
|
||||
Status *types.WorkerStatus
|
||||
Status *types.WorkerStatus
|
||||
QueueEnable bool
|
||||
}
|
||||
|
||||
func handleIndex(w http.ResponseWriter, r *http.Request) {
|
||||
|
@ -39,11 +41,13 @@ func handleIndex(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
slog.InfoContext(r.Context(), "Got Worker Status", "id", i, "status", status)
|
||||
data.Workers = append(data.Workers, IndexWorker{
|
||||
ID: i,
|
||||
Worker: *Workers[i],
|
||||
Status: &status,
|
||||
})
|
||||
} else {
|
||||
data.Workers = append(data.Workers, IndexWorker{
|
||||
ID: i,
|
||||
Worker: *Workers[i],
|
||||
Status: nil,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue