mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 23:16:32 +08:00
add retries for pinging function
backend: - new field for monitor: maxretries - new pending status while service is retrying: 2 - pending status event is not marked important - pending pings however register as downtime in the calculation frontend: - added pending status while service is retrying - added color for new pending status - added field to configure amount of retries database: - IMPORTANT: THIS REQUIRES MIGRATION!!!! - added field: maxretries with default value 0
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="hp-bar-big" :style="barStyle">
|
||||
<div
|
||||
class="beat"
|
||||
:class="{ 'empty' : (beat === 0), 'down' : (beat.status === 0) }"
|
||||
:class="{ 'empty' : (beat === 0), 'down' : (beat.status === 0), 'pending' : (beat.status === 2) }"
|
||||
:style="beatStyle"
|
||||
v-for="(beat, index) in shortBeatList"
|
||||
:key="index"
|
||||
@@ -166,6 +166,10 @@ export default {
|
||||
background-color: $danger;
|
||||
}
|
||||
|
||||
&.pending {
|
||||
background-color: $warning;
|
||||
}
|
||||
|
||||
&:not(.empty):hover {
|
||||
transition: all ease-in-out 0.15s;
|
||||
opacity: 0.8;
|
||||
|
@@ -14,6 +14,8 @@ export default {
|
||||
return "danger"
|
||||
} else if (this.status === 1) {
|
||||
return "primary"
|
||||
} else if (this.status === 2) {
|
||||
return "warning"
|
||||
} else {
|
||||
return "secondary"
|
||||
}
|
||||
@@ -24,6 +26,8 @@ export default {
|
||||
return "Down"
|
||||
} else if (this.status === 1) {
|
||||
return "Up"
|
||||
} else if (this.status === 2) {
|
||||
return "Pending"
|
||||
} else {
|
||||
return "Unknown"
|
||||
}
|
||||
@@ -34,6 +38,6 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
span {
|
||||
width: 45px;
|
||||
width: 54px;
|
||||
}
|
||||
</style>
|
||||
|
@@ -30,6 +30,8 @@ export default {
|
||||
return "danger"
|
||||
} else if (this.lastHeartBeat.status === 1) {
|
||||
return "primary"
|
||||
} else if (this.lastHeartBeat.status === 2) {
|
||||
return "warning"
|
||||
} else {
|
||||
return "secondary"
|
||||
}
|
||||
|
Reference in New Issue
Block a user