Welcome to mirror list, hosted at ThFree Co, Russian Federation.

observability_controller.rb « groups « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 525407f5849e1e2ce75251dcf09b54e27460483a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# frozen_string_literal: true
module Groups
  class ObservabilityController < Groups::ApplicationController
    include ::Observability::ContentSecurityPolicy

    feature_category :tracing

    before_action :check_observability_allowed

    def dashboards
      render_observability
    end

    def manage
      render_observability
    end

    def explore
      render_observability
    end

    def datasources
      render_observability
    end

    private

    def render_observability
      render 'observability', layout: 'group', locals: { base_layout: 'layouts/fullscreen' }
    end

    def check_observability_allowed
      render_404 unless Gitlab::Observability.allowed_for_action?(current_user, group, params[:action])
    end
  end
end