Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ui-v2/app/instance-initializers/event-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion ui-v2/app/templates/settings.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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'}} />
Expand Down
5 changes: 3 additions & 2 deletions ui-v2/tests/acceptance/dc/list-blocking.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down