mirror of https://github.com/status-im/consul.git
ui: Add and use ProxyFor to get the `connected with proxy` boolean (#7820)
* Add and use ProxyFor to get the `connected with proxy` boolean * Fix up page-navigation test * Upgrade to @hashicorp/consul-api-double@2.14.7
This commit is contained in:
parent
c4c06c2dab
commit
e2ef864b1e
|
@ -32,7 +32,13 @@ export default Controller.extend(WithEventSource, WithSearching, {
|
|||
return item.Kind === 'connect-proxy';
|
||||
})
|
||||
.forEach(item => {
|
||||
proxies[item.Name.replace('-proxy', '')] = true;
|
||||
// Iterating to cover the usecase of a proxy being
|
||||
// used by more than one service
|
||||
if (item.ProxyFor) {
|
||||
item.ProxyFor.forEach(service => {
|
||||
proxies[service] = true;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return proxies;
|
||||
|
|
|
@ -14,6 +14,7 @@ export default Model.extend({
|
|||
},
|
||||
}),
|
||||
InstanceCount: attr('number'),
|
||||
ProxyFor: attr(),
|
||||
Kind: attr('string'),
|
||||
ExternalSources: attr(),
|
||||
Meta: attr(),
|
||||
|
|
|
@ -42,7 +42,7 @@ Feature: page-navigation
|
|||
Where:
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
| Item | Model | URL | Endpoint | Back |
|
||||
| service | services | /dc-1/services/service-0-terminating-gateway/instances | /v1/discovery-chain/service-0-terminating-gateway?dc=dc-1&ns=@namespace | /dc-1/services |
|
||||
| service | services | /dc-1/services/service-0/instances | /v1/discovery-chain/service-0?dc=dc-1&ns=@namespace | /dc-1/services |
|
||||
| node | nodes | /dc-1/nodes/node-0/health-checks | /v1/session/node/node-0?dc=dc-1&ns=@namespace | /dc-1/nodes |
|
||||
| kv | kvs | /dc-1/kv/0-key-value/edit | /v1/session/info/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=dc-1&ns=@namespace | /dc-1/kv |
|
||||
# | acl | acls | /dc-1/acls/anonymous | /v1/acl/info/anonymous?dc=dc-1 | /dc-1/acls |
|
||||
|
|
|
@ -1211,9 +1211,9 @@
|
|||
js-yaml "^3.13.1"
|
||||
|
||||
"@hashicorp/consul-api-double@^2.6.2":
|
||||
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==
|
||||
version "2.14.7"
|
||||
resolved "https://registry.yarnpkg.com/@hashicorp/consul-api-double/-/consul-api-double-2.14.7.tgz#80cd19461a3f3716bf76ba28bcabff842bcd9aef"
|
||||
integrity sha512-QjpwvrraUswn/hFh+9lIKuA9keCGOkh1yr/cT3I6fDiw4JKLyDLaRN8bF/JNGtgoA/SsQh10L1YI3feZ7M3VKw==
|
||||
|
||||
"@hashicorp/ember-cli-api-double@^3.0.2":
|
||||
version "3.0.2"
|
||||
|
|
Loading…
Reference in New Issue