2020-04-30 13:15:19 +00:00
|
|
|
import Component from '@ember/component';
|
|
|
|
import { computed } from '@ember/object';
|
2020-06-10 13:49:16 +00:00
|
|
|
import { tagName } from '@ember-decorators/component';
|
|
|
|
import classic from 'ember-classic-decorator';
|
2020-04-30 13:15:19 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
@classic
|
|
|
|
@tagName('')
|
|
|
|
export default class LifecycleChartRow extends Component {
|
|
|
|
@computed('taskState.state')
|
|
|
|
get activeClass() {
|
2020-04-30 13:15:19 +00:00
|
|
|
if (this.taskState && this.taskState.state === 'running') {
|
|
|
|
return 'is-active';
|
|
|
|
}
|
2020-06-09 21:03:28 +00:00
|
|
|
|
2020-06-10 14:07:16 +00:00
|
|
|
return undefined;
|
2020-06-10 13:49:16 +00:00
|
|
|
}
|
2020-04-30 13:15:19 +00:00
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
@computed('taskState.finishedAt')
|
|
|
|
get finishedClass() {
|
2020-04-30 13:15:19 +00:00
|
|
|
if (this.taskState && this.taskState.finishedAt) {
|
|
|
|
return 'is-finished';
|
|
|
|
}
|
2020-06-09 21:03:28 +00:00
|
|
|
|
2020-06-10 14:07:16 +00:00
|
|
|
return undefined;
|
2020-06-10 13:49:16 +00:00
|
|
|
}
|
|
|
|
}
|