github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/ui/app/components/job-row.js (about) 1 import Ember from 'ember'; 2 import { lazyClick } from '../helpers/lazy-click'; 3 4 const { Component } = Ember; 5 6 export default Component.extend({ 7 tagName: 'tr', 8 classNames: ['job-row', 'is-interactive'], 9 10 job: null, 11 12 onClick() {}, 13 14 click(event) { 15 lazyClick([this.get('onClick'), event]); 16 }, 17 18 didReceiveAttrs() { 19 // Reload the job in order to get detail information 20 const job = this.get('job'); 21 if (job && !job.get('isLoading')) { 22 job.reload(); 23 } 24 }, 25 });