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