forked from longtao.wu/droboticflow
24 lines
1.5 KiB
Go
24 lines
1.5 KiB
Go
package api
|
|
|
|
import "github.com/go-chi/chi/v5"
|
|
|
|
// mountDashboardRoutes registers the overview dashboards, workforce and
|
|
// production statistics, and the data-operations views.
|
|
func (server *server) mountDashboardRoutes(router chi.Router) {
|
|
router.Get("/api/dashboard", server.withDashboardResponseCache("dashboard", server.handleDashboard))
|
|
router.Get("/api/workforce-returns", server.handleWorkforceReturns)
|
|
router.Get("/api/dashboard/workforce", server.handleDashboardWorkforce)
|
|
router.Get("/api/dashboard/production-quality", server.handleProductionQuality)
|
|
router.Get("/api/dashboard/annotation-output", server.handleAnnotationOutput)
|
|
server.withRoles(router, rolesAdmin...).Get("/api/dashboard/annotation-output/health", server.handleAnnotationOutputHealth)
|
|
router.Get("/api/dashboard/production", server.withDashboardResponseCache("production", server.handleProductionDashboard))
|
|
router.Get("/api/dashboard/production/scope", server.handleProductionScope)
|
|
router.Put("/api/dashboard/production/scope", server.handleProductionScope)
|
|
|
|
router.Get("/api/data-operations/summary", server.handleDataOperationsSummary)
|
|
router.Get("/api/data-operations/stage-items", server.handleDataOperationsStageItems)
|
|
router.Get("/api/data-operations/training-usage", server.handleDataOperationsTrainingUsage)
|
|
router.Get("/api/data-operations/datasets", server.handleDataOperationsDatasets)
|
|
server.withRoles(router, rolesAdmin...).Post("/api/data-operations/backfill", server.handleDataOperationsBackfill)
|
|
}
|