2024-01-27 00:39:50 +00:00
|
|
|
{{!
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
|
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
|
|
}}
|
|
|
|
|
|
|
|
{{#let @list (env "CONSUL_HCP_URL") as |SNL hcpUrl|}}
|
|
|
|
{{#if this.shouldShowBackToHcpItem}}
|
|
|
|
<SNL.BackLink
|
|
|
|
@text={{t "components.hashicorp-consul.side-nav.hcp"}}
|
|
|
|
@href={{hcpUrl}}
|
|
|
|
@isHrefExternal={{true}}
|
|
|
|
data-test-back-to-hcp
|
|
|
|
/>
|
2024-02-01 23:04:01 +00:00
|
|
|
{{else}}
|
|
|
|
{{#if this.shouldDisplayNavLinkItem}}
|
|
|
|
{{#if this.alreadyLinked}}
|
|
|
|
<SNL.Link
|
|
|
|
@text="HCP Consul Central"
|
|
|
|
@href={{hcp-resource-id-to-link @linkData.resourceId}}
|
|
|
|
@isHrefExternal={{true}}
|
|
|
|
@badge="Linked"
|
|
|
|
data-test-linked-cluster-hcp-link
|
|
|
|
/>
|
|
|
|
{{else}}
|
|
|
|
<SNL.Item data-test-link-to-hcp>
|
|
|
|
<button type="button" class="hds-side-nav__list-item-link hcp-nav-item" {{on "click" this.onLinkToConsulCentral}}>
|
|
|
|
<Hds::Text::Body @size='200'>Link to HCP Consul Central</Hds::Text::Body>
|
|
|
|
<FlightIcon class='w-4 h-4' @size='24' @name='arrow-right'/>
|
|
|
|
</button>
|
|
|
|
</SNL.Item>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2024-01-27 00:39:50 +00:00
|
|
|
{{/if}}
|
|
|
|
{{/let}}
|