List all pending deployments as array, with an action for each process

This commit is contained in:
Ingo Oppermann
2025-09-18 15:30:35 +02:00
parent 8c7ca4898a
commit a6e806fd31
6 changed files with 67 additions and 136 deletions

View File

@@ -309,6 +309,7 @@ func (h *ClusterHandler) Deployments(c echo.Context) error {
apiProcesses := []api.ClusterDeploymentsProcess{}
for _, p := range processes {
apiProcesses = append(apiProcesses, api.ClusterDeploymentsProcess{
Action: p.Action,
ID: p.ID,
Domain: p.Domain,
NodeID: p.NodeID,
@@ -321,12 +322,6 @@ func (h *ClusterHandler) Deployments(c echo.Context) error {
}
return c.JSON(http.StatusOK, api.ClusterDeployments{
Process: api.ClusterDeploymentsProcesses{
Delete: marshal(deployments.Process.Delete),
Update: marshal(deployments.Process.Update),
Order: marshal(deployments.Process.Order),
Add: marshal(deployments.Process.Add),
Relocate: marshal(deployments.Process.Relocate),
},
Process: marshal(deployments.Process),
})
}