mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 12:48:37 +00:00
fix: builds UI
This commit is contained in:
@@ -105,8 +105,14 @@ func updateRepoRunsNumbers(ctx context.Context, repo *repo_model.Repository) err
|
|||||||
builder.Select("count(*)").From("bots_run").
|
builder.Select("count(*)").From("bots_run").
|
||||||
Where(builder.Eq{
|
Where(builder.Eq{
|
||||||
"repo_id": repo.ID,
|
"repo_id": repo.ID,
|
||||||
"status": StatusFailure,
|
}.And(
|
||||||
},
|
builder.In("status",
|
||||||
|
StatusSuccess,
|
||||||
|
StatusFailure,
|
||||||
|
StatusCancelled,
|
||||||
|
StatusSkipped,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
).
|
).
|
||||||
Update(repo)
|
Update(repo)
|
||||||
|
@@ -99,6 +99,7 @@ func List(ctx *context.Context) {
|
|||||||
opts.IsClosed = util.OptionalBoolNone
|
opts.IsClosed = util.OptionalBoolNone
|
||||||
if ctx.FormString("state") == "closed" {
|
if ctx.FormString("state") == "closed" {
|
||||||
opts.IsClosed = util.OptionalBoolTrue
|
opts.IsClosed = util.OptionalBoolTrue
|
||||||
|
ctx.Data["IsShowClosed"] = true
|
||||||
} else {
|
} else {
|
||||||
opts.IsClosed = util.OptionalBoolFalse
|
opts.IsClosed = util.OptionalBoolFalse
|
||||||
}
|
}
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
{{svg "octicon-issue-opened" 16 "mr-3"}}
|
{{svg "octicon-issue-opened" 16 "mr-3"}}
|
||||||
{{.locale.Tr "repo.builds.open_tab" $.NumOpenRuns}}
|
{{.locale.Tr "repo.builds.open_tab" $.NumOpenRuns}}
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .IsShowClosed}}active{{end}} item" href="{{$.Link}}?workflow={{.CurWorkflow}}&&state=closed">
|
<a class="{{if .IsShowClosed}}active{{end}} item" href="{{$.Link}}?workflow={{.CurWorkflow}}&state=closed">
|
||||||
{{svg "octicon-issue-closed" 16 "mr-3"}}
|
{{svg "octicon-issue-closed" 16 "mr-3"}}
|
||||||
{{.locale.Tr "repo.builds.closed_tab" $.NumClosedRuns}}
|
{{.locale.Tr "repo.builds.closed_tab" $.NumClosedRuns}}
|
||||||
</a>
|
</a>
|
||||||
|
Reference in New Issue
Block a user