Remove bottlenecks in process handling, still some rough edges

This commit is contained in:
Ingo Oppermann
2024-07-18 17:16:49 +02:00
parent 8a28e2cf96
commit 72883d18d4
19 changed files with 302 additions and 205 deletions

View File

@@ -241,7 +241,7 @@ func (h *ClusterHandler) convertStoreProcessToAPIProcess(p store.Process, filter
if filter.config {
config := &api.ProcessConfig{}
config.Unmarshal(p.Config)
config.Unmarshal(p.Config, p.Metadata)
process.Config = config
}
@@ -442,7 +442,7 @@ func (h *ClusterHandler) ProcessUpdate(c echo.Context) error {
}
// Prefill the config with the current values
process.Unmarshal(current.Config)
process.Unmarshal(current.Config, current.Metadata)
if err := util.ShouldBindJSON(c, &process); err != nil {
return api.Err(http.StatusBadRequest, "", "invalid JSON: %s", err.Error())