feat(gitops): show live git validity status in workflow overview [BE-12885] (#2447)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Chaim Lev-Ari
2026-04-27 13:11:55 +03:00
committed by GitHub
parent da36002d37
commit ae1b6b8a71
26 changed files with 967 additions and 243 deletions
+9 -6
View File
@@ -5,6 +5,7 @@ import (
"time"
gocache "github.com/patrickmn/go-cache"
portainer "github.com/portainer/portainer/api"
"github.com/portainer/portainer/api/dataservices"
httperror "github.com/portainer/portainer/pkg/libhttp/error"
@@ -18,15 +19,17 @@ const (
type Handler struct {
*mux.Router
dataStore dataservices.DataStore
cache *gocache.Cache
dataStore dataservices.DataStore
gitService portainer.GitService
cache *gocache.Cache
}
func NewHandler(dataStore dataservices.DataStore) *Handler {
func NewHandler(dataStore dataservices.DataStore, gitService portainer.GitService) *Handler {
h := &Handler{
Router: mux.NewRouter(),
dataStore: dataStore,
cache: gocache.New(cacheTTL, cacheCleanupInterval),
Router: mux.NewRouter(),
dataStore: dataStore,
gitService: gitService,
cache: gocache.New(cacheTTL, cacheCleanupInterval),
}
h.Handle("/gitops/workflows", httperror.LoggerHandler(h.list)).Methods(http.MethodGet)