<commit_before>- url = url_for(:action => 'form_field_changed', :id => "#{@ems.id || 'new'}")

#form_div
  = render :partial => "layouts/flash_msg"
  %h3
    = _('Basic Information')
  .form-horizontal
    .form-group
      %label.control-label.col-md-2
        = _('Name')
      .col-md-8
        = text_field_tag("name", @edit[:new][:name],
        :maxlength         => MAX_NAME_LEN,
        "class"            => "form-control",
        "data-miq_focus"   => true,
        "data-miq_observe" => {:interval => '.5', :url => url}.to_json)
    .form-group
      %label.control-label.col-md-2
        = _('Type')
      .col-md-8
        - if @edit[:ems_id].nil?
          = select_tag("server_emstype",
                        options_for_select([["<#{_('Choose>')}", nil]] + Array(@edit[:ems_types].invert).sort_by(&:first), @edit[:new][:emstype]),
                        "class"            => "selectpicker")
          :javascript
            miqInitSelectPicker();
            miqSelectPickerEvent("server_emstype", "#{url}");
        - else
          = h(@edit[:ems_types][@edit[:new][:emstype]])
    = render(:partial => "form_fields", :locals => {:url => url})
    - if @edit[:new][:emstype] && @edit[:new][:emstype] == 'rhevm'
      .form-group#port_tr
        %label.control-label.col-md-2
          = _('API Port')
        .col-md-8
          = text_field_tag("port", @edit[:new][:port],
                            :maxlength         => 15,
                            "class"            => "form-control",
                            "data-miq_observe" => {:interval => '.5', :url => url}.to_json)
    - if @edit[:new][:emstype] && %w(openstack openstack_infra).include?(@edit[:new][:emstype])
      .form-group
        %label.control-label.col-md-2
          = _('API Version')
        .col-md-8
          = select_tag("api_version",
                       options_for_select(@edit[:openstack_api_versions], @edit[:new][:api_version]),
                       "class" => "selectpicker")<commit_msg>OpenstackInfra allow to set keystoen api port<commit_after>- url = url_for(:action => 'form_field_changed', :id => "#{@ems.id || 'new'}")

#form_div
  = render :partial => "layouts/flash_msg"
  %h3
    = _('Basic Information')
  .form-horizontal
    .form-group
      %label.control-label.col-md-2
        = _('Name')
      .col-md-8
        = text_field_tag("name", @edit[:new][:name],
        :maxlength         => MAX_NAME_LEN,
        "class"            => "form-control",
        "data-miq_focus"   => true,
        "data-miq_observe" => {:interval => '.5', :url => url}.to_json)
    .form-group
      %label.control-label.col-md-2
        = _('Type')
      .col-md-8
        - if @edit[:ems_id].nil?
          = select_tag("server_emstype",
                        options_for_select([["<#{_('Choose>')}", nil]] + Array(@edit[:ems_types].invert).sort_by(&:first), @edit[:new][:emstype]),
                        "class"            => "selectpicker")
          :javascript
            miqInitSelectPicker();
            miqSelectPickerEvent("server_emstype", "#{url}");
        - else
          = h(@edit[:ems_types][@edit[:new][:emstype]])
    = render(:partial => "form_fields", :locals => {:url => url})
    - if @edit[:new][:emstype] && %w(rhevm openstack_infra).include?(@edit[:new][:emstype])
      .form-group#port_tr
        %label.control-label.col-md-2
          = _('API Port')
        .col-md-8
          = text_field_tag("port", @edit[:new][:port],
                            :maxlength         => 15,
                            "class"            => "form-control",
                            "data-miq_observe" => {:interval => '.5', :url => url}.to_json)
    - if @edit[:new][:emstype] && %w(openstack openstack_infra).include?(@edit[:new][:emstype])
      .form-group
        %label.control-label.col-md-2
          = _('API Version')
        .col-md-8
          = select_tag("api_version",
                       options_for_select(@edit[:openstack_api_versions], @edit[:new][:api_version]),
                       "class" => "selectpicker")
{'fraction_non_alphanumeric': 0.18812852587687023, 'fraction_numerical': 0.006377238165317636, 'mean_word_length': 1.9572153734590283, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, 'https://': 0, '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': '3948026', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1332, 'n_words': 185}