mirror of https://github.com/bastienwirtz/homer
Fix UptimeKuma url breaking (#526)
parent
dfde8ea89d
commit
0e2abd7683
|
@ -112,13 +112,15 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
/* eslint-disable */
|
// eslint-disable-next-line vue/no-mutating-props
|
||||||
this.item.url = `${this.item.url}/status/${this.dashboard}`;
|
this.item.url = this.item.url.endsWith(this.dashboard)
|
||||||
|
? this.item.url
|
||||||
|
: `${this.item.url}/status/${this.dashboard}`;
|
||||||
this.fetchStatus();
|
this.fetchStatus();
|
||||||
},
|
},
|
||||||
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.dashboard}?cachebust=${now}`)
|
||||||
.catch((e) => console.error(e))
|
.catch((e) => console.error(e))
|
||||||
.then((resp) => (this.incident = resp));
|
.then((resp) => (this.incident = resp));
|
||||||
|
|
Loading…
Reference in New Issue