diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 21:18:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 21:18:33 +0300 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /app/controllers/projects/ci | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'app/controllers/projects/ci')
-rw-r--r-- | app/controllers/projects/ci/daily_build_group_report_results_controller.rb | 49 | ||||
-rw-r--r-- | app/controllers/projects/ci/pipeline_editor_controller.rb | 3 |
2 files changed, 9 insertions, 43 deletions
diff --git a/app/controllers/projects/ci/daily_build_group_report_results_controller.rb b/app/controllers/projects/ci/daily_build_group_report_results_controller.rb index aabcb74cefa..fee216da492 100644 --- a/app/controllers/projects/ci/daily_build_group_report_results_controller.rb +++ b/app/controllers/projects/ci/daily_build_group_report_results_controller.rb @@ -1,11 +1,6 @@ # frozen_string_literal: true class Projects::Ci::DailyBuildGroupReportResultsController < Projects::ApplicationController - include Gitlab::Utils::StrongMemoize - - MAX_ITEMS = 1000 - REPORT_WINDOW = 90.days - before_action :authorize_read_build_report_results! before_action :validate_param_type! @@ -40,53 +35,23 @@ class Projects::Ci::DailyBuildGroupReportResultsController < Projects::Applicati end def report_results - if ::Gitlab::Ci::Features.use_coverage_data_new_finder?(project) - ::Ci::Testing::DailyBuildGroupReportResultsFinder.new( - params: new_finder_params, - current_user: current_user - ).execute - else - Ci::DailyBuildGroupReportResultsFinder.new(**finder_params).execute - end + ::Ci::DailyBuildGroupReportResultsFinder.new( + params: finder_params, + current_user: current_user + ).execute end - def new_finder_params + def finder_params { project: project, coverage: true, - start_date: start_date, - end_date: end_date, + start_date: params[:start_date], + end_date: params[:end_date], ref_path: params[:ref_path], sort: true } end - def finder_params - { - current_user: current_user, - project: project, - ref_path: params.require(:ref_path), - start_date: start_date, - end_date: end_date, - limit: MAX_ITEMS - } - end - - def start_date - strong_memoize(:start_date) do - start_date = Date.parse(params.require(:start_date)) - - # The start_date cannot be older than `end_date - 90 days` - [start_date, end_date - REPORT_WINDOW].max - end - end - - def end_date - strong_memoize(:end_date) do - Date.parse(params.require(:end_date)) - end - end - def allowed_param_types Ci::DailyBuildGroupReportResult::PARAM_TYPES end diff --git a/app/controllers/projects/ci/pipeline_editor_controller.rb b/app/controllers/projects/ci/pipeline_editor_controller.rb index 3552915b561..4d491b33aa0 100644 --- a/app/controllers/projects/ci/pipeline_editor_controller.rb +++ b/app/controllers/projects/ci/pipeline_editor_controller.rb @@ -5,12 +5,13 @@ class Projects::Ci::PipelineEditorController < Projects::ApplicationController before_action do push_frontend_feature_flag(:ci_config_visualization_tab, @project, default_enabled: :yaml) push_frontend_feature_flag(:ci_config_merged_tab, @project, default_enabled: :yaml) + push_frontend_feature_flag(:pipeline_status_for_pipeline_editor, @project, default_enabled: :yaml) + push_frontend_feature_flag(:pipeline_editor_empty_state_action, @project, default_enabled: :yaml) end feature_category :pipeline_authoring def show - render_404 unless ::Gitlab::Ci::Features.ci_pipeline_editor_page_enabled?(@project) end private |