domains: simplify domain config panel cert section

This commit is contained in:
Alexandre Aubin 2022-10-08 19:21:36 +02:00
parent 403efe4873
commit a355f48580
2 changed files with 6 additions and 9 deletions

View file

@ -63,21 +63,18 @@ name = "DNS"
[cert]
name = "Certificate"
[cert.status]
name = "Status"
[cert.cert]
[cert.status.cert_summary]
[cert.cert.cert_summary]
type = "alert"
# Automatically filled by DomainConfigPanel
[cert.status.cert_validity]
[cert.cert.cert_validity]
type = "number"
readonly = true
visible = "false"
# Automatically filled by DomainConfigPanel
[cert.cert]
name = "Manage"
[cert.cert.cert_issuer]
type = "string"
visible = false

View file

@ -573,14 +573,14 @@ class DomainConfigPanel(ConfigPanel):
from yunohost.certificate import certificate_status
status = certificate_status([self.entity], full=True)["certificates"][self.entity]
toml["cert"]["status"]["cert_summary"]["style"] = status["style"]
toml["cert"]["cert"]["cert_summary"]["style"] = status["style"]
# i18n: domain_config_cert_summary_expired
# i18n: domain_config_cert_summary_selfsigned
# i18n: domain_config_cert_summary_abouttoexpire
# i18n: domain_config_cert_summary_ok
# i18n: domain_config_cert_summary_letsencrypt
toml["cert"]["status"]["cert_summary"]["ask"] = m18n.n(f"domain_config_cert_summary_{status['summary']}")
toml["cert"]["cert"]["cert_summary"]["ask"] = m18n.n(f"domain_config_cert_summary_{status['summary']}")
# Other specific strings used in config panels
# i18n: domain_config_cert_renew_help