1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07:02 +00:00

Add "No-Store Domain" info to status page

This commit is contained in:
James Hillyerd
2016-02-25 20:29:21 -08:00
parent f36e21a65c
commit 3eb2b5ce19
2 changed files with 8 additions and 2 deletions

View File

@@ -51,6 +51,12 @@ $(document).ready(
<div class="col-sm-3 col-xs-7"><b>HTTP Listener:</b></div>
<div class="col-sm-8 col-xs-5"><span>{{.webListener}}</span></div>
</div>
<div class="row">
<div class="col-sm-3 col-xs-7"><b>No-Store Domain:</b></div>
<div class="col-sm-8 col-xs-5">
<span>{{ or .noStoreDomain .noStoreDomain "Not Configured"}}</span>
</div>
</div>
</table>
</div>
</div>

View File

@@ -25,7 +25,6 @@ func RootIndex(w http.ResponseWriter, req *http.Request, ctx *httpd.Context) (er
// RootStatus serves the Inbucket status page
func RootStatus(w http.ResponseWriter, req *http.Request, ctx *httpd.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(),
@@ -36,9 +35,10 @@ func RootStatus(w http.ResponseWriter, req *http.Request, ctx *httpd.Context) (e
"ctx": ctx,
"version": config.Version,
"buildDate": config.BuildDate,
"retentionMinutes": retentionMinutes,
"retentionMinutes": config.GetDataStoreConfig().RetentionMinutes,
"smtpListener": smtpListener,
"pop3Listener": pop3Listener,
"webListener": webListener,
"noStoreDomain": config.GetSMTPConfig().DomainNoStore,
})
}