From 321b5fb6e6c5f16ea014a65dc847fde345467593 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Thu, 24 Oct 2019 17:55:13 -0700 Subject: [PATCH] Add isMigrating property to the allocation model --- ui/app/models/allocation.js | 1 + ui/app/serializers/allocation.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ui/app/models/allocation.js b/ui/app/models/allocation.js index 1b4f19757..6452a2bcb 100644 --- a/ui/app/models/allocation.js +++ b/ui/app/models/allocation.js @@ -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. diff --git a/ui/app/serializers/allocation.js b/ui/app/serializers/allocation.js index 64bb540d0..89e321a62 100644 --- a/ui/app/serializers/allocation.js +++ b/ui/app/serializers/allocation.js @@ -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;