Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Knox <psimyn@gmail.com>2018-02-21 03:36:56 +0300
committerSimon Knox <psimyn@gmail.com>2018-02-21 03:36:56 +0300
commit55429981da56016067562600e4567a3b0140edbd (patch)
tree2c9091e3cc79551e264806e7e813696839d7c655 /app/controllers/projects
parent34a211a1058eb5f0dd3391bd7a64c21c844e4739 (diff)
parent11bf575fe64e55cc932c5629e2d8d103109e0b2b (diff)
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into acet-mr-notes-index
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/clusters/gcp_controller.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/app/controllers/projects/clusters/gcp_controller.rb b/app/controllers/projects/clusters/gcp_controller.rb
index 94d33b91562..0f41af7d87b 100644
--- a/app/controllers/projects/clusters/gcp_controller.rb
+++ b/app/controllers/projects/clusters/gcp_controller.rb
@@ -39,12 +39,12 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
def verify_billing
case google_project_billing_status
- when 'true'
- return
- when 'false'
- flash[:alert] = _('Please <a href=%{link_to_billing} target="_blank" rel="noopener noreferrer">enable billing for one of your projects to be able to create a Kubernetes cluster</a>, then try again.').html_safe % { link_to_billing: "https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral" }
- else
+ when nil
flash[:alert] = _('We could not verify that one of your projects on GCP has billing enabled. Please try again.')
+ when false
+ flash[:alert] = _('Please <a href=%{link_to_billing} target="_blank" rel="noopener noreferrer">enable billing for one of your projects to be able to create a Kubernetes cluster</a>, then try again.').html_safe % { link_to_billing: "https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral" }
+ when true
+ return
end
@cluster = ::Clusters::Cluster.new(create_params)
@@ -81,9 +81,7 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
end
def google_project_billing_status
- Gitlab::Redis::SharedState.with do |redis|
- redis.get(CheckGcpProjectBillingWorker.redis_shared_state_key_for(token_in_session))
- end
+ CheckGcpProjectBillingWorker.get_billing_state(token_in_session)
end
def token_in_session