From 5754908fee556062ab2e42a418bf192a0bf56402 Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Fri, 27 Oct 2017 16:48:02 +0100 Subject: Adds buttons to the first page. Moves first page into a new one --- app/controllers/projects/clusters_controller.rb | 7 ++++++- app/views/projects/clusters/new.html.haml | 11 +++++++++-- app/views/projects/clusters/new_kubernetes_form.html.haml | 9 +++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 app/views/projects/clusters/new_kubernetes_form.html.haml diff --git a/app/controllers/projects/clusters_controller.rb b/app/controllers/projects/clusters_controller.rb index 03019b0becc..95e2f6a1257 100644 --- a/app/controllers/projects/clusters_controller.rb +++ b/app/controllers/projects/clusters_controller.rb @@ -26,10 +26,15 @@ class Projects::ClustersController < Projects::ApplicationController end end - def new + # TODO fix this + def new_kubernetes_form @cluster = project.build_cluster end + def new + # First page! + end + def create @cluster = Ci::CreateClusterService .new(project, current_user, create_params) diff --git a/app/views/projects/clusters/new.html.haml b/app/views/projects/clusters/new.html.haml index c538d41ffad..3963e4741f3 100644 --- a/app/views/projects/clusters/new.html.haml +++ b/app/views/projects/clusters/new.html.haml @@ -5,5 +5,12 @@ .col-sm-4 = render 'sidebar' .col-sm-8 - = render 'header' -= render 'form' + %h4= s_('ClusterIntegration|Choose how to set up cluster integration') + + %p= s_('ClusterIntegration| Create a new cluster on Google Engine right from GitLab') + -# TODO FIX PATH + = link_to s_('ClusterIntegration|Create on GKE'), providers_gcp_login_project_clusters_path(@project), class: 'btn append-bottom-20' + -# TODO FIX PATH + %p= s_('ClusterIntegration| Enter the details for an existing Kubernetes cluster') + = link_to s_('ClusterIntegration|Add an existing cluster'), project_settings_integrations_path(@project), class: 'btn append-bottom-20' + diff --git a/app/views/projects/clusters/new_kubernetes_form.html.haml b/app/views/projects/clusters/new_kubernetes_form.html.haml new file mode 100644 index 00000000000..c538d41ffad --- /dev/null +++ b/app/views/projects/clusters/new_kubernetes_form.html.haml @@ -0,0 +1,9 @@ +- breadcrumb_title "Cluster" +- page_title _("New Cluster") + +.row.prepend-top-default + .col-sm-4 + = render 'sidebar' + .col-sm-8 + = render 'header' += render 'form' -- cgit v1.2.1