open-nomad/ui/app/routes/csi/plugins/plugin/index.js

18 lines
495 B
JavaScript
Raw Normal View History

2020-05-19 05:37:54 +00:00
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 class IndexRoute extends Route.extend(WithWatchers) {
2020-05-19 05:37:54 +00:00
startWatchers(controller, model) {
if (!model) return;
controller.set('watchers', {
model: this.watch.perform(model),
});
}
2020-05-19 05:37:54 +00:00
@watchRecord('plugin') watch;
@collect('watch') watchers;
}