Handle the difference between parameterized on single and list responses

This commit is contained in:
Michael Lange 2018-01-25 09:30:46 -08:00
parent a4deea08af
commit 1845ccd456

View file

@ -28,6 +28,12 @@ export default ApplicationSerializer.extend({
hash.Periodic = true;
}
// Parameterized behaves like Periodic
if (hash.ParameterizedJob instanceof Object) {
hash.ParameterizedDetails = hash.ParameterizedJob;
hash.ParameterizedJob = true;
}
// Transform the map-based JobSummary object into an array-based
// JobSummary fragment list
hash.TaskGroupSummaries = Object.keys(get(hash, 'JobSummary.Summary') || {}).map(key => {