Fix legend

This commit is contained in:
Kamil Trzciński 2018-09-05 15:35:08 +02:00
parent f5fab097a4
commit 5e06c37745

View file

@ -76,14 +76,14 @@ class PrometheusMetric < ActiveRecord::Base
def query_series def query_series
case legend case legend
when 'Status Code' when 'Status Code'
{ [{
label: 'status_code', label: 'status_code',
when: [ when: [
{ value: '2xx', color: 'green' }, { value: '2xx', color: 'green' },
{ value: '4xx', color: 'orange' }, { value: '4xx', color: 'orange' },
{ value: '5xx', color: 'red' } { value: '5xx', color: 'red' }
] ]
} }]
end end
end end
end end