mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 04:38:36 +00:00
feat: fix Ln number
This commit is contained in:
@@ -62,7 +62,7 @@ type ViewGroup struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ViewJob struct {
|
type ViewJob struct {
|
||||||
Id int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@ func ViewPost(ctx *context.Context) {
|
|||||||
respJobs := make([]*ViewJob, len(jobs))
|
respJobs := make([]*ViewJob, len(jobs))
|
||||||
for i, v := range jobs {
|
for i, v := range jobs {
|
||||||
respJobs[i] = &ViewJob{
|
respJobs[i] = &ViewJob{
|
||||||
Id: v.ID,
|
ID: v.ID,
|
||||||
Name: v.Name,
|
Name: v.Name,
|
||||||
Status: v.Status.String(),
|
Status: v.Status.String(),
|
||||||
}
|
}
|
||||||
@@ -168,7 +168,7 @@ func ViewPost(ctx *context.Context) {
|
|||||||
logLines := make([]ViewStepLogLine, len(logRows))
|
logLines := make([]ViewStepLogLine, len(logRows))
|
||||||
for i, row := range logRows {
|
for i, row := range logRows {
|
||||||
logLines[i] = ViewStepLogLine{
|
logLines[i] = ViewStepLogLine{
|
||||||
Ln: cursor.Cursor + int64(i),
|
Ln: cursor.Cursor + int64(i) + 1, // start at 1
|
||||||
M: row.Content,
|
M: row.Content,
|
||||||
T: float64(row.Time.AsTime().UnixNano()) / float64(time.Second),
|
T: float64(row.Time.AsTime().UnixNano()) / float64(time.Second),
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user