Browse Source

修复日志显示问题

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

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

@@ -8,7 +8,6 @@ package repo
import (
"bufio"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
@@ -422,7 +421,7 @@ func CloudbrainGetLog(ctx *context.Context) {
startLine := ctx.QueryInt("base_line")
endLine := startLine + lines

if order == "asc" {
if order == "asc" && (startLine-lines) > 0 {
endLine = startLine
startLine = endLine - lines
if startLine < 0 {
@@ -513,7 +512,6 @@ func getLastLogFromModelDir(jobName string, lines int) map[string]interface{} {
}
if error == nil {
if i >= startLine {
log.Info("i=" + fmt.Sprint(i))
re = re + line
}
}


Loading…
Cancel
Save