mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-21 23:43:27 +01:00
fix(ui): Only show loading icon on initial load and on page change
This commit is contained in:
parent
11eb7fb02e
commit
9142ff837c
@ -32,7 +32,6 @@ export default {
|
|||||||
emits: ['showTooltip', 'toggleShowAverageResponseTime'],
|
emits: ['showTooltip', 'toggleShowAverageResponseTime'],
|
||||||
methods: {
|
methods: {
|
||||||
fetchData() {
|
fetchData() {
|
||||||
this.retrievedData = false;
|
|
||||||
fetch(`${SERVER_URL}/api/v1/endpoints/statuses?page=${this.currentPage}`, {credentials: 'include'})
|
fetch(`${SERVER_URL}/api/v1/endpoints/statuses?page=${this.currentPage}`, {credentials: 'include'})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.retrievedData = true;
|
this.retrievedData = true;
|
||||||
@ -50,6 +49,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
changePage(page) {
|
changePage(page) {
|
||||||
|
this.retrievedData = false; // Show loading only on page change or on initial load
|
||||||
this.currentPage = page;
|
this.currentPage = page;
|
||||||
this.fetchData();
|
this.fetchData();
|
||||||
},
|
},
|
||||||
@ -69,6 +69,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.retrievedData = false; // Show loading only on page change or on initial load
|
||||||
this.fetchData();
|
this.fetchData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user