2017-12-05 07:00:02 -05:00
|
|
|
= form_for @cluster, url: namespace_project_cluster_path(@project.namespace, @project, @cluster), as: :cluster do |field|
|
|
|
|
= form_errors(@cluster)
|
|
|
|
.form-group
|
2018-07-19 18:11:31 -04:00
|
|
|
= field.label :name, s_('ClusterIntegration|Kubernetes cluster name'), class: 'label-bold'
|
2018-01-29 14:49:00 -05:00
|
|
|
= field.text_field :name, class: 'form-control', placeholder: s_('ClusterIntegration|Kubernetes cluster name')
|
2017-12-05 07:00:02 -05:00
|
|
|
|
|
|
|
= field.fields_for :platform_kubernetes, @cluster.platform_kubernetes do |platform_kubernetes_field|
|
|
|
|
.form-group
|
2018-07-19 18:11:31 -04:00
|
|
|
= platform_kubernetes_field.label :api_url, s_('ClusterIntegration|API URL'), class: 'label-bold'
|
2017-12-05 07:00:02 -05:00
|
|
|
= platform_kubernetes_field.text_field :api_url, class: 'form-control', placeholder: s_('ClusterIntegration|API URL')
|
|
|
|
|
|
|
|
.form-group
|
2018-07-19 18:11:31 -04:00
|
|
|
= platform_kubernetes_field.label :ca_cert, s_('ClusterIntegration|CA Certificate'), class: 'label-bold'
|
2017-12-05 07:00:02 -05:00
|
|
|
= platform_kubernetes_field.text_area :ca_cert, class: 'form-control', placeholder: s_('ClusterIntegration|Certificate Authority bundle (PEM format)')
|
|
|
|
|
|
|
|
.form-group
|
2018-07-19 18:11:31 -04:00
|
|
|
= platform_kubernetes_field.label :token, s_('ClusterIntegration|Token'), class: 'label-bold'
|
2017-12-05 07:00:02 -05:00
|
|
|
.input-group
|
|
|
|
= platform_kubernetes_field.text_field :token, class: 'form-control js-cluster-token', type: 'password', placeholder: s_('ClusterIntegration|Token'), autocomplete: 'off'
|
2018-04-12 16:32:55 -04:00
|
|
|
%span.input-group-append.clipboard-addon
|
|
|
|
.input-group-text
|
|
|
|
%button.js-show-cluster-token.btn-blank{ type: 'button' }
|
|
|
|
= s_('ClusterIntegration|Show')
|
2017-12-05 07:00:02 -05:00
|
|
|
|
|
|
|
.form-group
|
2018-07-19 18:11:31 -04:00
|
|
|
= platform_kubernetes_field.label :namespace, s_('ClusterIntegration|Project namespace (optional, unique)'), class: 'label-bold'
|
2017-12-05 07:00:02 -05:00
|
|
|
= 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'
|