| @@ -8,7 +8,6 @@ package repo | |||||
| import ( | import ( | ||||
| "bufio" | "bufio" | ||||
| "encoding/json" | "encoding/json" | ||||
| "fmt" | |||||
| "io" | "io" | ||||
| "net/http" | "net/http" | ||||
| "os" | "os" | ||||
| @@ -422,7 +421,7 @@ func CloudbrainGetLog(ctx *context.Context) { | |||||
| startLine := ctx.QueryInt("base_line") | startLine := ctx.QueryInt("base_line") | ||||
| endLine := startLine + lines | endLine := startLine + lines | ||||
| if order == "asc" { | |||||
| if order == "asc" && (startLine-lines) > 0 { | |||||
| endLine = startLine | endLine = startLine | ||||
| startLine = endLine - lines | startLine = endLine - lines | ||||
| if startLine < 0 { | if startLine < 0 { | ||||
| @@ -513,7 +512,6 @@ func getLastLogFromModelDir(jobName string, lines int) map[string]interface{} { | |||||
| } | } | ||||
| if error == nil { | if error == nil { | ||||
| if i >= startLine { | if i >= startLine { | ||||
| log.Info("i=" + fmt.Sprint(i)) | |||||
| re = re + line | re = re + line | ||||
| } | } | ||||
| } | } | ||||