ui: If a service has no external-source, don't show the icon (#4996)
This commit is contained in:
parent
a641727208
commit
77ad621c04
|
@ -7,7 +7,13 @@
|
|||
{{#block-slot 'header'}}
|
||||
<h1>
|
||||
{{ item.Service.Service }}
|
||||
<span data-test-external-source="{{service/external-source item.Service}}" style={{{ concat 'background-image: ' (css-var (concat '--' (service/external-source item.Service) '-color-svg') 'none')}}} data-tooltip="Registered via {{service/external-source item.Service}}">Registered via {{service/external-source item.Service}}</span>
|
||||
{{#with (service/external-source item.Service) as |externalSource| }}
|
||||
{{#with (css-var (concat '--' externalSource '-color-svg') 'none') as |bg| }}
|
||||
{{#if (not-eq bg 'none') }}
|
||||
<span data-test-external-source="{{externalSource}}" style={{{ concat 'background-image:' bg }}} data-tooltip="Registered via {{externalSource}}">Registered via {{externalSource}}</span>
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
{{/with}}
|
||||
</h1>
|
||||
{{/block-slot}}
|
||||
{{#block-slot 'toolbar'}}
|
||||
|
|
|
@ -16,6 +16,22 @@ Feature: dc / services / show: Show Service
|
|||
service: service-0
|
||||
---
|
||||
Then I see externalSource like "consul"
|
||||
Scenario: Given a service with an 'unsupported' external source, there is no logo
|
||||
Given 1 datacenter model with the value "dc1"
|
||||
And 1 node models
|
||||
And 1 service model from yaml
|
||||
---
|
||||
- Service:
|
||||
Tags: ['Tag1', 'Tag2']
|
||||
Meta:
|
||||
external-source: 'not-supported'
|
||||
---
|
||||
When I visit the service page for yaml
|
||||
---
|
||||
dc: dc1
|
||||
service: service-0
|
||||
---
|
||||
Then I don't see externalSource
|
||||
Scenario: Given various services with various tags, all tags are displayed
|
||||
Given 1 datacenter model with the value "dc1"
|
||||
And 3 node models
|
||||
|
|
Loading…
Reference in New Issue