mirror of https://github.com/bastienwirtz/homer
added support for Get method to Ping custom service
parent
5418c6291a
commit
6c083d6a36
|
@ -29,7 +29,8 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchStatus: async function () {
|
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(() => {
|
.then(() => {
|
||||||
this.status = "online";
|
this.status = "online";
|
||||||
})
|
})
|
||||||
|
@ -45,6 +46,8 @@ export default {
|
||||||
.status {
|
.status {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--text-title);
|
color: var(--text-title);
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-left: 0.25rem;
|
||||||
|
|
||||||
&.online:before {
|
&.online:before {
|
||||||
background-color: #94e185;
|
background-color: #94e185;
|
||||||
|
|
Loading…
Reference in New Issue