github.com/hernad/nomad@v1.6.112/ui/app/routes/clients/client.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import { inject as service } from '@ember/service'; 7 import Route from '@ember/routing/route'; 8 import notifyError from 'nomad-ui/utils/notify-error'; 9 10 export default class ClientRoute extends Route { 11 @service store; 12 13 model() { 14 return super.model(...arguments).catch(notifyError(this)); 15 } 16 17 afterModel(model) { 18 if (model && model.get('isPartial')) { 19 return model.reload().then((node) => node.get('allocations')); 20 } 21 return model && model.get('allocations'); 22 } 23 }