Fix graph creation following tests

This commit is contained in:
root 2020-11-05 22:06:25 +00:00
parent dfbd7250d2
commit 317df3d148
3 changed files with 9 additions and 13 deletions

View file

@ -77,9 +77,9 @@ def appci_app(app):
if "Malformed path" in tests:
tests.remove("Malformed path")
history_file = "./app/scripts/appListsHistory/per_app/history_%s.json" % app
history_file = "./app/scripts/appListsHistory/per_app/history_%s.json" % app.name
if os.path.exists(history_file):
history = json.loads(open("./app/scripts/appListsHistory/count_history.json").read())
history = json.loads(open(history_file).read())
else:
history = []

File diff suppressed because one or more lines are too long

View file

@ -126,14 +126,11 @@
</div>
<div class="row">
<div class="mx-auto">
<div class="col-sm-6 offset-sm-3 mt-3">
<div id="levelHistory" style="height: 270px;"></div>
</div>
</div>
{% endblock %}
<script src="{{ url_for('static', filename='js/canvasjs.min.js') }}"></script>
<script>
window.onload = function () {
@ -153,19 +150,18 @@ window.onload = function () {
var chart = new CanvasJS.Chart("levelHistory", {
animationEnabled: false,
title:{
text: "App level (in apps.json)"
},
toolTip: {
reversed: true,
shared: true
text: "App level history (in apps.json)"
},
data: [
{
markerType: "circle",
markerSize: 10,
type: "line",
dataPoints: [
{% for d in history %}
{ label: "{{ d.date }}", y: {{ d["level"] }},
markerColor: colors_per_level[{{ d["level"] }}] },
markerColor: colors_per_level[{{ d["level"] }}]
},
{% endfor %}
]
},