mirror of
https://github.com/status-im/consul.git
synced 2025-02-02 17:03:31 +00:00
22e6ce0df1
* Convert consul-hcp to a simpler component * update existing test to use envStub helper * An hcp link item for the navbar * A method of linking to HCP * Hook up fetching linking status to the nav-item * Hooking up fetching link status to the hcp link friend * Adding some tests * remove a comment - but also fix padding justify-content * Fix the banner tests * Adding permission tests as well * some more sane formatting * Rename function with its now multipurpose use * Feature change: No more NEW Badge since it breaks padding - instead a linked badge * Removing unused class
34 lines
1.2 KiB
Handlebars
34 lines
1.2 KiB
Handlebars
{{!
|
|
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
|
|
/>
|
|
{{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}}
|
|
{{/if}}
|
|
{{/let}} |