<commit_before>  <tr class="fix-on-scroll">
    <th><%= t(:application) %></th>
    <th><%= t(:servers) %></th>
    <th><%= t(:applicaiton_instances) %></th>
    <th>JVM</th>
    <th><%= t(:cerbere) %></th>
    <th><%= t(:crons) %></th>
    <th><%= t(:database_short) %></th>
  </tr>
  <% @tomcats.sort_by do |t|
       [ t.dns, t.server.name.split("-").last.to_i, t.name.split("_").last.to_i ]
     end.group_by(&:dns).each do |dns,tomcats|%>
  <tr>
    <% tomcat = tomcats.first %>
    <% cronjobs = tomcats.map(&:cronjobs).flatten %>
    <td>
      <%= tomcat.dns %>
      <% vips = tomcats.map(&:vip).compact %>
      <% if vips.present? %>
        <ul class="tomcat_vips">
          <%= vips.sort.uniq.map{|n| "<li>via #{n}</li>"}.join("\n").html_safe %>
        </ul>
      <% end %>
    </td>
    <td class="center">
      <%= tomcats.map{|t| link_to_server_if_exists t.server}.sort.uniq.join("<br/>").html_safe %>
    </td>
    <td class="center">
      <%= tomcats.map(&:name).sort.uniq.join("<br/>").html_safe %>
    </td>
    <td class="center">
      <%= tomcats.map(&:java_version).sort.uniq.join("<br/>").html_safe %>
      <p class="details">
        <%= tomcats.map{|t| "#{t.java_xms} / #{t.java_xmx}"}.sort.uniq.join("<br/>").html_safe %>
      </p>
    </td>
    <td class="center">
      <% if tomcat.cerbere %>
        <%= image_tag("lock.png", size: "16x16") %><br />
        <span class="<%= tomcat.cerbere_csac ? "csacok" : "csacko" %>">csac</span>
      <% end %>
    </td>
    <td class="center">
      <% if cronjobs.any? %>
        <%= link_to image_tag("stopwatch_start.png", size: "16x16", class: "inline"),
                    "##{tomcat.dns.parameterize}", rel: "facebox" %><%= content_tag(:span, "×#{cronjobs.size}", class: "tinier") if cronjobs.size > 1 %>
       <%= render partial: "cronjobs/cron_collection",
                  locals: {title: "Crons #{tomcat.dns}", html_id: tomcat.dns.parameterize, crons: cronjobs,
                              context: "Tous les crons: " +
                                          cronjobs.map(&:server).uniq.sort_by(&:name).map do |s|
                                            link_to(s.name, cronjobs_path(by_server: s.id))
                                          end.join(" ").html_safe } %>
      <% end %><commit_msg>Don't display jvm parameters if none<commit_after>  <tr class="fix-on-scroll">
    <th><%= t(:application) %></th>
    <th><%= t(:servers) %></th>
    <th><%= t(:applicaiton_instances) %></th>
    <th>JVM</th>
    <th><%= t(:cerbere) %></th>
    <th><%= t(:crons) %></th>
    <th><%= t(:database_short) %></th>
  </tr>
  <% @tomcats.sort_by do |t|
       [ t.dns, t.server.name.split("-").last.to_i, t.name.split("_").last.to_i ]
     end.group_by(&:dns).each do |dns,tomcats|%>
  <tr>
    <% tomcat = tomcats.first %>
    <% cronjobs = tomcats.map(&:cronjobs).flatten %>
    <td>
      <%= tomcat.dns %>
      <% vips = tomcats.map(&:vip).compact %>
      <% if vips.present? %>
        <ul class="tomcat_vips">
          <%= vips.sort.uniq.map{|n| "<li>via #{n}</li>"}.join("\n").html_safe %>
        </ul>
      <% end %>
    </td>
    <td class="center">
      <%= tomcats.map{|t| link_to_server_if_exists t.server}.sort.uniq.join("<br/>").html_safe %>
    </td>
    <td class="center">
      <%= tomcats.map(&:name).sort.uniq.join("<br/>").html_safe %>
    </td>
    <td class="center">
      <%= tomcats.map(&:java_version).sort.uniq.join("<br/>").html_safe %>
      <% jvm_params = tomcats.map{|t| "#{t.java_xms} / #{t.java_xmx}" if t.java_xms.present? || t.java_xmx.present? }.sort.uniq.join("<br/>").html_safe %>
      <% if jvm_params.present? %>
        <p class="details"><%= jvm_params %></p>
      <% end %>
    </td>
    <td class="center">
      <% if tomcat.cerbere %>
        <%= image_tag("lock.png", size: "16x16") %><br />
        <span class="<%= tomcat.cerbere_csac ? "csacok" : "csacko" %>">csac</span>
      <% end %>
    </td>
    <td class="center">
      <% if cronjobs.any? %>
        <%= link_to image_tag("stopwatch_start.png", size: "16x16", class: "inline"),
                    "##{tomcat.dns.parameterize}", rel: "facebox" %><%= content_tag(:span, "×#{cronjobs.size}", class: "tinier") if cronjobs.size > 1 %>
       <%= render partial: "cronjobs/cron_collection",
                  locals: {title: "Crons #{tomcat.dns}", html_id: tomcat.dns.parameterize, crons: cronjobs,
                              context: "Tous les crons: " +
                                          cronjobs.map(&:server).uniq.sort_by(&:name).map do |s|
                                            link_to(s.name, cronjobs_path(by_server: s.id))
                                          end.join(" ").html_safe } %>
      <% end %>
{'fraction_non_alphanumeric': 0.23023402909550916, 'fraction_numerical': 0.003795066413662239, 'mean_word_length': 2.249315068493151, 'pattern_counts': {'":': 0, '<': 142, '<?xml version=': 0, '>': 144, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1341893', 'n_tokens_mistral': 1909, 'n_tokens_neox': 1753, 'n_words': 276}