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 'routes/dc/service/index';
|
||||
@import 'routes/dc/nodes/index';
|
||||
@import 'routes/dc/kv/index';
|
||||
|
||||
main a {
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
@import './icons';
|
||||
@import './tag';
|
||||
td strong {
|
||||
@extend %tag;
|
||||
background-color: $gray;
|
||||
}
|
||||
th {
|
||||
color: $text-light !important;
|
||||
}
|
||||
|
@ -53,12 +58,6 @@ table td a {
|
|||
tbody {
|
||||
overflow-x: visible !important;
|
||||
}
|
||||
td strong {
|
||||
display: inline-block;
|
||||
background-color: $gray;
|
||||
padding: 1px 5px;
|
||||
border-radius: $radius-small;
|
||||
}
|
||||
th,
|
||||
td:not(.actions),
|
||||
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 {
|
||||
display: flex;
|
||||
margin-bottom: 1.4em;
|
||||
}
|
||||
html.template-service.template-show main dt::after {
|
||||
content: ':';
|
||||
display: inline-block;
|
||||
margin-right: 0.2em;
|
||||
html.template-service.template-show main dt {
|
||||
display: none;
|
||||
}
|
||||
// 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">
|
||||
{{item.Port}}
|
||||
</td>
|
||||
<td>
|
||||
<td data-test-service-tags class="tags">
|
||||
{{#if (gt item.Tags.length 0)}}
|
||||
{{join ', ' item.Tags}}
|
||||
{{#each item.Tags as |item|}}
|
||||
<span>{{item}}</span>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
</td>
|
||||
{{/block-slot}}
|
||||
|
|
|
@ -35,9 +35,11 @@
|
|||
<dd title="Critical" class={{if (lt item.ChecksCritical 1) 'zero'}} style={{criticalWidth}}>{{format_number item.ChecksCritical}}</dd>
|
||||
</dl>
|
||||
</td>
|
||||
<td style={{remainingWidth}}>
|
||||
<td class="tags" style={{remainingWidth}}>
|
||||
{{#if (gt item.Tags.length 0)}}
|
||||
{{join ', ' item.Tags}}
|
||||
{{#each item.Tags as |item|}}
|
||||
<span>{{item}}</span>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
</td>
|
||||
{{/block-slot}}
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
<dl>
|
||||
<dt>Tags</dt>
|
||||
<dd data-test-tags>
|
||||
{{join ', ' item.Tags}}
|
||||
{{#each item.Tags as |item|}}
|
||||
<span>{{item}}</span>
|
||||
{{/each}}
|
||||
</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
|
|
@ -17,6 +17,7 @@ Feature: dc / services / show: Show Service
|
|||
dc: dc1
|
||||
service: service-0
|
||||
---
|
||||
Then I see the text "Tag1, Tag2, Tag3" in "[data-test-tags]"
|
||||
Then ok
|
||||
Then I see the text "Tag1" in "[data-test-tags] span:nth-child(1)"
|
||||
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