Class: Tiler::Widgets::MetricQuery
- Inherits:
-
Query::Base
- Object
- Query::Base
- Tiler::Widgets::MetricQuery
- Defined in:
- lib/tiler/widgets/metric.rb
Constant Summary
Constants inherited from Query::Base
Instance Attribute Summary
Attributes inherited from Query::Base
Instance Method Summary collapse
Methods inherited from Query::Base
Constructor Details
This class inherits a constructor from Tiler::Query::Base
Instance Method Details
#call ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/tiler/widgets/metric.rb', line 7 def call col = config["value_column"] agg = config["aggregation"] || "last" { value: aggregate(base_scope, col, agg), label: panel.title, prefix: config["prefix"].to_s, suffix: config["suffix"].to_s, aggregation: agg, time_window: config["time_window"] } end |