1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 06:49:40 +02:00

feat(system): upgrade on swarm [EE-5848] (#11728)

Co-authored-by: Chaim Lev-Ari <chaim.levi-ari@portainer.io>
Co-authored-by: LP B <xAt0mZ@users.noreply.github.com>
This commit is contained in:
Chaim Lev-Ari 2024-09-20 19:00:38 +03:00 committed by GitHub
parent 3cb484f06a
commit 6f84317e7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 362 additions and 158 deletions

View file

@ -7,6 +7,7 @@ import (
"github.com/portainer/portainer/api/dataservices"
"github.com/portainer/portainer/api/http/security"
"github.com/portainer/portainer/api/internal/upgrade"
"github.com/portainer/portainer/api/platform"
httperror "github.com/portainer/portainer/pkg/libhttp/error"
"github.com/gorilla/mux"
@ -15,22 +16,25 @@ import (
// Handler is the HTTP handler used to handle status operations.
type Handler struct {
*mux.Router
status *portainer.Status
dataStore dataservices.DataStore
upgradeService upgrade.Service
status *portainer.Status
dataStore dataservices.DataStore
upgradeService upgrade.Service
platformService platform.Service
}
// NewHandler creates a handler to manage status operations.
func NewHandler(bouncer security.BouncerService,
status *portainer.Status,
dataStore dataservices.DataStore,
platformService platform.Service,
upgradeService upgrade.Service) *Handler {
h := &Handler{
Router: mux.NewRouter(),
dataStore: dataStore,
status: status,
upgradeService: upgradeService,
Router: mux.NewRouter(),
dataStore: dataStore,
status: status,
upgradeService: upgradeService,
platformService: platformService,
}
router := h.PathPrefix("/system").Subrouter()