2020-02-13 06:14:28 +00:00
|
|
|
import { computed } from '@ember/object';
|
2020-02-11 00:19:28 +00:00
|
|
|
import attr from 'ember-data/attr';
|
|
|
|
import Fragment from 'ember-data-model-fragments/fragment';
|
2020-02-13 06:14:28 +00:00
|
|
|
import { fragmentOwner } from 'ember-data-model-fragments/attributes';
|
2020-02-11 00:19:28 +00:00
|
|
|
|
|
|
|
export default Fragment.extend({
|
2020-02-13 06:14:28 +00:00
|
|
|
task: fragmentOwner(),
|
|
|
|
|
2020-02-11 00:19:28 +00:00
|
|
|
volume: attr('string'),
|
2020-02-15 00:44:28 +00:00
|
|
|
source: computed('volume', 'task.taskGroup.volumes.@each.{name,source}', function() {
|
2020-02-13 06:14:28 +00:00
|
|
|
return this.task.taskGroup.volumes.findBy('name', this.volume).source;
|
|
|
|
}),
|
2020-02-11 00:19:28 +00:00
|
|
|
|
|
|
|
destination: attr('string'),
|
|
|
|
propagationMode: attr('string'),
|
|
|
|
readOnly: attr('boolean'),
|
|
|
|
});
|