Autofix on save

This commit is contained in:
Adam Stachowicz 2021-07-27 19:47:13 +02:00
parent 8331e795e7
commit 9648d700d7
29 changed files with 1182 additions and 1089 deletions

View file

@ -1,15 +1,16 @@
<template>
<div v-if="$route.name === 'DashboardHome'">
<h1 class="mb-3">Quick Stats</h1>
<h1 class="mb-3">
Quick Stats
</h1>
<div class="shadow-box big-padding text-center">
<div class="row">
<div class="col">
<div class="col">
<h3>Up</h3>
<span class="num">{{ stats.up }}</span>
</div>
<div class="col">
<div class="col">
<h3>Down</h3>
<span class="num text-danger">{{ stats.down }}</span>
</div>
@ -22,16 +23,16 @@
<span class="num text-secondary">{{ stats.pause }}</span>
</div>
</div>
<div class="row" v-if="false">
<div v-if="false" class="row">
<div class="col-3">
<h3>Uptime</h3>
<p>(24-hour)</p>
<span class="num"></span>
<span class="num" />
</div>
<div class="col-3">
<h3>Uptime</h3>
<p>(30-day)</p>
<span class="num"></span>
<span class="num" />
</div>
</div>
</div>
@ -39,32 +40,35 @@
<div class="shadow-box" style="margin-top: 25px;">
<table class="table table-borderless table-hover">
<thead>
<tr>
<th>Name</th>
<th>Status</th>
<th>DateTime</th>
<th>Message</th>
</tr>
<tr>
<th>Name</th>
<th>Status</th>
<th>DateTime</th>
<th>Message</th>
</tr>
</thead>
<tbody>
<tr v-for="(beat, index) in displayedRecords" :key="index">
<td>{{ beat.name }}</td>
<td><Status :status="beat.status" /></td>
<td><Datetime :value="beat.time" /></td>
<td>{{ beat.msg }}</td>
</tr>
<tr v-for="(beat, index) in displayedRecords" :key="index">
<td>{{ beat.name }}</td>
<td><Status :status="beat.status" /></td>
<td><Datetime :value="beat.time" /></td>
<td>{{ beat.msg }}</td>
</tr>
<tr v-if="importantHeartBeatList.length === 0">
<td colspan="4">No important events</td>
</tr>
<tr v-if="importantHeartBeatList.length === 0">
<td colspan="4">
No important events
</td>
</tr>
</tbody>
</table>
<div class="d-flex justify-content-center kuma_pagination">
<pagination
v-model="page"
:records=importantHeartBeatList.length
:per-page="perPage" />
:records="importantHeartBeatList.length"
:per-page="perPage"
/>
</div>
</div>
</div>
@ -111,7 +115,7 @@ export default {
} else if (beat.status === 0) {
result.down++;
} else if (beat.status === 2) {
result.up++;
result.up++;
} else {
result.unknown++;
}
@ -127,7 +131,7 @@ export default {
let result = [];
for (let monitorID in this.$root.importantHeartbeatList) {
let list = this.$root.importantHeartbeatList[monitorID]
let list = this.$root.importantHeartbeatList[monitorID]
result = result.concat(list);
}
@ -142,11 +146,11 @@ export default {
result.sort((a, b) => {
if (a.time > b.time) {
return -1;
} else if (a.time < b.time) {
} if (a.time < b.time) {
return 1;
} else {
return 0;
}
return 0;
});
this.heartBeatList = result;
@ -159,7 +163,7 @@ export default {
const endIndex = startIndex + this.perPage;
return this.heartBeatList.slice(startIndex, endIndex);
},
}
},
}
</script>