5 <strong class="notif total" title="Total Devices">
8 <strong class="notif connected" title="Connected Devices">
11 <strong class="notif newdevices" title="New Devices">
14 <strong class="notif alert" title="Down Alerts">
17 <strong v-if="serverError" class="notif alert"
18 title="Connection error to PiAlert server, check the url in config.yml">?</strong>
25 import service from "@/mixins/service.js";
26 import Generic from "./Generic.vue";
47 const updateInterval = parseInt(this.item.updateInterval, 10) || 0;
48 if (updateInterval > 0) {
49 setInterval(() => this.fetchStatus(), updateInterval);
54 fetchStatus: async function () {
55 this.fetch("/php/server/devices.php?action=getDevicesTotals")
57 this.total = response[0];
58 this.connected = response[1];
59 this.newdevices = response[3];
60 this.downalert = response[4];
64 this.serverError = true;
71 <style scoped lang="scss">
75 font-family: sans-serif;
80 display: inline-block;
81 padding: 0.2em 0.35em;
82 border-radius: 0.25em;
88 background-color: #4fb5d6;
92 background-color: #4fd671;
96 background-color: #d08d2e;
100 background-color: #e51111;