Skip to content

Draft: Migrate GKE submit button component

Diana Zubova requested to merge dz/migrate-button-to-pajamas into master

What does this MR do and why?

Migrate GKE submit button component to Pajamas GlButton

Screenshots or screen recordings

Before After
Screenshot_2022-04-08_at_12.07.13 Screenshot_2022-04-08_at_12.08.27
Screenshot_2022-04-08_at_12.07.55 Screenshot_2022-04-08_at_12.08.55

How to set up and validate locally

  1. Open the project where you have maintainers rights OR login as admin
  2. Apply this patch, otherwise you'd need to connect your local gitlab to gcp token
Patch
diff --git a/app/controllers/clusters/clusters_controller.rb b/app/controllers/clusters/clusters_controller.rb
index 21868cec313..7331af1bcb1 100644
--- a/app/controllers/clusters/clusters_controller.rb
+++ b/app/controllers/clusters/clusters_controller.rb
@@ -52,7 +52,8 @@ def new
       @instance_types = load_instance_types.to_json
 
     elsif params[:provider] == 'gcp'
-      redirect_to @authorize_url if @authorize_url && !@valid_gcp_token
+      true
+      # redirect_to @authorize_url if @authorize_url && !@valid_gcp_token
     end
   end
 
diff --git a/app/views/clusters/clusters/gcp/_new.html.haml b/app/views/clusters/clusters/gcp/_new.html.haml
index 6c3a230fb93..080a715fcdc 100644
--- a/app/views/clusters/clusters/gcp/_new.html.haml
+++ b/app/views/clusters/clusters/gcp/_new.html.haml
@@ -1,5 +1,5 @@
 = render 'clusters/clusters/gcp/header'
-- if @valid_gcp_token
+- if true
   = render 'clusters/clusters/gcp/form'
 - else
   = render 'clusters/clusters/gcp/gcp_not_configured'
  1. Go to Infrastructure -> Kubernetes clusters
  2. Choose Create a cluster (certificate - deprecated) or open http://localhost:3000/twitter/Typeahead.Js/-/clusters/new?provider=gcp
  3. Check the Create Kubernetes cluster button

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Diana Zubova

Merge request reports