mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
[ui, deployments] Fix a bug where watchers on a parent (periodic) job would continue on a child route (#17214)
* Treated same-route as sub-route and didnt cancel watchers * Changelog
This commit is contained in:
3
.changelog/17214.txt
Normal file
3
.changelog/17214.txt
Normal file
@@ -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
|
||||||
|
```
|
||||||
@@ -41,13 +41,16 @@ export default Mixin.create(WithVisibilityDetection, {
|
|||||||
actions: {
|
actions: {
|
||||||
willTransition(transition) {
|
willTransition(transition) {
|
||||||
// Don't cancel watchers if transitioning into a sub-route
|
// 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 (
|
if (
|
||||||
!transition.intent.name ||
|
!transition.intent.name ||
|
||||||
!transition.intent.name.startsWith(this.routeName)
|
!(
|
||||||
|
transition.intent.name.startsWith(this.routeName) &&
|
||||||
|
this.routeName !== transition.intent.name
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
this.cancelAllWatchers();
|
this.cancelAllWatchers();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bubble the action up to the application route
|
// Bubble the action up to the application route
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user