open-nomad/ui/app/models/volume-mount.js

18 lines
564 B
JavaScript
Raw Normal View History

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';
import { fragmentOwner } from 'ember-data-model-fragments/attributes';
2020-02-11 00:19:28 +00:00
export default Fragment.extend({
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() {
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'),
});