Add isMigrating property to the allocation model

This commit is contained in:
Michael Lange 2019-10-24 17:55:13 -07:00
parent aad8536949
commit 321b5fb6e6
2 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,7 @@ export default Model.extend({
}),
isRunning: equal('clientStatus', 'running'),
isMigrating: attr('boolean'),
// When allocations are server-side rescheduled, a paper trail
// is left linking all reschedule attempts.

View File

@ -40,6 +40,8 @@ export default ApplicationSerializer.extend({
hash.RescheduleEvents = (hash.RescheduleTracker || {}).Events;
hash.IsMigrating = (hash.DesiredTransition || {}).Migrate;
// API returns empty strings instead of null
hash.PreviousAllocationID = hash.PreviousAllocation ? hash.PreviousAllocation : null;
hash.NextAllocationID = hash.NextAllocation ? hash.NextAllocation : null;