<commit_before><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/">
    <xi:include href="header.html" />
  <head>
    <title py:if="multice">Grid Overview</title>
    <title py:if="not multice">HTCondor-CE Overview</title>
    <script type='text/javascript'>
//<![CDATA[
        google.load('visualization', '1', {packages:['table', 'controls']});
        $(document).ready(function() {
            load_data();
            setInterval(load_data, 300000);
        });

        function load_data() {
            $.get('/json/totals', got_totals);
            $.get('/json/pilots', got_pilots);
            if("${multice}" != "False") {
                $.get('/json/schedds', got_schedds);
            } else {
                $.get('/json/schedd', got_info);
            }
        }

        function got_totals(data) {

            $('#overall_stats_table').detach();
            schedd_stats_table = $("<table></table>");
            schedd_stats_table.addClass("table");
            schedd_stats_table.attr('id', 'overall_stats_table');
            schedd_stats_table.append("<tr><th>Running</th><th>Idle</th><th>Held</th><th>Last Data Update</th>");
            schedd_stats_table.append("<tr><td>" + data.Running + "</td><td>" + data.Idle + "</td><td>" + data.Held + "</td><td>" + Date(data.UpdateDate).toLocaleString() + "</td></tr>");
            $("#schedd_stats_table").append(schedd_stats_table);
        }

        function got_info(data) {

          $('#info_table_inner').detach();
          info_table = $("<table></table>");
          info_table.addClass("table");
          info_table.attr("id", "info_table_inner");
          $.getJSON("/json/tableattribs", function(attribs) {
              console.log(attribs);
              attribs.forEach(function(it) {
                  info_table.append("<tr><td>" + it.label + "</td><td>" + data[it.attrib] + "</td></tr>");
              });
          });
          $("#info_table").append(info_table);

        }

        function got_schedds(data) {
          $('#info_table_inner').detach();
          info_table = $("<table></table>");
          info_table.addClass("table");
          info_table.addClass("tablesorter");
          info_table.attr("id", "info_table_inner");
          $.getJSON("/json/tableattribs", function(attribs) {
            info_table.append("<thead>");
            info_table.append("<th>CE</th>");
            attribs.forEach(function(it) {
                info_table.append("<th>" + it.label + "</th>");
            });
            info_table.append("</thead>");

            info_table.append("<tbody>");
            for (name in data) {
                key = data[name]
                info_table.append("<tr>");
                info_table.append("<td>" + name + "</td>");
                attribs.forEach(function(it) {
                    info_table.append("<td>" + key[it.attrib] + "</td>");
                });
                info_table.append("</tr>");
            }
            info_table.append("</tbody>");
          });
          $("#info_table").append(info_table);

          $("#info_table_inner").tablesorter({<commit_msg>CEView template fixes for Info table<commit_after><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/">
    <xi:include href="header.html" />
  <head>
    <title py:if="multice">Grid Overview</title>
    <title py:if="not multice">HTCondor-CE Overview</title>
    <script type='text/javascript'>
//<![CDATA[
        google.load('visualization', '1', {packages:['table', 'controls']});
        $(document).ready(function() {
            load_data();
            setInterval(load_data, 300000);
        });

        function load_data() {
            $.get('/json/totals', got_totals);
            $.get('/json/pilots', got_pilots);
            if("${multice}" != "False") {
                $.when(
                    $.get('/json/schedds'),
                    $.get('/json/tableattribs'),
                ).then(function(a1, a2) { got_schedds(a1[0], a2[0]) });
            } else {
                $.get('/json/schedd', got_info);
            }
        }

        function got_totals(data) {

            $('#overall_stats_table').detach();
            schedd_stats_table = $("<table></table>");
            schedd_stats_table.addClass("table");
            schedd_stats_table.attr('id', 'overall_stats_table');
            schedd_stats_table.append("<tr><th>Running</th><th>Idle</th><th>Held</th><th>Last Data Update</th>");
            schedd_stats_table.append("<tr><td>" + data.Running + "</td><td>" + data.Idle + "</td><td>" + data.Held + "</td><td>" + Date(data.UpdateDate).toLocaleString() + "</td></tr>");
            $("#schedd_stats_table").append(schedd_stats_table);
        }

        function got_info(data) {

          $('#info_table_inner').detach();
          info_table = $("<table></table>");
          info_table.addClass("table");
          info_table.attr("id", "info_table_inner");
          $.getJSON("/json/tableattribs", function(attribs) {
              console.log(attribs);
              attribs.forEach(function(it) {
                  info_table.append("<tr><td>" + it.label + "</td><td>" + data[it.attrib] + "</td></tr>");
              });
          });
          $("#info_table").append(info_table);

        }

        function got_schedds(data, attribs) {
          $('#info_table_inner').detach();
          info_table = $("<table></table>");
          info_table.addClass("table");
          info_table.addClass("tablesorter");
          info_table.attr("id", "info_table_inner");

          thead = $('<thead>');
          row = $('<tr/>');
          row.append("<th>CE</th>");
          attribs.forEach(function(it) {
              row.append("<th>" + it.label + "</th>");
          });
          thead.append(row);
          info_table.append(thead);

          tbody = $('<tbody/>');
          for (name in data) {
              key = data[name]
              row = $('<tr/>');
              row.append("<td>" + name + "</td>");
              attribs.forEach(function(it) {
                  row.append("<td>" + key[it.attrib] + "</td>");
              });
              tbody.append(row);
          }
          info_table.append(tbody);

          $("#info_table").append(info_table);

          $("#info_table_inner").tablesorter({
{'fraction_non_alphanumeric': 0.19979016786570744, 'fraction_numerical': 0.008393285371702638, 'mean_word_length': 2.0498171846435103, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 109, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 6}, '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': '3473792', 'n_tokens_mistral': 2152, 'n_tokens_neox': 2052, 'n_words': 256}