Browse Source

修复日志显示问题

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.9.1^2
zouap 3 years ago
parent
commit
24799e1842
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      routers/api/v1/repo/cloudbrain.go

+ 4
- 4
routers/api/v1/repo/cloudbrain.go View File

@@ -420,16 +420,16 @@ func CloudbrainGetLog(ctx *context.Context) {
} else {
startLine := ctx.QueryInt("base_line")
endLine := startLine + lines

if order == "asc" {
if (startLine - lines) >= 0 {
if baseLine == "" {
startLine = 0
endLine = lines
} else {
endLine = startLine
startLine = endLine - lines
if startLine < 0 {
startLine = 0
}
} else {
endLine = startLine
}
}
result = getLogFromModelDir(job.JobName, startLine, endLine)


Loading…
Cancel
Save