summaryrefslogtreecommitdiff
path: root/app/views/clusters/clusters/new.html.haml
blob: fb182d99ff02d65df9735eda4201745b9b074320 (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
39
40
41
42
43
44
45
46
47
48
- breadcrumb_title _('Kubernetes')
- page_title _('Kubernetes Cluster')
- create_eks_enabled = Feature.enabled?(:create_eks_clusters)
- active_tab = local_assigns.fetch(:active_tab, 'create')
- link_end = '<a/>'.html_safe
= javascript_include_tag 'https://apis.google.com/js/api.js'

= render_gcp_signup_offer

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

    .tab-content.gitlab-tab-content
      - if create_eks_enabled
        .tab-pane{ id: 'create-cluster-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' }
          - if @gke_selected && @valid_gcp_token
            = render 'clusters/clusters/gcp/header'
            = render 'clusters/clusters/gcp/form'
          - elsif @eks_selected
            = render 'clusters/clusters/eks/index'
          - else
            = render 'clusters/clusters/cloud_providers/cloud_provider_selector'
      - else
        .tab-pane{ id: 'create-cluster-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' }
          = render 'clusters/clusters/gcp/header'
          - if @valid_gcp_token
            = render 'clusters/clusters/gcp/form'
          - elsif @authorize_url
            .signin-with-google
              - create_account_link = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: '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' }
              = link_to(image_tag('auth_buttons/signin_with_google.png', width: '191px', alt: _('Sign in with Google')), @authorize_url)
              = s_('or %{link_start}create a new Google account%{link_end}').html_safe % { link_start: create_account_link, link_end: link_end }
          - else
            - documentation_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path("integration/google") }
            = s_('Google authentication is not %{link_start}property configured%{link_end}. Ask your GitLab administrator if you want to use this service.').html_safe % { link_start: documentation_link_start, link_end: link_end }

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