Startup Error: re-added error message and config infos (#13563)

This commit is contained in:
Michael Geers 2024-04-24 10:17:47 +02:00 • committed by GitHub
parent aeaecfd6ea
commit c18e542569
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 7 deletions

View file

@ -22,9 +22,9 @@ import HelpModal from "../components/HelpModal.vue";
import collector from "../mixins/collector";
import { updateAuthStatus } from "../auth";
// assume offline if not data received for 60 seconds
// assume offline if not data received for 5 minutes
let lastDataReceived = new Date();
const maxDataAge = 60 * 1000;
const maxDataAge = 60 * 1000 * 5;
setInterval(() => {
if (new Date() - lastDataReceived > maxDataAge) {
console.log("no data received, assume we are offline");

View file

@ -77,20 +77,26 @@
import "@h2d2/shopicons/es/regular/car1";
import api from "../api";
import collector from "../mixins/collector";
import store from "../store";
export default {
name: "StartupError",
mixins: [collector],
props: {
fatal: Array,
config: String,
file: String,
line: Number,
offline: Boolean,
},
computed: {
errors() {
return this.fatal || [];
return store.state.fatal || [];
},
config() {
return store.state.config;
},
file() {
return store.state.file;
},
line() {
return store.state.line;
},
},
methods: {