mirror of https://github.com/hashicorp/consul
ui: Sort lists with health by unhealthy/healthy by default (#9234)
* ui: Update lists with Health to sort by unhealthy/healthy by default * Fix up tests for new sorting * Make specific services page-navigation testpull/9240/head
parent
f8e80fc688
commit
35f1274a1f
|
@ -4,7 +4,7 @@
|
||||||
{{#let (hash
|
{{#let (hash
|
||||||
statuses=(if status (split status ',') undefined)
|
statuses=(if status (split status ',') undefined)
|
||||||
) as |filters|}}
|
) as |filters|}}
|
||||||
{{#let (or sortBy "Node:asc") as |sort|}}
|
{{#let (or sortBy "Status:asc") as |sort|}}
|
||||||
<AppView>
|
<AppView>
|
||||||
<BlockSlot @name="header">
|
<BlockSlot @name="header">
|
||||||
<h1>
|
<h1>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
kinds=(if kind (split kind ',') undefined)
|
kinds=(if kind (split kind ',') undefined)
|
||||||
sources=(if source (split source ',') undefined)
|
sources=(if source (split source ',') undefined)
|
||||||
) as |filters|}}
|
) as |filters|}}
|
||||||
{{#let (or sortBy "Name:asc") as |sort|}}
|
{{#let (or sortBy "Status:asc") as |sort|}}
|
||||||
<AppView>
|
<AppView>
|
||||||
<BlockSlot @name="notification" as |status type|>
|
<BlockSlot @name="notification" as |status type|>
|
||||||
<Consul::Service::Notifications
|
<Consul::Service::Notifications
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
statuses=(if status (split status ',') undefined)
|
statuses=(if status (split status ',') undefined)
|
||||||
sources=(if source (split source ',') undefined)
|
sources=(if source (split source ',') undefined)
|
||||||
) as |filters|}}
|
) as |filters|}}
|
||||||
{{#let (or sortBy "Name:asc") as |sort|}}
|
{{#let (or sortBy "Status:asc") as |sort|}}
|
||||||
{{#if (gt items.length 0) }}
|
{{#if (gt items.length 0) }}
|
||||||
<input type="checkbox" id="toolbar-toggle" />
|
<input type="checkbox" id="toolbar-toggle" />
|
||||||
<Consul::ServiceInstance::SearchBar
|
<Consul::ServiceInstance::SearchBar
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{#let (hash
|
{{#let (hash
|
||||||
instances=(if instance (split instance ',') undefined)
|
instances=(if instance (split instance ',') undefined)
|
||||||
) as |filters|}}
|
) as |filters|}}
|
||||||
{{#let (or sortBy "Name:asc") as |sort|}}
|
{{#let (or sortBy "Status:asc") as |sort|}}
|
||||||
{{#if (gt gatewayServices.length 0)}}
|
{{#if (gt gatewayServices.length 0)}}
|
||||||
<input type="checkbox" id="toolbar-toggle" />
|
<input type="checkbox" id="toolbar-toggle" />
|
||||||
<Consul::Upstream::SearchBar
|
<Consul::Upstream::SearchBar
|
||||||
|
|
|
@ -6,14 +6,24 @@ Feature: dc / nodes / empty-ids: Hedge for if nodes come in over the API with no
|
||||||
---
|
---
|
||||||
- ID: id-1
|
- ID: id-1
|
||||||
Node: name-1
|
Node: name-1
|
||||||
|
Checks:
|
||||||
|
- Status: passing
|
||||||
- ID: ""
|
- ID: ""
|
||||||
Node: name-2
|
Node: name-2
|
||||||
|
Checks:
|
||||||
|
- Status: passing
|
||||||
- ID: ""
|
- ID: ""
|
||||||
Node: name-3
|
Node: name-3
|
||||||
|
Checks:
|
||||||
|
- Status: passing
|
||||||
- ID: ""
|
- ID: ""
|
||||||
Node: name-4
|
Node: name-4
|
||||||
|
Checks:
|
||||||
|
- Status: passing
|
||||||
- ID: ""
|
- ID: ""
|
||||||
Node: name-5
|
Node: name-5
|
||||||
|
Checks:
|
||||||
|
- Status: passing
|
||||||
---
|
---
|
||||||
When I visit the nodes page for yaml
|
When I visit the nodes page for yaml
|
||||||
---
|
---
|
||||||
|
@ -27,4 +37,4 @@ Feature: dc / nodes / empty-ids: Hedge for if nodes come in over the API with no
|
||||||
- name-3
|
- name-3
|
||||||
- name-4
|
- name-4
|
||||||
- name-5
|
- name-5
|
||||||
---
|
---
|
||||||
|
|
|
@ -21,10 +21,14 @@ Feature: dc / nodes / index
|
||||||
---
|
---
|
||||||
- Address: 211.245.86.75
|
- Address: 211.245.86.75
|
||||||
Checks:
|
Checks:
|
||||||
- Status: warning
|
- Status: critical
|
||||||
Name: Warning check
|
Name: Warning check
|
||||||
- Address: 10.0.0.1
|
- Address: 10.0.0.1
|
||||||
|
Checks:
|
||||||
|
- Status: passing
|
||||||
- Address: 10.0.0.3
|
- Address: 10.0.0.3
|
||||||
|
Checks:
|
||||||
|
- Status: passing
|
||||||
---
|
---
|
||||||
When I visit the nodes page for yaml
|
When I visit the nodes page for yaml
|
||||||
---
|
---
|
||||||
|
@ -59,4 +63,4 @@ Feature: dc / nodes / index
|
||||||
s: 10.0.0.1
|
s: 10.0.0.1
|
||||||
---
|
---
|
||||||
And I see 1 node model
|
And I see 1 node model
|
||||||
And I see 1 node model with the name "node-02"
|
And I see 1 node model with the name "node-02"
|
||||||
|
|
|
@ -7,33 +7,51 @@ Feature: dc / services / index: List Services
|
||||||
- Name: Service-0
|
- Name: Service-0
|
||||||
ExternalSources:
|
ExternalSources:
|
||||||
- consul
|
- consul
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 10
|
||||||
Kind: ~
|
Kind: ~
|
||||||
- Name: Service-0-proxy
|
- Name: Service-0-proxy
|
||||||
Kind: 'connect-proxy'
|
Kind: 'connect-proxy'
|
||||||
- Name: Service-1
|
- Name: Service-1
|
||||||
ExternalSources:
|
ExternalSources:
|
||||||
- nomad
|
- nomad
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 9
|
||||||
Kind: ~
|
Kind: ~
|
||||||
- Name: Service-1-proxy
|
- Name: Service-1-proxy
|
||||||
Kind: 'connect-proxy'
|
Kind: 'connect-proxy'
|
||||||
- Name: Service-2
|
- Name: Service-2
|
||||||
ExternalSources:
|
ExternalSources:
|
||||||
- terraform
|
- terraform
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 8
|
||||||
Kind: ~
|
Kind: ~
|
||||||
- Name: Service-2-proxy
|
- Name: Service-2-proxy
|
||||||
Kind: 'connect-proxy'
|
Kind: 'connect-proxy'
|
||||||
- Name: Service-3
|
- Name: Service-3
|
||||||
ExternalSources:
|
ExternalSources:
|
||||||
- kubernetes
|
- kubernetes
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 7
|
||||||
Kind: ~
|
Kind: ~
|
||||||
- Name: Service-3-proxy
|
- Name: Service-3-proxy
|
||||||
Kind: 'connect-proxy'
|
Kind: 'connect-proxy'
|
||||||
- Name: Service-4
|
- Name: Service-4
|
||||||
ExternalSources:
|
ExternalSources:
|
||||||
- aws
|
- aws
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 6
|
||||||
Kind: ~
|
Kind: ~
|
||||||
- Name: Service-4-proxy
|
- Name: Service-4-proxy
|
||||||
Kind: 'connect-proxy'
|
Kind: 'connect-proxy'
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 5
|
||||||
---
|
---
|
||||||
|
|
||||||
When I visit the services page for yaml
|
When I visit the services page for yaml
|
||||||
|
@ -57,10 +75,19 @@ Feature: dc / services / index: List Services
|
||||||
---
|
---
|
||||||
- Name: Service-0-proxy
|
- Name: Service-0-proxy
|
||||||
Kind: 'connect-proxy'
|
Kind: 'connect-proxy'
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 3
|
||||||
- Name: Service-1-ingress-gateway
|
- Name: Service-1-ingress-gateway
|
||||||
Kind: 'ingress-gateway'
|
Kind: 'ingress-gateway'
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 2
|
||||||
- Name: Service-2-terminating-gateway
|
- Name: Service-2-terminating-gateway
|
||||||
Kind: 'terminating-gateway'
|
Kind: 'terminating-gateway'
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
When I visit the services page for yaml
|
When I visit the services page for yaml
|
||||||
|
@ -83,12 +110,18 @@ Feature: dc / services / index: List Services
|
||||||
Kind: ~
|
Kind: ~
|
||||||
ConnectedWithProxy: true
|
ConnectedWithProxy: true
|
||||||
ConnectedWithGateway: true
|
ConnectedWithGateway: true
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 2
|
||||||
- Name: Service-0-proxy
|
- Name: Service-0-proxy
|
||||||
Kind: connect-proxy
|
Kind: connect-proxy
|
||||||
- Name: Service-1
|
- Name: Service-1
|
||||||
Kind: ~
|
Kind: ~
|
||||||
ConnectedWithProxy: false
|
ConnectedWithProxy: false
|
||||||
ConnectedWithGateway: false
|
ConnectedWithGateway: false
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
When I visit the services page for yaml
|
When I visit the services page for yaml
|
||||||
|
@ -106,10 +139,19 @@ Feature: dc / services / index: List Services
|
||||||
---
|
---
|
||||||
- Name: Service-0
|
- Name: Service-0
|
||||||
Kind: ~
|
Kind: ~
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 2
|
||||||
- Name: Service-0-proxy
|
- Name: Service-0-proxy
|
||||||
Kind: connect-proxy
|
Kind: connect-proxy
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 1
|
||||||
- Name: Service-1
|
- Name: Service-1
|
||||||
Kind: 'ingress-gateway'
|
Kind: 'ingress-gateway'
|
||||||
|
ChecksPassing: 0
|
||||||
|
ChecksWarning: 0
|
||||||
|
ChecksCritical: 1
|
||||||
GatewayConfig:
|
GatewayConfig:
|
||||||
- AssociatedServiceCount: 345
|
- AssociatedServiceCount: 345
|
||||||
---
|
---
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
@setupApplicationTest
|
||||||
|
Feature: dc / services / navigation
|
||||||
|
Scenario: Clicking a service in the listing and back again
|
||||||
|
Given 1 datacenter model with the value "dc-1"
|
||||||
|
And 1 service model
|
||||||
|
When I visit the services page for yaml
|
||||||
|
---
|
||||||
|
dc: dc-1
|
||||||
|
---
|
||||||
|
Then the url should be /dc-1/services
|
||||||
|
And the title should be "Services - Consul"
|
||||||
|
Then I see 1 service models
|
||||||
|
When I click service on the services
|
||||||
|
And I click "[data-test-back]"
|
||||||
|
Then the url should be /dc-1/services
|
||||||
|
|
|
@ -66,7 +66,7 @@ Feature: dc / services / show: Show Service
|
||||||
And 1 service model from yaml
|
And 1 service model from yaml
|
||||||
---
|
---
|
||||||
- Checks:
|
- Checks:
|
||||||
- Status: passing
|
- Status: critical
|
||||||
Service:
|
Service:
|
||||||
Kind: ~
|
Kind: ~
|
||||||
ID: passing-service-8080
|
ID: passing-service-8080
|
||||||
|
@ -74,14 +74,18 @@ Feature: dc / services / show: Show Service
|
||||||
Address: 1.1.1.1
|
Address: 1.1.1.1
|
||||||
Node:
|
Node:
|
||||||
Address: 1.2.2.2
|
Address: 1.2.2.2
|
||||||
- Service:
|
- Checks:
|
||||||
|
- Status: warning
|
||||||
|
Service:
|
||||||
Kind: ~
|
Kind: ~
|
||||||
ID: service-8000
|
ID: service-8000
|
||||||
Port: 8000
|
Port: 8000
|
||||||
Address: 2.2.2.2
|
Address: 2.2.2.2
|
||||||
Node:
|
Node:
|
||||||
Address: 2.3.3.3
|
Address: 2.3.3.3
|
||||||
- Service:
|
- Checks:
|
||||||
|
- Status: passing
|
||||||
|
Service:
|
||||||
Kind: ~
|
Kind: ~
|
||||||
ID: service-8888
|
ID: service-8888
|
||||||
Port: 8888
|
Port: 8888
|
||||||
|
|
|
@ -41,7 +41,6 @@ Feature: page-navigation
|
||||||
Where:
|
Where:
|
||||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
| Item | Model | URL | Endpoint | Back |
|
| Item | Model | URL | Endpoint | Back |
|
||||||
| service | services | /dc-1/services/service-0/topology | /v1/discovery-chain/service-0?dc=dc-1&ns=@namespace | /dc-1/services |
|
|
||||||
| 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 |
|
| 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 |
|
# | acl | acls | /dc-1/acls/anonymous | /v1/acl/info/anonymous?dc=dc-1 | /dc-1/acls |
|
||||||
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
import steps from '../../steps';
|
||||||
|
|
||||||
|
// step definitions that are shared between features should be moved to the
|
||||||
|
// tests/acceptance/steps/steps.js file
|
||||||
|
|
||||||
|
export default function(assert) {
|
||||||
|
return steps(assert).then('I should find a file', function() {
|
||||||
|
assert.ok(true, this.step);
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in New Issue