diff options
-rw-r--r-- | app/models/clusters/applications/prometheus.rb | 17 | ||||
-rw-r--r-- | app/models/clusters/concerns/application_status.rb | 4 |
2 files changed, 7 insertions, 14 deletions
diff --git a/app/models/clusters/applications/prometheus.rb b/app/models/clusters/applications/prometheus.rb index 7a97760536a..26bf73f4dd8 100644 --- a/app/models/clusters/applications/prometheus.rb +++ b/app/models/clusters/applications/prometheus.rb @@ -5,7 +5,8 @@ module Clusters class Prometheus < ActiveRecord::Base include PrometheusAdapter - VERSION = '6.7.3'.freeze + VERSION = '6.7.3' + READY_STATUS = [:installed, :updating, :updated, :update_errored].freeze self.table_name = 'clusters_applications_prometheus' @@ -24,20 +25,8 @@ module Clusters end end - def ready_status - [:installed, :updating, :updated, :update_errored] - end - def ready? - ready_status.include?(status_name) - end - - def update_in_progress? - status_name == :updating - end - - def update_errored? - status_name == :update_errored + READY_STATUS.include?(status_name) end def chart diff --git a/app/models/clusters/concerns/application_status.rb b/app/models/clusters/concerns/application_status.rb index 0e74cce29b7..a556dd5ad8b 100644 --- a/app/models/clusters/concerns/application_status.rb +++ b/app/models/clusters/concerns/application_status.rb @@ -77,6 +77,10 @@ module Clusters def available? installed? || updated? end + + def update_in_progress? + updating? + end end end end |