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:
@@ -51,6 +51,12 @@ $(document).ready(
|
|||||||
<div class="col-sm-3 col-xs-7"><b>HTTP Listener:</b></div>
|
<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 class="col-sm-8 col-xs-5"><span>{{.webListener}}</span></div>
|
||||||
</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>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ func RootIndex(w http.ResponseWriter, req *http.Request, ctx *httpd.Context) (er
|
|||||||
|
|
||||||
// RootStatus serves the Inbucket status page
|
// RootStatus serves the Inbucket status page
|
||||||
func RootStatus(w http.ResponseWriter, req *http.Request, ctx *httpd.Context) (err error) {
|
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(),
|
smtpListener := fmt.Sprintf("%s:%d", config.GetSMTPConfig().IP4address.String(),
|
||||||
config.GetSMTPConfig().IP4port)
|
config.GetSMTPConfig().IP4port)
|
||||||
pop3Listener := fmt.Sprintf("%s:%d", config.GetPOP3Config().IP4address.String(),
|
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,
|
"ctx": ctx,
|
||||||
"version": config.Version,
|
"version": config.Version,
|
||||||
"buildDate": config.BuildDate,
|
"buildDate": config.BuildDate,
|
||||||
"retentionMinutes": retentionMinutes,
|
"retentionMinutes": config.GetDataStoreConfig().RetentionMinutes,
|
||||||
"smtpListener": smtpListener,
|
"smtpListener": smtpListener,
|
||||||
"pop3Listener": pop3Listener,
|
"pop3Listener": pop3Listener,
|
||||||
"webListener": webListener,
|
"webListener": webListener,
|
||||||
|
"noStoreDomain": config.GetSMTPConfig().DomainNoStore,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user