Commit c11ebd30 authored by Sean McGivern's avatar Sean McGivern

Add feature categories to ProjectsController::[E-H]*

Danger wants a commit body, but there's really not any more to say.
These are all best effort and not guaranteed to be 100% accurate.
parent c987c5e1
...@@ -5,6 +5,8 @@ class Projects::Environments::PrometheusApiController < Projects::ApplicationCon ...@@ -5,6 +5,8 @@ class Projects::Environments::PrometheusApiController < Projects::ApplicationCon
before_action :proxyable before_action :proxyable
feature_category :metrics
private private
def proxyable def proxyable
......
# frozen_string_literal: true # frozen_string_literal: true
class Projects::Environments::SampleMetricsController < Projects::ApplicationController class Projects::Environments::SampleMetricsController < Projects::ApplicationController
feature_category :metrics
def query def query
result = Metrics::SampleMetricsService.new(params[:identifier], range_start: params[:start], range_end: params[:end]).query result = Metrics::SampleMetricsService.new(params[:identifier], range_start: params[:start], range_end: params[:end]).query
......
...@@ -25,6 +25,8 @@ class Projects::EnvironmentsController < Projects::ApplicationController ...@@ -25,6 +25,8 @@ class Projects::EnvironmentsController < Projects::ApplicationController
before_action :expire_etag_cache, only: [:index], unless: -> { request.format.json? } before_action :expire_etag_cache, only: [:index], unless: -> { request.format.json? }
after_action :expire_etag_cache, only: [:cancel_auto_stop] after_action :expire_etag_cache, only: [:cancel_auto_stop]
feature_category :continuous_delivery
def index def index
@environments = project.environments @environments = project.environments
.with_state(params[:scope] || :available) .with_state(params[:scope] || :available)
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
class Projects::ErrorTracking::BaseController < Projects::ApplicationController class Projects::ErrorTracking::BaseController < Projects::ApplicationController
POLLING_INTERVAL = 1_000 POLLING_INTERVAL = 1_000
feature_category :error_tracking
def set_polling_interval def set_polling_interval
Gitlab::PollingInterval.set_header(response, interval: POLLING_INTERVAL) Gitlab::PollingInterval.set_header(response, interval: POLLING_INTERVAL)
end end
......
...@@ -7,6 +7,8 @@ module Projects ...@@ -7,6 +7,8 @@ module Projects
before_action :authorize_read_sentry_issue! before_action :authorize_read_sentry_issue!
feature_category :error_tracking
def index def index
service = ::ErrorTracking::ListProjectsService.new( service = ::ErrorTracking::ListProjectsService.new(
project, project,
......
...@@ -4,6 +4,8 @@ class Projects::FeatureFlagsClientsController < Projects::ApplicationController ...@@ -4,6 +4,8 @@ class Projects::FeatureFlagsClientsController < Projects::ApplicationController
before_action :authorize_admin_feature_flags_client! before_action :authorize_admin_feature_flags_client!
before_action :feature_flags_client before_action :feature_flags_client
feature_category :feature_flags
def reset_token def reset_token
feature_flags_client.reset_token! feature_flags_client.reset_token!
......
...@@ -19,6 +19,8 @@ class Projects::FeatureFlagsController < Projects::ApplicationController ...@@ -19,6 +19,8 @@ class Projects::FeatureFlagsController < Projects::ApplicationController
push_frontend_feature_flag(:feature_flags_legacy_read_only_override, project) push_frontend_feature_flag(:feature_flags_legacy_read_only_override, project)
end end
feature_category :feature_flags
def index def index
@feature_flags = FeatureFlagsFinder @feature_flags = FeatureFlagsFinder
.new(project, current_user, scope: params[:scope]) .new(project, current_user, scope: params[:scope])
......
...@@ -4,6 +4,8 @@ class Projects::FeatureFlagsUserListsController < Projects::ApplicationControlle ...@@ -4,6 +4,8 @@ class Projects::FeatureFlagsUserListsController < Projects::ApplicationControlle
before_action :authorize_admin_feature_flags_user_lists! before_action :authorize_admin_feature_flags_user_lists!
before_action :user_list, only: [:edit, :show] before_action :user_list, only: [:edit, :show]
feature_category :feature_flags
def new def new
end end
......
...@@ -10,6 +10,8 @@ class Projects::FindFileController < Projects::ApplicationController ...@@ -10,6 +10,8 @@ class Projects::FindFileController < Projects::ApplicationController
before_action :assign_ref_vars before_action :assign_ref_vars
before_action :authorize_download_code! before_action :authorize_download_code!
feature_category :source_code_management
def show def show
return render_404 unless @repository.commit(@ref) return render_404 unless @repository.commit(@ref)
......
...@@ -14,6 +14,8 @@ class Projects::ForksController < Projects::ApplicationController ...@@ -14,6 +14,8 @@ class Projects::ForksController < Projects::ApplicationController
before_action :authorize_fork_project!, only: [:new, :create] before_action :authorize_fork_project!, only: [:new, :create]
before_action :authorize_fork_namespace!, only: [:create] before_action :authorize_fork_namespace!, only: [:create]
feature_category :source_code_management
def index def index
@total_forks_count = project.forks.size @total_forks_count = project.forks.size
@public_forks_count = project.forks.public_only.size @public_forks_count = project.forks.public_only.size
......
...@@ -4,6 +4,8 @@ class Projects::GrafanaApiController < Projects::ApplicationController ...@@ -4,6 +4,8 @@ class Projects::GrafanaApiController < Projects::ApplicationController
include RenderServiceResults include RenderServiceResults
include MetricsDashboard include MetricsDashboard
feature_category :metrics
def proxy def proxy
result = ::Grafana::ProxyService.new( result = ::Grafana::ProxyService.new(
project, project,
......
...@@ -11,6 +11,8 @@ class Projects::GraphsController < Projects::ApplicationController ...@@ -11,6 +11,8 @@ class Projects::GraphsController < Projects::ApplicationController
track_unique_visits :charts, target_id: 'p_analytics_repo' track_unique_visits :charts, target_id: 'p_analytics_repo'
feature_category :source_code_management
def show def show
respond_to do |format| respond_to do |format|
format.html format.html
......
...@@ -5,6 +5,8 @@ class Projects::GroupLinksController < Projects::ApplicationController ...@@ -5,6 +5,8 @@ class Projects::GroupLinksController < Projects::ApplicationController
before_action :authorize_admin_project! before_action :authorize_admin_project!
before_action :authorize_admin_project_member!, only: [:update] before_action :authorize_admin_project_member!, only: [:update]
feature_category :subgroups
def create def create
group = Group.find(params[:link_group_id]) if params[:link_group_id].present? group = Group.find(params[:link_group_id]) if params[:link_group_id].present?
......
...@@ -12,6 +12,8 @@ class Projects::HookLogsController < Projects::ApplicationController ...@@ -12,6 +12,8 @@ class Projects::HookLogsController < Projects::ApplicationController
layout 'project_settings' layout 'project_settings'
feature_category :integrations
def show def show
end end
......
...@@ -12,6 +12,8 @@ class Projects::HooksController < Projects::ApplicationController ...@@ -12,6 +12,8 @@ class Projects::HooksController < Projects::ApplicationController
layout "project_settings" layout "project_settings"
feature_category :integrations
def index def index
@hooks = @project.hooks @hooks = @project.hooks
@hook = ProjectHook.new @hook = ProjectHook.new
......
...@@ -6,6 +6,8 @@ module Projects ...@@ -6,6 +6,8 @@ module Projects
before_action :authorize_admin_feature_flags_issue_links! before_action :authorize_admin_feature_flags_issue_links!
feature_category :feature_flags
private private
def create_service def create_service
......
...@@ -28,7 +28,8 @@ RSpec.describe "Every controller" do ...@@ -28,7 +28,8 @@ RSpec.describe "Every controller" do
next if controller.feature_category_for_action(action) next if controller.feature_category_for_action(action)
next if controller.to_s.start_with?('P') && next if controller.to_s.start_with?('P') &&
!child_controller.to_s.start_with?('A', 'B', 'C', 'D') !child_controller.to_s.start_with?('A', 'B', 'C', 'D',
'E', 'F', 'G', 'H')
"#{controller}##{action}" "#{controller}##{action}"
end.compact end.compact
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment