summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-02-12 16:13:59 +1300
committerThong Kuah <tkuah@gitlab.com>2019-02-15 12:34:23 +1300
commit9eeca2db6db51e1d7b121a0efdfe14b517dea4b6 (patch)
treeefd98ebc11bfb63a48b9b2281ac8a9f16d9275c9 /app
parente2a56bd1ae6af4166db108eca4455530d98f6aa8 (diff)
downloadgitlab-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.rb5
-rw-r--r--app/models/clusters/concerns/application_status.rb4
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