github.com/hernad/nomad@v1.6.112/ui/app/routes/clients/index.js (about)

     1  /**
     2   * Copyright (c) HashiCorp, Inc.
     3   * SPDX-License-Identifier: MPL-2.0
     4   */
     5  
     6  import Route from '@ember/routing/route';
     7  import { collect } from '@ember/object/computed';
     8  import { watchAll } from 'nomad-ui/utils/properties/watch';
     9  import WithWatchers from 'nomad-ui/mixins/with-watchers';
    10  import { inject as service } from '@ember/service';
    11  
    12  export default class IndexRoute extends Route.extend(WithWatchers) {
    13    @service store;
    14  
    15    startWatchers(controller) {
    16      controller.set('watcher', this.watch.perform());
    17    }
    18  
    19    @watchAll('node') watch;
    20    @collect('watch') watchers;
    21  }