logs: handle logs not found (logrotated)

we show an error message in the UI now
This commit is contained in:
Girish Ramakrishnan
2024-09-12 10:31:31 +02:00
parent 23df6bdfbf
commit e9a422b657
3 changed files with 15 additions and 4 deletions
+2 -3
View File
@@ -26,7 +26,7 @@
<script>
import { Button, TopBar, MainLayout } from 'pankow';
import { TopBar, MainLayout } from 'pankow';
import LogsModel from '../models/LogsModel.js';
import AppModel from '../models/AppModel.js';
@@ -36,7 +36,6 @@ const API_ORIGIN = import.meta.env.VITE_API_ORIGIN ? 'https://' + import.meta.en
export default {
name: 'LogsViewer',
components: {
Button,
MainLayout,
TopBar
},
@@ -159,7 +158,7 @@ export default {
this.logsModel.stream((time, html) => {
newLogLines.push({ time, html });
}, function (error) {
console.error('Failed to start log stream:', error);
newLogLines.push({ time: error.time, html: error.html });
})
}
};