| @@ -766,13 +766,17 @@ func CloudbrainGetLog(ctx *context.APIContext) { | |||||
| if baseLine == "" && order == "desc" && result["Lines"].(int) == 0 { | if baseLine == "" && order == "desc" && result["Lines"].(int) == 0 { | ||||
| result["Lines"] = 1 | result["Lines"] = 1 | ||||
| result["EndLine"] = 1 | result["EndLine"] = 1 | ||||
| content = content + ctx.Data["existStr"].(string) | |||||
| } | } | ||||
| if ctx.Data["existStr"] != nil && result["Lines"].(int) < 60 { | |||||
| if result["Lines"].(int) == 0 && result["StartLine"] == result["EndLine"] && result["StartLine"].(int) != 0 { | |||||
| content = content + ctx.Data["existStr"].(string) | content = content + ctx.Data["existStr"].(string) | ||||
| if result["Lines"].(int) == 0 { | |||||
| result["Lines"] = 1 | |||||
| result["EndLine"] = result["StartLine"] | |||||
| } | |||||
| result["Lines"] = 1 | |||||
| result["StartLine"] = result["StartLine"].(int) - 1 | |||||
| } | |||||
| if result["Lines"].(int) == 1 && result["StartLine"] == result["EndLine"] { | |||||
| result["Lines"] = 0 | |||||
| result["StartLine"] = result["StartLine"].(int) + 1 | |||||
| } | } | ||||
| } | } | ||||
| } else { | } else { | ||||