diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-02-01 02:12:24 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-02-01 02:12:24 +0300 |
commit | 9cdec947e1375dd76b05b175fde530374a59b819 (patch) | |
tree | 23ce1d622f4cf82f04d2fbb669ed3ae871fc0a9b /app/models/project_services | |
parent | bb79e3cbec0a8c98b9a0e9a7dd4aad22b96b151c (diff) |
fix rubocop errors and ensure prometheus_installed? doesn't fail in CI tests where project is nil
Diffstat (limited to 'app/models/project_services')
-rw-r--r-- | app/models/project_services/prometheus_service.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/project_services/prometheus_service.rb b/app/models/project_services/prometheus_service.rb index f2f71547e03..c35e725aa20 100644 --- a/app/models/project_services/prometheus_service.rb +++ b/app/models/project_services/prometheus_service.rb @@ -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 |