<commit_before>{% extends 'base.html' %}

{% block content %}
<div class="row">
  <div class="col-xs-12">
    <div class="col-xs-1"><h2><i class="glyphicon glyphicon-{% if result.check.polymorphic_ctype.model == 'graphitestatuscheck' %}signal{% elif result.check.polymorphic_ctype.model == 'httpstatuscheck' %}arrow-up{% elif result.check.polymorphic_ctype.model == 'jenkinsstatuscheck' %}ok{% endif %}"></i></h2></div>
    <div class="col-xs-9">
      <h2>Check result: <a href="{% url check result.check.id %}">{{ result.check.name }}</a></h2>
    </div>
    <div class="col-xs-2 text-right"><h2><span class="label label-{% if result.succeeded %}success{% else %}danger{% endif %}">{{ result.status|capfirst }}</span></h2></div>
  </div>
  <div class="col-xs-12">
    <table class="table table-striped table-bordered">
      <tbody>
        <tr><th>Name</th><td>{{ result.check.name }}</td></tr>

        <tr><th>Status</th><td>{{ result.status|capfirst }}</td></tr>
        <tr><th>Time started</th><td>{{ result.time }}</td></tr>
        <tr><th>Time complete</th><td>{{ result.time_complete }}</td></tr>
        <tr><th>Took</th><td>{{ result.took }}ms</td></tr>
        <tr><th>Error</th><td>{{ result.error }}</td></tr>
        <tr><th>Raw data</th><td><div id="graph" style="height: 200px; width:100%;"></div><pre>{{ result.raw_data }}</pre></td></tr>
      </tbody>
    </table>
  </div>
</div>

{% endblock %}

{% block js %}
{% load compress %}
{{ block.super }}
<script type="text/javascript">
window.DATA = {{ result.raw_check_data|safe }};
</script>
{% compress js %}
<script type="text/javascript" src="{{ STATIC_URL }}arachnys/js/raphael.js"></script>
<script type="text/coffeescript">
kvs = []
labels = []
for series in window.DATA
  label = series.target
  labels.push label
  for point in series.datapoints
    tmp = {}
    tmp['time'] = point[1]*1000
    tmp[label] = point[0]
    kvs.push tmp

Morris.Line
  element: 'graph'
  data: kvs
  xkey: 'time'
  ykeys: labels
  labels: (label[0..20] for label in labels)
  hideHover: true
</script>
{% endcompress %}
{% endblock js %}<commit_msg>Changed result.raw_check_data to result.raw_data. StatusCheckResults don't have raw_check_data.<commit_after>{% extends 'base.html' %}

{% block content %}
<div class="row">
  <div class="col-xs-12">
    <div class="col-xs-1"><h2><i class="glyphicon glyphicon-{% if result.check.polymorphic_ctype.model == 'graphitestatuscheck' %}signal{% elif result.check.polymorphic_ctype.model == 'httpstatuscheck' %}arrow-up{% elif result.check.polymorphic_ctype.model == 'jenkinsstatuscheck' %}ok{% endif %}"></i></h2></div>
    <div class="col-xs-9">
      <h2>Check result: <a href="{% url check result.check.id %}">{{ result.check.name }}</a></h2>
    </div>
    <div class="col-xs-2 text-right"><h2><span class="label label-{% if result.succeeded %}success{% else %}danger{% endif %}">{{ result.status|capfirst }}</span></h2></div>
  </div>
  <div class="col-xs-12">
    <table class="table table-striped table-bordered">
      <tbody>
        <tr><th>Name</th><td>{{ result.check.name }}</td></tr>

        <tr><th>Status</th><td>{{ result.status|capfirst }}</td></tr>
        <tr><th>Time started</th><td>{{ result.time }}</td></tr>
        <tr><th>Time complete</th><td>{{ result.time_complete }}</td></tr>
        <tr><th>Took</th><td>{{ result.took }}ms</td></tr>
        <tr><th>Error</th><td>{{ result.error }}</td></tr>
        <tr><th>Raw data</th><td><div id="graph" style="height: 200px; width:100%;"></div><pre>{{ result.raw_data }}</pre></td></tr>
      </tbody>
    </table>
  </div>
</div>

{% endblock %}

{% block js %}
{% load compress %}
{{ block.super }}
<script type="text/javascript">
window.DATA = {{ result.raw_data|safe }};
</script>
{% compress js %}
<script type="text/javascript" src="{{ STATIC_URL }}arachnys/js/raphael.js"></script>
<script type="text/coffeescript">
kvs = []
labels = []
for series in window.DATA
  label = series.target
  labels.push label
  for point in series.datapoints
    tmp = {}
    tmp['time'] = point[1]*1000
    tmp[label] = point[0]
    kvs.push tmp

Morris.Line
  element: 'graph'
  data: kvs
  xkey: 'time'
  ykeys: labels
  labels: (label[0..20] for label in labels)
  hideHover: true
</script>
{% endcompress %}
{% endblock js %}

{'fraction_non_alphanumeric': 0.22561117578579745, 'fraction_numerical': 0.013038416763678696, 'mean_word_length': 3.9322617680826637, 'pattern_counts': {'":': 0, '<': 163, '<?xml version=': 0, '>': 163, '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': '3429747', 'n_tokens_mistral': 1648, 'n_tokens_neox': 1516, 'n_words': 315}