open-nomad/ui/app/components/job-row.js

26 lines
467 B
JavaScript
Raw Normal View History

2017-09-19 14:47:10 +00:00
import Ember from 'ember';
import { lazyClick } from '../helpers/lazy-click';
2017-09-19 14:47:10 +00:00
const { Component } = Ember;
export default Component.extend({
tagName: 'tr',
classNames: ['job-row', 'is-interactive'],
job: null,
onClick() {},
click(event) {
lazyClick([this.get('onClick'), event]);
2017-09-19 14:47:10 +00:00
},
didReceiveAttrs() {
// Reload the job in order to get detail information
const job = this.get('job');
if (job) {
job.reload();
}
},
});