open-nomad/ui/app/adapters/node.js
Alex Dadgar e5ec915ac3 sync
2017-09-19 10:08:23 -05:00

13 lines
368 B
JavaScript

import ApplicationAdapter from './application';
export default ApplicationAdapter.extend({
findAllocations(node) {
const url = `${this.buildURL('node', node.get('id'), node, 'findRecord')}/allocations`;
return this.ajax(url, 'GET').then(allocs => {
return this.store.pushPayload('allocation', {
allocations: allocs,
});
});
},
});