<commit_before><style><%= stylesheet %></style>

<div id="monittr">

  <p id="toggle">+ Expand all</p>

  <% cluster.servers.each do |server| %>

    <div class="server rounded">
      <h2 class="rounded">
        <strong>
          <span title="status" class="dot status <%= server.system.status == 0 ? 'running' : 'failure' %>">&middot;</span>
          <span title="monitored" class="dot monitored <%= server.system.monitored == 1 ? 'running' : 'failure' %>">&middot;</span>
          <a href="<%= server.url %>"><%= server.system.name %></a>
          <%= "<em>#{server.system.message}</em>" if server.system.message %>
        </strong>

        <small>
          <span class="info"><span class="label">load:   </span><%= server.system.load   || 'N/A' %></span>
          <span class="info"><span class="label">cpu:    </span><%= server.system.cpu    || 'N/A' %></span>
          <span class="info"><span class="label">memory: </span><%= server.system.memory || 'N/A' %></span>
          <span class="info"><span class="label">swap:   </span><%= server.system.swap   || 'N/A' %></span>
          <span class="info"><span class="label">uptime: </span><%= time_in_words(server.system.uptime) || 'N/A' %></span>
        </small>
      </h2>

      <div class="content">
        <div class="segment filesystems">
          <h3>Filesystem</h3>
          <ul class="clearfix">
            <% server.filesystems.each do |fs| %>
            <li>
              <strong title="(<%= fs.usage %> of <%= fs.total %>)">
                <span class="dot status <%= fs.status == 0 ? 'running' : 'failure' %>">&middot;</span>
                <span class="dot monitored <%= fs.monitored == 1 ? 'running' : 'failure' %>">&middot;</span>
                <%= fs.name %>
              </strong>
              <%= fs.percent %>%  
            </li>
            <% end %>
          </ul>
          <div class="clear"></div>
        </div><!-- /filesystems -->

        <div class="segment processes">
          <h3>Processes</h3>
          <ul>
            <% server.processes.each do |process| %>
            <li>
              <strong>
                <span class="dot status <%= process.status == 0 ? 'running' : 'failure' %>">&middot;</span>
                <span class="dot monitored <%= process.monitored == 1 ? 'running' : 'failure' %>">&middot;</span>
                <%= process.name %>
                <% unless process.monitored == 1 %><span class="label warning">NOT MONITORED</span><% end %>
              </strong>

              <small>
                <span class="info"><span class="label">cpu:    </span><%= process.cpu    || 'N/A' %></span>
                <span class="info"><span class="label">memory: </span><%= process.memory || 'N/A' %></span>
                <span class="info"><span class="label">uptime: </span><%= time_in_words(process.uptime) || 'N/A' %></span>
              </small>
            </li>
            <% end %>
          </ul>
          <div class="clear"></div>
        </div><!-- /processes -->

        <div class="segment hosts">
          <h3>Hosts</h3>
          <ul>
            <% server.hosts.each do |host| %>
            <li>
              <strong>
                <span class="dot status <%= host.status == 0 ? 'running' : 'failure' %>">&middot;</span>
                <span class="dot monitored <%= host.monitored == 1 ? 'running' : 'failure' %>">&middot;</span>
                <%= host.name %>
                <% unless host.monitored == 1 %><span class="label warning">NOT MONITORED</span><% end %>
              </strong>

              <small>
                <span class="info"><span class="label">response time: </span><%= host.response_time  || 'N/A' %></span>
              </small>
            </li>
            <% end %>
          </ul>
          <div class="clear"></div>
        </div><!-- /hosts -->

      </div><!-- /content -->

      <div class="clear"></div>
    </div><!-- /server -->
  <% end %>

  <div class="clear"></div>
</div><!-- /monittr -->

<script>if ('undefined' == typeof jQuery) { document.write("<script type=\"text/javascript\"   src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js\"></"+"script>"); }</script>

