ui: Adds a HCP home link when in HCP (#14417)

This commit is contained in:
John Cowen 2022-09-01 18:26:12 +01:00 committed by GitHub
parent c06cc60b90
commit 50380861d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 35 additions and 10 deletions

View File

@ -0,0 +1,8 @@
<div
class="consul-hcp-home"
...attributes
>
<a href={{env 'CONSUL_HCP_URL'}}>
Back to HCP
</a>
</div>

View File

@ -0,0 +1,11 @@
.consul-hcp-home {
position: relative;
top: -22px;
}
.consul-hcp-home a::before {
content: '';
--icon-name: icon-arrow-left;
--icon-size: icon-300;
margin-right: 8px;
}

View File

@ -1,5 +1,7 @@
(services => services({
'component:consul/hcp/home': {
class: 'consul-ui/components/consul/hcp/home',
},
}))(
(json, data = (typeof document !== 'undefined' ? document.currentScript.dataset : module.exports)) => {
data[`services`] = JSON.stringify(json);

View File

@ -86,13 +86,14 @@
</:home-nav>
<:main-nav>
<Consul::Hcp::Home />
<ul>
<Consul::Datacenter::Selector
@dc={{@dc}}
@partition={{@partition}}
@nspace={{@nspace}}
@dcs={{@dcs}}
/>
<Consul::Datacenter::Selector
@dc={{@dc}}
@partition={{@partition}}
@nspace={{@nspace}}
@dcs={{@dcs}}
/>
<Consul::Partition::Selector
@dc={{@dc}}
@partition={{@partition}}

View File

@ -8,9 +8,8 @@
@extend %main-nav-vertical-item;
}
/**/
/* actual clickable button-y things plus states */
%main-nav-vertical > ul > li > a {
%main-nav-vertical a {
@extend %main-nav-vertical-action;
}
%main-nav-vertical > ul > li.is-active > a {

View File

@ -2,7 +2,7 @@
@import './alert-circle-outline/index.scss';
@import './alert-triangle/index.scss';
// @import './arrow-down/index.scss';
// @import './arrow-left/index.scss';
@import './arrow-left/index.scss';
@import './arrow-right/index.scss';
// @import './arrow-up/index.scss';
// @import './bolt/index.scss';

View File

@ -109,3 +109,4 @@
@import 'consul-ui/components/consul/node/peer-info';
@import 'consul-ui/components/consul/peer/info';
@import 'consul-ui/components/consul/peer/form';
@import 'consul-ui/components/consul/hcp/home';

View File

@ -18,6 +18,9 @@
'component:consul/peer/selector': {
class: '@glimmer/component',
},
'component:consul/hcp/home': {
class: '@glimmer/component',
},
}))(
(
json,