Merge branch 'ce-9826-fix-broken-downstreams' into 'master'
CE port for expanded pipelines See merge request gitlab-org/gitlab-ce!25859
This commit is contained in:
commit
71dbd61398
|
@ -19,6 +19,7 @@ export default class pipelinesMediator {
|
|||
this.poll = new Poll({
|
||||
resource: this.service,
|
||||
method: 'getPipeline',
|
||||
data: this.store.state.expandedPipelines ? this.getExpandedParameters() : undefined,
|
||||
successCallback: this.successCallback.bind(this),
|
||||
errorCallback: this.errorCallback.bind(this),
|
||||
});
|
||||
|
@ -56,6 +57,19 @@ export default class pipelinesMediator {
|
|||
.getPipeline()
|
||||
.then(response => this.successCallback(response))
|
||||
.catch(() => this.errorCallback())
|
||||
.finally(() => this.poll.restart());
|
||||
.finally(() =>
|
||||
this.poll.restart(
|
||||
this.store.state.expandedPipelines ? this.getExpandedParameters() : undefined,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Backend expects paramets in the following format: `expanded[]=id&expanded[]=id`
|
||||
*/
|
||||
getExpandedParameters() {
|
||||
return {
|
||||
expanded: this.store.state.expandedPipelines,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ export default class PipelineService {
|
|||
this.pipeline = endpoint;
|
||||
}
|
||||
|
||||
getPipeline() {
|
||||
return axios.get(this.pipeline);
|
||||
getPipeline(params) {
|
||||
return axios.get(this.pipeline, { params });
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
|
|
Loading…
Reference in New Issue