e8593ec1bb
This rethinks namespaces as a filter on list pages rather than a global setting. The biggest net-new feature here is being able to select All (*) to list all jobs or CSI volumes across namespaces.
21 lines
623 B
JavaScript
21 lines
623 B
JavaScript
import { inject as service } from '@ember/service';
|
|
import { get } from '@ember/object';
|
|
import ApplicationSerializer from './application';
|
|
import classic from 'ember-classic-decorator';
|
|
|
|
@classic
|
|
export default class Evaluation extends ApplicationSerializer {
|
|
@service system;
|
|
|
|
mapToArray = ['FailedTGAllocs'];
|
|
separateNanos = ['CreateTime', 'ModifyTime'];
|
|
|
|
normalize(typeHash, hash) {
|
|
hash.PlainJobId = hash.JobID;
|
|
hash.Namespace = hash.Namespace || get(hash, 'Job.Namespace') || 'default';
|
|
hash.JobID = JSON.stringify([hash.JobID, hash.Namespace]);
|
|
|
|
return super.normalize(typeHash, hash);
|
|
}
|
|
}
|