mirror of
https://github.com/status-im/consul.git
synced 2025-02-03 09:24:25 +00:00
5fb9df1640
* Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at <Blog URL>, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
147 lines
4.4 KiB
Handlebars
147 lines
4.4 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
<Route
|
|
@name={{routeName}}
|
|
as |route|>
|
|
<DataLoader
|
|
@src={{
|
|
uri '/${partition}/${nspace}/${dc}/license'
|
|
(hash
|
|
partition=route.params.partition
|
|
nspace=route.params.nspace
|
|
dc=route.params.dc
|
|
)
|
|
}}
|
|
as |loader|>
|
|
|
|
{{#let
|
|
loader.data
|
|
as |item|}}
|
|
<BlockSlot @name="error">
|
|
<ErrorState
|
|
@error={{loader.error}}
|
|
@login={{route.model.app.login.open}}
|
|
/>
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="disconnected" as |after|>
|
|
{{#if (eq loader.error.status "404")}}
|
|
<Hds::Toast @color='warning'
|
|
{{notification
|
|
sticky=true
|
|
}} as |T|>
|
|
<T.Title>Warning!</T.Title>
|
|
<T.Description>This service has been deregistered and no longer exists in the catalog.</T.Description>
|
|
</Hds::Toast>
|
|
{{else if (eq loader.error.status "403")}}
|
|
<Hds::Toast @color='critical'
|
|
{{notification
|
|
sticky=true
|
|
}} as |T|>
|
|
<T.Title>Error!</T.Title>
|
|
<T.Description>You no longer have access to this service.</T.Description>
|
|
</Hds::Toast>
|
|
{{else}}
|
|
<Hds::Toast @color='warning'
|
|
{{notification
|
|
sticky=true
|
|
}} as |T|>
|
|
<T.Title>Warning!</T.Title>
|
|
<T.Description>An error was returned whilst loading this data, refresh to try again.</T.Description>
|
|
</Hds::Toast>
|
|
{{/if}}
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="loaded">
|
|
<div class="tab-section">
|
|
<section
|
|
class={{class-map
|
|
'validity'
|
|
(array 'valid' item.Valid)
|
|
}}
|
|
>
|
|
<header>
|
|
<h2>
|
|
{{compute (fn route.t 'expiry.header')}}
|
|
</h2>
|
|
</header>
|
|
|
|
<p>
|
|
{{compute (fn route.t 'expiry.${type}.body'
|
|
(hash
|
|
type=(if item.Valid 'valid' 'expired')
|
|
date=(format-time item.License.expiration_time
|
|
year='numeric'
|
|
month='long'
|
|
day='numeric'
|
|
)
|
|
time=(format-time item.License.expiration_time
|
|
hour12=true
|
|
hour='numeric'
|
|
hourCycle='h12'
|
|
minute='numeric'
|
|
second='numeric'
|
|
timeZoneName='short'
|
|
)
|
|
htmlSafe=true
|
|
)
|
|
)}}
|
|
</p>
|
|
|
|
<dl>
|
|
<dt class={{class-map
|
|
(array 'valid' item.Valid)
|
|
(array 'expired' (not item.Valid))
|
|
(array 'warning' (temporal-within item.License.expiration_time 2629800000))
|
|
}}
|
|
>
|
|
{{compute (fn route.t 'expiry.${type}.header'
|
|
(hash
|
|
type=(if item.Valid 'valid' 'expired')
|
|
)
|
|
)}}
|
|
</dt>
|
|
<dd>
|
|
{{temporal-format item.License.expiration_time}}
|
|
</dd>
|
|
</dl>
|
|
|
|
<aside>
|
|
<header>
|
|
<h3>
|
|
{{compute (fn route.t 'documentation.title')}}
|
|
</h3>
|
|
</header>
|
|
<div class="flex gap-1.5 flex-col">
|
|
<Hds::Link::Standalone
|
|
@text={{compute (fn route.t 'documentation.links.license-expiration.text')}}
|
|
@href='{{concat (env 'CONSUL_DOCS_URL') (compute (fn route.t 'documentation.links.license-expiration.link'))}}'
|
|
@icon='docs-link'
|
|
@iconPosition='trailing'
|
|
/>
|
|
<Hds::Link::Standalone
|
|
@text={{compute (fn route.t 'documentation.links.renewing-license.text')}}
|
|
@href='{{concat (env 'CONSUL_DOCS_URL') (compute (fn route.t 'documentation.links.renewing-license.link'))}}'
|
|
@icon='docs-link'
|
|
@iconPosition='trailing'
|
|
/>
|
|
<Hds::Link::Standalone
|
|
@text={{compute (fn route.t 'documentation.links.applying-new-license.text')}}
|
|
@href='{{concat (env 'CONSUL_DOCS_URL') (compute (fn route.t 'documentation.links.applying-new-license.link'))}}'
|
|
@icon='docs-link'
|
|
@iconPosition='trailing'
|
|
/>
|
|
</div>
|
|
</aside>
|
|
|
|
</section>
|
|
</div>
|
|
</BlockSlot>
|
|
{{/let}}
|
|
</DataLoader>
|
|
</Route>
|
|
|