mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
Rename about page to status
This commit is contained in:
@@ -18,7 +18,7 @@ Released for free under a Creative Commons Attribution 2.5 License
|
||||
<div id="header">
|
||||
<ul id="menu">
|
||||
<li><a href="/" accesskey="1" title="">Home</a></li>
|
||||
<li><a href="/about" accesskey="2" title="">About</a></li>
|
||||
<li><a href="/status" accesskey="2" title="">Status</a></li>
|
||||
</ul>
|
||||
<form id="search" action="{{reverse "MailboxIndex"}}" method="GET">
|
||||
<fieldset>
|
||||
|
||||
@@ -117,13 +117,14 @@
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<h2>About Inbucket</h2>
|
||||
<h2>Inbucket Status</h2>
|
||||
|
||||
<p>Inbucket is an email testing service; it will accept email for any email
|
||||
address and make it available to view without a password.</p>
|
||||
<p>Metrics are polled every 5 seconds. Inbucket does not keep history for the
|
||||
graphs labeled <em>(5s)</em>, but your web browser will chart the last 50
|
||||
values over time.</p>
|
||||
|
||||
<div class="box">
|
||||
<h3>System Metrics</h3>
|
||||
<h3>General Metrics</h3>
|
||||
<table class="metrics">
|
||||
<tr>
|
||||
<th>Uptime:</th>
|
||||
@@ -136,7 +137,7 @@ address and make it available to view without a password.</p>
|
||||
<td>(5s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Heap Capacity:</th>
|
||||
<th>Heap Size:</th>
|
||||
<td><span id="m-memstatsHeapSys">.</span></td>
|
||||
<td class="sparkline"><span id="s-memstatsHeapSys">.</span></td>
|
||||
<td>(5s)</td>
|
||||
@@ -10,8 +10,8 @@ func RootIndex(w http.ResponseWriter, req *http.Request, ctx *Context) (err erro
|
||||
})
|
||||
}
|
||||
|
||||
func RootAbout(w http.ResponseWriter, req *http.Request, ctx *Context) (err error) {
|
||||
return RenderTemplate("root/about.html", w, map[string]interface{}{
|
||||
func RootStatus(w http.ResponseWriter, req *http.Request, ctx *Context) (err error) {
|
||||
return RenderTemplate("root/status.html", w, map[string]interface{}{
|
||||
"ctx": ctx,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ func setupRoutes(cfg config.WebConfig) {
|
||||
|
||||
// Root
|
||||
r.Path("/").Handler(handler(RootIndex)).Name("RootIndex").Methods("GET")
|
||||
r.Path("/about").Handler(handler(RootAbout)).Name("RootAbout").Methods("GET")
|
||||
r.Path("/status").Handler(handler(RootStatus)).Name("RootStatus").Methods("GET")
|
||||
r.Path("/mailbox").Handler(handler(MailboxIndex)).Name("MailboxIndex").Methods("GET")
|
||||
r.Path("/mailbox/list/{name}").Handler(handler(MailboxList)).Name("MailboxList").Methods("GET")
|
||||
r.Path("/mailbox/show/{name}/{id}").Handler(handler(MailboxShow)).Name("MailboxShow").Methods("GET")
|
||||
@@ -49,6 +49,7 @@ func Start() {
|
||||
cfg := config.GetWebConfig()
|
||||
setupRoutes(cfg)
|
||||
|
||||
// TODO Make configurable
|
||||
sessionStore = sessions.NewCookieStore([]byte("something-very-secret"))
|
||||
|
||||
addr := fmt.Sprintf("%v:%v", cfg.Ip4address, cfg.Ip4port)
|
||||
|
||||
Reference in New Issue
Block a user