open-nomad/ui/app/serializers/reschedule-event.js
2023-04-10 15:36:59 +00:00

21 lines
510 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import ApplicationSerializer from './application';
import classic from 'ember-classic-decorator';
@classic
export default class RescheduleEvent extends ApplicationSerializer {
separateNanos = ['Time'];
normalize(typeHash, hash) {
hash.PreviousAllocationId = hash.PrevAllocID ? hash.PrevAllocID : null;
hash.PreviousNodeId = hash.PrevNodeID ? hash.PrevNodeID : null;
return super.normalize(typeHash, hash);
}
}