ui: Add ...attributes to healthcheck-info (#8120)

This commit is contained in:
John Cowen 2020-06-16 19:22:04 +01:00 committed by GitHub
parent 6c4cb5d357
commit a4c491ae75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 215 additions and 216 deletions

View File

@ -1,4 +1,4 @@
<div> <div ...attributes>
<ul> <ul>
{{#each items as |item| }} {{#each items as |item| }}
<li class={{concat 'healthcheck-output ' item.Status}}> <li class={{concat 'healthcheck-output ' item.Status}}>

View File

@ -1,215 +1,214 @@
@setupApplicationTest @setupApplicationTest
Feature: dc / services / instances / show: Proxy Info tab Feature: dc / services / instances / proxyinfo: Proxy Info tab
Background: Background:
Given 1 datacenter model with the value "dc1" Given 1 datacenter model with the value "dc1"
Scenario: A Service instance without a Proxy does not display Proxy Info tab Scenario: A Service instance without a Proxy does not display Proxy Info tab
Given 1 proxy model from yaml Given 1 proxy model from yaml
--- ---
- ServiceProxy: - ServiceProxy:
DestinationServiceName: service-1 DestinationServiceName: service-1
DestinationServiceID: ~ DestinationServiceID: ~
--- ---
When I visit the instance page for yaml When I visit the instance page for yaml
--- ---
dc: dc1 dc: dc1
service: service-0 service: service-0
node: node-0 node: node-0
id: service-0-with-id id: service-0-with-id
--- ---
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 proxyInfo on the tabs And I don't see proxyInfo on the tabs
Scenario: A Service instance with a Proxy displays Proxy Info tab Scenario: A Service instance with a Proxy displays Proxy Info tab
When I visit the instance page for yaml When I visit the instance page for yaml
--- ---
dc: dc1 dc: dc1
service: service-0 service: service-0
node: node-0 node: node-0
id: service-0-with-id id: service-0-with-id
--- ---
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 see proxyInfo on the tabs And I see proxyInfo on the tabs
When I click proxyInfo on the tabs When I click proxyInfo on the tabs
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy
And I see proxyInfoIsSelected on the tabs And I see proxyInfoIsSelected on the tabs
@notNamespaceable Scenario: A Proxy with health checks, upstreams, and exposed paths displays all info
Scenario: A Proxy with health checks, upstreams, and exposed paths displays all info Given 2 instance models from yaml
Given 2 instance models from yaml ---
--- - Service:
- Service: ID: service-0-with-id
ID: service-0-with-id Kind: consul
Kind: consul Node:
Node: Node: node-0
Node: node-0 - Service:
- Service: ID: service-0-with-id-proxy
ID: service-0-with-id-proxy Kind: connect-proxy
Kind: connect-proxy Proxy:
Proxy: DestinationServiceName: service-0
DestinationServiceName: service-0 Expose:
Expose: Checks: false
Checks: false Paths:
Paths: - Path: /grpc-metrics
- Path: /grpc-metrics Protocol: grpc
Protocol: grpc LocalPathPort: 8081
LocalPathPort: 8081 ListenerPort: 8080
ListenerPort: 8080 - Path: /http-metrics
- Path: /http-metrics Protocol: http
Protocol: http LocalPathPort: 8082
LocalPathPort: 8082 ListenerPort: 8083
ListenerPort: 8083 - Path: /http-metrics-2
- Path: /http-metrics-2 Protocol: http
Protocol: http LocalPathPort: 8083
LocalPathPort: 8083 ListenerPort: 8084
ListenerPort: 8084 Upstreams:
Upstreams: - DestinationType: service
- DestinationType: service DestinationName: service-2
DestinationName: service-2 DestinationNamespace: default
DestinationNamespace: default LocalBindAddress: 127.0.0.1
LocalBindAddress: 127.0.0.1 LocalBindPort: 1111
LocalBindPort: 1111 - DestinationType: prepared_query
- DestinationType: prepared_query DestinationName: service-3
DestinationName: service-3 LocalBindAddress: 127.0.0.1
LocalBindAddress: 127.0.0.1 LocalBindPort: 1112
LocalBindPort: 1112 Node:
Node: Node: node-0
Node: node-0 Checks:
Checks: - Name: Service check
- Name: Service check ServiceID: service-0-proxy
ServiceID: service-0-proxy Output: Output of check
Output: Output of check Status: passing
Status: passing - Name: Service check
- Name: Service check ServiceID: service-0-proxy
ServiceID: service-0-proxy Output: Output of check
Output: Output of check Status: warning
Status: warning - Name: Service check
- Name: Service check Type: http
Type: http ServiceID: service-0-proxy
ServiceID: service-0-proxy Output: Output of check
Output: Output of check Status: critical
Status: critical - Name: Node check
- Name: Node check ServiceID: ""
ServiceID: "" Output: Output of check
Output: Output of check Status: passing
Status: passing - Name: Node check
- Name: Node check ServiceID: ""
ServiceID: "" Output: Output of check
Output: Output of check Status: warning
Status: warning - Name: Node check
- Name: Node check ServiceID: ""
ServiceID: "" Output: Output of check
Output: Output of check Status: critical
Status: critical ---
--- When I visit the instance page for yaml
When I visit the instance page for yaml ---
--- dc: dc1
dc: dc1 service: service-0
service: service-0 node: node-0
node: node-0 id: service-0-with-id
id: service-0-with-id ---
--- 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 see proxyInfo on the tabs
And I see proxyInfo on the tabs
When I click proxyInfo on the tabs
When I click proxyInfo on the tabs Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy
And I see 6 of the proxyChecks object
And I see 6 of the proxyChecks object
And I see 2 of the upstreams object
And I see 2 of the upstreams object And I see name on the upstreams like yaml
And I see name on the upstreams like yaml ---
--- - service-2
- service-2 - service-3
- service-3 ---
--- Scenario: A Proxy without health checks does not display Proxy Health section
Scenario: A Proxy without health checks does not display Proxy Health section And 2 instance models from yaml
And 2 instance models from yaml ---
--- - Service:
- Service: ID: service-0-with-id
ID: service-0-with-id Kind: consul
Kind: consul Node:
Node: Node: node-0
Node: node-0 - Service:
- Service: ID: service-0-with-id-proxy
ID: service-0-with-id-proxy Kind: connect-proxy
Kind: connect-proxy Node:
Node: Node: node-0
Node: node-0 Checks: []
Checks: [] ---
--- When I visit the instance page for yaml
When I visit the instance page for yaml ---
--- dc: dc1
dc: dc1 service: service-0
service: service-0 node: node-0
node: node-0 id: service-0-with-id
id: service-0-with-id ---
--- 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 see proxyInfo on the tabs
And I see proxyInfo on the tabs
When I click proxyInfo on the tabs
When I click proxyInfo on the tabs Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy And I see 0 of the proxyChecks object
And I see 0 of the proxyChecks object Scenario: A Proxy without upstreams does not display Upstreams section
Scenario: A Proxy without upstreams does not display Upstreams section And 2 instance models from yaml
And 2 instance models from yaml ---
--- - Service:
- Service: ID: service-0-with-id
ID: service-0-with-id Kind: consul
Kind: consul Node:
Node: Node: node-0
Node: node-0 - Service:
- Service: ID: service-0-with-id-proxy
ID: service-0-with-id-proxy Kind: connect-proxy
Kind: connect-proxy Proxy:
Proxy: Upstreams: []
Upstreams: [] Node:
Node: Node: node-0
Node: node-0 ---
--- When I visit the instance page for yaml
When I visit the instance page for yaml ---
--- dc: dc1
dc: dc1 service: service-0
service: service-0 node: node-0
node: node-0 id: service-0-with-id
id: service-0-with-id ---
--- 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 see proxyInfo on the tabs
And I see proxyInfo on the tabs
When I click proxyInfo on the tabs
When I click proxyInfo on the tabs Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy And I see 0 of the upstreams object
And I see 0 of the upstreams object Scenario: A Proxy without exposed path does not display Exposed Paths section
Scenario: A Proxy without exposed path does not display Exposed Paths section And 2 instance models from yaml
And 2 instance models from yaml ---
--- - Service:
- Service: ID: service-0-with-id
ID: service-0-with-id Kind: consul
Kind: consul Node:
Node: Node: node-0
Node: node-0 - Service:
- Service: ID: service-0-with-id-proxy
ID: service-0-with-id-proxy Kind: connect-proxy
Kind: connect-proxy Proxy:
Proxy: Expose:
Expose: Checks: false
Checks: false Paths: []
Paths: [] Node:
Node: Node: node-0
Node: node-0 ---
--- When I visit the instance page for yaml
When I visit the instance page for yaml ---
--- dc: dc1
dc: dc1 service: service-0
service: service-0 node: node-0
node: node-0 id: service-0-with-id
id: service-0-with-id ---
--- 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 see proxyInfo on the tabs
And I see proxyInfo on the tabs
When I click proxyInfo on the tabs
When I click proxyInfo on the tabs Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy
Then the url should be /dc1/services/service-0/instances/node-0/service-0-with-id/proxy And I see 0 of the exposedPaths object
And I see 0 of the exposedPaths object