logs: handle logs not found (logrotated)
we show an error message in the UI now
This commit is contained in:
@@ -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 });
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user