open-vault/ui/app/templates/components/license-banners.hbs
Chris Capurso 353246655a
base sys/license/status mock times based on current timestamp (#15286)
* base sys/license/status mock times based on current timestamp

* add missing trailing commas

* license specific test selector

Co-authored-by: Claire Bontempo <cbontempo@hashicorp.com>
2022-05-05 08:20:40 -04:00

47 lines
1.5 KiB
Handlebars

{{#if this.licenseExpired}}
<div class="license-banner-wrapper" data-test-license-banner data-test-license-banner-expired>
<AlertBanner
@bannerType="license"
@type="danger"
@title="License expired"
@message="Your Vault license expired on {{date-format
@expiry
'MMM d, yyyy'
}}. Add a new license to your configuration and restart Vault."
@marginless={{true}}
>
<a
href="https://learn.hashicorp.com/tutorials/nomad/hashicorp-enterprise-license"
target="_blank"
rel="noreferrer noopener"
>
Read documentation
</a>
</AlertBanner>
</div>
{{else if (lte this.licenseExpiringInDays 30)}}
<div class="license-banner-wrapper" data-test-license-banner data-test-license-banner-warning>
<AlertBanner
@bannerType="license"
@type="warning"
@title="Vault license expiring"
@message="Your Vault license will expire in {{this.licenseExpiringInDays}} days at {{date-format
@expiry
'hh:mm:ss a'
}} on {{date-format @expiry 'MMM d, yyyy'}}. {{if
@autoloaded
'Add a new license to your configuration.'
'Keep in mind that your next license will need to be autoloaded'
}}"
@marginless={{true}}
>
<a
href="https://learn.hashicorp.com/tutorials/nomad/hashicorp-enterprise-license"
target="_blank"
rel="noreferrer noopener"
>
Read documentation
</a>
</AlertBanner>
</div>
{{/if}}