summaryrefslogtreecommitdiff
path: root/app/views/projects/clusters/user/_show.html.haml
blob: b07a98e9ef48c94e4f56634ceb6dc1cf1831807d (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
= form_for @cluster, url: namespace_project_cluster_path(@project.namespace, @project, @cluster), as: :cluster do |field|
  = form_errors(@cluster)
  .form-group
    = field.label :name, s_('ClusterIntegration|Cluster name')
    = field.text_field :name, class: 'form-control', placeholder: s_('ClusterIntegration|Cluster name')

  .form-group
    = field.label :environment_scope, s_('ClusterIntegration|Environment scope')
    = field.text_field :environment_scope, class: 'form-control js-select-on-focus', readonly: has_multiple_clusters?(@project), placeholder: s_('ClusterIntegration|Environment scope')

  = field.fields_for :platform_kubernetes, @cluster.platform_kubernetes do |platform_kubernetes_field|
    .form-group
      = platform_kubernetes_field.label :api_url, s_('ClusterIntegration|API URL')
      = platform_kubernetes_field.text_field :api_url, class: 'form-control', placeholder: s_('ClusterIntegration|API URL')

    .form-group
      = platform_kubernetes_field.label :ca_cert, s_('ClusterIntegration|CA Certificate')
      = platform_kubernetes_field.text_area :ca_cert, class: 'form-control', placeholder: s_('ClusterIntegration|Certificate Authority bundle (PEM format)')

    .form-group
      = platform_kubernetes_field.label :token, s_('ClusterIntegration|Token')
      .input-group
        = platform_kubernetes_field.text_field :token, class: 'form-control js-cluster-token', type: 'password', placeholder: s_('ClusterIntegration|Token'), autocomplete: 'off'
        %span.input-group-addon.clipboard-addon
          %button.js-show-cluster-token.btn-blank{ type: 'button' }
            = s_('ClusterIntegration|Show')

    .form-group
      = platform_kubernetes_field.label :namespace, s_('ClusterIntegration|Project namespace (optional, unique)')
      = platform_kubernetes_field.text_field :namespace, class: 'form-control', placeholder: s_('ClusterIntegration|Project namespace')

    .form-group
      = field.submit s_('ClusterIntegration|Save changes'), class: 'btn btn-success'