Fix scale and summary adapters to correct live reloading
This commit is contained in:
parent
602b6771ba
commit
b0f2a9f51d
|
@ -1,3 +1,7 @@
|
|||
import WatchableNamespaceIDs from './watchable-namespace-ids';
|
||||
|
||||
export default class JobScaleAdapter extends WatchableNamespaceIDs {}
|
||||
export default class JobScaleAdapter extends WatchableNamespaceIDs {
|
||||
urlForFindRecord(id, type, hash) {
|
||||
return super.urlForFindRecord(id, 'job', hash, 'scale');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
import WatchableNamespaceIDs from './watchable-namespace-ids';
|
||||
|
||||
export default class JobSummaryAdapter extends WatchableNamespaceIDs {}
|
||||
export default class JobSummaryAdapter extends WatchableNamespaceIDs {
|
||||
urlForFindRecord(id, type, hash) {
|
||||
return super.urlForFindRecord(id, 'job', hash, 'summary');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,9 +35,10 @@ export default class WatchableNamespaceIDs extends Watchable {
|
|||
return associateNamespace(url, namespace);
|
||||
}
|
||||
|
||||
urlForFindRecord(id, type, hash) {
|
||||
urlForFindRecord(id, type, hash, pathSuffix) {
|
||||
const [name, namespace] = JSON.parse(id);
|
||||
let url = super.urlForFindRecord(name, type, hash);
|
||||
if (pathSuffix) url += `/${pathSuffix}`;
|
||||
return associateNamespace(url, namespace);
|
||||
}
|
||||
|
||||
|
|
|
@ -55,8 +55,8 @@ export default class TaskGroupRoute extends Route.extend(WithWatchers) {
|
|||
const job = model.get('job');
|
||||
controller.set('watchers', {
|
||||
job: this.watchJob.perform(job),
|
||||
summary: this.watchSummary.perform(job),
|
||||
scale: this.watchScale.perform(job),
|
||||
summary: this.watchSummary.perform(job.get('summary')),
|
||||
scale: this.watchScale.perform(job.get('scaleState')),
|
||||
allocations: this.watchAllocations.perform(job),
|
||||
latestDeployment: job.get('supportsDeployments') && this.watchLatestDeployment.perform(job),
|
||||
});
|
||||
|
@ -64,8 +64,8 @@ export default class TaskGroupRoute extends Route.extend(WithWatchers) {
|
|||
}
|
||||
|
||||
@watchRecord('job') watchJob;
|
||||
@watchRelationship('job-summary') watchSummary;
|
||||
@watchRelationship('job-scale') watchScale;
|
||||
@watchRecord('job-summary') watchSummary;
|
||||
@watchRecord('job-scale') watchScale;
|
||||
@watchRelationship('allocations') watchAllocations;
|
||||
@watchRelationship('latestDeployment') watchLatestDeployment;
|
||||
|
||||
|
|
Loading…
Reference in New Issue