Update UI to use new allocated ports fields (#8631)

* nomad: canonicalize alloc shared resources to populate ports

* ui: network ports

* ui: remove unused task network references and update tests with new shared ports model

* ui: lint

* ui: revert auto formatting

* ui: remove unused page objects

* structs: remove unrelated test from bad conflict resolution

* ui: formatting
This commit is contained in:
Nick Ethier
2020-08-20 11:07:13 -04:00
committed by GitHub
parent 8916643b0d
commit 2be03bc0d9
17 changed files with 122 additions and 138 deletions

View File

@@ -94,6 +94,7 @@ func (s *HTTPServer) allocGet(allocID string, resp http.ResponseWriter, req *htt
}
// Decode the payload if there is any
alloc := out.Alloc
if alloc.Job != nil && len(alloc.Job.Payload) != 0 {
decoded, err := snappy.Decode(nil, alloc.Job.Payload)
@@ -105,6 +106,9 @@ func (s *HTTPServer) allocGet(allocID string, resp http.ResponseWriter, req *htt
}
alloc.SetEventDisplayMessages()
// Handle 0.12 ports upgrade path
alloc.AllocatedResources.Shared.Canonicalize()
return alloc, nil
}