mirror of https://github.com/status-im/consul.git
Merge pull request #4253 from hashicorp/feature/ui-clearer-tags
UI - Clearer tags
This commit is contained in:
commit
30402b51b1
|
@ -45,6 +45,7 @@
|
||||||
@import 'components/notice';
|
@import 'components/notice';
|
||||||
|
|
||||||
@import 'routes/dc/service/index';
|
@import 'routes/dc/service/index';
|
||||||
|
@import 'routes/dc/nodes/index';
|
||||||
@import 'routes/dc/kv/index';
|
@import 'routes/dc/kv/index';
|
||||||
|
|
||||||
main a {
|
main a {
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
@import './icons';
|
@import './icons';
|
||||||
|
@import './tag';
|
||||||
|
td strong {
|
||||||
|
@extend %tag;
|
||||||
|
background-color: $gray;
|
||||||
|
}
|
||||||
th {
|
th {
|
||||||
color: $text-light !important;
|
color: $text-light !important;
|
||||||
}
|
}
|
||||||
|
@ -53,12 +58,6 @@ table td a {
|
||||||
tbody {
|
tbody {
|
||||||
overflow-x: visible !important;
|
overflow-x: visible !important;
|
||||||
}
|
}
|
||||||
td strong {
|
|
||||||
display: inline-block;
|
|
||||||
background-color: $gray;
|
|
||||||
padding: 1px 5px;
|
|
||||||
border-radius: $radius-small;
|
|
||||||
}
|
|
||||||
th,
|
th,
|
||||||
td:not(.actions),
|
td:not(.actions),
|
||||||
td:not(.actions) a {
|
td:not(.actions) a {
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
%tag {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 1px 5px;
|
||||||
|
border-radius: $radius-small;
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
// TODO: Generalize this, also see services/index
|
||||||
|
html.template-node.template-show td.tags span {
|
||||||
|
@extend %tag;
|
||||||
|
background-color: $gray;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
|
@ -1,9 +1,15 @@
|
||||||
|
@import '../../../components/tag';
|
||||||
html.template-service.template-show main dl {
|
html.template-service.template-show main dl {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 1.4em;
|
margin-bottom: 1.4em;
|
||||||
}
|
}
|
||||||
html.template-service.template-show main dt::after {
|
html.template-service.template-show main dt {
|
||||||
content: ':';
|
display: none;
|
||||||
display: inline-block;
|
}
|
||||||
margin-right: 0.2em;
|
// TODO: Generalize this, also see nodes/index
|
||||||
|
html.template-service.template-list td.tags span,
|
||||||
|
html.template-service.template-show main dd span {
|
||||||
|
@extend %tag;
|
||||||
|
background-color: $gray;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,9 +20,11 @@
|
||||||
<td data-test-service-port="{{item.Port}}" class="port">
|
<td data-test-service-port="{{item.Port}}" class="port">
|
||||||
{{item.Port}}
|
{{item.Port}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td data-test-service-tags class="tags">
|
||||||
{{#if (gt item.Tags.length 0)}}
|
{{#if (gt item.Tags.length 0)}}
|
||||||
{{join ', ' item.Tags}}
|
{{#each item.Tags as |item|}}
|
||||||
|
<span>{{item}}</span>
|
||||||
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
{{/block-slot}}
|
{{/block-slot}}
|
||||||
|
|
|
@ -35,9 +35,11 @@
|
||||||
<dd title="Critical" class={{if (lt item.ChecksCritical 1) 'zero'}} style={{criticalWidth}}>{{format_number item.ChecksCritical}}</dd>
|
<dd title="Critical" class={{if (lt item.ChecksCritical 1) 'zero'}} style={{criticalWidth}}>{{format_number item.ChecksCritical}}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</td>
|
</td>
|
||||||
<td style={{remainingWidth}}>
|
<td class="tags" style={{remainingWidth}}>
|
||||||
{{#if (gt item.Tags.length 0)}}
|
{{#if (gt item.Tags.length 0)}}
|
||||||
{{join ', ' item.Tags}}
|
{{#each item.Tags as |item|}}
|
||||||
|
<span>{{item}}</span>
|
||||||
|
{{/each}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
{{/block-slot}}
|
{{/block-slot}}
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Tags</dt>
|
<dt>Tags</dt>
|
||||||
<dd data-test-tags>
|
<dd data-test-tags>
|
||||||
{{join ', ' item.Tags}}
|
{{#each item.Tags as |item|}}
|
||||||
|
<span>{{item}}</span>
|
||||||
|
{{/each}}
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -17,6 +17,7 @@ Feature: dc / services / show: Show Service
|
||||||
dc: dc1
|
dc: dc1
|
||||||
service: service-0
|
service: service-0
|
||||||
---
|
---
|
||||||
Then I see the text "Tag1, Tag2, Tag3" in "[data-test-tags]"
|
Then I see the text "Tag1" in "[data-test-tags] span:nth-child(1)"
|
||||||
Then ok
|
Then I see the text "Tag2" in "[data-test-tags] span:nth-child(2)"
|
||||||
|
Then I see the text "Tag3" in "[data-test-tags] span:nth-child(3)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue