debian-mirror-gitlab/app/controllers/groups/observability_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
755 B
Ruby
Raw Normal View History

2022-10-11 01:57:18 +05:30
# frozen_string_literal: true
module Groups
class ObservabilityController < Groups::ApplicationController
2023-03-04 22:38:38 +05:30
include ::Observability::ContentSecurityPolicy
2022-10-11 01:57:18 +05:30
2023-03-04 22:38:38 +05:30
feature_category :tracing
2022-10-11 01:57:18 +05:30
2023-01-13 00:05:48 +05:30
before_action :check_observability_allowed
2022-10-11 01:57:18 +05:30
2023-01-13 00:05:48 +05:30
def dashboards
render_observability
end
2022-10-11 01:57:18 +05:30
2023-01-13 00:05:48 +05:30
def manage
render_observability
end
2022-10-11 01:57:18 +05:30
2023-01-13 00:05:48 +05:30
def explore
render_observability
2022-10-11 01:57:18 +05:30
end
2023-03-17 16:20:25 +05:30
def datasources
render_observability
end
2022-10-11 01:57:18 +05:30
private
2023-01-13 00:05:48 +05:30
def render_observability
render 'observability', layout: 'group', locals: { base_layout: 'layouts/fullscreen' }
end
2022-10-11 01:57:18 +05:30
def check_observability_allowed
2023-05-27 22:25:52 +05:30
render_404 unless Gitlab::Observability.allowed_for_action?(current_user, group, params[:action])
2022-10-11 01:57:18 +05:30
end
end
end