diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-02-12 16:13:59 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-02-15 12:34:23 +1300 |
commit | 9eeca2db6db51e1d7b121a0efdfe14b517dea4b6 (patch) | |
tree | efd98ebc11bfb63a48b9b2281ac8a9f16d9275c9 /app | |
parent | e2a56bd1ae6af4166db108eca4455530d98f6aa8 (diff) | |
download | gitlab-ce-9eeca2db6db51e1d7b121a0efdfe14b517dea4b6.tar.gz |
Move common method to application concern
This could be potentially useful to all cluster applications.
Address followup issue https://gitlab.com/gitlab-org/gitlab-ce/issues/56524
Diffstat (limited to 'app')
-rw-r--r-- | app/models/clusters/applications/prometheus.rb | 5 | ||||
-rw-r--r-- | app/models/clusters/concerns/application_status.rb | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb index 52c440ffb2f..fa7ce363531 100644 --- a/app/models/clusters/applications/prometheus.rb +++ b/app/models/clusters/applications/prometheus.rb @@ -6,7 +6,6 @@ module Clusters include PrometheusAdapter VERSION = '6.7.3' - READY_STATUS = [:installed, :updating, :updated, :update_errored].freeze self.table_name = 'clusters_applications_prometheus' @@ -25,10 +24,6 @@ module Clusters end end - def ready? - READY_STATUS.include?(status_name) - end - def chart 'stable/prometheus' end diff --git a/app/models/clusters/concerns/application_status.rb b/app/models/clusters/concerns/application_status.rb index 5c0164831bc..9ecd7229604 100644 --- a/app/models/clusters/concerns/application_status.rb +++ b/app/models/clusters/concerns/application_status.rb @@ -80,6 +80,10 @@ module Clusters installed? || updated? end + def ready? + installed? || updating? || updated? || update_errored? + end + def update_in_progress? updating? end |