From 77200b36494dbf8f7aa1500fbf5976585fffdb66 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 19 Nov 2025 18:38:25 +0100 Subject: dashboard/app: add support for AI workflows Support for: - polling for AI jobs - handling completion of AI jobs - submitting job trajectory logs - basic visualization for AI jobs --- dashboard/app/handler.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'dashboard/app/handler.go') diff --git a/dashboard/app/handler.go b/dashboard/app/handler.go index bda86eb30..1acd9ed4d 100644 --- a/dashboard/app/handler.go +++ b/dashboard/app/handler.go @@ -214,6 +214,7 @@ func serveTemplate(w http.ResponseWriter, name string, data any) error { type uiHeader struct { Admin bool + AI bool // Enable UI elements related to AI URLPath string LoginLink string AnalyticsTrackingID string @@ -225,6 +226,7 @@ type uiHeader struct { Namespaces []uiNamespace ShowSubsystems bool ShowCoverageMenu bool + Message string // Show message box with this message when the page loads. } type uiNamespace struct { @@ -299,8 +301,10 @@ func commonHeader(c context.Context, r *http.Request, w http.ResponseWriter, ns } } if ns != adminPage { + cfg := getNsConfig(c, ns) h.Namespace = ns - h.ShowSubsystems = getNsConfig(c, ns).Subsystems.Service != nil + h.AI = cfg.AI && accessLevel >= AIAccessLevel + h.ShowSubsystems = cfg.Subsystems.Service != nil cookie.Namespace = ns encodeCookie(w, cookie) cached, err := CacheGet(c, r, ns) @@ -309,7 +313,7 @@ func commonHeader(c context.Context, r *http.Request, w http.ResponseWriter, ns } h.BugCounts = &cached.Total h.MissingBackports = cached.MissingBackports - h.ShowCoverageMenu = getNsConfig(c, ns).Coverage != nil + h.ShowCoverageMenu = cfg.Coverage != nil } return h, nil } -- cgit mrf-deployment