collapsing all of dr_botzo one directory

This commit is contained in:
2017-02-04 11:48:55 -06:00
parent 38d14bb0d2
commit cd23f062a9
194 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
{% extends 'base.html' %}
{% load static %}
{% block extra_media %}
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/t/bs/jqc-1.12.0,dt-1.10.11/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/t/bs/jqc-1.12.0,dt-1.10.11/datatables.min.js"></script>
{% endblock %}
{% block title %}karma{% endblock %}
{% block content %}
<div style="width: 75%; margin-left: auto; margin-right: auto;">
<table id="karma" class="display table table-striped table-bordered" cellspacing="0" width="100%">
<thead>
<tr>
<th>Key</th>
<th>Score</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Key</th>
<th>Score</th>
</tr>
</tfoot>
<tbody>
{% for entry in entries %}
<tr>
<td><a href="{% url 'karma_key_detail' entry.key %}">{{ entry.key }}</a></td>
<td>{{ entry.score }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#karma').DataTable( {
"order": [[ 1, "desc" ]],
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
} );
} );
</script>
{% endblock %}

View File

@@ -0,0 +1,67 @@
{% extends 'base.html' %}
{% load static %}
{% block extra_media %}
<script type="text/javascript" src="{% get_static_prefix %}js/Chart.min.js"></script>
{% endblock %}
{% block title %}karma: {{ entry.key }}{% endblock %}
{% block content %}
<h3>{{ entry.key }}</h3>
<canvas id="karma_history"></canvas>
<script type="text/javascript">
Chart.defaults.global.responsive = true;
Chart.defaults.global.maintainAspectRatio = true;
Chart.types.Line.extend({name : "AltLine",
initialize : function(data) {
Chart.types.Line.prototype.initialize.apply(this, arguments);
this.scale.draw = function() {
if (this.display && (this.xLabelRotation > 90)) {
this.endPoint = this.height - 5;
}
Chart.Scale.prototype.draw.apply(this, arguments);
};
}
});
var ctx = $("#karma_history").get(0).getContext("2d");
var data = {
labels: [{% for x in entry_history %}"{{ x.0 }}", {% endfor %}],
datasets: [
{
label: "{{ entry.key }}",
fillColor: "rgba(150,150,220,0.2)",
strokeColor: "rgba(100,100,220,1)",
pointColor: "rgba(50,50,220,1)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(220,220,220,1)",
data: [{% for x in entry_history %}{{ x.2 }}, {% endfor %}]
}
]
};
var myLineChart = new Chart(ctx).AltLine(data, {
pointDot: false,
{% if entry_history|length > 100 %}
showTooltips: false,
scaleShowVerticalLines: false,
{% endif %}
tooltipEvents: ["click"]
});
</script>
<h5>Log</h5>
<table border="1px">
<tr>
<th>Date</th>
<th>Delta</th>
<th>Score</th>
</tr>
{% for delta in entry_history %}
<tr>
<td>{{ delta.0 }}</td>
<td>{{ delta.1 }}</td>
<td>{{ delta.2 }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}