1
0
Fork 0
mirror of https://github.com/bastienwirtz/homer.git synced 2026-07-17 16:38:59 +00:00

fix(UptimeKuma): stop overwriting the configured url

This commit is contained in:
tanasegabriel 2026-07-13 21:31:20 +00:00 committed by Bastien Wirtz
parent bfcf203a98
commit a0c286cbf0

View file

@ -33,7 +33,7 @@ export default {
heartbeat: null, heartbeat: null,
}), }),
computed: { computed: {
dashboard: function () { slug: function () {
return this.item.slug ? this.item.slug : "default"; return this.item.slug ? this.item.slug : "default";
}, },
status: function () { status: function () {
@ -108,9 +108,6 @@ export default {
}, },
}, },
created() { created() {
/* eslint-disable */
this.item.url = `${this.item.url}/status/${this.dashboard}`;
// Set up auto-update method for the scheduler // Set up auto-update method for the scheduler
this.autoUpdateMethod = this.fetchStatus; this.autoUpdateMethod = this.fetchStatus;
@ -120,13 +117,11 @@ export default {
methods: { methods: {
fetchStatus: function () { fetchStatus: function () {
const now = Date.now(); const now = Date.now();
this.fetch(`/api/status-page/${this.dashboard}?cachebust=${now}`) this.fetch(`/api/status-page/${this.slug}?cachebust=${now}`)
.catch((e) => console.error(e)) .catch((e) => console.error(e))
.then((resp) => (this.incident = resp)); .then((resp) => (this.incident = resp));
this.fetch( this.fetch(`/api/status-page/heartbeat/${this.slug}?cachebust=${now}`)
`/api/status-page/heartbeat/${this.dashboard}?cachebust=${now}`,
)
.catch((e) => console.error(e)) .catch((e) => console.error(e))
.then((resp) => (this.heartbeat = resp)); .then((resp) => (this.heartbeat = resp));
}, },