mirror of
https://github.com/YunoHost/tartiflette.git
synced 2024-09-03 20:06:08 +02:00
Fix graph creation following tests
This commit is contained in:
parent
dfbd7250d2
commit
317df3d148
3 changed files with 9 additions and 13 deletions
|
@ -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 = []
|
||||
|
||||
|
|
2
app/static/css/bootstrap.min.css
vendored
2
app/static/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -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 %}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue