From 6c083d6a361c0359ffa597021c28154e60c285c1 Mon Sep 17 00:00:00 2001 From: Isaac Suttell Date: Sun, 10 Jul 2022 13:06:02 -0700 Subject: added support for Get method to Ping custom service --- src/components/services/Ping.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/components') diff --git a/src/components/services/Ping.vue b/src/components/services/Ping.vue index d1fda57..9f4a03d 100644 --- a/src/components/services/Ping.vue +++ b/src/components/services/Ping.vue @@ -29,7 +29,8 @@ export default { }, methods: { fetchStatus: async function () { - this.fetch("/", { method: "HEAD", cache: "no-cache" }, false) + const method = typeof this.item.method === 'string' && this.item.method.toLowerCase() === "get" ? "GET" : "HEAD" + this.fetch("/", { method, cache: "no-cache" }, false) .then(() => { this.status = "online"; }) @@ -45,6 +46,8 @@ export default { .status { font-size: 0.8rem; color: var(--text-title); + white-space: nowrap; + margin-left: 0.25rem; &.online:before { background-color: #94e185; -- cgit v1.2.3