diff --git a/themes/integral/templates/root/status.html b/themes/integral/templates/root/status.html index 5804178..fc1cb12 100644 --- a/themes/integral/templates/root/status.html +++ b/themes/integral/templates/root/status.html @@ -139,6 +139,24 @@

Metrics are polled every 10 seconds. Inbucket does not keep history for the 10 minute graphs, but your web browser will accumulate the data over time.

+
+

Configuration

+ + + + + + + + + + + + + +
SMTP Listener:{{.smtpListener}}
POP3 Listener:{{.pop3Listener}}
HTTP Listener:{{.webListener}}
+

 

+

General Metrics

diff --git a/web/root_controller.go b/web/root_controller.go index bcd83a7..f5df0de 100644 --- a/web/root_controller.go +++ b/web/root_controller.go @@ -1,6 +1,7 @@ package web import ( + "fmt" "github.com/jhillyerd/inbucket/config" "net/http" ) @@ -13,8 +14,17 @@ func RootIndex(w http.ResponseWriter, req *http.Request, ctx *Context) (err erro func RootStatus(w http.ResponseWriter, req *http.Request, ctx *Context) (err error) { retentionMinutes := config.GetDataStoreConfig().RetentionMinutes + smtpListener := fmt.Sprintf("%s:%d", config.GetSmtpConfig().Ip4address.String(), + config.GetSmtpConfig().Ip4port) + pop3Listener := fmt.Sprintf("%s:%d", config.GetPop3Config().Ip4address.String(), + config.GetPop3Config().Ip4port) + webListener := fmt.Sprintf("%s:%d", config.GetWebConfig().Ip4address.String(), + config.GetWebConfig().Ip4port) return RenderTemplate("root/status.html", w, map[string]interface{}{ - "ctx": ctx, + "ctx": ctx, "retentionMinutes": retentionMinutes, + "smtpListener": smtpListener, + "pop3Listener": pop3Listener, + "webListener": webListener, }) }