diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-03-12 11:08:27 +0000 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-03-13 13:28:08 +0000 |
commit | 812b64ed86fd1c80658877488a6ea7c4372f2a07 (patch) | |
tree | a2a807692a91dd7eaad883bda919ca74abc68805 | |
parent | 49ad9b7e1034715fe48892a343b9dab44c611b44 (diff) | |
download | gitlab-ce-812b64ed86fd1c80658877488a6ea7c4372f2a07.tar.gz |
Merge branch 'ce-9826-fix-broken-downstreams' into 'master'
CE port for expanded pipelines
See merge request gitlab-org/gitlab-ce!25859
(cherry picked from commit 71dbd613982c6f247b3897e2d012a261904178a4)
2dbf3da2 CE port for expanded pipelines
-rw-r--r-- | app/assets/javascripts/pipelines/pipeline_details_mediator.js | 16 | ||||
-rw-r--r-- | app/assets/javascripts/pipelines/services/pipeline_service.js | 4 |
2 files changed, 17 insertions, 3 deletions
diff --git a/app/assets/javascripts/pipelines/pipeline_details_mediator.js b/app/assets/javascripts/pipelines/pipeline_details_mediator.js index bd1e1895660..d67d88c4dba 100644 --- a/app/assets/javascripts/pipelines/pipeline_details_mediator.js +++ b/app/assets/javascripts/pipelines/pipeline_details_mediator.js @@ -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, + }; } } diff --git a/app/assets/javascripts/pipelines/services/pipeline_service.js b/app/assets/javascripts/pipelines/services/pipeline_service.js index a53a9cc8365..e44eb9cdfd1 100644 --- a/app/assets/javascripts/pipelines/services/pipeline_service.js +++ b/app/assets/javascripts/pipelines/services/pipeline_service.js @@ -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 |