WIP new WebAdmin: status page

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2024-01-25 19:26:51 +01:00
parent eec9c449d4
commit 9fcff83f8f
9 changed files with 260 additions and 155 deletions

View File

@@ -228,19 +228,19 @@ func (b *Binding) HasProxy() bool {
// GetTLSDescription returns the TLS mode as string
func (b *Binding) GetTLSDescription() string {
if certMgr == nil {
return "Disabled"
return util.I18nFTPTLSDisabled
}
switch b.TLSMode {
case 1:
return "Explicit required"
return util.I18nFTPTLSExplicit
case 2:
return "Implicit"
return util.I18nFTPTLSImplicit
}
if certMgr.HasCertificate(common.DefaultTLSKeyPaidID) || certMgr.HasCertificate(b.GetAddress()) {
return "Plain and explicit"
return util.I18nFTPTLSMixed
}
return "Disabled"
return util.I18nFTPTLSDisabled
}
// PortRange defines a port range