summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorAllen Wild <aswild@users.noreply.github.com>2018-03-02 04:09:43 -0500
committerLauris BH <lauris@nix.lv>2018-03-02 11:09:43 +0200
commit8606d9f5bc01fce90159c9bdef9989a31a865e38 (patch)
treeddac9956aa33be65d7acf7f733c87c6893a6b083 /routers
parent2cd3622ddc340a67d95e1471f1e13bda383ef95b (diff)
downloadgitea-8606d9f5bc01fce90159c9bdef9989a31a865e38.tar.gz
gitea-8606d9f5bc01fce90159c9bdef9989a31a865e38.zip
Add admin dashboard option to run health checks (#3606)
There's one for git gc, why not git fsck too? Also add a couple more trace logs to GitFsck to see progress
Diffstat (limited to 'routers')
-rw-r--r--routers/admin/admin.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 39a8f718ca..9b18847d6c 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -122,6 +122,7 @@ const (
syncRepositoryUpdateHook
reinitMissingRepository
syncExternalUsers
+ gitFsck
)
// Dashboard show admin panel dashboard
@@ -161,6 +162,9 @@ func Dashboard(ctx *context.Context) {
case syncExternalUsers:
success = ctx.Tr("admin.dashboard.sync_external_users_started")
go models.SyncExternalUsers()
+ case gitFsck:
+ success = ctx.Tr("admin.dashboard.git_fsck_started")
+ go models.GitFsck()
}
if err != nil {