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, deployments] Fix a bug where watchers on a parent (periodic) job would continue on a child route #17214

Merged
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/17214.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: fixes an issue where the allocations table on child (periodic, parameterized) job pages wouldn't update when accessed via their parent
```
7 changes: 5 additions & 2 deletions ui/app/mixins/with-watchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ export default Mixin.create(WithVisibilityDetection, {
actions: {
willTransition(transition) {
// Don't cancel watchers if transitioning into a sub-route
// Make sure, if it starts with the route name, that it's not the same route
if (
!transition.intent.name ||
!transition.intent.name.startsWith(this.routeName)
!(
transition.intent.name.startsWith(this.routeName) &&
this.routeName !== transition.intent.name
)
) {
this.cancelAllWatchers();
}

// Bubble the action up to the application route
return true;
},
Expand Down