@@ -130,6 +144,7 @@ const jsyaml = require("js-yaml");
const merge = require("lodash.merge");
import Navbar from "./components/Navbar.vue";
+import GetStarted from "./components/GetStarted.vue";
import ConnectivityChecker from "./components/ConnectivityChecker.vue";
import Service from "./components/Service.vue";
import Message from "./components/Message.vue";
@@ -144,6 +159,7 @@ export default {
name: "App",
components: {
Navbar,
+ GetStarted,
ConnectivityChecker,
Service,
Message,
@@ -154,6 +170,8 @@ export default {
},
data: function () {
return {
+ loaded: false,
+ configNotFound: false,
config: null,
services: null,
offline: false,
@@ -163,9 +181,15 @@ export default {
showMenu: false,
};
},
+ computed: {
+ configurationNeeded: function () {
+ return (this.loaded && !this.services) || this.configNotFound;
+ },
+ },
created: async function () {
this.buildDashboard();
window.onhashchange = this.buildDashboard;
+ this.loaded = true;
},
methods: {
searchHotkey() {
@@ -193,6 +217,7 @@ export default {
}
this.config = merge(defaults, config);
this.services = this.config.services;
+
document.title =
this.config.documentTitle ||
`${this.config.title} | ${this.config.subtitle}`;
@@ -211,6 +236,12 @@ export default {
window.location.href = response.url;
return;
}
+
+ if (response.status == 404) {
+ this.configNotFound = true;
+ return {};
+ }
+
if (!response.ok) {
throw Error(`${response.statusText}: ${response.body}`);
}