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-03-17 16:20:25 +05:30
|
|
|
render_404 unless Gitlab::Observability.observability_enabled?(current_user, group)
|
2022-10-11 01:57:18 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|