Merge pull request #175 from camandel/api_logarchived
gateway: add api to get log status
This commit is contained in:
commit
9fd4b662a8
|
@ -111,6 +111,11 @@ func createRunTaskResponse(rt *rstypes.RunTask, rct *rstypes.RunConfigTask) *gwa
|
||||||
}
|
}
|
||||||
rcts := rct.Steps[i]
|
rcts := rct.Steps[i]
|
||||||
rts := rt.Steps[i]
|
rts := rt.Steps[i]
|
||||||
|
|
||||||
|
if rts.LogPhase == rstypes.RunTaskFetchPhaseFinished {
|
||||||
|
s.LogArchived = true
|
||||||
|
}
|
||||||
|
|
||||||
switch rcts := rcts.(type) {
|
switch rcts := rcts.(type) {
|
||||||
case *rstypes.RunStep:
|
case *rstypes.RunStep:
|
||||||
s.Type = "run"
|
s.Type = "run"
|
||||||
|
@ -124,7 +129,6 @@ func createRunTaskResponse(rt *rstypes.RunTask, rct *rstypes.RunConfigTask) *gwa
|
||||||
s.Shell = shell
|
s.Shell = shell
|
||||||
|
|
||||||
s.ExitStatus = rts.ExitStatus
|
s.ExitStatus = rts.ExitStatus
|
||||||
|
|
||||||
case *rstypes.SaveToWorkspaceStep:
|
case *rstypes.SaveToWorkspaceStep:
|
||||||
s.Type = "save_to_workspace"
|
s.Type = "save_to_workspace"
|
||||||
s.Name = "save to workspace"
|
s.Name = "save to workspace"
|
||||||
|
|
|
@ -106,6 +106,8 @@ type RunTaskResponseStep struct {
|
||||||
|
|
||||||
StartTime *time.Time `json:"start_time"`
|
StartTime *time.Time `json:"start_time"`
|
||||||
EndTime *time.Time `json:"end_time"`
|
EndTime *time.Time `json:"end_time"`
|
||||||
|
|
||||||
|
LogArchived bool `json:"log_archived"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RunActionType string
|
type RunActionType string
|
||||||
|
|
Loading…
Reference in New Issue