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 () {
33 typeof this.item.method === "string"
34 ? this.item.method.toUpperCase()
37 if (!["GET", "HEAD", "OPTION"].includes(method)) {
38 console.error(`Ping: ${method} is not a supported HTTP method`);
42 this.fetch("/", { method, cache: "no-cache" }, false)
44 this.status = "online";
47 this.status = "offline";
54 <style scoped lang="scss">
57 color: var(--text-title);
62 background-color: #94e185;
63 border-color: #78d965;
64 box-shadow: 0 0 5px 1px #94e185;
68 background-color: #c9404d;
69 border-color: #c42c3b;
70 box-shadow: 0 0 5px 1px #c9404d;
75 display: inline-block;
79 border: 1px solid #000;