Commit 9cdec947 authored by Mike Greiling's avatar Mike Greiling

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