4 <div v-if="status" class="status" :class="status">
12 import service from "@/mixins/service.js";
13 import Generic from "./Generic.vue";
31 fetchStatus: async function () {
32 const method = typeof this.item.method === 'string' ? this.item.method.toUpperCase() : 'unknown';
34 if (!['GET', 'HEAD', 'OPTION'].includes(method)) {
35 console.error(`Ping: ${method} is not a supported HTTP method`);
39 this.fetch("/", { method, cache: "no-cache" }, false)
41 this.status = "online";
44 this.status = "offline";
51 <style scoped lang="scss">
54 color: var(--text-title);
59 background-color: #94e185;
60 border-color: #78d965;
61 box-shadow: 0 0 5px 1px #94e185;
65 background-color: #c9404d;
66 border-color: #c42c3b;
67 box-shadow: 0 0 5px 1px #c9404d;
72 display: inline-block;
76 border: 1px solid #000;