2017-12-15 21:39:18 +00:00
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
import { get } from '@ember/object';
|
2017-11-29 01:21:56 +00:00
|
|
|
import ApplicationSerializer from './application';
|
2020-06-22 15:48:53 +00:00
|
|
|
import classic from 'ember-classic-decorator';
|
2017-11-29 01:21:56 +00:00
|
|
|
|
2020-06-22 15:48:53 +00:00
|
|
|
@classic
|
2020-06-10 13:49:16 +00:00
|
|
|
export default class Evaluation extends ApplicationSerializer {
|
|
|
|
@service system;
|
2017-11-29 01:21:56 +00:00
|
|
|
|
2020-08-20 17:14:49 +00:00
|
|
|
mapToArray = ['FailedTGAllocs'];
|
|
|
|
separateNanos = ['CreateTime', 'ModifyTime'];
|
2017-11-29 01:21:56 +00:00
|
|
|
|
2020-08-20 17:14:49 +00:00
|
|
|
normalize(typeHash, hash) {
|
2017-11-29 01:21:56 +00:00
|
|
|
hash.PlainJobId = hash.JobID;
|
2021-04-29 20:00:59 +00:00
|
|
|
hash.Namespace = hash.Namespace || get(hash, 'Job.Namespace') || 'default';
|
2017-11-29 01:21:56 +00:00
|
|
|
hash.JobID = JSON.stringify([hash.JobID, hash.Namespace]);
|
|
|
|
|
2020-06-10 13:49:16 +00:00
|
|
|
return super.normalize(typeHash, hash);
|
|
|
|
}
|
|
|
|
}
|