feat(runner-view): add pagination for jobs in runner details page

This commit is contained in:
fuxiaohei
2022-11-10 21:39:05 +08:00
committed by Jason Song
parent 0c3f283a84
commit e218b6f1d2
4 changed files with 35 additions and 7 deletions

View File

@@ -42,8 +42,12 @@ func Runners(ctx *context.Context) {
func RunnersEdit(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("repo.settings.runners")
ctx.Data["PageIsSettingsRunners"] = true
page := ctx.FormInt("page")
if page <= 1 {
page = 1
}
common.RunnerDetails(ctx, tplRunnerEdit,
common.RunnerDetails(ctx, tplRunnerEdit, page,
ctx.ParamsInt64(":runnerid"), 0, ctx.Repo.Repository.ID,
)
}