mirror of https://github.com/status-im/consul.git
ui: Remove node name from agentless service instance (#14903)
* [NET-949]: Remove node name from agentless instance * Add changelog entry
This commit is contained in:
parent
97ad73ad24
commit
2c349bb126
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:feature
|
||||||
|
ui: Removed reference to node name on service instance page when using agentless
|
||||||
|
```
|
|
@ -151,10 +151,12 @@ as |item|}}
|
||||||
<dt>Service Name</dt>
|
<dt>Service Name</dt>
|
||||||
<dd><a href="{{href-to 'dc.services.show' item.Service.Service}}">{{item.Service.Service}}</a></dd>
|
<dd><a href="{{href-to 'dc.services.show' item.Service.Service}}">{{item.Service.Service}}</a></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
{{#unless item.Node.Meta.synthetic-node}}
|
||||||
<dt>Node Name</dt>
|
<dl>
|
||||||
<dd><a href="{{href-to 'dc.nodes.show' item.Node.Node}}">{{item.Node.Node}}</a></dd>
|
<dt>Node Name</dt>
|
||||||
</dl>
|
<dd><a data-test-service-instance-node-name href="{{href-to 'dc.nodes.show' item.Node.Node}}">{{item.Node.Node}}</a></dd>
|
||||||
|
</dl>
|
||||||
|
{{/unless}}
|
||||||
{{#if item.Service.PeerName}}
|
{{#if item.Service.PeerName}}
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Peer Name</dt>
|
<dt>Peer Name</dt>
|
||||||
|
|
|
@ -18,6 +18,16 @@
|
||||||
const proxy = service.indexOf('-proxy')
|
const proxy = service.indexOf('-proxy')
|
||||||
const sidecar = service.indexOf('-sidecar-proxy')
|
const sidecar = service.indexOf('-sidecar-proxy')
|
||||||
const id = (proxy !== -1 ? service.slice(0, -6) + '-with-id-proxy' : service + '-with-id');
|
const id = (proxy !== -1 ? service.slice(0, -6) + '-with-id-proxy' : service + '-with-id');
|
||||||
|
const externalSource = fake.helpers.randomize([
|
||||||
|
'consul-api-gateway',
|
||||||
|
'vault',
|
||||||
|
'nomad',
|
||||||
|
'terraform',
|
||||||
|
'kubernetes',
|
||||||
|
'aws',
|
||||||
|
'lambda',
|
||||||
|
''
|
||||||
|
]);
|
||||||
let kind = '';
|
let kind = '';
|
||||||
switch(true) {
|
switch(true) {
|
||||||
case service.endsWith('-mesh-gateway'):
|
case service.endsWith('-mesh-gateway'):
|
||||||
|
@ -42,7 +52,10 @@
|
||||||
"Address":"${ip}",
|
"Address":"${ip}",
|
||||||
"Datacenter":"dc1",
|
"Datacenter":"dc1",
|
||||||
"TaggedAddresses":{"lan":"${ip}","wan":"${ip}"},
|
"TaggedAddresses":{"lan":"${ip}","wan":"${ip}"},
|
||||||
"Meta":{"${service}-network-segment":""},
|
"Meta":{
|
||||||
|
"${service}-network-segment":"",
|
||||||
|
"synthetic-node":${externalSource === 'kubernetes' ? "true" : "false"}
|
||||||
|
},
|
||||||
${typeof location.search.peer !== 'undefined' ? `
|
${typeof location.search.peer !== 'undefined' ? `
|
||||||
"PeerName": "${location.search.peer}",
|
"PeerName": "${location.search.peer}",
|
||||||
` : ``}
|
` : ``}
|
||||||
|
@ -87,16 +100,7 @@ ${typeof location.search.partition !== 'undefined' ? `
|
||||||
${ fake.random.number({min: 1, max: 10}) > 2 ? `
|
${ fake.random.number({min: 1, max: 10}) > 2 ? `
|
||||||
"Meta": {
|
"Meta": {
|
||||||
"consul-dashboard-url": "${fake.internet.protocol()}://${fake.internet.domainName()}/?id={{Service}}",
|
"consul-dashboard-url": "${fake.internet.protocol()}://${fake.internet.domainName()}/?id={{Service}}",
|
||||||
"external-source": "${fake.helpers.randomize([
|
"external-source": "${externalSource}"
|
||||||
'consul-api-gateway',
|
|
||||||
'vault',
|
|
||||||
'nomad',
|
|
||||||
'terraform',
|
|
||||||
'kubernetes',
|
|
||||||
'aws',
|
|
||||||
'lambda',
|
|
||||||
''
|
|
||||||
])}"
|
|
||||||
},
|
},
|
||||||
` : `
|
` : `
|
||||||
"Meta": null,
|
"Meta": null,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Feature: dc / services / instances / show: Show Service Instance
|
Feature: dc / services / instances / show: Show Service Instance
|
||||||
Background:
|
Background:
|
||||||
Given 1 datacenter model with the value "dc1"
|
Given 1 datacenter model with the value "dc1"
|
||||||
And 2 instance models from yaml
|
And 3 instance models from yaml
|
||||||
---
|
---
|
||||||
- Service:
|
- Service:
|
||||||
ID: service-0-with-id
|
ID: service-0-with-id
|
||||||
|
@ -45,6 +45,15 @@ Feature: dc / services / instances / show: Show Service Instance
|
||||||
ServiceID: ""
|
ServiceID: ""
|
||||||
Output: Output of check
|
Output: Output of check
|
||||||
Status: critical
|
Status: critical
|
||||||
|
- Service:
|
||||||
|
ID: service-2-with-id
|
||||||
|
Meta:
|
||||||
|
external-source: kubernetes
|
||||||
|
synthetic-node: true
|
||||||
|
Node:
|
||||||
|
Node: node-2
|
||||||
|
Meta:
|
||||||
|
synthetic-node: true
|
||||||
---
|
---
|
||||||
Scenario: A Service instance has no Proxy
|
Scenario: A Service instance has no Proxy
|
||||||
Given 1 proxy model from yaml
|
Given 1 proxy model from yaml
|
||||||
|
@ -62,6 +71,7 @@ Feature: dc / services / instances / show: Show Service Instance
|
||||||
---
|
---
|
||||||
Then the url should be /dc1/services/service-0/instances/another-node/service-1-with-id/health-checks
|
Then the url should be /dc1/services/service-0/instances/another-node/service-1-with-id/health-checks
|
||||||
Then I see externalSource like "nomad"
|
Then I see externalSource like "nomad"
|
||||||
|
And I see the text "another-node" in "[data-test-service-instance-node-name]"
|
||||||
|
|
||||||
And I don't see upstreams on the tabs
|
And I don't see upstreams on the tabs
|
||||||
And I see healthChecksIsSelected on the tabs
|
And I see healthChecksIsSelected on the tabs
|
||||||
|
@ -115,3 +125,14 @@ Feature: dc / services / instances / show: Show Service Instance
|
||||||
---
|
---
|
||||||
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks
|
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/health-checks
|
||||||
And I don't see proxy on the tabs
|
And I don't see proxy on the tabs
|
||||||
|
Scenario: A Service instance with a synthetic node does not display the node name
|
||||||
|
When I visit the instance page for yaml
|
||||||
|
---
|
||||||
|
dc: dc1
|
||||||
|
service: service-2
|
||||||
|
node: node-2
|
||||||
|
id: service-2-with-id
|
||||||
|
---
|
||||||
|
Then the url should be /dc1/services/service-2/instances/node-2/service-2-with-id/health-checks
|
||||||
|
Then I see externalSource like "kubernetes"
|
||||||
|
And I don't see the text "node-2" in "[data-test-service-instance-node-name]"
|
||||||
|
|
Loading…
Reference in New Issue