96 lines
2.3 KiB
Plaintext
Raw Normal View History

2017-10-02 12:56:51 +00:00
component AdminTabs
.tabs
Tab("Server", "server", "/admin")
2017-10-03 13:26:29 +00:00
Tab("WebDev", "html5", "/admin/webdev")
2018-04-17 16:20:53 +00:00
Tab("Client errors", "exclamation", "/admin/errors/client")
2018-04-16 13:17:23 +00:00
Tab("Registrations", "user-plus", "/admin/registrations")
2017-10-07 21:24:09 +00:00
Tab("Purchases", "shopping-cart", "/admin/purchases")
Tab("Payments", "paypal", "/admin/payments")
2018-03-09 01:34:50 +00:00
.corner-buttons
a.button(href="/editor", aria-label="Editor")
2017-10-06 20:07:12 +00:00
Icon("pencil")
span.tab-text Editor
2017-10-02 12:56:51 +00:00
2018-11-06 07:20:44 +00:00
component Admin(user *arn.User, platform, family, platformVersion, kernelVersion string, cpuUsage, memUsage, diskUsage float64, cpuModel string, memTotal, diskTotal uint64, memStats *runtime.MemStats)
2017-07-06 20:23:32 +00:00
h1.page-title Admin Panel
2017-06-18 15:44:18 +00:00
2017-10-02 12:56:51 +00:00
AdminTabs
2017-11-03 11:02:13 +00:00
.admin
2018-11-06 07:20:44 +00:00
.admin-widget.mountable
h3.widget-title Usage
2017-10-02 12:28:10 +00:00
2018-11-06 07:20:44 +00:00
table
tbody
tr
td.admin-info-key CPU usage:
td.admin-info-value
span= int(cpuUsage + 0.5)
span %
tr
td.admin-info-key Memory usage:
td.admin-info-value
span= int(memUsage + 0.5)
span %
tr
td.admin-info-key Disk usage:
td.admin-info-value
span= int(diskUsage + 0.5)
span %
2017-10-02 12:28:10 +00:00
2018-11-06 07:20:44 +00:00
.admin-widget.mountable
2017-10-02 12:28:10 +00:00
h3.widget-title OS
table
tbody
tr
2018-11-06 07:20:44 +00:00
td.admin-info-key Platform:
td.admin-info-value= platform
2017-10-02 12:28:10 +00:00
tr
2018-11-06 07:20:44 +00:00
td.admin-info-key Family:
td.admin-info-value= family
2017-10-02 12:28:10 +00:00
tr
2018-11-06 07:20:44 +00:00
td.admin-info-key Version:
td.admin-info-value= platformVersion
2017-10-02 12:28:10 +00:00
tr
2018-11-06 07:20:44 +00:00
td.admin-info-key Kernel:
td.admin-info-value= kernelVersion
2017-10-02 12:28:10 +00:00
2018-11-06 07:20:44 +00:00
.admin-widget.mountable
2017-10-02 12:28:10 +00:00
h3.widget-title Hardware
table
tbody
tr
2018-11-06 07:20:44 +00:00
td.admin-info-key CPU model:
td.admin-info-value= cpuModel
tr
td.admin-info-key CPU cores:
td.admin-info-value= runtime.NumCPU()
tr
td.admin-info-key RAM:
td.admin-info-value= humanize.IBytes(memTotal)
2017-10-02 12:28:10 +00:00
2018-11-06 07:20:44 +00:00
tr
td.admin-info-key Disk:
td.admin-info-value= humanize.IBytes(diskTotal)
.admin-widget.mountable
2017-10-02 12:28:10 +00:00
h3.widget-title Go
table
tbody
tr
2018-11-06 07:20:44 +00:00
td.admin-info-key Version:
td.admin-info-value= runtime.Version()
tr
td.admin-info-key Goroutines:
td.admin-info-value= humanize.Comma(int64(runtime.NumGoroutine()))
2017-10-02 12:28:10 +00:00
tr
2018-11-06 07:20:44 +00:00
td.admin-info-key Objects:
td.admin-info-value= humanize.Comma(int64(memStats.HeapObjects))