forked from Gitlink/forgeplus
查询steps接口修改
This commit is contained in:
parent
7e9acd1850
commit
0d6ddad013
|
@ -139,6 +139,7 @@ class Ci::PipelinesController < Ci::BaseController
|
|||
|
||||
# ========步骤相关接口========= #
|
||||
def steps
|
||||
@stage_type = Ci::PipelineStage.find(params[:stage_id]).stage_type
|
||||
@pipeline_stage_steps = Ci::PipelineStageStep.where('stage_id=?', params[:stage_id]).order('show_index asc')
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ json.stage_id pipeline_stage_step.stage_id
|
|||
json.show_index pipeline_stage_step.show_index
|
||||
json.content pipeline_stage_step.content
|
||||
json.template_id pipeline_stage_step.template_id
|
||||
json.category Ci::Template.find(pipeline_stage_step.template_id).category
|
||||
json.category stage_type == 'customize' ? Ci::Template.find(pipeline_stage_step.template_id).parent_category : Ci::Template.find(pipeline_stage_step.template_id).category
|
||||
json.created_at pipeline_stage_step.created_at
|
||||
json.updated_at pipeline_stage_step.updated_at
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
json.steps @pipeline_stage_steps do |pipeline_stage_step|
|
||||
json.partial! "/ci/pipeline_stage_steps/list", pipeline_stage_step: pipeline_stage_step
|
||||
json.partial! "/ci/pipeline_stage_steps/list", pipeline_stage_step: pipeline_stage_step, stage_type: @stage_type
|
||||
end
|
Loading…
Reference in New Issue