Skip to content

Commit

Permalink
Startup Error: re-added error message and config infos (#13563)
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis committed Apr 24, 2024
1 parent aeaecfd commit c18e542
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions assets/js/views/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
16 changes: 11 additions & 5 deletions assets/js/views/StartupError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit c18e542

Please sign in to comment.