WIP Add more language strings for panel debug.
Shorten more things. Sneak draft tables in. Add the profile_block phrase. Add the panel_debug_memory_stats phrase. Add the panel_debug_memory_stats_sys phrase. Add the panel_debug_memory_stats_heapsys phrase. Add the panel_debug_memory_stats_heapalloc phrase. Add the panel_debug_memory_stats_heapidle phrase. Add the panel_debug_memory_stats_heapobjects phrase. Add the panel_debug_memory_stats_stackinuse phrase. Add the panel_debug_caches phrase. Add the panel_debug_caches_topic phrase. Add the panel_debug_caches_user phrase. Add the panel_debug_caches_reply phrase. Add the panel_debug_caches_topic_list phrase. Add the panel_debug_database phrase. Add the panel_debug_database_topics phrase. Add the panel_debug_database_users phrase. Add the panel_debug_database_replies phrase. Add the panel_debug_disk phrase.
This commit is contained in:
parent
8ab9ca3bf0
commit
65b4fef40e
|
@ -10,7 +10,7 @@ type tC = tblColumn
|
||||||
type tblKey = qgen.DBTableKey
|
type tblKey = qgen.DBTableKey
|
||||||
|
|
||||||
func createTables(adapter qgen.Adapter) (err error) {
|
func createTables(adapter qgen.Adapter) (err error) {
|
||||||
createTable := func(table string, charset string, collation string, columns []qgen.DBTableColumn, keys []qgen.DBTableKey) {
|
createTable := func(table string, charset string, collation string, columns []tC, keys []tblKey) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -419,10 +419,22 @@ func createTables(adapter qgen.Adapter) (err error) {
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
createTable("users_friends", "", "",
|
||||||
|
[]tC{
|
||||||
|
tC{"uid", "int", 0, false, false, ""},
|
||||||
|
tC{"uid2", "int", 0, false, false, ""},
|
||||||
|
}, nil,
|
||||||
|
)
|
||||||
|
createTable("users_friends_invites", "", "",
|
||||||
|
[]tC{
|
||||||
|
tC{"requester", "int", 0, false, false, ""},
|
||||||
|
tC{"target", "int", 0, false, false, ""},
|
||||||
|
}, nil,
|
||||||
|
)
|
||||||
createTable("users_blocks", "", "",
|
createTable("users_blocks", "", "",
|
||||||
[]tC{
|
[]tC{
|
||||||
tC{"blocker", "int", 0, false, false, ""},
|
tC{"blocker", "int", 0, false, false, ""},
|
||||||
tC{"uid", "int", 0, false, false, ""},
|
tC{"blockedUser", "int", 0, false, false, ""},
|
||||||
}, nil,
|
}, nil,
|
||||||
)
|
)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/subtle"
|
||||||
"html"
|
"html"
|
||||||
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"os"
|
|
||||||
"io"
|
|
||||||
"regexp"
|
|
||||||
"crypto/subtle"
|
|
||||||
|
|
||||||
"github.com/Azareal/Gosora/common/phrases"
|
"github.com/Azareal/Gosora/common/phrases"
|
||||||
)
|
)
|
||||||
|
@ -182,8 +182,7 @@ func simpleUserCheck(w http.ResponseWriter, r *http.Request, user *User) (header
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetThemeByReq(r *http.Request) *Theme {
|
func GetThemeByReq(r *http.Request) *Theme {
|
||||||
var theme = &Theme{Name: ""}
|
theme := &Theme{Name: ""}
|
||||||
|
|
||||||
cookie, err := r.Cookie("current_theme")
|
cookie, err := r.Cookie("current_theme")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
inTheme, ok := Themes[html.EscapeString(cookie.Value)]
|
inTheme, ok := Themes[html.EscapeString(cookie.Value)]
|
||||||
|
@ -462,16 +461,14 @@ func NoBanned(w http.ResponseWriter, r *http.Request, user User) RouteError {
|
||||||
}
|
}
|
||||||
|
|
||||||
func ParseForm(w http.ResponseWriter, r *http.Request, user User) RouteError {
|
func ParseForm(w http.ResponseWriter, r *http.Request, user User) RouteError {
|
||||||
err := r.ParseForm()
|
if err := r.ParseForm(); err != nil {
|
||||||
if err != nil {
|
|
||||||
return LocalError("Bad Form", w, r, user)
|
return LocalError("Bad Form", w, r, user)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func NoSessionMismatch(w http.ResponseWriter, r *http.Request, user User) RouteError {
|
func NoSessionMismatch(w http.ResponseWriter, r *http.Request, user User) RouteError {
|
||||||
err := r.ParseForm()
|
if err := r.ParseForm(); err != nil {
|
||||||
if err != nil {
|
|
||||||
return LocalError("Bad Form", w, r, user)
|
return LocalError("Bad Form", w, r, user)
|
||||||
}
|
}
|
||||||
// TODO: Try to eliminate some of these allocations
|
// TODO: Try to eliminate some of these allocations
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
package extend
|
|
@ -1 +0,0 @@
|
||||||
This file is here so that Git will include this folder in the repository.
|
|
|
@ -699,6 +699,7 @@
|
||||||
"profile_add_friend":"Add Friend",
|
"profile_add_friend":"Add Friend",
|
||||||
"profile_unban":"Unban",
|
"profile_unban":"Unban",
|
||||||
"profile_ban":"Ban",
|
"profile_ban":"Ban",
|
||||||
|
"profile_block":"Block",
|
||||||
"profile_report_user_tooltip":"Report User",
|
"profile_report_user_tooltip":"Report User",
|
||||||
"profile_report_user_aria":"Report User",
|
"profile_report_user_aria":"Report User",
|
||||||
"profile_ban_user_head":"Ban User",
|
"profile_ban_user_head":"Ban User",
|
||||||
|
@ -1085,6 +1086,26 @@
|
||||||
"panel_debug_adapter_label":"Adapter",
|
"panel_debug_adapter_label":"Adapter",
|
||||||
|
|
||||||
"panel_debug_goroutine_count_label":"Goroutines",
|
"panel_debug_goroutine_count_label":"Goroutines",
|
||||||
"panel_debug_cpu_count_label":"CPUs"
|
"panel_debug_cpu_count_label":"CPUs",
|
||||||
|
|
||||||
|
"panel_debug_memory_stats":"Memory Statistics",
|
||||||
|
"panel_debug_memory_stats_sys":"Sys",
|
||||||
|
"panel_debug_memory_stats_heapsys":"HeapSys",
|
||||||
|
"panel_debug_memory_stats_heapalloc":"HeapAlloc",
|
||||||
|
"panel_debug_memory_stats_heapidle":"HeapIdle",
|
||||||
|
"panel_debug_memory_stats_heapobjects":"HeapObjects",
|
||||||
|
"panel_debug_memory_stats_stackinuse":"StackInuse",
|
||||||
|
|
||||||
|
"panel_debug_caches":"Caches",
|
||||||
|
"panel_debug_caches_topic":"Topic Cache",
|
||||||
|
"panel_debug_caches_user":"User Cache",
|
||||||
|
"panel_debug_caches_reply":"Reply Cache",
|
||||||
|
"panel_debug_caches_topic_list":"Topic List",
|
||||||
|
|
||||||
|
"panel_debug_database":"Database",
|
||||||
|
"panel_debug_database_topics":"Topics",
|
||||||
|
"panel_debug_database_users":"Users",
|
||||||
|
"panel_debug_database_replies":"Replies",
|
||||||
|
"panel_debug_disk":"Disk"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
c "github.com/Azareal/Gosora/common"
|
c "github.com/Azareal/Gosora/common"
|
||||||
"github.com/Azareal/Gosora/common/phrases"
|
p "github.com/Azareal/Gosora/common/phrases"
|
||||||
"github.com/Azareal/Gosora/query_gen"
|
"github.com/Azareal/Gosora/query_gen"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -199,14 +199,14 @@ func analyticsRowsToAverageMap2(rows *sql.Rows, labelList []int64, avgMap map[in
|
||||||
}
|
}
|
||||||
|
|
||||||
func PreAnalyticsDetail(w http.ResponseWriter, r *http.Request, user *c.User) (*c.BasePanelPage, c.RouteError) {
|
func PreAnalyticsDetail(w http.ResponseWriter, r *http.Request, user *c.User) (*c.BasePanelPage, c.RouteError) {
|
||||||
bPage, ferr := buildBasePage(w, r, user, "analytics", "analytics")
|
bp, ferr := buildBasePage(w, r, user, "analytics", "analytics")
|
||||||
if ferr != nil {
|
if ferr != nil {
|
||||||
return nil, ferr
|
return nil, ferr
|
||||||
}
|
}
|
||||||
bPage.AddSheet("chartist/chartist.min.css")
|
bp.AddSheet("chartist/chartist.min.css")
|
||||||
bPage.AddScript("chartist/chartist.min.js")
|
bp.AddScript("chartist/chartist.min.js")
|
||||||
bPage.AddScriptAsync("analytics.js")
|
bp.AddScriptAsync("analytics.js")
|
||||||
return bPage, nil
|
return bp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func AnalyticsViews(w http.ResponseWriter, r *http.Request, user c.User) c.RouteError {
|
func AnalyticsViews(w http.ResponseWriter, r *http.Request, user c.User) c.RouteError {
|
||||||
|
@ -315,7 +315,7 @@ func AnalyticsAgentViews(w http.ResponseWriter, r *http.Request, user c.User, ag
|
||||||
graph := c.PanelTimeGraph{Series: [][]int64{viewList}, Labels: labelList}
|
graph := c.PanelTimeGraph{Series: [][]int64{viewList}, Labels: labelList}
|
||||||
c.DebugLogf("graph: %+v\n", graph)
|
c.DebugLogf("graph: %+v\n", graph)
|
||||||
|
|
||||||
friendlyAgent, ok := phrases.GetUserAgentPhrase(agent)
|
friendlyAgent, ok := p.GetUserAgentPhrase(agent)
|
||||||
if !ok {
|
if !ok {
|
||||||
friendlyAgent = agent
|
friendlyAgent = agent
|
||||||
}
|
}
|
||||||
|
@ -397,7 +397,7 @@ func AnalyticsSystemViews(w http.ResponseWriter, r *http.Request, user c.User, s
|
||||||
graph := c.PanelTimeGraph{Series: [][]int64{viewList}, Labels: labelList}
|
graph := c.PanelTimeGraph{Series: [][]int64{viewList}, Labels: labelList}
|
||||||
c.DebugLogf("graph: %+v\n", graph)
|
c.DebugLogf("graph: %+v\n", graph)
|
||||||
|
|
||||||
friendlySystem, ok := phrases.GetOSPhrase(system)
|
friendlySystem, ok := p.GetOSPhrase(system)
|
||||||
if !ok {
|
if !ok {
|
||||||
friendlySystem = system
|
friendlySystem = system
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,7 @@ func AnalyticsLanguageViews(w http.ResponseWriter, r *http.Request, user c.User,
|
||||||
graph := c.PanelTimeGraph{Series: [][]int64{viewList}, Labels: labelList}
|
graph := c.PanelTimeGraph{Series: [][]int64{viewList}, Labels: labelList}
|
||||||
c.DebugLogf("graph: %+v\n", graph)
|
c.DebugLogf("graph: %+v\n", graph)
|
||||||
|
|
||||||
friendlyLang, ok := phrases.GetHumanLangPhrase(lang)
|
friendlyLang, ok := p.GetHumanLangPhrase(lang)
|
||||||
if !ok {
|
if !ok {
|
||||||
friendlyLang = lang
|
friendlyLang = lang
|
||||||
}
|
}
|
||||||
|
@ -659,7 +659,7 @@ func analyticsRowsToDuoMap(rows *sql.Rows, labelList []int64, viewMap map[int64]
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Bulk log this
|
// TODO: Bulk log this
|
||||||
var unixCreatedAt = createdAt.Unix()
|
unixCreatedAt := createdAt.Unix()
|
||||||
if c.Dev.SuperDebug {
|
if c.Dev.SuperDebug {
|
||||||
log.Print("count: ", count)
|
log.Print("count: ", count)
|
||||||
log.Print("name: ", name)
|
log.Print("name: ", name)
|
||||||
|
@ -830,7 +830,7 @@ func AnalyticsRoutes(w http.ResponseWriter, r *http.Request, user c.User) c.Rout
|
||||||
ovList := analyticsVMapToOVList(vMap)
|
ovList := analyticsVMapToOVList(vMap)
|
||||||
|
|
||||||
ex := strings.Split(r.FormValue("ex"), ",")
|
ex := strings.Split(r.FormValue("ex"), ",")
|
||||||
var inEx = func(name string) bool {
|
inEx := func(name string) bool {
|
||||||
for _, e := range ex {
|
for _, e := range ex {
|
||||||
if e == name {
|
if e == name {
|
||||||
return true
|
return true
|
||||||
|
@ -902,7 +902,7 @@ func AnalyticsAgents(w http.ResponseWriter, r *http.Request, user c.User) c.Rout
|
||||||
ovList := analyticsVMapToOVList(vMap)
|
ovList := analyticsVMapToOVList(vMap)
|
||||||
|
|
||||||
ex := strings.Split(r.FormValue("ex"), ",")
|
ex := strings.Split(r.FormValue("ex"), ",")
|
||||||
var inEx = func(name string) bool {
|
inEx := func(name string) bool {
|
||||||
for _, e := range ex {
|
for _, e := range ex {
|
||||||
if e == name {
|
if e == name {
|
||||||
return true
|
return true
|
||||||
|
@ -918,7 +918,7 @@ func AnalyticsAgents(w http.ResponseWriter, r *http.Request, user c.User) c.Rout
|
||||||
if inEx(ovitem.name) {
|
if inEx(ovitem.name) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
lName, ok := phrases.GetUserAgentPhrase(ovitem.name)
|
lName, ok := p.GetUserAgentPhrase(ovitem.name)
|
||||||
if !ok {
|
if !ok {
|
||||||
lName = ovitem.name
|
lName = ovitem.name
|
||||||
}
|
}
|
||||||
|
@ -945,7 +945,7 @@ func AnalyticsAgents(w http.ResponseWriter, r *http.Request, user c.User) c.Rout
|
||||||
if inEx(agent) {
|
if inEx(agent) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
aAgent, ok := phrases.GetUserAgentPhrase(agent)
|
aAgent, ok := p.GetUserAgentPhrase(agent)
|
||||||
if !ok {
|
if !ok {
|
||||||
aAgent = agent
|
aAgent = agent
|
||||||
}
|
}
|
||||||
|
@ -996,7 +996,7 @@ func AnalyticsSystems(w http.ResponseWriter, r *http.Request, user c.User) c.Rou
|
||||||
viewList = append(viewList, ovitem.viewMap[value])
|
viewList = append(viewList, ovitem.viewMap[value])
|
||||||
}
|
}
|
||||||
vList = append(vList, viewList)
|
vList = append(vList, viewList)
|
||||||
lName, ok := phrases.GetOSPhrase(ovitem.name)
|
lName, ok := p.GetOSPhrase(ovitem.name)
|
||||||
if !ok {
|
if !ok {
|
||||||
lName = ovitem.name
|
lName = ovitem.name
|
||||||
}
|
}
|
||||||
|
@ -1012,7 +1012,7 @@ func AnalyticsSystems(w http.ResponseWriter, r *http.Request, user c.User) c.Rou
|
||||||
// TODO: Sort this slice
|
// TODO: Sort this slice
|
||||||
var systemItems []c.PanelAnalyticsAgentsItem
|
var systemItems []c.PanelAnalyticsAgentsItem
|
||||||
for system, count := range osMap {
|
for system, count := range osMap {
|
||||||
sSystem, ok := phrases.GetOSPhrase(system)
|
sSystem, ok := p.GetOSPhrase(system)
|
||||||
if !ok {
|
if !ok {
|
||||||
sSystem = system
|
sSystem = system
|
||||||
}
|
}
|
||||||
|
@ -1068,7 +1068,7 @@ func AnalyticsLanguages(w http.ResponseWriter, r *http.Request, user c.User) c.R
|
||||||
if inEx(ovitem.name) {
|
if inEx(ovitem.name) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
lName, ok := phrases.GetHumanLangPhrase(ovitem.name)
|
lName, ok := p.GetHumanLangPhrase(ovitem.name)
|
||||||
if !ok {
|
if !ok {
|
||||||
lName = ovitem.name
|
lName = ovitem.name
|
||||||
}
|
}
|
||||||
|
@ -1096,7 +1096,7 @@ func AnalyticsLanguages(w http.ResponseWriter, r *http.Request, user c.User) c.R
|
||||||
if inEx(lang) {
|
if inEx(lang) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
lLang, ok := phrases.GetHumanLangPhrase(lang)
|
lLang, ok := p.GetHumanLangPhrase(lang)
|
||||||
if !ok {
|
if !ok {
|
||||||
lLang = lang
|
lLang = lang
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{if .IP}}
|
{{if .IP}}
|
||||||
<div class="rowblock rowlist bgavatars micro_grid">
|
<div class="rowblock rowlist bgavatars micro_grid">
|
||||||
{{range .ItemList}}<div class="rowitem" style="background-image: url('{{.Avatar}}');">
|
{{range .ItemList}}<div class="rowitem" style="background-image:url('{{.Avatar}}');">
|
||||||
<img src="{{.Avatar}}" class="bgsub" alt="Avatar" aria-hidden="true" />
|
<img src="{{.Avatar}}" class="bgsub" alt="Avatar" aria-hidden="true" />
|
||||||
<a class="rowTitle" href="{{.Link}}">{{.Name}}</a>
|
<a class="rowTitle" href="{{.Link}}">{{.Name}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,4 +22,4 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</main>
|
</main>
|
||||||
{{template "footer.html" . }}
|
{{template "footer.html" . }}
|
|
@ -7,11 +7,11 @@
|
||||||
<div class="rowblock">
|
<div class="rowblock">
|
||||||
<div class="rowitem passive rowmsg level_{{.Status}}">
|
<div class="rowitem passive rowmsg level_{{.Status}}">
|
||||||
<div class="levelBit">{{level .Level}}</div>
|
<div class="levelBit">{{level .Level}}</div>
|
||||||
<div class="progressWrap"{{if eq .Status "inprogress"}} style="width: {{.Percentage}}%;"{{end}}>
|
<div class="progressWrap"{{if eq .Status "inprogress"}} style="width:{{.Percentage}}%;"{{end}}>
|
||||||
<div>Score: {{.Score}}</div>
|
<div>Score: {{.Score}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</main>
|
</main>
|
||||||
{{template "footer.html" . }}
|
{{template "footer.html" . }}
|
|
@ -2,50 +2,45 @@
|
||||||
<div class="rowitem"><h1>{{lang "panel_debug_head"}}</h1></div>
|
<div class="rowitem"><h1>{{lang "panel_debug_head"}}</h1></div>
|
||||||
</div>{{flush}}
|
</div>{{flush}}
|
||||||
<div id="panel_debug" class="colstack_grid">
|
<div id="panel_debug" class="colstack_grid">
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>{{lang "panel_debug_uptime_label"}}</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_uptime_label"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>{{lang "panel_debug_go_version_label"}}</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_go_version_label"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>{{lang "panel_debug_database_version_label"}}</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_database_version_label"}}
|
||||||
|
{{template "panel_debug_stat.html" .Uptime}}
|
||||||
<div class="grid_item grid_stat"><span>{{.Uptime}}</span></div>
|
{{template "panel_debug_stat.html" .GoVersion}}
|
||||||
<div class="grid_item grid_stat"><span>{{.GoVersion}}</span></div>
|
{{template "panel_debug_stat.html" .DBVersion}}
|
||||||
<div class="grid_item grid_stat"><span>{{.DBVersion}}</span></div>
|
|
||||||
|
|
||||||
|
{{template "panel_debug_stat_head.html" "panel_debug_open_database_connections_label"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>{{lang "panel_debug_open_database_connections_label"}}</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_adapter_label"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>{{lang "panel_debug_adapter_label"}}</span></div>
|
|
||||||
{{/** TODO: Use this for active database connections when Go 1.11 lands **/}}
|
{{/** TODO: Use this for active database connections when Go 1.11 lands **/}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>???</span></div>
|
{{template "panel_debug_stat_head_q.html"}}
|
||||||
|
{{template "panel_debug_stat.html" .OpenConns}}
|
||||||
|
{{template "panel_debug_stat.html" .DBAdapter}}
|
||||||
|
{{template "panel_debug_stat_q.html"}}
|
||||||
|
|
||||||
<div class="grid_item grid_stat"><span>{{.OpenConns}}</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_goroutine_count_label"}}
|
||||||
<div class="grid_item grid_stat"><span>{{.DBAdapter}}</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_cpu_count_label"}}
|
||||||
<div class="grid_item grid_stat"><span>?</span></div>
|
{{template "panel_debug_stat_head_q.html"}}
|
||||||
|
{{template "panel_debug_stat.html" .Goroutines}}
|
||||||
|
{{template "panel_debug_stat.html" .CPUs}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>{{lang "panel_debug_goroutine_count_label"}}</span></div>
|
{{template "panel_debug_stat_q.html"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>{{lang "panel_debug_cpu_count_label"}}</span></div>
|
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>???</span></div>
|
|
||||||
|
|
||||||
<div class="grid_item grid_stat"><span>{{.Goroutines}}</span></div>
|
|
||||||
<div class="grid_item grid_stat"><span>{{.CPUs}}</span></div>
|
|
||||||
<div class="grid_item grid_stat"><span>?</span></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="colstack_item colstack_head colstack_sub_head">
|
<div class="colstack_item colstack_head colstack_sub_head">
|
||||||
<div class="rowitem"><h2>Memory Statistics</h2></div>
|
<div class="rowitem"><h2>{{lang "panel_debug_memory_stats"}}</h2></div>
|
||||||
</div>{{flush}}
|
</div>{{flush}}
|
||||||
<div id="panel_debug" class="colstack_grid">
|
<div id="panel_debug" class="colstack_grid">
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Sys</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_memory_stats_sys"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>HeapSys</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_memory_stats_heapsys"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>HeapAlloc</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_memory_stats_heapalloc"}}
|
||||||
|
|
||||||
<div class="grid_item grid_stat"><span>{{.MemStats.Sys}} ({{bunit .MemStats.Sys}})</span></div>
|
<div class="grid_item grid_stat"><span>{{.MemStats.Sys}} ({{bunit .MemStats.Sys}})</span></div>
|
||||||
<div class="grid_item grid_stat"><span>{{.MemStats.HeapSys}} ({{bunit .MemStats.HeapSys}})</span></div>
|
<div class="grid_item grid_stat"><span>{{.MemStats.HeapSys}} ({{bunit .MemStats.HeapSys}})</span></div>
|
||||||
<div class="grid_item grid_stat"><span>{{.MemStats.HeapAlloc}} ({{bunit .MemStats.HeapAlloc}})</span></div>
|
<div class="grid_item grid_stat"><span>{{.MemStats.HeapAlloc}} ({{bunit .MemStats.HeapAlloc}})</span></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>HeapIdle</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_memory_stats_heapidle"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>HeapObjects</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_memory_stats_heapobjects"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>StackInuse</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_memory_stats_stackinuse"}}
|
||||||
|
|
||||||
<div class="grid_item grid_stat"><span>{{.MemStats.HeapIdle}} ({{bunit .MemStats.HeapIdle}})</span></div>
|
<div class="grid_item grid_stat"><span>{{.MemStats.HeapIdle}} ({{bunit .MemStats.HeapIdle}})</span></div>
|
||||||
<div class="grid_item grid_stat"><span>{{.MemStats.HeapObjects}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.MemStats.HeapObjects}}</span></div>
|
||||||
|
@ -70,33 +65,33 @@
|
||||||
<div class="grid_item grid_stat"><span>{{.MemStats.OtherSys}} ({{bunit .MemStats.OtherSys}})</span></div>
|
<div class="grid_item grid_stat"><span>{{.MemStats.OtherSys}} ({{bunit .MemStats.OtherSys}})</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="colstack_item colstack_head colstack_sub_head">
|
<div class="colstack_item colstack_head colstack_sub_head">
|
||||||
<div class="rowitem"><h2>Caches</h2></div>
|
<div class="rowitem"><h2>{{lang "panel_debug_caches"}}</h2></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="panel_debug" class="colstack_grid">
|
<div id="panel_debug" class="colstack_grid">
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Topic Cache</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_caches_topic"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>User Cache</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_caches_user"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Reply Cache</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_caches_reply"}}
|
||||||
|
|
||||||
<div class="grid_item grid_stat"><span>{{.Cache.Topics}} / {{.Cache.TCap}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.Cache.Topics}} / {{.Cache.TCap}}</span></div>
|
||||||
<div class="grid_item grid_stat"><span>{{.Cache.Users}} / {{.Cache.UCap}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.Cache.Users}} / {{.Cache.UCap}}</span></div>
|
||||||
<div class="grid_item grid_stat"><span>{{.Cache.Replies}} / {{.Cache.RCap}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.Cache.Replies}} / {{.Cache.RCap}}</span></div>
|
||||||
|
|
||||||
|
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Topic List</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_caches_topic_list"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>???</span></div>
|
{{template "panel_debug_stat_head_q.html"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>???</span></div>
|
{{template "panel_debug_stat_head_q.html"}}
|
||||||
|
|
||||||
<div class="grid_item grid_stat"><span>{{if .Cache.TopicListThaw}}Thawed{{else}}Sleeping{{end}}</span></div>
|
<div class="grid_item grid_stat"><span>{{if .Cache.TopicListThaw}}Thawed{{else}}Sleeping{{end}}</span></div>
|
||||||
<div class="grid_item grid_stat"><span>?</span></div>
|
{{template "panel_debug_stat_q.html"}}
|
||||||
<div class="grid_item grid_stat"><span>?</span></div>
|
{{template "panel_debug_stat_q.html"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="colstack_item colstack_head colstack_sub_head">
|
<div class="colstack_item colstack_head colstack_sub_head">
|
||||||
<div class="rowitem"><h2>Database</h2></div>
|
<div class="rowitem"><h2>{{lang "panel_debug_database"}}</h2></div>
|
||||||
</div>{{flush}}
|
</div>{{flush}}
|
||||||
<div id="panel_debug" class="colstack_grid">
|
<div id="panel_debug" class="colstack_grid">
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Topics</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_database_topics"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Users</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_database_users"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Replies</span></div>
|
{{template "panel_debug_stat_head.html" "panel_debug_database_replies"}}
|
||||||
|
|
||||||
<div class="grid_item grid_stat"><span>{{.Database.Topics}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.Database.Topics}}</span></div>
|
||||||
<div class="grid_item grid_stat"><span>{{.Database.Users}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.Database.Users}}</span></div>
|
||||||
|
@ -114,11 +109,11 @@
|
||||||
|
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Attachments</span></div>
|
<div class="grid_item grid_stat grid_stat_head"><span>Attachments</span></div>
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Polls</span></div>
|
<div class="grid_item grid_stat grid_stat_head"><span>Polls</span></div>
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>???</span></div>
|
{{template "panel_debug_stat_head_q.html"}}
|
||||||
|
|
||||||
<div class="grid_item grid_stat"><span>{{.Database.Attachments}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.Database.Attachments}}</span></div>
|
||||||
<div class="grid_item grid_stat"><span>{{.Database.Polls}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.Database.Polls}}</span></div>
|
||||||
<div class="grid_item grid_stat"><span>?</span></div>
|
{{template "panel_debug_stat_q.html"}}
|
||||||
|
|
||||||
|
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Login Logs</span></div>
|
<div class="grid_item grid_stat grid_stat_head"><span>Login Logs</span></div>
|
||||||
|
@ -131,12 +126,12 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Admin Logs</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>
|
{{template "panel_debug_stat_head_q.html"}}
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>???</span></div>
|
{{template "panel_debug_stat_head_q.html"}}
|
||||||
|
|
||||||
<div class="grid_item grid_stat"><span>{{.Database.AdminLogs}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.Database.AdminLogs}}</span></div>
|
||||||
<div class="grid_item grid_stat"><span>?</span></div>
|
{{template "panel_debug_stat_q.html"}}
|
||||||
<div class="grid_item grid_stat"><span>?</span></div>
|
{{template "panel_debug_stat_q.html"}}
|
||||||
|
|
||||||
|
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Views</span></div>
|
<div class="grid_item grid_stat grid_stat_head"><span>Views</span></div>
|
||||||
|
@ -159,14 +154,14 @@
|
||||||
|
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Post Analytics</span></div>
|
<div class="grid_item grid_stat grid_stat_head"><span>Post Analytics</span></div>
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Topic Analytics</span></div>
|
<div class="grid_item grid_stat grid_stat_head"><span>Topic Analytics</span></div>
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>???</span></div>
|
{{template "panel_debug_stat_head_q.html"}}
|
||||||
|
|
||||||
<div class="grid_item grid_stat"><span>{{.Database.PostChunks}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.Database.PostChunks}}</span></div>
|
||||||
<div class="grid_item grid_stat"><span>{{.Database.TopicChunks}}</span></div>
|
<div class="grid_item grid_stat"><span>{{.Database.TopicChunks}}</span></div>
|
||||||
<div class="grid_item grid_stat"><span>?</span></div>
|
{{template "panel_debug_stat_q.html"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="colstack_item colstack_head colstack_sub_head">
|
<div class="colstack_item colstack_head colstack_sub_head">
|
||||||
<div class="rowitem"><h2>Disk</h2></div>
|
<div class="rowitem"><h2>{{lang "panel_debug_disk"}}</h2></div>
|
||||||
</div>{{flush}}
|
</div>{{flush}}
|
||||||
<div id="panel_debug" class="colstack_grid">
|
<div id="panel_debug" class="colstack_grid">
|
||||||
<div class="grid_item grid_stat grid_stat_head"><span>Static Files</span></div>
|
<div class="grid_item grid_stat grid_stat_head"><span>Static Files</span></div>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<div class="grid_item grid_stat"><span>{{.}}</span></div>
|
|
@ -0,0 +1 @@
|
||||||
|
<div class="grid_item grid_stat grid_stat_head"><span>{{lang .}}</span></div>
|
|
@ -0,0 +1 @@
|
||||||
|
<div class="grid_item grid_stat grid_stat_head"><span>???</span></div>
|
|
@ -0,0 +1 @@
|
||||||
|
<div class="grid_item grid_stat"><span>?</span></div>
|
|
@ -36,4 +36,4 @@
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
{{template "footer.html" . }}
|
{{template "footer.html" . }}
|
|
@ -53,4 +53,4 @@
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
{{template "footer.html" . }}
|
{{template "footer.html" . }}
|
|
@ -15,4 +15,4 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
{{template "footer.html" . }}
|
{{template "footer.html" . }}
|
Loading…
Reference in New Issue