<commit_before><% title "Machine" %>

<div class="grid_12">
<%= action_links do %>
  <%= link_to 'Editer', edit_machine_path(@machine) %> |
  <%= link_to 'Supprimer', @machine, :confirm => t(:text_are_you_sure), :method => :delete %> |
  <%= link_to 'Retourner à la liste', machines_path %>
<% end %>
</div>

<div class="clear"></div>

<div id="machine_general" class="grid_3">
<table class="show_item full">
  <thead>
    <tr>
      <th colspan="2" class="machine_name">
        <%= @machine.name %>
        <% if @machine.virtual? %>
          <span class="virtual-machine">V</span>
        <% end %>
      </th>
    </tr>
  </thead>
  <%= show_for @machine do |s| %>
    <% if @machine.description.present? %>
    <tr class="wrapper machine_description">
      <td colspan="2">
        <label class="input">Description :</label><br />
        <%= @machine.description.capitalize %>
      </td>
    </tr>
    <% end %>
    <tr class="wrapper machine_ipaddresses">
      <td colspan="2">
        <label><%= t(:ipaddresses) %> :</label><br />
        <ul class="collection">
        <% @machine.ipaddresses.each do |ip| %>
          <li><%= ip %></li>
        <% end %>
        </ul>
      </td>
    </tr>
    <!--<%= s.attribute :server_type %>-->
    <%= s.attribute :operating_system %>
    <%= s.attribute :service %>
    <%= s.attribute :theme %>
    <!--<%= s.attribute :previous_name %>-->
  <% end %>
  <% unless @machine.virtual? %>
  <thead>
    <tr><th colspan="2">Maintenance</th></tr>
  </thead>
  <%= show_for @machine do |s| %>
    <%= s.attribute :mainteneur %>
    <%= s.attribute :delivered_on %>
    <%= s.attribute :maintained_until %>
    <%= s.attribute :contract_type %>
    <%= s.attribute :serial_number %>
  <% end %>
  <% end %>
</table>
</div>

<div id="machine_hardware" class="grid_3">
<table class="show_item full">
  <thead>
    <tr>
      <th colspan="2"><%= @machine.virtual? ? "Ressources" : "Matériel" %></th>
    </tr>
  </thead>
  <%= show_for @machine do |s| %>
    <%= s.attribute :physical_rack unless @machine.virtual? %>
    <%= s.attribute :fullmodel unless @machine.virtual? %>
    <%= s.attribute :cpu %>
    <%= s.attribute :memory %>
    <%= s.attribute :disks %>
    <%= s.attribute :media_drive unless @machine.virtual? %>
    <%= s.attribute :nb_rj45 %>
    <%= s.attribute :nb_fc %>
    <%= s.attribute :nb_iscsi %>
  <% end %>
</table>
</div>

<div id="machine_relations" class="grid_3">
<table class="show_item full">
  <thead>
    <tr><th colspan="2">Applications liées</th></tr>
  </thead>
  <%= show_for @machine do |s| %>
    <tr class="wrapper machine_applications">
      <td colspan="2">
        <ul>
        <% @machine.application_instances.each do |instance| %>
          <li><%= link_to instance.fullname, instance.application %></li>
        <% end %>
        </ul>
      </td>
    </tr>
  <% end %>
</table><commit_msg>Added message to tell if there's no application instance for a machine<commit_after><% title "Machine" %>

<div class="grid_12">
<%= action_links do %>
  <%= link_to 'Editer', edit_machine_path(@machine) %> |
  <%= link_to 'Supprimer', @machine, :confirm => t(:text_are_you_sure), :method => :delete %> |
  <%= link_to 'Retourner à la liste', machines_path %>
<% end %>
</div>

<div class="clear"></div>

<div id="machine_general" class="grid_3">
<table class="show_item full">
  <thead>
    <tr>
      <th colspan="2" class="machine_name">
        <%= @machine.name %>
        <% if @machine.virtual? %>
          <span class="virtual-machine">V</span>
        <% end %>
      </th>
    </tr>
  </thead>
  <%= show_for @machine do |s| %>
    <% if @machine.description.present? %>
    <tr class="wrapper machine_description">
      <td colspan="2">
        <label class="input">Description :</label><br />
        <%= @machine.description.capitalize %>
      </td>
    </tr>
    <% end %>
    <tr class="wrapper machine_ipaddresses">
      <td colspan="2">
        <label><%= t(:ipaddresses) %> :</label><br />
        <ul class="collection">
        <% @machine.ipaddresses.each do |ip| %>
          <li><%= ip %></li>
        <% end %>
        </ul>
      </td>
    </tr>
    <!--<%= s.attribute :server_type %>-->
    <%= s.attribute :operating_system %>
    <%= s.attribute :service %>
    <%= s.attribute :theme %>
    <!--<%= s.attribute :previous_name %>-->
  <% end %>
  <% unless @machine.virtual? %>
  <thead>
    <tr><th colspan="2">Maintenance</th></tr>
  </thead>
  <%= show_for @machine do |s| %>
    <%= s.attribute :mainteneur %>
    <%= s.attribute :delivered_on %>
    <%= s.attribute :maintained_until %>
    <%= s.attribute :contract_type %>
    <%= s.attribute :serial_number %>
  <% end %>
  <% end %>
</table>
</div>

<div id="machine_hardware" class="grid_3">
<table class="show_item full">
  <thead>
    <tr>
      <th colspan="2"><%= @machine.virtual? ? "Ressources" : "Matériel" %></th>
    </tr>
  </thead>
  <%= show_for @machine do |s| %>
    <%= s.attribute :physical_rack unless @machine.virtual? %>
    <%= s.attribute :fullmodel unless @machine.virtual? %>
    <%= s.attribute :cpu %>
    <%= s.attribute :memory %>
    <%= s.attribute :disks %>
    <%= s.attribute :media_drive unless @machine.virtual? %>
    <%= s.attribute :nb_rj45 %>
    <%= s.attribute :nb_fc %>
    <%= s.attribute :nb_iscsi %>
  <% end %>
</table>
</div>

<div id="machine_relations" class="grid_3">
<table class="show_item full">
  <thead>
    <tr><th colspan="2">Applications liées</th></tr>
  </thead>
  <%= show_for @machine do |s| %>
    <tr class="wrapper machine_applications">
      <td colspan="2">
        <% if @machine.application_instances.any? %>
        <ul>
        <% @machine.application_instances.each do |instance| %>
          <li><%= link_to instance.fullname, instance.application %></li>
        <% end %>
        </ul>
        <% else %>
          Pas d'instance liée.
        <% end %>
      </td>
    </tr>
  <% end %>
</table>
{'fraction_non_alphanumeric': 0.2115966386554622, 'fraction_numerical': 0.004705882352941176, 'mean_word_length': 2.795280612244898, 'pattern_counts': {'":': 0, '<': 242, '<?xml version=': 0, '>': 246, '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': '1860375', 'n_tokens_mistral': 2281, 'n_tokens_neox': 2035, 'n_words': 421}