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
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"
# 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. <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
# 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"
# - name: ""
# icon: "fas fa-broadcast-tower"
# subtitle: ""
- url: "/api/dvbtuner"
+27 -14
View File
@@ -5,9 +5,9 @@
<div class="card-content">
<div class="media">
<!-- <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">
<i style="font-size: 35px;" :class="item.icon"></i>
<i style="font-size: 35px" :class="diocane.icon"></i>
</figure>
</div>
<div class="media-content">
@@ -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();
},
};
</script>