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: Ensure we clean up javascript based DataSources #10915

Merged
merged 2 commits into from
Sep 27, 2021
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
3 changes: 3 additions & 0 deletions .changelog/10915.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: Ensure routing-config page blocking queries are cleaned up correctly
```
7 changes: 6 additions & 1 deletion ui/packages/consul-ui/app/routes/dc/routing-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ export default class RoutingConfigRoute extends Route {
dc: dc,
nspace: nspace,
slug: name,
chain: await this.data.source(uri => uri`/${nspace}/${dc}/discovery-chain/${params.name}`),
chain: await this.data.source(uri => uri`/${nspace}/${dc}/discovery-chain/${name}`),
};
}

setupController(controller, model) {
super.setupController(...arguments);
controller.setProperties(model);
}
}
4 changes: 2 additions & 2 deletions ui/packages/consul-ui/app/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ html[data-route$='edit'] .app-view > header + div > *:first-child {
}
/* most tabs have margin after the tab bar, unless the tab has a filter bar */
/* if it is a filter bar and the thing after the filter bar is a p then it also */
/* needs a top margun :S */
/* needs a top margin :S */
%app-view-content .tab-section > *:first-child:not(.filter-bar):not(table),
%app-view-content .tab-section > .search-bar + p,
%app-view-content .tab-section .consul-health-check-list,
%app-view-content .container {
html[data-route$='dc.routing-config'] .discovery-chain {
margin-top: 1.25em;
}
.consul-upstream-instance-list,
Expand Down
43 changes: 24 additions & 19 deletions ui/packages/consul-ui/app/templates/dc/routing-config.hbs
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
{{page-title @model.slug}}
<Route
@name={{routeName}}
@title={{slug}}
as |route|>

<AppView>
<BlockSlot @name="breadcrumbs">
<ol>
<li><a data-test-back href={{href-to 'dc.services'}}>All Services</a></li>
</ol>
</BlockSlot>
<BlockSlot @name="header">
<h1>
{{@model.slug}}
</h1>
<Consul::Source @source={{t "routes.dc.routing-config.source"}} @withInfo={{true}} />
</BlockSlot>
<BlockSlot @name="content">
<div class="container">
<EventSource @src={{chain}} />

<AppView>
<BlockSlot @name="breadcrumbs">
<ol>
<li><a data-test-back href={{href-to 'dc.services'}}>All Services</a></li>
</ol>
</BlockSlot>
<BlockSlot @name="header">
<h1>
{{slug}}
</h1>
<Consul::Source @source={{t "routes.dc.routing-config.source"}} @withInfo={{true}} />
</BlockSlot>
<BlockSlot @name="content">
<Consul::DiscoveryChain
@chain={{@model.chain.Chain}}
@chain={{chain.Chain}}
/>
</div>
</BlockSlot>
</AppView>
</BlockSlot>
</AppView>

</Route>