Serve logfile and logs for UI seperately

This commit is contained in:
Julian Stirling 2025-04-07 23:38:09 +01:00
parent 70d9e2f758
commit 3a47151694
4 changed files with 24 additions and 8 deletions

View file

@ -33,7 +33,7 @@
<a
class="uk-button uk-button-default"
:href="logFileURI"
download="openflexure_microscope-ui.log"
download="openflexure_microscope.log"
>Download Log File</a
>
</div>
@ -128,9 +128,12 @@ export default {
return items;
},
logFileURI: function() {
logURI: function() {
return `${this.$store.getters.baseUri}/log/`;
},
logFileURI: function() {
return `${this.$store.getters.baseUri}/logfile/`;
},
pagedItems: function() {
let startIndex = (this.page - 1) * this.maxitems;
return this.filteredItems.slice(startIndex, startIndex + this.maxitems);
@ -153,7 +156,7 @@ export default {
}
},
async updateLogs() {
let response = await axios.get(this.logFileURI);
let response = await axios.get(this.logURI);
let lines = response.data.split("\n");
let logs = [];
let regexp = /\[(.+)\] \[(.+)\] (.*)$/;