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

Move prometheus-alerts-available inside presenter

parent 5ecf5224
...@@ -16,7 +16,8 @@ module EE ...@@ -16,7 +16,8 @@ module EE
'settings-path': '', 'settings-path': '',
'project-path': '', 'project-path': '',
'tags-path': '', 'tags-path': '',
'alerts-endpoint': alerts_endpoint 'alerts-endpoint': alerts_endpoint,
'prometheus-alerts-available': prometheus_alerts_available
} }
end end
...@@ -29,6 +30,10 @@ module EE ...@@ -29,6 +30,10 @@ module EE
def alerts_endpoint def alerts_endpoint
'/' if ::Feature.enabled?(:prometheus_computed_alerts) '/' if ::Feature.enabled?(:prometheus_computed_alerts)
end end
def prometheus_alerts_available
'true' if ::Feature.enabled?(:prometheus_computed_alerts)
end
end end
end end
end end
...@@ -29,7 +29,8 @@ describe Clusters::ClusterPresenter do ...@@ -29,7 +29,8 @@ describe Clusters::ClusterPresenter do
'settings-path': '', 'settings-path': '',
'project-path': '', 'project-path': '',
'tags-path': '', 'tags-path': '',
'alerts-endpoint': '/' 'alerts-endpoint': '/',
'prometheus-alerts-available': 'true'
) )
end end
...@@ -41,6 +42,10 @@ describe Clusters::ClusterPresenter do ...@@ -41,6 +42,10 @@ describe Clusters::ClusterPresenter do
it 'alerts-endpoint is nil' do it 'alerts-endpoint is nil' do
expect(subject['alerts-endpoint']).to be_nil expect(subject['alerts-endpoint']).to be_nil
end end
it 'prometheus-alerts-available is nil' do
expect(subject['prometheus-alerts-available']).to be_nil
end
end 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