|
|
@@ -46,7 +46,12 @@ type LatestAppRevisionRequest struct {
|
|
|
|
|
|
// LatestAppRevisionResponse is the response object for the /apps/{porter_app_name}/latest endpoint
|
|
|
type LatestAppRevisionResponse struct {
|
|
|
+ // B64AppProto is the base64 encoded app proto definition
|
|
|
B64AppProto string `json:"b64_app_proto"`
|
|
|
+ // Status is the status of the revision
|
|
|
+ Status string `json:"status"`
|
|
|
+ // RevisionNumber is the revision number with respect to the app and deployment target
|
|
|
+ RevisionNumber uint64 `json:"revision_number"`
|
|
|
}
|
|
|
|
|
|
// ServeHTTP translates the request into a CurrentAppRevision grpc request, forwards to the cluster control plane, and returns the response.
|
|
|
@@ -145,7 +150,9 @@ func (c *LatestAppRevisionHandler) ServeHTTP(w http.ResponseWriter, r *http.Requ
|
|
|
b64 := base64.StdEncoding.EncodeToString(encoded)
|
|
|
|
|
|
response := &LatestAppRevisionResponse{
|
|
|
- B64AppProto: b64,
|
|
|
+ B64AppProto: b64,
|
|
|
+ Status: currentAppRevisionResp.Msg.Status,
|
|
|
+ RevisionNumber: currentAppRevisionResp.Msg.RevisionNumber,
|
|
|
}
|
|
|
|
|
|
c.WriteResult(w, r, response)
|