Quellcode durchsuchen

HandleGetJobStatus: return job start time

Anukul Sangwan vor 4 Jahren
Ursprung
Commit
adc2494ff0
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. 4 1
      server/api/release_handler.go

+ 4 - 1
server/api/release_handler.go

@@ -602,7 +602,8 @@ func (app *App) HandleGetReleaseAllPods(w http.ResponseWriter, r *http.Request)
 }
 
 type GetJobStatusResult struct {
-	Status string `json:"status"`
+	Status    string       `json:"status"`
+	StartTime *metav1.Time `json:"start_time"`
 }
 
 // HandleGetJobStatus gets the status for a specific job
@@ -708,6 +709,8 @@ func (app *App) HandleGetJobStatus(w http.ResponseWriter, r *http.Request) {
 			}
 		}
 
+		res.StartTime = mostRecentJob.Status.StartTime
+
 		// get the status of the most recent job
 		if mostRecentJob.Status.Succeeded >= 1 {
 			res.Status = "succeeded"