@@ -130,6 +133,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 +148,7 @@ export default {
name: "App",
components: {
Navbar,
+ GetStarted,
ConnectivityChecker,
Service,
Message,
@@ -154,6 +159,7 @@ export default {
},
data: function () {
return {
+ loaded: false,
config: null,
services: null,
offline: false,
@@ -166,6 +172,7 @@ export default {
created: async function () {
this.buildDashboard();
window.onhashchange = this.buildDashboard;
+ this.loaded = true;
},
methods: {
searchHotkey() {
@@ -193,6 +200,7 @@ export default {
}
this.config = merge(defaults, config);
this.services = this.config.services;
+
document.title =
this.config.documentTitle ||
`${this.config.title} | ${this.config.subtitle}`;
diff --git a/src/components/GetStarted.vue b/src/components/GetStarted.vue
new file mode 100644
index 0000000..dcabc02
--- /dev/null
+++ b/src/components/GetStarted.vue
@@ -0,0 +1,35 @@
+
+
+
+
No configured service found!
+
Check out the documentation to start building your Homer dashboard.
+
+
+ Get started
+
+
+
+
+
+
+
+
+
diff --git a/src/components/services/Portainer.vue b/src/components/services/Portainer.vue
index 176d92e..c7e9962 100644
--- a/src/components/services/Portainer.vue
+++ b/src/components/services/Portainer.vue
@@ -8,7 +8,11 @@
{{ dead }}
-
+
{{ misc }}
@@ -55,7 +59,10 @@ export default {
return "";
}
return this.containers.filter((container) => {
- return container.State.toLowerCase() !== "running" && container.State.toLowerCase() !== "dead";
+ return (
+ container.State.toLowerCase() !== "running" &&
+ container.State.toLowerCase() !== "dead"
+ );
}).length;
},
},
@@ -68,18 +75,20 @@ export default {
"X-Api-Key": this.item.apikey,
};
- this.endpoints = await this.fetch("/api/endpoints", { headers })
- .catch((e) => {
+ this.endpoints = await this.fetch("/api/endpoints", { headers }).catch(
+ (e) => {
console.error(e);
- });
+ }
+ );
let containers = [];
for (let endpoint of this.endpoints) {
const uri = `/api/endpoints/${endpoint.Id}/docker/containers/json?all=1`;
- const endpointContainers = await this.fetch(uri, { headers })
- .catch((e) => {
+ const endpointContainers = await this.fetch(uri, { headers }).catch(
+ (e) => {
console.error(e);
- });
+ }
+ );
containers = containers.concat(endpointContainers);
}
--
cgit v1.2.3
From a7cbcc7700990dbdfbfe61374e14a700ff0d4714 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Catarino?=