aboutsummaryrefslogtreecommitdiffstats
path: root/routers/admin/admin.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-06-13 13:01:52 -0400
committerUnknown <joe2010xtmf@163.com>2014-06-13 13:01:52 -0400
commitd952b4200c7c024ff5a809a3885bc79be9e4cce9 (patch)
treeb106d81f51a10144749e20c923713fd2c78643e4 /routers/admin/admin.go
parente07674bff19dcc321a1611a3598d69c418ac8642 (diff)
downloadgitea-d952b4200c7c024ff5a809a3885bc79be9e4cce9.tar.gz
gitea-d952b4200c7c024ff5a809a3885bc79be9e4cce9.zip
Add corn rask monitor panel
Diffstat (limited to 'routers/admin/admin.go')
-rw-r--r--routers/admin/admin.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 56eba88a2b..d4b49a9e15 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -14,6 +14,7 @@ import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/base"
+ "github.com/gogits/gogs/modules/cron"
"github.com/gogits/gogs/modules/middleware"
"github.com/gogits/gogs/modules/setting"
)
@@ -228,3 +229,19 @@ func Config(ctx *middleware.Context) {
ctx.HTML(200, "admin/config")
}
+
+func Monitor(ctx *middleware.Context) {
+ ctx.Data["Title"] = "Monitoring Center"
+ ctx.Data["PageIsMonitor"] = true
+
+ tab := ctx.Query("tab")
+ switch tab {
+ case "process":
+ ctx.Data["PageIsMonitorProcess"] = true
+ default:
+ ctx.Data["PageIsMonitorCron"] = true
+ ctx.Data["Entries"] = cron.ListEntries()
+ }
+
+ ctx.HTML(200, "admin/monitor/cron")
+}