diff --git a/public/config.yml b/public/config.yml index 5d98a28..7d9ccf6 100644 --- a/public/config.yml +++ b/public/config.yml @@ -8,7 +8,6 @@ icon: "fas fa-cannabis" header: true footer: false -#footer: '

Created with ❤️ with bulma, vuejs & font awesome // Fork me on

' # set false if you want to hide it. columns: "4" # Optionnal theme customization theme: default @@ -45,15 +44,11 @@ colors: #url: https://b4bz.io # style: "is-dark" # See https://bulma.io/documentation/components/message/#colors for styling options. #title: "👋 Demo !" - #content: "This is a dummy homepage demo.
Find more information on github.com/bastienwirtz/homer" + #content: "This is a dummy homepage demo." # Optional navbar # links: [] # Allows for navbar (dark mode, layout, and search) without any links links: - #- name: "Login" - #icon: "fas fa-unlock" - #url: "/personal" - #target: "_blank" - name: "Pages" icon: "fas fa-list" url: "/pages" @@ -67,14 +62,9 @@ services: items: - name: "Unifi Controller" subtitle: "controller.snakes.wtf" - icon: "fas fa-server" + icon: "fas fa-wifi" url: "https://controller.snakes.wtf" target: "_blank" # optionnal html a tag target attribute - #- name: "Pihole" - #icon: "fab fa-raspberry-pi" - #subtitle: "192.168.10.12" - #url: "http://pihole.lan/admin" - #target: "_blank" - name: "TvHeadEnd" icon: "fas fa-tv" subtitle: "tv.snakes.wtf" @@ -113,62 +103,18 @@ services: subtitle: "192.168.10.2" url: "http://192.168.10.2" target: "_blank" - #- name: "Main Switch" - #icon: "fas fa-ethernet" - #subtitle: "192.168.10.3" - #url: "http://192.168.10.3" - #target: "_blank" - # - name: " FWR8102" - # icon: "fas fa-ethernet" - # subtitle: "192.168.10.5" - # url: "http://192.168.10.5" - # target: "_blank" - # - name: "FRITZ!Box Fon 5140" - # icon: "fas fa-phone-alt" - # subtitle: "192.168.10.4" - # url: "http://192.168.10.4" - # target: "_blank" - #- name: " Turn on PC" - #icon: "fas fa-ethernet" - #subtitle: "192.168.10.15" - #url: "/api/powerOnPc" - #target: "_blank" external: - name: "System" icon: "fas fa-heartbeat" items: - - name: "Pi Status" - icon: "fas fa-joint" - subtitle: "" - url: "http://192.168.44.5:3000/api/sysStatus" - # - name: "External Ip" - # icon: "fas fa-joint" - # subtitle: "" - # url: "/api/internetCheck" - - name: "Pi Jager VPN" - icon: "fas fa-joint" - subtitle: "" - url: "http://192.168.44.5:3000/api/vpnCheck" - - name: "Room Temp" - icon: "fas fa-joint" - subtitle: "" - url: "http://192.168.44.5:3000/api/roomTemp" + #- name: "" + # icon: "" + # subtitle: "" + - url: "/api/sysStatus" - name: "TV Status" icon: "fas fa-tv" items: - #- name: "Minisatip Rome" - # icon: "fas fa-broadcast-tower" - # subtitle: "" - # url: "http://192.168.44.5:3000/api/minisatip?id=0" - # - name: "Tv Hat Channel" - # icon: "fas fa-tv" - # subtitle: "" - # url: "/api/dvbChannel?t=1" - #- name: "Minisatip Lanciont" - # icon: "fas fa-broadcast-tower" - # subtitle: "" - # url: "http://192.168.44.5:3000/api/minisatip?id=1" - - name: "" - icon: "fas fa-broadcast-tower" - subtitle: "" - url: "http://192.168.44.5:3000/api/dvbtuner" \ No newline at end of file + # - name: "" + # icon: "fas fa-broadcast-tower" + # subtitle: "" + - url: "/api/dvbtuner" \ No newline at end of file diff --git a/src/components/External.vue b/src/components/External.vue index 25ffa7e..1160ec7 100644 --- a/src/components/External.vue +++ b/src/components/External.vue @@ -5,9 +5,9 @@
-
+
- +
@@ -30,22 +30,35 @@ export default { data: function () { return { response: null, + timer: "", }; }, - mounted: async function () { - let response = await fetch(this.item.url, { - headers: { - "Content-Type": "application/json", - }, - }); - if (!response.ok) { - throw Error(response.statusText); - } - this.response = await response.json(); - if (this.response.stderr !== "") { - console.error(this.response.stderr); + mounted: function () { + this.fetchList(); + this.timer = setInterval(this.fetchList, 10000); + }, + methods: { + fetchList: async function () { + let response = await fetch(this.item.url, { + headers: { + "Content-Type": "application/json", + }, + }); + if (!response.ok) { + throw Error(response.statusText); + } + this.response = await response.json(); + if (this.response.stderr !== "") { + //console.error(this.response.stderr); + } + }, + cancelAutoUpdate: function () { + clearInterval(this.timer); } }, + beforeDestroy() { + this.cancelAutoUpdate(); + }, };