Commit 83bc462c authored by Vitali Tatarintev's avatar Vitali Tatarintev

Move prometheus-alerts-available inside presenter

parent 5ecf5224
......@@ -16,7 +16,8 @@ module EE
'settings-path': '',
'project-path': '',
'tags-path': '',
'alerts-endpoint': alerts_endpoint
'alerts-endpoint': alerts_endpoint,
'prometheus-alerts-available': prometheus_alerts_available
}
end
......@@ -29,6 +30,10 @@ module EE
def alerts_endpoint
'/' if ::Feature.enabled?(:prometheus_computed_alerts)
end
def prometheus_alerts_available
'true' if ::Feature.enabled?(:prometheus_computed_alerts)
end
end
end
end
......@@ -29,7 +29,8 @@ describe Clusters::ClusterPresenter do
'settings-path': '',
'project-path': '',
'tags-path': '',
'alerts-endpoint': '/'
'alerts-endpoint': '/',
'prometheus-alerts-available': 'true'
)
end
......@@ -41,6 +42,10 @@ describe Clusters::ClusterPresenter do
it 'alerts-endpoint is nil' do
expect(subject['alerts-endpoint']).to be_nil
end
it 'prometheus-alerts-available is nil' do
expect(subject['prometheus-alerts-available']).to be_nil
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment