<commit_before>- url = url_for(:action => 'form_field_changed', :id => (@host.id || 'new'))
- observe = { :interval => '.5', :url => url }.to_json
#form_div
  = render :partial => "layouts/flash_msg"
  - if session[:host_items].nil?
    %h3=_('Basic Information')
    %table.style1
      %tr
        %td.key=_('Name')
        %td.wide
          = text_field_tag("name",
            @edit[:new][:name],
            :maxlength => MAX_NAME_LEN,
            "data-miq_focus" => true,
            "data-miq_observe" => observe)
      %tr
        %td.key=_('Host Name (or IPv4 or IPv6 address)')
        %td.wide
          = text_field_tag("hostname",
            @edit[:new][:hostname],
            :maxlength => MAX_HOSTNAME_LEN,
            "data-miq_observe" => observe)
      %tr
        %td.key=_('Custom Identifier')
        %td.wide
          = text_field_tag("custom_1",
            @edit[:new][:custom_1],
            :maxlength => 50,
            "data-miq_observe" => observe)
      - if @host.operating_system.nil? || @host.operating_system.product_name.nil?
        %tr
          %td.key=_('Host platform')
          %td.wide
            = select_tag("user_assigned_os",
              options_for_select([["<#{_('not specified')}>", nil]] + Host.host_create_os_types.to_a,
              @edit[:new][:user_assigned_os]),
              "data-miq_observe" => { :url => url }.to_json)
      %tr
        %td.key=_('IPMI IP Address')
        %td.wide
          = text_field_tag("ipmi_address",
            @edit[:new][:ipmi_address],
            :maxlength => 15,
            "data-miq_observe" => observe)
      %tr
        %td.key=_('MAC Address')
        %td.wide
          = text_field_tag("mac_address",
            @edit[:new][:mac_address],
            :maxlength => MAX_NAME_LEN,
            "data-miq_observe" => observe)
    %hr

  = render(:partial => "/layouts/multi_auth_credentials", :locals => {:record => @host})
  - if ["new", "create"].include?(controller.action_name)
    %table{:width => '100%'}
      %tr
        %td{:align => 'right'}
          #buttons_on
            = button_tag(_('Add'),
              :class => 'btn btn-primary',
              :alt => (t = _("Add this Host")),
              :title => t,
              :onclick => "miqAjaxButton('#{url_for(:action => "create",
                :id     => "new",
                :button => "add")}');")
            = button_tag((t = _('Cancel')),
              :class => 'btn btn-default',
              :alt => t,
              :title => t,
              :onclick => "miqAjaxButton('#{url_for(:action => 'create',
                :id => 'new',
                :button => 'cancel')}');")
  - else
    = render(:partial => '/layouts/edit_form_buttons', :locals  => {:record_id => @host.id, :ajax_buttons => true})

  - unless session[:host_items].nil?
    %h3
      = pluralize(session[:host_items].length,Dictionary::gettext(Host.to_s, :type => :model, :notfound => :titleize))
      |
      =_('Selected')
    |
    =_('Click on a Host to fetch its settings')
    %table.admittable{:height => '75'}
      %tbody
        %tr
          %td
            - if session[:host_items]
              - @embedded = true
              - @gtl_type = @settings[:views][:host]
              = render :partial => 'layouts/gtl'
<commit_msg>Removed obsolete pipe characters from the hosts edit page<commit_after>- url = url_for(:action => 'form_field_changed', :id => (@host.id || 'new'))
- observe = { :interval => '.5', :url => url }.to_json
#form_div
  = render :partial => "layouts/flash_msg"
  - if session[:host_items].nil?
    %h3=_('Basic Information')
    %table.style1
      %tr
        %td.key=_('Name')
        %td.wide
          = text_field_tag("name",
            @edit[:new][:name],
            :maxlength => MAX_NAME_LEN,
            "data-miq_focus" => true,
            "data-miq_observe" => observe)
      %tr
        %td.key=_('Host Name (or IPv4 or IPv6 address)')
        %td.wide
          = text_field_tag("hostname",
            @edit[:new][:hostname],
            :maxlength => MAX_HOSTNAME_LEN,
            "data-miq_observe" => observe)
      %tr
        %td.key=_('Custom Identifier')
        %td.wide
          = text_field_tag("custom_1",
            @edit[:new][:custom_1],
            :maxlength => 50,
            "data-miq_observe" => observe)
      - if @host.operating_system.nil? || @host.operating_system.product_name.nil?
        %tr
          %td.key=_('Host platform')
          %td.wide
            = select_tag("user_assigned_os",
              options_for_select([["<#{_('not specified')}>", nil]] + Host.host_create_os_types.to_a,
              @edit[:new][:user_assigned_os]),
              "data-miq_observe" => { :url => url }.to_json)
      %tr
        %td.key=_('IPMI IP Address')
        %td.wide
          = text_field_tag("ipmi_address",
            @edit[:new][:ipmi_address],
            :maxlength => 15,
            "data-miq_observe" => observe)
      %tr
        %td.key=_('MAC Address')
        %td.wide
          = text_field_tag("mac_address",
            @edit[:new][:mac_address],
            :maxlength => MAX_NAME_LEN,
            "data-miq_observe" => observe)
    %hr

  = render(:partial => "/layouts/multi_auth_credentials", :locals => {:record => @host})
  - if ["new", "create"].include?(controller.action_name)
    %table{:width => '100%'}
      %tr
        %td{:align => 'right'}
          #buttons_on
            = button_tag(_('Add'),
              :class => 'btn btn-primary',
              :alt => (t = _("Add this Host")),
              :title => t,
              :onclick => "miqAjaxButton('#{url_for(:action => "create",
                :id     => "new",
                :button => "add")}');")
            = button_tag((t = _('Cancel')),
              :class => 'btn btn-default',
              :alt => t,
              :title => t,
              :onclick => "miqAjaxButton('#{url_for(:action => 'create',
                :id => 'new',
                :button => 'cancel')}');")
  - else
    = render(:partial => '/layouts/edit_form_buttons', :locals  => {:record_id => @host.id, :ajax_buttons => true})

  - unless session[:host_items].nil?
    %h3
      = pluralize(session[:host_items].length,Dictionary::gettext(Host.to_s, :type => :model, :notfound => :titleize))
      =_('Selected')
    =_('Click on a Host to fetch its settings')
    %table.admittable{:height => '75'}
      %tbody
        %tr
          %td
            - if session[:host_items]
              - @embedded = true
              - @gtl_type = @settings[:views][:host]
              = render :partial => 'layouts/gtl'

{'fraction_non_alphanumeric': 0.17455532107325897, 'fraction_numerical': 0.0051251130539644255, 'mean_word_length': 1.9241956809167033, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 95, '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': '4106034', 'n_tokens_mistral': 2169, 'n_tokens_neox': 2151, 'n_words': 376}