summaryrefslogtreecommitdiff
path: root/app/views/projects/clusters/new.html.haml
blob: 6646edbc6214a27bcf5a7b8d12e30dd6101851ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-# TODO: Combine gcp/new and user/new views
- breadcrumb_title 'Kubernetes'
- page_title _("Kubernetes Cluster")
- active_tab = local_assigns.fetch(:active_tab, 'new')
= javascript_include_tag 'https://apis.google.com/js/api.js'


= render_gcp_signup_offer

.row.prepend-top-default
  .col-sm-3
    = render 'sidebar'
  .col-lg-9.js-toggle-container
    %ul.nav-links.gitlab-tabs{ role: 'tablist' }
      %li{ class: active_when(active_tab == 'new'), role: 'presentation' }
        %a{ href: '#create-new-cluster-pane', id: 'create-new-cluster-tab', data: { toggle: 'tab' }, role: 'tab' }
          %span Create new Cluster on GKE
      %li{ class: active_when(active_tab == 'existing'), role: 'presentation' }
        %a{ href: '#add-existing-cluster-pane', id: 'add-existing-cluster-tab', data: { toggle: 'tab' }, role: 'tab' }
          %span Add existing cluster

    .tab-content.gitlab-tab-content
      .tab-pane{ id: 'create-new-cluster-pane', class: active_when(active_tab == 'new'), role: 'tabpanel' }
        = render 'projects/clusters/gcp/header'
        - if @token_in_session
          = render 'projects/clusters/gcp/form'
        - elsif @authorize_url
          = link_to @authorize_url do
            = image_tag('auth_buttons/signin_with_google.png', width: '191px')
          = _('or')
          = link_to('create a new Google account', 'https://accounts.google.com/SignUpWithoutGmail?service=cloudconsole&continue=https%3A%2F%2Fconsole.cloud.google.com%2Ffreetrial%3Futm_campaign%3D2018_cpanel%26utm_source%3Dgitlab%26utm_medium%3Dreferral', target: '_blank', rel: 'noopener noreferrer')
        - else
          - link = link_to(s_('ClusterIntegration|properly configured'), help_page_path("integration/google"), target: '_blank', rel: 'noopener noreferrer')
          = s_('Google authentication is not %{link_to_documentation}. Ask your GitLab administrator if you want to use this service.').html_safe % { link_to_documentation: link }

      .tab-pane{ id: 'add-existing-cluster-pane', class: active_when(active_tab == 'existing'), role: 'tabpanel' }
        = render 'projects/clusters/user/header'
        = render 'projects/clusters/user/form'