diff --git a/routers/web/repo/vault/vault.go b/routers/web/repo/vault/vault.go index e2baafb886..d5a0207ce5 100644 --- a/routers/web/repo/vault/vault.go +++ b/routers/web/repo/vault/vault.go @@ -362,11 +362,13 @@ func Audit(ctx *context.Context) { return } + pager := context.NewPagination(int(total), pageSize, page, 5) + pager.AddParamFromRequest(ctx.Req) + ctx.Data["PageIsVault"] = true ctx.Data["PageIsVaultAudit"] = true ctx.Data["AuditEntries"] = entries - ctx.Data["Page"] = page - ctx.Data["PageSize"] = pageSize + ctx.Data["Page"] = pager ctx.Data["Total"] = total ctx.Data["CanWrite"] = ctx.Repo.CanWrite(unit.TypeCode) ctx.Data["IsRepoAdmin"] = ctx.Repo.IsAdmin() diff --git a/services/vault/vault.go b/services/vault/vault.go index b3e5f54124..5fe80a9181 100644 --- a/services/vault/vault.go +++ b/services/vault/vault.go @@ -99,8 +99,10 @@ type Token struct { RepoID int64 Description string Scope string + CreatedUnix int64 ExpiresUnix int64 LastUsedUnix int64 + UsedCount int64 IsRevoked bool IsExpired bool }