=== modified file 'lava_scheduler_app/templates/lava_scheduler_app/reports.html'
@@ -10,27 +10,26 @@
<script type="text/javascript">
$(document).ready(function() {
var dpass = [];
-var dfail = [];
var ddates= [];
{% for day in health_day_report %}
- dpass.push([{{forloop.counter0}}, {{day.pass}}]);
- dfail.push([{{forloop.counter0}}, {{day.fail}}]);
+ dpass.push([{{forloop.counter0}}, 100*{{day.pass}}/({{day.pass}}+{{day.fail}})]);
ddates.push([{{forloop.counter0}}, "{{day.date}}<br/>Pass: {{day.pass}}<br/>Fail: {{day.fail}}"]);
{% endfor %}
var ddata = [
- {'label': 'Fail', 'data': dfail, 'color': '#FF0000'},
- {'label': 'Pass', 'data': dpass, 'color': '#00FF00'},
+ {'label': '% Pass', 'data': dpass, 'color': '#00FF00'},
];
$.plot($("#placeholder-daily"), ddata, {
series: {
- stack: true,
- bars: { show: true, barWidth: 0.6 },
+ lines: { show: true, fill: true, steps: false },
},
xaxis: {
ticks: ddates,
},
+ yaxis: {
+ max: 100,
+ },
});
}
);
@@ -44,28 +43,26 @@
<script type="text/javascript">
$(document).ready(function() {
var wpass = [];
-var wfail = [];
var wdates= [];
{% for week in health_week_report %}
- wpass.push([{{forloop.counter0}}, {{week.pass}}]);
- wfail.push([{{forloop.counter0}}, {{week.fail}}]);
+ wpass.push([{{forloop.counter0}}, 100*{{week.pass}}/({{week.pass}}+{{week.fail}})]);
wdates.push([{{forloop.counter0}}, "{{week.date}}<br/>Pass: {{week.pass}}<br/>Fail: {{week.fail}}"]);
{% endfor %}
var wdata = [
- {'label': 'Fail', 'data': wfail, 'color': '#FF0000'},
- {'label': 'Pass', 'data': wpass, 'color': '#00FF00'},
+ {'label': '% Pass', 'data': wpass, 'color': '#00FF00'},
];
$.plot($("#placeholder-weekly"), wdata, {
series: {
- stack: true,
- //lines: { show: true, fill: true, steps: false },
- bars: { show: true, barWidth: 0.6 },
+ lines: { show: true, fill: true, steps: false },
},
xaxis: {
ticks: wdates,
},
+ yaxis: {
+ max: 100,
+ },
});
}
);
@@ -80,27 +77,26 @@
<script type="text/javascript">
$(document).ready(function() {
var jdpass = [];
-var jdfail = [];
var jddates= [];
{% for day in job_day_report %}
- jdpass.push([{{forloop.counter0}}, {{day.pass}}]);
- jdfail.push([{{forloop.counter0}}, {{day.fail}}]);
+ jdpass.push([{{forloop.counter0}}, 100*{{day.pass}}/({{day.pass}}+{{day.fail}})]);
jddates.push([{{forloop.counter0}}, "{{day.date}}<br/>Pass: {{day.pass}}<br/>Fail: {{day.fail}}"]);
{% endfor %}
var jddata = [
- {'label': 'Fail', 'data': jdfail, 'color': '#FF0000'},
- {'label': 'Pass', 'data': jdpass, 'color': '#00FF00'},
+ {'label': '% Pass', 'data': jdpass, 'color': '#00FF00'},
];
$.plot($("#placeholder-job-daily"), jddata, {
series: {
- stack: true,
- bars: { show: true, barWidth: 0.6 },
+ lines: { show: true, fill: true, steps: false },
},
xaxis: {
ticks: jddates,
},
+ yaxis: {
+ max: 100,
+ },
});
}
);
@@ -114,28 +110,26 @@
<script type="text/javascript">
$(document).ready(function() {
var jwpass = [];
-var jwfail = [];
var jwdates= [];
{% for week in job_week_report %}
- jwpass.push([{{forloop.counter0}}, {{week.pass}}]);
- jwfail.push([{{forloop.counter0}}, {{week.fail}}]);
+ jwpass.push([{{forloop.counter0}}, 100*{{week.pass}}/({{week.pass}}+{{week.fail}})]);
jwdates.push([{{forloop.counter0}}, "{{week.date}}<br/>Pass: {{week.pass}}<br/>Fail: {{week.fail}}"]);
{% endfor %}
var jwdata = [
- {'label': 'Fail', 'data': jwfail, 'color': '#FF0000'},
- {'label': 'Pass', 'data': jwpass, 'color': '#00FF00'},
+ {'label': '% Pass', 'data': jwpass, 'color': '#00FF00'},
];
$.plot($("#placeholder-job-weekly"), jwdata, {
series: {
- stack: true,
- //lines: { show: true, fill: true, steps: false },
- bars: { show: true, barWidth: 0.6 },
+ lines: { show: true, fill: true, steps: false },
},
xaxis: {
ticks: jwdates,
},
+ yaxis: {
+ max: 100,
+ },
});
}
);