Class: GrafanaReporter::PanelPropertyQuery

Inherits:
AbstractQuery show all
Defined in:
lib/grafana_reporter/panel_property_query.rb

Overview

This class is used to query properties from a Grafana::Panel, such as description, title etc.

Instance Attribute Summary

Attributes inherited from AbstractQuery

#dashboard, #datasource, #panel, #result, #variables

Instance Method Summary collapse

Methods inherited from AbstractQuery

#apply, #execute, #filter_columns, #format_columns, #format_table_output, #initialize, #replace_values, #timeout, #translate_date, #transpose

Constructor Details

This class inherits a constructor from GrafanaReporter::AbstractQuery

Instance Method Details

#post_processObject

See Also:

  • Grafana::AbstractQuery#post_process


13
14
15
# File 'lib/grafana_reporter/panel_property_query.rb', line 13

def post_process
  @result = @result[:content].first
end

#pre_processObject

See Also:

  • Grafana::AbstractQuery#pre_process


8
9
10
# File 'lib/grafana_reporter/panel_property_query.rb', line 8

def pre_process
  @datasource = Grafana::GrafanaPropertyDatasource.new(nil)
end

#raw_queryObject

See Also:

  • Grafana::AbstractQuery#raw_query


18
19
20
# File 'lib/grafana_reporter/panel_property_query.rb', line 18

def raw_query
  @raw_query.merge({ panel: @panel })
end