648
646
// Unit or workload status - display the agent status or any error.
649
647
// NOTE: thumper 2016-06-27, this is truely horrible, and we are lying to our users.
650
648
// however, this is explicitly what has been asked for as much as we dislike it.
652
650
newInfo.WorkloadStatus = s.toStatusInfo()
654
652
newInfo.AgentStatus = s.toStatusInfo()
655
653
// If the unit was in error and now it's not, we need to reset its
656
654
// status back to what was previously recorded.
658
656
newInfo.WorkloadStatus.Current = unitStatus.Status
659
657
newInfo.WorkloadStatus.Message = unitStatus.Message
660
658
newInfo.WorkloadStatus.Data = unitStatus.Data