initial jobs dashboard

This commit is contained in:
allanice001
2025-09-23 05:33:20 +01:00
parent c50fc1540a
commit 4ee03d5409
27 changed files with 2218 additions and 205 deletions

View File

@@ -8,6 +8,7 @@ import (
"github.com/glueops/autoglue/internal/handlers/authn"
"github.com/glueops/autoglue/internal/handlers/clusters"
"github.com/glueops/autoglue/internal/handlers/health"
"github.com/glueops/autoglue/internal/handlers/jobs"
"github.com/glueops/autoglue/internal/handlers/labels"
"github.com/glueops/autoglue/internal/handlers/nodepools"
"github.com/glueops/autoglue/internal/handlers/orgs"
@@ -36,6 +37,17 @@ func RegisterRoutes(r chi.Router) {
ad.Delete("/users/{userId}", authn.AdminDeleteUser)
})
v1.Route("/jobs", func(j chi.Router) {
j.Use(authMW)
j.Get("/kpi", jobs.GetKPI)
j.Get("/queues", jobs.GetQueues)
j.Get("/active", jobs.GetActive)
j.Get("/failures", jobs.GetFailures)
j.Post("/{id}/retry", jobs.RetryNow)
j.Post("/{id}/cancel", jobs.Cancel)
j.Post("/{id}/enqueue", jobs.Enqueue)
})
v1.Route("/auth", func(a chi.Router) {
a.Post("/login", authn.Login)
a.Post("/register", authn.Register)