github.com/hernad/nomad@v1.6.112/ui/app/serializers/drain-strategy.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import ApplicationSerializer from './application'; 7 import classic from 'ember-classic-decorator'; 8 9 @classic 10 export default class DrainStrategy extends ApplicationSerializer { 11 normalize(typeHash, hash) { 12 // TODO API: finishedAt is always marshaled as a date even when unset. 13 // To simplify things, unset it here when it's the empty date value. 14 if (hash.ForceDeadline === '0001-01-01T00:00:00Z') { 15 hash.ForceDeadline = null; 16 } 17 18 return super.normalize(typeHash, hash); 19 } 20 }