Class: CertWatch::Views::CertificateState
- Inherits:
-
Arbre::Component
- Object
- Arbre::Component
- CertWatch::Views::CertificateState
- Defined in:
- lib/cert_watch/views/certificate_state.rb
Constant Summary collapse
- STATE_MAPPING =
{ 'installed' => 'ok', 'installing' => 'warn', 'renewing' => 'warn', 'installing_failed' => 'error', 'renewing_failed' => 'error' }.freeze
Instance Method Summary collapse
Instance Method Details
#build(certificate_or_domain, options = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/cert_watch/views/certificate_state.rb', line 17 def build(certificate_or_domain, = {}) state = get_state(certificate_or_domain) format = .fetch(:format, 'short') add_class 'cert_watch_certificate_state' status_tag(t(state, scope: "cert_watch.states.#{format}"), [state, STATE_MAPPING[state]].compact.join(' ')) end |