mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
ui: Show service and node checks as a merged list sorted by health (#8797)
This commit is contained in:
parent
6abc6a293c
commit
f0ee2055b7
@ -1,22 +1,17 @@
|
|||||||
<div id="health-checks" class="tab-section">
|
<div class="tab-section">
|
||||||
<div role="tabpanel">
|
<div role="tabpanel">
|
||||||
{{#if (gt item.ServiceChecks.length 0) }}
|
{{#if (gt item.Checks.length 0) }}
|
||||||
<section data-test-service-checks>
|
<section data-test-checks>
|
||||||
<HealthcheckList @items={{sort-by (comparator 'check' 'Status:asc') item.ServiceChecks}} @exposed={{proxy.ServiceProxy.Expose.Checks}} />
|
<HealthcheckList @items={{sort-by (comparator 'check' 'Status:asc') item.Checks}} @exposed={{proxy.ServiceProxy.Expose.Checks}} />
|
||||||
</section>
|
</section>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p>
|
<EmptyState>
|
||||||
This instance has no service health checks.
|
<BlockSlot @name="body">
|
||||||
</p>
|
<p>
|
||||||
{{/if}}
|
This instance has no health checks.
|
||||||
{{#if (gt item.NodeChecks.length 0) }}
|
</p>
|
||||||
<section data-test-node-checks>
|
</BlockSlot>
|
||||||
<HealthcheckList @items={{sort-by (comparator 'check' 'Status:asc') item.NodeChecks}} />
|
</EmptyState>
|
||||||
</section>
|
|
||||||
{{else}}
|
|
||||||
<p>
|
|
||||||
This instance has no node health checks.
|
|
||||||
</p>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,11 +47,11 @@ Feature: dc / services / instances / show: Show Service Instance
|
|||||||
Status: critical
|
Status: critical
|
||||||
---
|
---
|
||||||
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
|
||||||
---
|
---
|
||||||
- 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
|
||||||
---
|
---
|
||||||
@ -65,8 +65,7 @@ Feature: dc / services / instances / show: Show Service Instance
|
|||||||
|
|
||||||
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
|
||||||
And I see 3 of the serviceChecks object
|
And I see 6 of the checks object
|
||||||
And I see 3 of the nodeChecks object
|
|
||||||
|
|
||||||
When I click tags&Meta on the tabs
|
When I click tags&Meta on the tabs
|
||||||
And I see tags&MetaIsSelected on the tabs
|
And I see tags&MetaIsSelected on the tabs
|
||||||
@ -78,10 +77,10 @@ Feature: dc / services / instances / show: Show Service Instance
|
|||||||
|
|
||||||
Scenario: A Service instance warns when deregistered whilst blocking
|
Scenario: A Service instance warns when deregistered whilst blocking
|
||||||
Given 1 proxy model from yaml
|
Given 1 proxy model from yaml
|
||||||
---
|
---
|
||||||
- ServiceProxy:
|
- ServiceProxy:
|
||||||
DestinationServiceName: service-1
|
DestinationServiceName: service-1
|
||||||
DestinationServiceID: ~
|
DestinationServiceID: ~
|
||||||
---
|
---
|
||||||
Given settings from yaml
|
Given settings from yaml
|
||||||
---
|
---
|
||||||
@ -102,10 +101,10 @@ Feature: dc / services / instances / show: Show Service Instance
|
|||||||
And pause until I see the text "deregistered" in "[data-notification]"
|
And pause until I see the text "deregistered" in "[data-notification]"
|
||||||
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
|
||||||
---
|
---
|
||||||
@ -115,4 +114,4 @@ Feature: dc / services / instances / show: Show Service Instance
|
|||||||
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 proxy on the tabs
|
And I don't see proxy on the tabs
|
||||||
|
@ -5,8 +5,7 @@ export default function(visitable, attribute, collection, text, tabs) {
|
|||||||
scope: '.title',
|
scope: '.title',
|
||||||
}),
|
}),
|
||||||
tabs: tabs('tab', ['health-checks', 'proxy-info', 'addresses', 'tags-&-meta']),
|
tabs: tabs('tab', ['health-checks', 'proxy-info', 'addresses', 'tags-&-meta']),
|
||||||
serviceChecks: collection('[data-test-service-checks] li'),
|
checks: collection('[data-test-checks] li'),
|
||||||
nodeChecks: collection('[data-test-node-checks] li'),
|
|
||||||
upstreams: collection('[data-test-proxy-upstreams] > li', {
|
upstreams: collection('[data-test-proxy-upstreams] > li', {
|
||||||
name: text('[data-test-destination-name]'),
|
name: text('[data-test-destination-name]'),
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user