<commit_before><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- $I$ -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>History chart</title>
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
		<script type="text/javascript">
		  $(document).ready(function() {
        var options = {
          chart: {
            renderTo: 'container',
            type: 'spline',
            zoomType: 'x'
          },
          title: {
            text: 'Statusdashboard history'
          },
          subtitle: {
            text: 'Click and drag in the plot area to zoom in'
          },
          xAxis: {
            type: 'datetime',
            dateTimeLabelFormats: {
              month: '%e. %b',
              year: '%b'
            }
          },
          yAxis: {
            title: {
              text: 'Status'
            },
            min: -1,
            max: 3,
            labels: {
              formatter: function() {
                if (this.value == 2) return "UP";
                if (this.value == 1) return "CRITICAL";
                if (this.value == 0) return "DOWN";
                if (this.value == -1) return "UNKNOW";
                return "";
              }
            }
          },
          tooltip: {
            formatter: function() {
              var series = this.point.series;
              var unit = series.unit && series.unit[0];
              var format = '%A, %b %e, %Y, %H:%M:%S';
              if (unit == 'day') { // skip hours
                format = '%A, %b %e, %Y';
              }
              var msg = this.series.name.toUpperCase() + '<br/><b>' + Highcharts.dateFormat(format, this.x) + '</b>' + '<br/>Status: ';
              if (this.y == 2) return msg + "UP";
              if (this.y == 1) return msg + "CRITICAL";
              if (this.y == 0) return msg + "DOWN";
              if (this.y == -1) return msg + "UNKNOW";
              return msg + "??";
            }
          },
          series: []
        };
        $.getJSON('/api/history/all', function(data) {
          var i = 0;
          for (var name in data) {
            options.series[i] = {
              name : name,
              data : []
            };
            var items = data[name];
            for(item in items) {
              var status;
              switch(items[item].status) {
                case 'up':
                  status = 2;
                  break;
                case 'critical':
                  status = 1;
                  break;
                case 'down':
                  status = 0;
                  break;
                case 'unknown':
                  status = -1;
                  break;
              }
              options.series[i].data.push(new Array(items[item].time, status));
            }
            i = i + 1;
          }
          var chart = new Highcharts.Chart(options);
        });
		  });
		</script><commit_msg>history plugin: make links relative<commit_after><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- $I$ -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>History chart</title>
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
		<script type="text/javascript">
		  $(document).ready(function() {
        var options = {
          chart: {
            renderTo: 'container',
            type: 'spline',
            zoomType: 'x'
          },
          title: {
            text: 'Statusdashboard history'
          },
          subtitle: {
            text: 'Click and drag in the plot area to zoom in'
          },
          xAxis: {
            type: 'datetime',
            dateTimeLabelFormats: {
              month: '%e. %b',
              year: '%b'
            }
          },
          yAxis: {
            title: {
              text: 'Status'
            },
            min: -1,
            max: 3,
            labels: {
              formatter: function() {
                if (this.value == 2) return "UP";
                if (this.value == 1) return "CRITICAL";
                if (this.value == 0) return "DOWN";
                if (this.value == -1) return "UNKNOW";
                return "";
              }
            }
          },
          tooltip: {
            formatter: function() {
              var series = this.point.series;
              var unit = series.unit && series.unit[0];
              var format = '%A, %b %e, %Y, %H:%M:%S';
              if (unit == 'day') { // skip hours
                format = '%A, %b %e, %Y';
              }
              var msg = this.series.name.toUpperCase() + '<br/><b>' + Highcharts.dateFormat(format, this.x) + '</b>' + '<br/>Status: ';
              if (this.y == 2) return msg + "UP";
              if (this.y == 1) return msg + "CRITICAL";
              if (this.y == 0) return msg + "DOWN";
              if (this.y == -1) return msg + "UNKNOW";
              return msg + "??";
            }
          },
          series: []
        };
        $.getJSON('all', function(data) {
          var i = 0;
          for (var name in data) {
            options.series[i] = {
              name : name,
              data : []
            };
            var items = data[name];
            for(item in items) {
              var status;
              switch(items[item].status) {
                case 'up':
                  status = 2;
                  break;
                case 'critical':
                  status = 1;
                  break;
                case 'down':
                  status = 0;
                  break;
                case 'unknown':
                  status = -1;
                  break;
              }
              options.series[i].data.push(new Array(items[item].time, status));
            }
            i = i + 1;
          }
          var chart = new Highcharts.Chart(options);
        });
		  });
		</script>
{'fraction_non_alphanumeric': 0.14932486100079428, 'fraction_numerical': 0.010166799046862589, 'mean_word_length': 1.1284651791751183, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, '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': '1677845', 'n_tokens_mistral': 1895, 'n_tokens_neox': 1770, 'n_words': 419}