BigW Consortium Gitlab

fix rubocop errors and ensure prometheus_installed? doesn't fail in CI tests where project is nil

parent bb79e3cb
......@@ -45,6 +45,7 @@ class PrometheusService < MonitoringService
def fields
return [] unless editable?
[
{
type: 'checkbox',
......@@ -124,7 +125,7 @@ class PrometheusService < MonitoringService
end
def prometheus_installed?
return false if template?
return false if template? || !project
project.clusters.enabled.any? { |cluster| cluster.application_prometheus&.installed? }
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