|
|
|
@@ -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) |
|
|
|
|