|
|
@@ -1359,6 +1359,23 @@ func GrampusGetLog(ctx *context.Context) { |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
result, err := grampus.GetJob(jobID) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetJob(%s) failed:%v", job.JobName, err) |
|
|
|
ctx.JSON(http.StatusOK, map[string]interface{}{ |
|
|
|
"JobName": job.JobName, |
|
|
|
"Content": content, |
|
|
|
"CanLogDownload": false, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if result != nil { |
|
|
|
job.Status = grampus.TransTrainJobStatus(result.JobInfo.Status) |
|
|
|
if job.Status == models.GrampusStatusFailed { |
|
|
|
content = content + "\n" + result.ExitDiagnostics |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
canLogDownload := err == nil && job.IsUserHasRight(ctx.User) |
|
|
|
ctx.JSON(http.StatusOK, map[string]interface{}{ |
|
|
|
"JobName": job.JobName, |
|
|
|