mirror of https://github.com/bastienwirtz/homer
Add a flag to hide the averages. They are not calculated in this case
parent
732f072cd4
commit
bd0a4e9cfd
|
@ -60,6 +60,7 @@ export default {
|
||||||
// Initialise counts, avg times
|
// Initialise counts, avg times
|
||||||
this.total = response.length;
|
this.total = response.length;
|
||||||
this.up = 0;
|
this.up = 0;
|
||||||
|
|
||||||
let totalrestime = 0;
|
let totalrestime = 0;
|
||||||
let totalresults = 0;
|
let totalresults = 0;
|
||||||
|
|
||||||
|
@ -68,6 +69,7 @@ export default {
|
||||||
this.up++;
|
this.up++;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!this.item.hideaverages) {
|
||||||
// Update array of average times
|
// Update array of average times
|
||||||
let totalduration = 0;
|
let totalduration = 0;
|
||||||
let rescounter = 0;
|
let rescounter = 0;
|
||||||
|
@ -78,6 +80,11 @@ export default {
|
||||||
|
|
||||||
totalrestime += totalduration;
|
totalrestime += totalduration;
|
||||||
totalresults += rescounter;
|
totalresults += rescounter;
|
||||||
|
} else {
|
||||||
|
totalrestime = 0;
|
||||||
|
totalresults = 1;
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Rest are down
|
// Rest are down
|
||||||
|
|
Loading…
Reference in New Issue