@@ -39,12 +39,12 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
...
@@ -39,12 +39,12 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
defverify_billing
defverify_billing
casegoogle_project_billing_status
casegoogle_project_billing_status
when'true'
whennil
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
flash[:alert]=_('We could not verify that one of your projects on GCP has billing enabled. Please try again.')
flash[:alert]=_('We could not verify that one of your projects on GCP has billing enabled. Please try again.')
whenfalse
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"}
whentrue
return
end
end
@cluster=::Clusters::Cluster.new(create_params)
@cluster=::Clusters::Cluster.new(create_params)
...
@@ -81,9 +81,7 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
...
@@ -81,9 +81,7 @@ class Projects::Clusters::GcpController < Projects::ApplicationController