Class: GrafanaReporter::ReporterEnvironmentDatasource

Inherits:
Grafana::AbstractDatasource show all
Defined in:
lib/grafana_reporter/reporter_environment_datasource.rb

Overview

Implements a datasource to return environment related information about the reporter in a tabular format.

Instance Attribute Summary

Attributes inherited from Grafana::AbstractDatasource

#model

Instance Method Summary collapse

Methods inherited from Grafana::AbstractDatasource

build_instance, #category, handles?, #id, inherited, #initialize, #raw_query_from_panel_model, #replace_variables, #type, #uid

Constructor Details

This class inherits a constructor from Grafana::AbstractDatasource

Instance Method Details

#default_variable_formatObject

See Also:

  • AbstractDatasource#default_variable_format


15
16
17
# File 'lib/grafana_reporter/reporter_environment_datasource.rb', line 15

def default_variable_format
  nil
end

#nameObject

See Also:

  • AbstractDatasource#name


20
21
22
# File 'lib/grafana_reporter/reporter_environment_datasource.rb', line 20

def name
  self.class.to_s
end

#request(query_description) ⇒ Object

See Also:

  • AbstractDatasource#request


7
8
9
10
11
12
# File 'lib/grafana_reporter/reporter_environment_datasource.rb', line 7

def request(query_description)
  {
    header: ['Version', 'Release Date'],
    content: [[GRAFANA_REPORTER_VERSION.join('.'), GRAFANA_REPORTER_RELEASE_DATE]]
  }
end