summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-05-04 21:18:16 +0200
committerFilipa Lacerda <filipa@gitlab.com>2019-05-24 10:04:04 +0100
commit819746dc6544820f41d66b87c2c68efc9b17e0f4 (patch)
tree2f3647077b9e4d499a1ab3a89b8040b62984ea76
parent79fc5e139c1dbfe0f80907bc319fea135f060279 (diff)
downloadgitlab-ce-819746dc6544820f41d66b87c2c68efc9b17e0f4.tar.gz
Do not serialize pipeline on each build serialization request
-rw-r--r--app/assets/javascripts/jobs/store/actions.js2
-rw-r--r--app/serializers/build_details_entity.rb6
2 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/jobs/store/actions.js b/app/assets/javascripts/jobs/store/actions.js
index 8045f6dc3ff..abbdd7910de 100644
--- a/app/assets/javascripts/jobs/store/actions.js
+++ b/app/assets/javascripts/jobs/store/actions.js
@@ -186,7 +186,7 @@ export const fetchStages = ({ state, dispatch }) => {
dispatch('requestStages');
axios
- .get(`${state.job.pipeline.path}.json`)
+ .get(`${state.job.pipeline_path}.json`)
.then(({ data }) => {
// Set selected stage
dispatch('receiveStagesSuccess', data.details.stages);
diff --git a/app/serializers/build_details_entity.rb b/app/serializers/build_details_entity.rb
index 62c26809eeb..2843132ef62 100644
--- a/app/serializers/build_details_entity.rb
+++ b/app/serializers/build_details_entity.rb
@@ -8,7 +8,11 @@ class BuildDetailsEntity < JobEntity
expose :stuck?, as: :stuck
expose :user, using: UserEntity
expose :runner, using: RunnerEntity
- expose :pipeline, using: PipelineEntity
+
+ # expose :pipeline, using: PipelineEntity
+ expose :pipeline_path do |build|
+ project_pipeline_path(build.project, build.pipeline)
+ end
expose :deployment_status, if: -> (*) { build.starts_environment? } do
expose :deployment_status, as: :status