|
|
@ -34,6 +34,14 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="my-3">
|
|
|
|
|
|
|
|
<label for="auto-refresh-interval" class="form-label">{{ $t("Refresh Interval") }}</label>
|
|
|
|
|
|
|
|
<input id="auto-refresh-interval" v-model="config.autoRefreshInterval" type="number" class="form-control" :min="5">
|
|
|
|
|
|
|
|
<div class="form-text">
|
|
|
|
|
|
|
|
{{ $t("Refresh Interval Description", [config.autoRefreshInterval]) }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="my-3">
|
|
|
|
<div class="my-3">
|
|
|
|
<label for="switch-theme" class="form-label">{{ $t("Theme") }}</label>
|
|
|
|
<label for="switch-theme" class="form-label">{{ $t("Theme") }}</label>
|
|
|
|
<select id="switch-theme" v-model="config.theme" class="form-select">
|
|
|
|
<select id="switch-theme" v-model="config.theme" class="form-select">
|
|
|
@ -438,7 +446,6 @@ export default {
|
|
|
|
baseURL: "",
|
|
|
|
baseURL: "",
|
|
|
|
clickedEditButton: false,
|
|
|
|
clickedEditButton: false,
|
|
|
|
maintenanceList: [],
|
|
|
|
maintenanceList: [],
|
|
|
|
autoRefreshInterval: 5,
|
|
|
|
|
|
|
|
lastUpdateTime: dayjs(),
|
|
|
|
lastUpdateTime: dayjs(),
|
|
|
|
updateCountdown: null,
|
|
|
|
updateCountdown: null,
|
|
|
|
updateCountdownText: null,
|
|
|
|
updateCountdownText: null,
|
|
|
@ -708,6 +715,13 @@ export default {
|
|
|
|
this.$root.publicGroupList = res.data.publicGroupList;
|
|
|
|
this.$root.publicGroupList = res.data.publicGroupList;
|
|
|
|
|
|
|
|
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Configure auto-refresh loop
|
|
|
|
|
|
|
|
feedInterval = setInterval(() => {
|
|
|
|
|
|
|
|
this.updateHeartbeatList();
|
|
|
|
|
|
|
|
}, (this.config.autoRefreshInterval + 10) * 1000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.updateUpdateTimer();
|
|
|
|
}).catch( function (error) {
|
|
|
|
}).catch( function (error) {
|
|
|
|
if (error.response.status === 404) {
|
|
|
|
if (error.response.status === 404) {
|
|
|
|
location.href = "/page-not-found";
|
|
|
|
location.href = "/page-not-found";
|
|
|
@ -715,13 +729,7 @@ export default {
|
|
|
|
console.log(error);
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Configure auto-refresh loop
|
|
|
|
|
|
|
|
this.updateHeartbeatList();
|
|
|
|
this.updateHeartbeatList();
|
|
|
|
feedInterval = setInterval(() => {
|
|
|
|
|
|
|
|
this.updateHeartbeatList();
|
|
|
|
|
|
|
|
}, (this.autoRefreshInterval * 60 + 10) * 1000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.updateUpdateTimer();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Go to edit page if ?edit present
|
|
|
|
// Go to edit page if ?edit present
|
|
|
|
// null means ?edit present, but no value
|
|
|
|
// null means ?edit present, but no value
|
|
|
@ -797,7 +805,7 @@ export default {
|
|
|
|
clearInterval(this.updateCountdown);
|
|
|
|
clearInterval(this.updateCountdown);
|
|
|
|
|
|
|
|
|
|
|
|
this.updateCountdown = setInterval(() => {
|
|
|
|
this.updateCountdown = setInterval(() => {
|
|
|
|
const countdown = dayjs.duration(this.lastUpdateTime.add(this.autoRefreshInterval, "minutes").add(10, "seconds").diff(dayjs()));
|
|
|
|
const countdown = dayjs.duration(this.lastUpdateTime.add(this.config.autoRefreshInterval, "seconds").add(10, "seconds").diff(dayjs()));
|
|
|
|
if (countdown.as("seconds") < 0) {
|
|
|
|
if (countdown.as("seconds") < 0) {
|
|
|
|
clearInterval(this.updateCountdown);
|
|
|
|
clearInterval(this.updateCountdown);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|