mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Add wasPreempted bool to allocs
This commit is contained in:
@@ -48,6 +48,7 @@ export default Model.extend({
|
||||
|
||||
preemptedAllocations: hasMany('allocation', { inverse: 'preemptedByAllocation' }),
|
||||
preemptedByAllocation: belongsTo('allocation', { inverse: 'preemptedAllocations' }),
|
||||
wasPreempted: attr('boolean'),
|
||||
|
||||
followUpEvaluation: belongsTo('evaluation'),
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ export default ApplicationSerializer.extend({
|
||||
|
||||
hash.PreemptedAllocationIDs = hash.PreemptedAllocations || [];
|
||||
hash.PreemptedByAllocationID = hash.PreemptedByAllocation || null;
|
||||
hash.WasPreempted = !!hash.PreemptedByAllocationID;
|
||||
|
||||
return this._super(typeHash, hash);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user