MCPcopy Create free account
hub / github.com/gogs/gogs / Dashboard

Function Dashboard

internal/route/admin/admin.go:108–123  ·  view source on GitHub ↗
(c *context.Context)

Source from the content-addressed store, hash-verified

106}
107
108func Dashboard(c *context.Context) {
109 c.Title("admin.dashboard")
110 c.PageIs("Admin")
111 c.PageIs("AdminDashboard")
112
113 c.Data["GitVersion"] = conf.Git.Version
114 c.Data["GoVersion"] = runtime.Version()
115 c.Data["BuildTime"] = conf.BuildTime
116 c.Data["BuildCommit"] = conf.BuildCommit
117
118 c.Data["Stats"] = database.GetStatistic(c.Req.Context())
119 // FIXME: update periodically
120 updateSystemStatus()
121 c.Data["SysStatus"] = sysStatus
122 c.Success(tmplDashboard)
123}
124
125// Operation types.
126type AdminOperation int

Callers

nothing calls this directly

Calls 5

GetStatisticFunction · 0.92
updateSystemStatusFunction · 0.85
TitleMethod · 0.80
PageIsMethod · 0.80
SuccessMethod · 0.80

Tested by

no test coverage detected