Add the log tables to the debug page.
This commit is contained in:
parent
a339a3eb69
commit
05a8adb25e
|
@ -621,6 +621,11 @@ type DebugPageDatabase struct {
|
|||
Attachments int
|
||||
Polls int
|
||||
|
||||
LoginLogs int
|
||||
RegLogs int
|
||||
ModLogs int
|
||||
AdminLogs int
|
||||
|
||||
Views int
|
||||
ViewsAgents int
|
||||
ViewsForums int
|
||||
|
|
|
@ -80,6 +80,24 @@ func Debug(w http.ResponseWriter, r *http.Request, user c.User) c.RouteError {
|
|||
if err != nil {
|
||||
return c.InternalError(err,w,r)
|
||||
}
|
||||
|
||||
loginLogs, err := count("login_logs")
|
||||
if err != nil {
|
||||
return c.InternalError(err,w,r)
|
||||
}
|
||||
regLogs, err := count("registration_logs")
|
||||
if err != nil {
|
||||
return c.InternalError(err,w,r)
|
||||
}
|
||||
modLogs, err := count("moderation_logs")
|
||||
if err != nil {
|
||||
return c.InternalError(err,w,r)
|
||||
}
|
||||
adminLogs, err := count("administration_logs")
|
||||
if err != nil {
|
||||
return c.InternalError(err,w,r)
|
||||
}
|
||||
|
||||
views, err := count("viewchunks")
|
||||
if err != nil {
|
||||
return c.InternalError(err,w,r)
|
||||
|
@ -112,7 +130,7 @@ func Debug(w http.ResponseWriter, r *http.Request, user c.User) c.RouteError {
|
|||
if err != nil {
|
||||
return c.InternalError(err,w,r)
|
||||
}
|
||||
debugDatabase := c.DebugPageDatabase{c.Topics.Count(),c.Users.Count(),c.Rstore.Count(),c.Prstore.Count(),c.Activity.Count(),likes,attachs,polls,views,viewsAgents,viewsForums,viewsLangs,viewsReferrers,viewsSystems,postChunks,topicChunks}
|
||||
debugDatabase := c.DebugPageDatabase{c.Topics.Count(),c.Users.Count(),c.Rstore.Count(),c.Prstore.Count(),c.Activity.Count(),likes,attachs,polls,loginLogs,regLogs,modLogs,adminLogs,views,viewsAgents,viewsForums,viewsLangs,viewsReferrers,viewsSystems,postChunks,topicChunks}
|
||||
|
||||
staticSize, err := c.DirSize("./public/")
|
||||
if err != nil {
|
||||
|
|
|
@ -121,6 +121,24 @@
|
|||
<div class="grid_item grid_stat"><span>?</span></div>
|
||||
|
||||
|
||||
<div class="grid_item grid_stat grid_stat_head"><span>Login Logs</span></div>
|
||||
<div class="grid_item grid_stat grid_stat_head"><span>Reg Logs</span></div>
|
||||
<div class="grid_item grid_stat grid_stat_head"><span>Mod Logs</span></div>
|
||||
|
||||
<div class="grid_item grid_stat"><span>{{.Database.LoginLogs}}</span></div>
|
||||
<div class="grid_item grid_stat"><span>{{.Database.RegLogs}}</span></div>
|
||||
<div class="grid_item grid_stat"><span>{{.Database.ModLogs}}</span></div>
|
||||
|
||||
|
||||
<div class="grid_item grid_stat grid_stat_head"><span>Admin Logs</span></div>
|
||||
<div class="grid_item grid_stat grid_stat_head"><span>???</span></div>
|
||||
<div class="grid_item grid_stat grid_stat_head"><span>???</span></div>
|
||||
|
||||
<div class="grid_item grid_stat"><span>{{.Database.AdminLogs}}</span></div>
|
||||
<div class="grid_item grid_stat"><span>?</span></div>
|
||||
<div class="grid_item grid_stat"><span>?</span></div>
|
||||
|
||||
|
||||
<div class="grid_item grid_stat grid_stat_head"><span>Views</span></div>
|
||||
<div class="grid_item grid_stat grid_stat_head"><span>Views Agents</span></div>
|
||||
<div class="grid_item grid_stat grid_stat_head"><span>Views Forums</span></div>
|
||||
|
|
Loading…
Reference in New Issue