Class: Metrics::Dashboards::AnnotationsFinder
- Inherits:
-
Object
- Object
- Metrics::Dashboards::AnnotationsFinder
- Defined in:
- app/finders/metrics/dashboards/annotations_finder.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(dashboard:, params:) ⇒ AnnotationsFinder
constructor
A new instance of AnnotationsFinder.
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
#execute ⇒ Object
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 |