mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
fix log viewer for empty logs
This commit is contained in:
parent
d2c34fb9c7
commit
0e76441684
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<div [ngbNavOutlet]="nav" class="mt-2"></div>
|
<div [ngbNavOutlet]="nav" class="mt-2"></div>
|
||||||
|
|
||||||
<div #logContainer class="bg-dark p-3 mb-3 text-light text-monospace log-container">
|
<div class="bg-dark p-3 mb-3 text-light text-monospace log-container">
|
||||||
<p
|
<p
|
||||||
class="m-0 p-0 log-entry-{{getLogLevel(log)}}"
|
class="m-0 p-0 log-entry-{{getLogLevel(log)}}"
|
||||||
*ngFor="let log of logs" style="white-space: pre;">{{log}}</p>
|
*ngFor="let log of logs" style="white-space: pre;">{{log}}</p>
|
||||||
|
@ -10,8 +10,6 @@ export class LogsComponent implements OnInit {
|
|||||||
|
|
||||||
constructor(private logService: LogService) { }
|
constructor(private logService: LogService) { }
|
||||||
|
|
||||||
@ViewChild('logContainer') private logContainer: ElementRef
|
|
||||||
|
|
||||||
logs: string[] = []
|
logs: string[] = []
|
||||||
|
|
||||||
logFiles: string[] = []
|
logFiles: string[] = []
|
||||||
@ -31,6 +29,8 @@ export class LogsComponent implements OnInit {
|
|||||||
reloadLogs() {
|
reloadLogs() {
|
||||||
this.logService.get(this.activeLog).subscribe(result => {
|
this.logService.get(this.activeLog).subscribe(result => {
|
||||||
this.logs = result
|
this.logs = result
|
||||||
|
}, error => {
|
||||||
|
this.logs = []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user