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
9
# File 'app/finders/metrics/dashboards/annotations_finder.rb', line 6

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

Instance Method Details

#executeObject


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

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