<script>
$(function() {
  $('#monittr .server .content').hide();

  $('#monittr .server').bind('expand', function() {
    $(this).addClass('expanded').find('.content').show('fast', function() { });
  });
  $('#monittr .server').bind('collapse', function() {
    $(this).removeClass('expanded').find('.content').hide('fast', function() { });
  });

  $('#monittr .server h2').toggle(
    function() { $(this).parent().trigger('expand') },
    function() { $(this).parent().trigger('collapse') }
  );

  $('#toggle').toggle(
    function() {
      $('#monittr .server').trigger('expand');
      $(this).html('- Collapse all');
    },<commit_msg>[FIX] Fix jQuery handler for expand/collapse so we can click on links in headers<commit_after><style><%= stylesheet %></style>

<div id="monittr">

  <p id="toggle">+ Expand all</p>

  <% cluster.servers.each do |server| %>

    <div class="server rounded">
      <h2 class="rounded">
        <strong>
          <span title="status" class="dot status <%= server.system.status == 0 ? 'running' : 'failure' %>">&middot;</span>
          <span title="monitored" class="dot monitored <%= server.system.monitored == 1 ? 'running' : 'failure' %>">&middot;</span>
          <a href="<%= server.url %>"><%= server.system.name %></a>
          <%= "<em>#{server.system.message}</em>" if server.system.message %>
        </strong>

        <small>
          <span class="info"><span class="label">load:   </span><%= server.system.load   || 'N/A' %></span>
          <span class="info"><span class="label">cpu:    </span><%= server.system.cpu    || 'N/A' %></span>
          <span class="info"><span class="label">memory: </span><%= server.system.memory || 'N/A' %></span>
          <span class="info"><span class="label">swap:   </span><%= server.system.swap   || 'N/A' %></span>
          <span class="info"><span class="label">uptime: </span><%= time_in_words(server.system.uptime) || 'N/A' %></span>
        </small>
      </h2>

      <div class="content">
        <div class="segment filesystems">
          <h3>Filesystem</h3>
          <ul class="clearfix">
            <% server.filesystems.each do |fs| %>
            <li>
              <strong title="(<%= fs.usage %> of <%= fs.total %>)">
                <span class="dot status <%= fs.status == 0 ? 'running' : 'failure' %>">&middot;</span>
                <span class="dot monitored <%= fs.monitored == 1 ? 'running' : 'failure' %>">&middot;</span>
                <%= fs.name %>
              </strong>
              <%= fs.percent %>%  
            </li>
            <% end %>
          </ul>
          <div class="clear"></div>
        </div><!-- /filesystems -->

        <div class="segment processes">
          <h3>Processes</h3>
          <ul>
            <% server.processes.each do |process| %>
            <li>
              <strong>
                <span class="dot status <%= process.status == 0 ? 'running' : 'failure' %>">&middot;</span>
                <span class="dot monitored <%= process.monitored == 1 ? 'running' : 'failure' %>">&middot;</span>
                <%= process.name %>
                <% unless process.monitored == 1 %><span class="label warning">NOT MONITORED</span><% end %>
              </strong>

              <small>
                <span class="info"><span class="label">cpu:    </span><%= process.cpu    || 'N/A' %></span>
                <span class="info"><span class="label">memory: </span><%= process.memory || 'N/A' %></span>
                <span class="info"><span class="label">uptime: </span><%= time_in_words(process.uptime) || 'N/A' %></span>
              </small>
            </li>
            <% end %>
          </ul>
          <div class="clear"></div>
        </div><!-- /processes -->

        <div class="segment hosts">
          <h3>Hosts</h3>
          <ul>
            <% server.hosts.each do |host| %>
            <li>
              <strong>
                <span class="dot status <%= host.status == 0 ? 'running' : 'failure' %>">&middot;</span>
                <span class="dot monitored <%= host.monitored == 1 ? 'running' : 'failure' %>">&middot;</span>
                <%= host.name %>
                <% unless host.monitored == 1 %><span class="label warning">NOT MONITORED</span><% end %>
              </strong>

              <small>
                <span class="info"><span class="label">response time: </span><%= host.response_time  || 'N/A' %></span>
              </small>
            </li>
            <% end %>
          </ul>
          <div class="clear"></div>
        </div><!-- /hosts -->

      </div><!-- /content -->

      <div class="clear"></div>
    </div><!-- /server -->
  <% end %>

  <div class="clear"></div>
</div><!-- /monittr -->

<script>if ('undefined' == typeof jQuery) { document.write("<script type=\"text/javascript\"   src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js\"></"+"script>"); }</script>

<script>
$(function() {
  $('#monittr .server .content').hide();

  $('#monittr .server').bind('expand', function() {
    $(this).addClass('expanded').find('.content').show('fast', function() { });
  });
  $('#monittr .server').bind('collapse', function() {
    $(this).removeClass('expanded').find('.content').hide('fast', function() { });
  });

  $('#monittr .server h2').click(
    function(event) {
      if ( event.target != this ) return true; // Enable clicking on links
      $(this).parent().hasClass('expanded') ? $(this).parent().trigger('collapse') : $(this).parent().trigger('expand');
  });


  $('#toggle').toggle(
    function() {
      $('#monittr .server').trigger('expand');
      $(this).html('- Collapse all');
    },
{'fraction_non_alphanumeric': 0.22762744501874937, 'fraction_numerical': 0.004459308807134894, 'mean_word_length': 2.1317042208822596, 'pattern_counts': {'":': 0, '<': 343, '<?xml version=': 0, '>': 343, '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': '104411', 'n_tokens_mistral': 3207, 'n_tokens_neox': 2950, 'n_words': 608}