open-nomad/ui/app/adapters/job-summary.js
Michael Lange e4d2b52748 Treat job-summary like a typical relationship rather than a custom link
This way ED doesn't eagerly fetch the job summary even when it's already
in the store due to the jobs list endpoint
2018-03-20 16:41:18 -07:00

13 lines
333 B
JavaScript

import Watchable from './watchable';
export default Watchable.extend({
urlForFindRecord(id, type, hash) {
const [name, namespace] = JSON.parse(id);
let url = this._super(name, 'job', hash) + '/summary';
if (namespace && namespace !== 'default') {
url += `?namespace=${namespace}`;
}
return url;
},
});