open-nomad/ui/app/components/lifecycle-chart-row.js
2020-06-10 16:18:56 -05:00

27 lines
623 B
JavaScript

import Component from '@ember/component';
import { computed } from '@ember/object';
import { tagName } from '@ember-decorators/component';
import classic from 'ember-classic-decorator';
@classic
@tagName('')
export default class LifecycleChartRow extends Component {
@computed('taskState.state')
get activeClass() {
if (this.taskState && this.taskState.state === 'running') {
return 'is-active';
}
return undefined;
}
@computed('taskState.finishedAt')
get finishedClass() {
if (this.taskState && this.taskState.finishedAt) {
return 'is-finished';
}
return undefined;
}
}