Merge branch 'master' into feature/tls-renegotiation

pull/482/head
Anže Jenšterle 2020-04-06 18:05:39 +02:00 committed by GitHub
commit 6b74003533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 22 deletions

View File

@ -96,19 +96,15 @@
start = new Date(start.getUTCFullYear(), start.getUTCMonth()+1, 1); start = new Date(start.getUTCFullYear(), start.getUTCMonth()+1, 1);
monthNum += 1 monthNum += 1
} }
window.console.log(monthData)
this.series = monthData.reverse() this.series = monthData.reverse()
this.ready = true this.ready = true
}, },
async heatmapData(start, end) { async heatmapData(start, end) {
window.console.log("start: ", start)
window.console.log("end: ", end)
const data = await Api.service_failures_data(this.service.id, this.toUnix(start), this.toUnix(end), "24h", true) const data = await Api.service_failures_data(this.service.id, this.toUnix(start), this.toUnix(end), "24h", true)
let dataArr = [] let dataArr = []
if (!data) {
return {name: start.toLocaleString('en-us', { month: 'long'}), data: []}
}
data.forEach((d) => { data.forEach((d) => {
dataArr.push({x: this.parseISO(d.timeframe), y: d.amount}); dataArr.push({x: this.parseISO(d.timeframe), y: d.amount});
}); });

View File

@ -44,6 +44,7 @@
async mounted() { async mounted() {
await this.latencyYesterday(); await this.latencyYesterday();
}, },
methods: {
async latencyYesterday() { async latencyYesterday() {
const todayTime = await Api.service_hits(this.service.id, this.toUnix(this.nowSubtract(86400)), this.toUnix(new Date()), this.group, false) const todayTime = await Api.service_hits(this.service.id, this.toUnix(this.nowSubtract(86400)), this.toUnix(new Date()), this.group, false)
const fetched = await Api.service_hits(this.service.id, this.start, this.end, this.group, false) const fetched = await Api.service_hits(this.service.id, this.start, this.end, this.group, false)
@ -63,6 +64,7 @@
return total return total
} }
} }
}
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->

View File