ui: Redesign - Gateway Instances List page (#7796)
* Hide Nav in Instances page for Gateway services * Fix up tests to have mocked Services with no Kind attribute * Upgrade consul-api-double to 2.14.4
This commit is contained in:
parent
eedd062977
commit
697f1f56cf
|
@ -14,13 +14,14 @@ export default Route.extend({
|
|||
const nspace = this.modelFor('nspace').nspace.substr(1);
|
||||
return hash({
|
||||
item: this.repo.findBySlug(params.name, dc, nspace),
|
||||
intentions: this.intentionRepo.findByService(params.name, dc, nspace),
|
||||
urls: this.settings.findBySlug('urls'),
|
||||
dc: dc,
|
||||
proxies: [],
|
||||
}).then(model => {
|
||||
return ['connect-proxy', 'mesh-gateway'].includes(get(model, 'item.Service.Kind'))
|
||||
? model
|
||||
: hash({
|
||||
intentions: this.intentionRepo.findByService(params.name, dc, nspace),
|
||||
chain: this.chainRepo.findBySlug(params.name, dc, nspace).catch(function(e) {
|
||||
const code = get(e, 'errors.firstObject.status');
|
||||
// Currently we are specifically catching a 500, but we return null
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
</h1>
|
||||
<ConsulExternalSource @item={{item.Service}} />
|
||||
</div>
|
||||
{{#if (not item.Service.Kind)}}
|
||||
<TabNav @items={{
|
||||
compact
|
||||
(array
|
||||
|
@ -25,6 +26,7 @@
|
|||
(hash label="Tags" href=(href-to "dc.services.show.tags") selected=(is-href "dc.services.show.tags"))
|
||||
)
|
||||
}}/>
|
||||
{{/if}}
|
||||
</BlockSlot>
|
||||
<BlockSlot @name="actions">
|
||||
{{#if urls.service}}
|
||||
|
|
|
@ -6,6 +6,7 @@ Feature: dc / services / show: Show Service
|
|||
And 1 service model from yaml
|
||||
---
|
||||
- Service:
|
||||
Kind: ~
|
||||
Tags: ['Tag1', 'Tag2']
|
||||
Meta:
|
||||
external-source: consul
|
||||
|
@ -24,6 +25,7 @@ Feature: dc / services / show: Show Service
|
|||
And 1 service model from yaml
|
||||
---
|
||||
- Service:
|
||||
Kind: ~
|
||||
Tags: ['Tag1', 'Tag2']
|
||||
Meta:
|
||||
external-source: 'not-supported'
|
||||
|
@ -40,10 +42,13 @@ Feature: dc / services / show: Show Service
|
|||
And 1 service model from yaml
|
||||
---
|
||||
- Service:
|
||||
Kind: ~
|
||||
Tags: ['Tag1', 'Tag2']
|
||||
- Service:
|
||||
Kind: ~
|
||||
Tags: ['Tag3', 'Tag1']
|
||||
- Service:
|
||||
Kind: ~
|
||||
Tags: ['Tag2', 'Tag3']
|
||||
---
|
||||
When I visit the service page for yaml
|
||||
|
@ -51,6 +56,7 @@ Feature: dc / services / show: Show Service
|
|||
dc: dc1
|
||||
service: service-0
|
||||
---
|
||||
And pause for 3000
|
||||
And I click tags on the tabs
|
||||
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)"
|
||||
|
@ -63,18 +69,21 @@ Feature: dc / services / show: Show Service
|
|||
- Checks:
|
||||
- Status: passing
|
||||
Service:
|
||||
Kind: ~
|
||||
ID: passing-service-8080
|
||||
Port: 8080
|
||||
Address: 1.1.1.1
|
||||
Node:
|
||||
Address: 1.2.2.2
|
||||
- Service:
|
||||
Kind: ~
|
||||
ID: service-8000
|
||||
Port: 8000
|
||||
Address: 2.2.2.2
|
||||
Node:
|
||||
Address: 2.3.3.3
|
||||
- Service:
|
||||
Kind: ~
|
||||
ID: service-8888
|
||||
Port: 8888
|
||||
Address: 3.3.3.3
|
||||
|
|
|
@ -6,7 +6,7 @@ Feature: dc / services / intentions: Intentions per service
|
|||
And 1 service model from yaml
|
||||
---
|
||||
- Service:
|
||||
Kind: consul
|
||||
Kind: ~
|
||||
Name: service-0
|
||||
ID: service-0-with-id
|
||||
---
|
||||
|
|
|
@ -1211,9 +1211,9 @@
|
|||
js-yaml "^3.13.1"
|
||||
|
||||
"@hashicorp/consul-api-double@^2.6.2":
|
||||
version "2.14.3"
|
||||
resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-2.14.3.tgz#57974cd877cd457d660f1168abdfd0b3fc79ea1b"
|
||||
integrity sha512-3E7aBFbeWWdCk3f07x5z3puGfV3DEyxrpElWD/J4NWxZIgJ92iYV2LKkLZ5u19UGAI5lVdhT3wYaBOqmC725pA==
|
||||
version "2.14.4"
|
||||
resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-2.14.4.tgz#cc68c500f934d9ac76292797f845e78b9e3c4fcb"
|
||||
integrity sha512-6GXHlSKr822CPuAz7jWBDZE4KAxKNSFt/2RA0Z7q6HAHu0O3NTd14vZweO30hS1yusyVEI9RLd9OvgMbv5WXhA==
|
||||
|
||||
"@hashicorp/ember-cli-api-double@^3.0.2":
|
||||
version "3.0.2"
|
||||
|
|
Loading…
Reference in a new issue