pippopipip

This commit is contained in:
sco
2021-11-10 02:26:44 +01:00
parent 3e0fdc4b5d
commit 7a7da0610b
2 changed files with 37 additions and 78 deletions
+10 -64
View File
@@ -8,7 +8,6 @@ icon: "fas fa-cannabis"
header: true header: true
footer: false footer: false
#footer: '<p>Created with <span class="has-text-danger">❤️</span> with <a href="https://bulma.io/">bulma</a>, <a href="https://vuejs.org/">vuejs</a> & <a href="https://fontawesome.com/">font awesome</a> // Fork me on <a href="https://github.com/bastienwirtz/homer"><i class="fab fa-github-alt"></i></a></p>' # set false if you want to hide it.
columns: "4" columns: "4"
# Optionnal theme customization # Optionnal theme customization
theme: default theme: default
@@ -45,15 +44,11 @@ colors:
#url: https://b4bz.io #url: https://b4bz.io
# style: "is-dark" # See https://bulma.io/documentation/components/message/#colors for styling options. # style: "is-dark" # See https://bulma.io/documentation/components/message/#colors for styling options.
#title: "👋 Demo !" #title: "👋 Demo !"
#content: "This is a dummy homepage demo. <br /> Find more information on <a href='https://github.com/bastienwirtz/homer'>github.com/bastienwirtz/homer</a>" #content: "This is a dummy homepage demo."
# Optional navbar # Optional navbar
# links: [] # Allows for navbar (dark mode, layout, and search) without any links # links: [] # Allows for navbar (dark mode, layout, and search) without any links
links: links:
#- name: "Login"
#icon: "fas fa-unlock"
#url: "/personal"
#target: "_blank"
- name: "Pages" - name: "Pages"
icon: "fas fa-list" icon: "fas fa-list"
url: "/pages" url: "/pages"
@@ -67,14 +62,9 @@ services:
items: items:
- name: "Unifi Controller" - name: "Unifi Controller"
subtitle: "controller.snakes.wtf" subtitle: "controller.snakes.wtf"
icon: "fas fa-server" icon: "fas fa-wifi"
url: "https://controller.snakes.wtf" url: "https://controller.snakes.wtf"
target: "_blank" # optionnal html a tag target attribute 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" - name: "TvHeadEnd"
icon: "fas fa-tv" icon: "fas fa-tv"
subtitle: "tv.snakes.wtf" subtitle: "tv.snakes.wtf"
@@ -113,62 +103,18 @@ services:
subtitle: "192.168.10.2" subtitle: "192.168.10.2"
url: "http://192.168.10.2" url: "http://192.168.10.2"
target: "_blank" 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: external:
- name: "System" - name: "System"
icon: "fas fa-heartbeat" icon: "fas fa-heartbeat"
items: items:
- name: "Pi Status" #- name: ""
icon: "fas fa-joint" # icon: ""
subtitle: "" # subtitle: ""
url: "http://192.168.44.5:3000/api/sysStatus" - url: "/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: "TV Status" - name: "TV Status"
icon: "fas fa-tv" icon: "fas fa-tv"
items: items:
#- name: "Minisatip Rome" # - name: ""
# icon: "fas fa-broadcast-tower" # icon: "fas fa-broadcast-tower"
# subtitle: "" # subtitle: ""
# url: "http://192.168.44.5:3000/api/minisatip?id=0" - url: "/api/dvbtuner"
# - 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"
+27 -14
View File
@@ -5,9 +5,9 @@
<div class="card-content"> <div class="card-content">
<div class="media"> <div class="media">
<!-- <div class="card-content "> --> <!-- <div class="card-content "> -->
<div v-if="item.icon" class="media-left"> <div v-if="diocane.icon" class="media-left">
<figure class="image is-48x48"> <figure class="image is-48x48">
<i style="font-size: 35px;" :class="item.icon"></i> <i style="font-size: 35px" :class="diocane.icon"></i>
</figure> </figure>
</div> </div>
<div class="media-content"> <div class="media-content">
@@ -30,22 +30,35 @@ export default {
data: function () { data: function () {
return { return {
response: null, response: null,
timer: "",
}; };
}, },
mounted: async function () { mounted: function () {
let response = await fetch(this.item.url, { this.fetchList();
headers: { this.timer = setInterval(this.fetchList, 10000);
"Content-Type": "application/json", },
}, methods: {
}); fetchList: async function () {
if (!response.ok) { let response = await fetch(this.item.url, {
throw Error(response.statusText); headers: {
} "Content-Type": "application/json",
this.response = await response.json(); },
if (this.response.stderr !== "") { });
console.error(this.response.stderr); 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();
},
}; };
</script> </script>