ui: Add live updates/blocking queries to the Intention listing page (#7161)

* ui: Enable blocking queries/live updates for intentions

* ui: Add acceptance tests for intention blocking queries

* ui: Add copy to explain that intentions are also now 'real time'
pull/7174/head
John Cowen 5 years ago committed by GitHub
parent e568cded17
commit ac60338269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,7 +4,7 @@ export function initialize(container) {
if (env('CONSUL_UI_DISABLE_REALTIME')) {
return;
}
['node', 'coordinate', 'session', 'service', 'proxy', 'discovery-chain']
['node', 'coordinate', 'session', 'service', 'proxy', 'discovery-chain', 'intention']
.concat(env('CONSUL_NSPACES_ENABLED') ? ['nspace/enabled'] : [])
.map(function(item) {
// create repositories that return a promise resolving to an EventSource
@ -70,6 +70,12 @@ export function initialize(container) {
proxyRepo: 'repository/proxy/event-source',
},
},
{
route: 'dc/intentions/index',
services: {
repo: 'repository/intention/event-source',
},
},
{
service: 'form',
services: {

@ -28,7 +28,7 @@
{{#if (not (env 'CONSUL_UI_DISABLE_REALTIME'))}}
<fieldset>
<h2>Blocking Queries</h2>
<p>Keep catalog info up-to-date without refreshing the page. Any changes made to services and nodes would be reflected in real time.</p>
<p>Keep catalog info up-to-date without refreshing the page. Any changes made to services, nodes and intentions would be reflected in real time.</p>
<div class="type-toggle">
<label>
<input type="checkbox" name="client[blocking]" checked={{if item.client.blocking 'checked'}} onchange={{action 'change'}} />

@ -5,7 +5,7 @@ Feature: dc / list-blocking
I want to see changes if I change consul externally
Background:
Given 1 datacenter model with the value "dc-1"
Scenario: Viewing the listing pages
Scenario: Viewing the listing pages for [Page]
Given 3 [Model] models
And a network latency of 100
When I visit the [Page] page for yaml
@ -25,8 +25,9 @@ Feature: dc / list-blocking
| Page | Model | Url |
| services | service | services |
| nodes | node | nodes |
| intentions | intention | intentions |
------------------------------------------------
Scenario: Viewing detail pages with a listing
Scenario: Viewing detail pages with a listing for [Page]
Given 3 [Model] models
And a network latency of 100
When I visit the [Page] page for yaml

Loading…
Cancel
Save