diff options
author | Isaac Suttell <isaac@isaacsuttell.com> | 2022-07-10 13:06:02 -0700 |
---|---|---|
committer | Bastien Wirtz <bastien.wirtz@gmail.com> | 2022-10-08 11:53:26 +0200 |
commit | 6c083d6a361c0359ffa597021c28154e60c285c1 (patch) | |
tree | 705ca1786645df370cc5ac8cb9612e47cf320c2c /src/components/services | |
parent | 5418c6291a39d27aeee471673adba742080e1ccb (diff) | |
download | homer-6c083d6a361c0359ffa597021c28154e60c285c1.tar.gz homer-6c083d6a361c0359ffa597021c28154e60c285c1.tar.zst homer-6c083d6a361c0359ffa597021c28154e60c285c1.zip |
added support for Get method to Ping custom service
Diffstat (limited to 'src/components/services')
-rw-r--r-- | src/components/services/Ping.vue | 5 |
1 files changed, 4 insertions, 1 deletions
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 { | |||
29 | }, | 29 | }, |
30 | methods: { | 30 | methods: { |
31 | fetchStatus: async function () { | 31 | fetchStatus: async function () { |
32 | this.fetch("/", { method: "HEAD", cache: "no-cache" }, false) | 32 | const method = typeof this.item.method === 'string' && this.item.method.toLowerCase() === "get" ? "GET" : "HEAD" |
33 | this.fetch("/", { method, cache: "no-cache" }, false) | ||
33 | .then(() => { | 34 | .then(() => { |
34 | this.status = "online"; | 35 | this.status = "online"; |
35 | }) | 36 | }) |
@@ -45,6 +46,8 @@ export default { | |||
45 | .status { | 46 | .status { |
46 | font-size: 0.8rem; | 47 | font-size: 0.8rem; |
47 | color: var(--text-title); | 48 | color: var(--text-title); |
49 | white-space: nowrap; | ||
50 | margin-left: 0.25rem; | ||
48 | 51 | ||
49 | &.online:before { | 52 | &.online:before { |
50 | background-color: #94e185; | 53 | background-color: #94e185; |