summaryrefslogtreecommitdiffstats
path: root/routers/admin/admin.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-11-18 19:05:33 -0500
committerUnknwon <joe2010xtmf@163.com>2014-11-18 19:05:33 -0500
commit2d8c414f8c44e20619d6680b96044424ef6ebb2a (patch)
treed9aa9233ab9f73f615dc9e683096a056dfd034bf /routers/admin/admin.go
parentce8d4cc80ba908022f0bbaf796b9025cfb68956e (diff)
downloadgitea-2d8c414f8c44e20619d6680b96044424ef6ebb2a.tar.gz
gitea-2d8c414f8c44e20619d6680b96044424ef6ebb2a.zip
Fix #635
Diffstat (limited to 'routers/admin/admin.go')
-rw-r--r--routers/admin/admin.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 6f2966bcb4..db36696c77 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -116,6 +116,7 @@ type AdminOperation int
const (
CLEAN_UNBIND_OAUTH AdminOperation = iota + 1
CLEAN_INACTIVATE_USER
+ CLEAN_REPO_ARCHIVES
)
func Dashboard(ctx *middleware.Context) {
@@ -131,11 +132,14 @@ func Dashboard(ctx *middleware.Context) {
switch AdminOperation(op) {
case CLEAN_UNBIND_OAUTH:
- success = "All unbind OAuthes have been deleted."
+ success = ctx.Tr("admin.dashboard.clean_unbind_oauth_success")
err = models.CleanUnbindOauth()
case CLEAN_INACTIVATE_USER:
- success = "All inactivate accounts have been deleted."
+ success = ctx.Tr("admin.dashboard.delete_inactivate_accounts_success")
err = models.DeleteInactivateUsers()
+ case CLEAN_REPO_ARCHIVES:
+ success = ctx.Tr("admin.dashboard.delete_repo_archives_success")
+ err = models.DeleteRepositoryArchives()
}
if err != nil {
@@ -148,6 +152,7 @@ func Dashboard(ctx *middleware.Context) {
}
ctx.Data["Stats"] = models.GetStatistic()
+ // FIXME: update periodically
updateSystemStatus()
ctx.Data["SysStatus"] = sysStatus
ctx.HTML(200, DASHBOARD)