mirror of https://github.com/status-im/consul.git
ui: Upstream CSS Tweaks (#11554)
Various CSS tweaks/HTML cleanup around upstreams (but impacts other 'rows') - Prefer {{tooltip}} to <Tooltip> - Removed some now unnecessary spans - Stop using an empty class="" for styling purposes. - Renamed any classes used to identify response properties to follow the exact property name but kebab-cased. - Fixed up the alignment of things in the rows when used with a 'tiny copy button' (see screengrab) which was minus positioning and knocking things out (pending a proper refactor of our copy button CSS which is from the very very start of things)
This commit is contained in:
parent
c847c9a8cb
commit
28b1e642cb
|
@ -14,10 +14,10 @@
|
||||||
{{#if (env 'CONSUL_NSPACES_ENABLED')}}
|
{{#if (env 'CONSUL_NSPACES_ENABLED')}}
|
||||||
{{#if (not-eq item.DestinationType 'prepared_query')}}
|
{{#if (not-eq item.DestinationType 'prepared_query')}}
|
||||||
<dl class="nspace">
|
<dl class="nspace">
|
||||||
<dt>
|
<dt
|
||||||
<Tooltip>
|
{{tooltip}}
|
||||||
|
>
|
||||||
Namespace
|
Namespace
|
||||||
</Tooltip>
|
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{{or item.DestinationNamespace 'default'}}
|
{{or item.DestinationNamespace 'default'}}
|
||||||
|
@ -27,10 +27,10 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (and (not-eq item.Datacenter @dc) (not-eq item.Datacenter ""))}}
|
{{#if (and (not-eq item.Datacenter @dc) (not-eq item.Datacenter ""))}}
|
||||||
<dl class="datacenter">
|
<dl class="datacenter">
|
||||||
<dt>
|
<dt
|
||||||
<Tooltip>
|
{{tooltip}}
|
||||||
|
>
|
||||||
Datacenter
|
Datacenter
|
||||||
</Tooltip>
|
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{{item.Datacenter}}
|
{{item.Datacenter}}
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
</dl>
|
</dl>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if item.LocalBindSocketPath}}
|
{{#if item.LocalBindSocketPath}}
|
||||||
<dl>
|
<dl class="local-bind-socket-path">
|
||||||
<dt>
|
<dt>
|
||||||
Local bind socket path
|
Local bind socket path
|
||||||
</dt>
|
</dt>
|
||||||
|
@ -50,8 +50,10 @@
|
||||||
{{item.LocalBindSocketPath}}
|
{{item.LocalBindSocketPath}}
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="local-bind-mode">
|
<dl class="local-bind-socket-mode">
|
||||||
<dt class>mode</dt>
|
<dt>
|
||||||
|
Mode
|
||||||
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{{or item.LocalBindSocketMode '-'}}
|
{{or item.LocalBindSocketMode '-'}}
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -61,9 +63,7 @@
|
||||||
{{#let (concat (or item.LocalBindAddress '127.0.0.1') ':' item.LocalBindPort) as |combinedAddress|}}
|
{{#let (concat (or item.LocalBindAddress '127.0.0.1') ':' item.LocalBindPort) as |combinedAddress|}}
|
||||||
<dl class="local-bind-address">
|
<dl class="local-bind-address">
|
||||||
<dt>
|
<dt>
|
||||||
<span>
|
|
||||||
Address
|
Address
|
||||||
</span>
|
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<CopyButton
|
<CopyButton
|
||||||
|
@ -75,7 +75,6 @@
|
||||||
</dl>
|
</dl>
|
||||||
{{/let}}
|
{{/let}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.consul-upstream-instance-list {
|
%consul-upstream-instance-list {
|
||||||
li {
|
li {
|
||||||
@extend %composite-row;
|
@extend %composite-row;
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,16 @@
|
||||||
dl.nspace dt::before {
|
dl.nspace dt::before {
|
||||||
@extend %with-folder-outline-mask, %as-pseudo;
|
@extend %with-folder-outline-mask, %as-pseudo;
|
||||||
}
|
}
|
||||||
dl.local-bind-mode dt {
|
dl.local-bind-socket-path dt,
|
||||||
|
dl.local-bind-address dt {
|
||||||
|
@extend %horizontal-kv-list-hidden-title;
|
||||||
|
}
|
||||||
|
dl.local-bind-socket-mode dt {
|
||||||
|
@extend %horizontal-kv-list-visible-title;
|
||||||
|
text-transform: lowercase;
|
||||||
font-weight: var(--typo-weight-semibold);
|
font-weight: var(--typo-weight-semibold);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.consul-upstream-instance-list {
|
||||||
|
@extend %consul-upstream-instance-list;
|
||||||
|
}
|
||||||
|
|
|
@ -10,8 +10,9 @@ as |item index|>
|
||||||
<dt>
|
<dt>
|
||||||
Health
|
Health
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd
|
||||||
<Tooltip @position="top-start">
|
{{tooltip}}
|
||||||
|
>
|
||||||
{{#if (eq 'critical' item.MeshStatus)}}
|
{{#if (eq 'critical' item.MeshStatus)}}
|
||||||
At least one health check on one instance is failing.
|
At least one health check on one instance is failing.
|
||||||
{{else if (eq 'warning' item.MeshStatus)}}
|
{{else if (eq 'warning' item.MeshStatus)}}
|
||||||
|
@ -21,25 +22,21 @@ as |item index|>
|
||||||
{{else}}
|
{{else}}
|
||||||
There are no health checks.
|
There are no health checks.
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</Tooltip>
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
{{#if (and (can 'use nspaces') (not-eq item.Namespace @nspace))}}
|
|
||||||
<a
|
<a
|
||||||
data-test-service-name
|
data-test-service-name
|
||||||
href={{href-to 'dc.services.show' @dc item.Name
|
href={{if (and (can 'use nspaces') (not-eq item.Namespace @nspace))
|
||||||
|
(href-to 'dc.services.show' @dc item.Name
|
||||||
params=(hash
|
params=(hash
|
||||||
nspace=item.Namespace
|
nspace=item.Namespace
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
(href-to 'dc.services.show' item.Name)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{{item.Name}}
|
{{item.Name}}
|
||||||
</a>
|
</a>
|
||||||
{{else}}
|
|
||||||
<a data-test-service-name href={{href-to 'dc.services.show' item.Name}}>
|
|
||||||
{{item.Name}}
|
|
||||||
</a>
|
|
||||||
{{/if}}
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<p data-test-service-name>
|
<p data-test-service-name>
|
||||||
{{item.Name}}
|
{{item.Name}}
|
||||||
|
@ -47,12 +44,12 @@ as |item index|>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
<BlockSlot @name="details">
|
<BlockSlot @name="details">
|
||||||
{{#if (and (env 'CONSUL_NSPACES_ENABLED') (not-eq item.Namespace @nspace))}}
|
{{#if (and (can 'use nspaces') (not-eq item.Namespace @nspace))}}
|
||||||
<dl class="nspace">
|
<dl class="nspace">
|
||||||
<dt>
|
<dt
|
||||||
<Tooltip>
|
{{tooltip}}
|
||||||
|
>
|
||||||
Namespace
|
Namespace
|
||||||
</Tooltip>
|
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
{{item.Namespace}}
|
{{item.Namespace}}
|
||||||
|
@ -62,7 +59,7 @@ as |item index|>
|
||||||
{{#each item.GatewayConfig.Addresses as |address|}}
|
{{#each item.GatewayConfig.Addresses as |address|}}
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
<span>Address</span>
|
Address
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<CopyButton
|
<CopyButton
|
||||||
|
|
|
@ -3,6 +3,20 @@
|
||||||
%copy-button {
|
%copy-button {
|
||||||
@extend %button;
|
@extend %button;
|
||||||
}
|
}
|
||||||
|
/* Temporary tweak for copy-buttons in kv-lists */
|
||||||
|
/* once someone gets round to re-doing copy buttons */
|
||||||
|
/* hopefully this little tweak can go */
|
||||||
|
%horizontal-kv-list .copy-button {
|
||||||
|
margin-top: 0 !important;
|
||||||
|
}
|
||||||
|
%horizontal-kv-list .copy-btn {
|
||||||
|
top: 0 !important;
|
||||||
|
}
|
||||||
|
%horizontal-kv-list .copy-btn:empty::before {
|
||||||
|
left: 0 !important;
|
||||||
|
}
|
||||||
|
/**/
|
||||||
|
|
||||||
.copy-button button {
|
.copy-button button {
|
||||||
@extend %copy-button;
|
@extend %copy-button;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 140px auto;
|
grid-template-columns: 140px auto;
|
||||||
grid-gap: 0.4em 20px;
|
grid-gap: 0.4em 20px;
|
||||||
|
margin-bottom: 1.4em;
|
||||||
}
|
}
|
||||||
%definition-table dd > * {
|
%definition-table dd > * {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
@ -60,8 +60,7 @@ span.label {
|
||||||
}
|
}
|
||||||
%form table,
|
%form table,
|
||||||
%radio-group,
|
%radio-group,
|
||||||
%checkbox-group,
|
%checkbox-group {
|
||||||
%main-content form dl {
|
|
||||||
@extend %form-row;
|
@extend %form-row;
|
||||||
}
|
}
|
||||||
%radio-group label,
|
%radio-group label,
|
||||||
|
|
|
@ -10,10 +10,6 @@
|
||||||
%horizontal-kv-list:not([class]) dt:not([class]) {
|
%horizontal-kv-list:not([class]) dt:not([class]) {
|
||||||
@extend %horizontal-kv-list-hidden-title;
|
@extend %horizontal-kv-list-hidden-title;
|
||||||
}
|
}
|
||||||
%horizontal-kv-list[class] dt,
|
|
||||||
%horizontal-kv-list dt[class] {
|
|
||||||
@extend %horizontal-kv-list-visible-title;
|
|
||||||
}
|
|
||||||
%horizontal-kv-list-hidden-title {
|
%horizontal-kv-list-hidden-title {
|
||||||
@extend %visually-hidden;
|
@extend %visually-hidden;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
%horizontal-kv-list-visible-title {
|
%horizontal-kv-list-visible-title {
|
||||||
|
display: inline-flex;
|
||||||
min-width: 18px;
|
min-width: 18px;
|
||||||
}
|
}
|
||||||
%horizontal-kv-list-reversed:not(:first-of-type),
|
%horizontal-kv-list-reversed:not(:first-of-type),
|
||||||
|
@ -35,9 +36,12 @@
|
||||||
}
|
}
|
||||||
/**/
|
/**/
|
||||||
%horizontal-kv-list-reversed dt,
|
%horizontal-kv-list-reversed dt,
|
||||||
%horizontal-kv-list-visible-title + dd {
|
%horizontal-kv-list dt + dd {
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
%horizontal-kv-list-hidden-title + dd {
|
||||||
|
margin-left: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
%horizontal-kv-list-reversed dt + dd {
|
%horizontal-kv-list-reversed dt + dd {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
%horizontal-kv-list dt[class=""]::after,
|
%horizontal-kv-list-visible-title::after {
|
||||||
%horizontal-kv-list dt[class=""]::after {
|
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
%horizontal-kv-list dt[class=""]::after {
|
%horizontal-kv-list-visible-title::after {
|
||||||
content: var(--horizontal-kv-list-key-separator);
|
content: var(--horizontal-kv-list-key-separator);
|
||||||
}
|
}
|
||||||
%horizontal-kv-list-reversed dt[class=""]::after {
|
%horizontal-kv-list-reversed dt[class=""]::after {
|
||||||
|
|
|
@ -58,7 +58,7 @@ ${range(env('CONSUL_EXPOSED_COUNT', 3)).map((i) => `
|
||||||
${ location.pathname.slice(4) === "service-0" ? `
|
${ location.pathname.slice(4) === "service-0" ? `
|
||||||
,
|
,
|
||||||
"DestinationServiceID": "${location.pathname.slice(4)}-with-id",
|
"DestinationServiceID": "${location.pathname.slice(4)}-with-id",
|
||||||
${ fake.random.number({min: 1, max: 10}) > 2 ? `
|
${ fake.random.number({min: 1, max: 10}) > 5 ? `
|
||||||
"LocalServiceAddress": "${fake.internet.ip()}",
|
"LocalServiceAddress": "${fake.internet.ip()}",
|
||||||
"LocalServicePort": ${fake.random.number({min: 0, max: 65535})}
|
"LocalServicePort": ${fake.random.number({min: 0, max: 65535})}
|
||||||
` : `
|
` : `
|
||||||
|
|
|
@ -133,7 +133,7 @@ ${range(env('CONSUL_EXPOSED_COUNT', 3)).map((i) => `
|
||||||
"DestinationName": "${fake.hacker.noun()}",
|
"DestinationName": "${fake.hacker.noun()}",
|
||||||
"DestinationNamespace": "${fake.hacker.noun()}",
|
"DestinationNamespace": "${fake.hacker.noun()}",
|
||||||
"DestinationType": "${fake.helpers.randomize(['service', 'prepared_query'])}",
|
"DestinationType": "${fake.helpers.randomize(['service', 'prepared_query'])}",
|
||||||
${ false ? `
|
${fake.random.number({min: 1, max: 10}) > 5 ? `
|
||||||
"LocalBindAddress": "${fake.internet.ip()}",
|
"LocalBindAddress": "${fake.internet.ip()}",
|
||||||
"LocalBindPort": ${fake.random.number({min: 0, max: 65535})}
|
"LocalBindPort": ${fake.random.number({min: 0, max: 65535})}
|
||||||
` : `
|
` : `
|
||||||
|
|
Loading…
Reference in New Issue