github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/routes/csi/plugins/plugin/index.js (about)

     1  import Route from '@ember/routing/route';
     2  import { collect } from '@ember/object/computed';
     3  import { watchRecord } from 'nomad-ui/utils/properties/watch';
     4  import WithWatchers from 'nomad-ui/mixins/with-watchers';
     5  
     6  export default class IndexRoute extends Route.extend(WithWatchers) {
     7    startWatchers(controller, model) {
     8      if (!model) return;
     9  
    10      controller.set('watchers', {
    11        model: this.watch.perform(model),
    12      });
    13    }
    14  
    15    @watchRecord('plugin') watch;
    16    @collect('watch') watchers;
    17  }