<commit_before>= render "intro"



.toolbar
  / / seach form
  %form
    .inputwrapper
      = select_tag 'searchfor', options_for_select(['Name', 'ID', 'IP', 'Status'], @searchfor)
      .toolbar-input-divider
      .input-group
        .has-feedback.has-feedback-searchable
          %input.form-control{:id => "search", :name => 'search', :placeholder => "Name, ID, IP or Status", :type => "text", :size => 40, :value => @search }
            .span.form-control-feedback.not-empty
              %button.btn.btn-sm{:type => 'button', :onclick => "$('#search').val('');"}
                %i.fa.fa-times-circle
        .span.input-group-btn
          %button.btn.btn-default{type: "submit"}
            %i.fa.fa-search
      %a.help-link.has-feedback-help{href: "#", data: {toggle: "popover", "popover-type": "help-hint", content: 'ID and Status (Active, Shutoff, ...) are searched exactly with the given term. A Name and Fixed IP search gives as result all Servers where the term is contained'}}
        %i.fa.fa-question-circle


  - if current_user.is_allowed?("compute:instance_create", {target: { project: @active_project, scoped_domain_name: @scoped_domain_name}})
    .main-buttons
      = link_to 'Create new', plugin('compute').new_instance_path, data: {modal: true}, class: 'btn btn-primary'

-# add searchable plugin to instances table (identified by css class searchable)
%table.table.instances
  %thead
    %tr
      %th.snug
      %th
        Name / AZ
        %i.fa.fa-fw.fa-info-circle{data: { toggle: "tooltip", placement: "top", title: "Availability Zone"}}
      - if @all_projects
        %th Owning Project
      -# %th
      -#   AZ
      -#   %i.fa.fa-fw.fa-info-circle{data: { toggle: "tooltip", placement: "top", title: "Availability Zone"}}
      %th IPs
      %th
        OS / Size
      -# %th Size
      %th Power state
      %th Status
      %th Created at
      %th.snug
  %tbody
    - if @instances.empty?<commit_msg>Fix new server search markup so that it also works in Safari.<commit_after>= render "intro"


%form
  .toolbar.toolbar-controlcenter
    / / seach form
    .inputwrapper
      = select_tag 'searchfor', options_for_select(['Name', 'ID', 'IP', 'Status'], @searchfor), class: "form-control"

    .inputwrapper
      .input-group.has-feedback.has-feedback-searchable
        %input.form-control{:id => "search", :name => 'search', :placeholder => "Name, ID, IP or Status", :type => "text", :size => 40, :value => @search }
        .span.input-group-btn
          %button.btn.btn-default{type: "submit"}
            %i.fa.fa-search
    %a.help-link.has-feedback-help{href: "#", data: {toggle: "popover", "popover-type": "help-hint", content: 'Search by name and fixed IP will find exact or partial matches. ID and status have to be exact matches to be found.'}}
      %i.fa.fa-question-circle

    - if current_user.is_allowed?("compute:instance_create", {target: { project: @active_project, scoped_domain_name: @scoped_domain_name}})
      .main-buttons
        = link_to 'Create new', plugin('compute').new_instance_path, data: {modal: true}, class: 'btn btn-primary'

-# add searchable plugin to instances table (identified by css class searchable)
%table.table.instances
  %thead
    %tr
      %th.snug
      %th
        Name / AZ
        %i.fa.fa-fw.fa-info-circle{data: { toggle: "tooltip", placement: "top", title: "Availability Zone"}}
      - if @all_projects
        %th Owning Project
      -# %th
      -#   AZ
      -#   %i.fa.fa-fw.fa-info-circle{data: { toggle: "tooltip", placement: "top", title: "Availability Zone"}}
      %th IPs
      %th
        OS / Size
      -# %th Size
      %th Power state
      %th Status
      %th Created at
      %th.snug
  %tbody
    - if @instances.empty?
{'fraction_non_alphanumeric': 0.15310749533208856, 'fraction_numerical': 0.0010669511869831954, 'mean_word_length': 2.654970760233918, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 17, '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': '978761', 'n_tokens_mistral': 1238, 'n_tokens_neox': 1199, 'n_words': 316}