1
0
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:
James Hillyerd
2012-10-24 09:48:56 -07:00
parent bf0d6a6be5
commit 606fb124a6
4 changed files with 11 additions and 9 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -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,
})
}

View File

@@ -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)