summaryrefslogtreecommitdiff
path: root/app/models/prometheus_metric.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/prometheus_metric.rb')
-rw-r--r--app/models/prometheus_metric.rb23
1 files changed, 1 insertions, 22 deletions
diff --git a/app/models/prometheus_metric.rb b/app/models/prometheus_metric.rb
index 22b64744fe7..3cbaa870b1d 100644
--- a/app/models/prometheus_metric.rb
+++ b/app/models/prometheus_metric.rb
@@ -95,28 +95,7 @@ class PrometheusMetric < ActiveRecord::Base
end
def queries
- [
- {
- query_range: query,
- unit: unit,
- label: legend,
- series: query_series
- }.compact
- ]
- end
-
- def query_series
- case legend
- when 'Status Code'
- [{
- label: 'status_code',
- when: [
- { value: '2xx', color: 'green' },
- { value: '4xx', color: 'orange' },
- { value: '5xx', color: 'red' }
- ]
- }]
- end
+ prometheus_queries.map(&:to_query_hash)
end
private