mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Prevent sticky query params for plugin alloc filtering
This commit is contained in:
27
ui/app/routes/csi/plugins/plugin/allocations.js
Normal file
27
ui/app/routes/csi/plugins/plugin/allocations.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import { collect } from '@ember/object/computed';
|
||||
import { watchRecord } from 'nomad-ui/utils/properties/watch';
|
||||
import WithWatchers from 'nomad-ui/mixins/with-watchers';
|
||||
|
||||
export default Route.extend(WithWatchers, {
|
||||
startWatchers(controller, model) {
|
||||
if (!model) return;
|
||||
|
||||
controller.set('watchers', {
|
||||
model: this.watch.perform(model),
|
||||
});
|
||||
},
|
||||
|
||||
resetController(controller, isExiting) {
|
||||
if (isExiting) {
|
||||
controller.setProperties({
|
||||
currentPage: 1,
|
||||
qpType: '',
|
||||
qpHealth: '',
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
watch: watchRecord('plugin'),
|
||||
watchers: collect('watch'),
|
||||
});
|
||||
Reference in New Issue
Block a user