mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
fix(edge-stack) make protainer compatible with previous agent EE-5614 (#9220)
This commit is contained in:
parent
8c533bee67
commit
7acd1080ad
3 changed files with 42 additions and 6 deletions
|
@ -75,12 +75,18 @@ func (handler *Handler) endpointEdgeStackInspect(w http.ResponseWriter, r *http.
|
|||
return httperror.InternalServerError("Unable to load repository", err)
|
||||
}
|
||||
|
||||
fileContent, err := filesystem.FilterDirForCompatibility(dirEntries, fileName, endpoint.Agent.Version)
|
||||
if err != nil {
|
||||
return httperror.InternalServerError("File not found", err)
|
||||
}
|
||||
|
||||
dirEntries = filesystem.FilterDirForEntryFile(dirEntries, fileName)
|
||||
|
||||
return response.JSON(w, edge.StackPayload{
|
||||
DirEntries: dirEntries,
|
||||
EntryFileName: fileName,
|
||||
Name: edgeStack.Name,
|
||||
Namespace: namespace,
|
||||
DirEntries: dirEntries,
|
||||
EntryFileName: fileName,
|
||||
StackFileContent: fileContent,
|
||||
Name: edgeStack.Name,
|
||||
Namespace: namespace,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue