<commit_before>= javascript_include_tag 'https://apis.google.com/js/api.js'

%p
  - link_to_help_page = link_to(s_('ClusterIntegration|help page'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
  = s_('ClusterIntegration|Read our %{link_to_help_page} on Kubernetes cluster integration.').html_safe % { link_to_help_page: link_to_help_page}

= form_for @cluster, html: { class: 'prepend-top-20', data: { token: @token_in_session } }, url: gcp_namespace_project_clusters_path(@project.namespace, @project), as: :cluster do |field|
  = form_errors(@cluster)
  .form-group
    = field.label :name, s_('ClusterIntegration|Kubernetes cluster name')
    = field.text_field :name, class: 'form-control', placeholder: s_('ClusterIntegration|Kubernetes cluster name')
  .form-group
    = field.label :environment_scope, s_('ClusterIntegration|Environment scope')
    = field.text_field :environment_scope, class: 'form-control', readonly: !has_multiple_clusters?(@project), placeholder: s_('ClusterIntegration|Environment scope')

  = field.fields_for :provider_gcp, @cluster.provider_gcp do |provider_gcp_field|
    .form-group
      = provider_gcp_field.label :gcp_project_id, s_('ClusterIntegration|Google Cloud Platform project ID')
      #js-gcp-project-id-dropdown-entry-point{ data: { docsUrl: 'https://console.cloud.google.com/home/dashboard' } }
        = provider_gcp_field.hidden_field :gcp_project_id, class: 'form-control', placeholder: 'Select project'

    .form-group
      = provider_gcp_field.label :zone, s_('ClusterIntegration|Zone')
      = link_to(s_('ClusterIntegration|See zones'), 'https://cloud.google.com/compute/docs/regions-zones/regions-zones', target: '_blank', rel: 'noopener noreferrer')
      #js-gcp-zone-dropdown-entry-point
        = provider_gcp_field.hidden_field :zone, class: 'form-control', placeholder: 'us-central1-a'

    .form-group
      = provider_gcp_field.label :num_nodes, s_('ClusterIntegration|Number of nodes')
      = provider_gcp_field.text_field :num_nodes, class: 'form-control', placeholder: '3'

    .form-group
      = provider_gcp_field.label :machine_type, s_('ClusterIntegration|Machine type')
      #js-gcp-machine-type-dropdown-entry-point
        = provider_gcp_field.hidden_field :machine_type, class: 'form-control', placeholder: 'us-central1-a'

    .form-group
      = field.submit s_('ClusterIntegration|Create Kubernetes cluster'), class: 'btn btn-success', disabled: true
<commit_msg>change entrypoints + dummy loading elements<commit_after>= javascript_include_tag 'https://apis.google.com/js/api.js'

%p
  - link_to_help_page = link_to(s_('ClusterIntegration|help page'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
  = s_('ClusterIntegration|Read our %{link_to_help_page} on Kubernetes cluster integration.').html_safe % { link_to_help_page: link_to_help_page}

= form_for @cluster, html: { class: 'prepend-top-20', data: { token: @token_in_session } }, url: gcp_namespace_project_clusters_path(@project.namespace, @project), as: :cluster do |field|
  = form_errors(@cluster)
  .form-group
    = field.label :name, s_('ClusterIntegration|Kubernetes cluster name')
    = field.text_field :name, class: 'form-control', placeholder: s_('ClusterIntegration|Kubernetes cluster name')
  .form-group
    = field.label :environment_scope, s_('ClusterIntegration|Environment scope')
    = field.text_field :environment_scope, class: 'form-control', readonly: !has_multiple_clusters?(@project), placeholder: s_('ClusterIntegration|Environment scope')

  = field.fields_for :provider_gcp, @cluster.provider_gcp do |provider_gcp_field|
    .form-group
      = provider_gcp_field.label :gcp_project_id, s_('ClusterIntegration|Google Cloud Platform project ID')
      .js-gcp-project-id-dropdown-entry-point{ data: { docsUrl: 'https://console.cloud.google.com/home/dashboard' } }
        = provider_gcp_field.hidden_field :gcp_project_id
        .dropdown
          %button.dropdown-menu-toggle.dropdown-menu-full-width{ type: 'button', disabled: true }
            %span.dropdown-toggle-text
              = _('Select project')
            = icon('chevron-down')

    .form-group
      = provider_gcp_field.label :zone, s_('ClusterIntegration|Zone')
      = link_to(s_('ClusterIntegration|See zones'), 'https://cloud.google.com/compute/docs/regions-zones/regions-zones', target: '_blank', rel: 'noopener noreferrer')
      .js-gcp-zone-dropdown-entry-point
        = provider_gcp_field.hidden_field :zone
        .dropdown
          %button.dropdown-menu-toggle.dropdown-menu-full-width{ type: 'button', disabled: true }
            %span.dropdown-toggle-text
              = _('Select project to choose zone')
            = icon('chevron-down')

    .form-group
      = provider_gcp_field.label :num_nodes, s_('ClusterIntegration|Number of nodes')
      = provider_gcp_field.text_field :num_nodes, class: 'form-control', placeholder: '3'

    .form-group
      = provider_gcp_field.label :machine_type, s_('ClusterIntegration|Machine type')
      .js-gcp-machine-type-dropdown-entry-point
        = provider_gcp_field.hidden_field :machine_type
        .dropdown
          %button.dropdown-menu-toggle.dropdown-menu-full-width{ type: 'button', disabled: true }
            %span.dropdown-toggle-text
              = _('Select project and zone to choose machine type')
            = icon('chevron-down')

    .form-group
      = field.submit s_('ClusterIntegration|Create Kubernetes cluster'), class: 'btn btn-success', disabled: true

{'fraction_non_alphanumeric': 0.13088630259623993, 'fraction_numerical': 0.001432408236347359, 'mean_word_length': 4.355704697986577, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '926564', 'n_tokens_mistral': 1775, 'n_tokens_neox': 1739, 'n_words': 316}