diff options
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r-- | app/controllers/projects/pipelines_controller.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb index adc3a912a91..b2aa1d9f4ca 100644 --- a/app/controllers/projects/pipelines_controller.rb +++ b/app/controllers/projects/pipelines_controller.rb @@ -38,6 +38,8 @@ class Projects::PipelinesController < Projects::ApplicationController track_redis_hll_event :charts, name: 'p_analytics_ci_cd_pipelines', if: -> { should_track_ci_cd_pipelines? } track_redis_hll_event :charts, name: 'p_analytics_ci_cd_deployment_frequency', if: -> { should_track_ci_cd_deployment_frequency? } track_redis_hll_event :charts, name: 'p_analytics_ci_cd_lead_time', if: -> { should_track_ci_cd_lead_time? } + track_redis_hll_event :charts, name: 'p_analytics_ci_cd_time_to_restore_service', if: -> { should_track_ci_cd_time_to_restore_service? } + track_redis_hll_event :charts, name: 'p_analytics_ci_cd_change_failure_rate', if: -> { should_track_ci_cd_change_failure_rate? } wrap_parameters Ci::Pipeline @@ -174,7 +176,7 @@ class Projects::PipelinesController < Projects::ApplicationController end def stage - @stage = pipeline.legacy_stage(params[:stage]) + @stage = pipeline.stage(params[:stage]) return not_found unless @stage render json: StageSerializer @@ -361,6 +363,14 @@ class Projects::PipelinesController < Projects::ApplicationController def should_track_ci_cd_lead_time? params[:chart] == 'lead-time' end + + def should_track_ci_cd_time_to_restore_service? + params[:chart] == 'time-to-restore-service' + end + + def should_track_ci_cd_change_failure_rate? + params[:chart] == 'change-failure-rate' + end end Projects::PipelinesController.prepend_mod_with('Projects::PipelinesController') |