open-nomad/ui/app/components/lifecycle-chart-row.js
Jasmine Dahilig a9004faa11
UI: Add representations for task lifecycles (#7659)
This adds details about task lifecycles to allocations, task groups,
and tasks. It includes a live-updating timeline-like chart on allocations.
2020-04-30 08:15:19 -05:00

19 lines
456 B
JavaScript

import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
tagName: '',
activeClass: computed('taskState.state', function() {
if (this.taskState && this.taskState.state === 'running') {
return 'is-active';
}
}),
finishedClass: computed('taskState.finishedAt', function() {
if (this.taskState && this.taskState.finishedAt) {
return 'is-finished';
}
}),
});