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

annotation_type.rb « dashboards « metrics « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0c787476f5431a24bce79dc1356efae6b6e431e0 (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
# frozen_string_literal: true

module Types
  module Metrics
    module Dashboards
      class AnnotationType < ::Types::BaseObject
        graphql_name 'MetricsDashboardAnnotation'
        authorize :read_metrics_dashboard_annotation

        field :description, GraphQL::Types::String, null: true,
              description: 'Description of the annotation.'

        field :id, GraphQL::Types::ID, null: false,
              description: 'ID of the annotation.'

        field :panel_id, GraphQL::Types::String, null: true,
              description: 'ID of a dashboard panel to which the annotation should be scoped.'

        field :starting_at, Types::TimeType, null: true,
              description: 'Timestamp marking start of annotated time span.'

        field :ending_at, Types::TimeType, null: true,
              description: 'Timestamp marking end of annotated time span.'

        def panel_id
          object.panel_xid
        end
      end
    end
  end
end