Class: Metrics::Dashboards::AnnotationsFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/metrics/dashboards/annotations_finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(dashboard:, params:) ⇒ AnnotationsFinder

Returns a new instance of AnnotationsFinder.


6
7
8
# File 'app/finders/metrics/dashboards/annotations_finder.rb', line 6

def initialize(dashboard:, params:)
  @dashboard, @params = dashboard, params
end

Instance Method Details

#executeObject


10
11
12
13
14
15
16
# File 'app/finders/metrics/dashboards/annotations_finder.rb', line 10

def execute
  if dashboard.environment
    apply_filters_to(annotations_for_environment)
  else
    Metrics::Dashboard::Annotation.none
  end
end