mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	fix log viewer for empty logs
This commit is contained in:
		@@ -11,7 +11,7 @@
 | 
			
		||||
 | 
			
		||||
<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
 | 
			
		||||
    class="m-0 p-0 log-entry-{{getLogLevel(log)}}"
 | 
			
		||||
    *ngFor="let log of logs" style="white-space: pre;">{{log}}</p>
 | 
			
		||||
 
 | 
			
		||||
@@ -10,8 +10,6 @@ export class LogsComponent implements OnInit {
 | 
			
		||||
 | 
			
		||||
  constructor(private logService: LogService) { }
 | 
			
		||||
 | 
			
		||||
  @ViewChild('logContainer') private logContainer: ElementRef
 | 
			
		||||
 | 
			
		||||
  logs: string[] = []
 | 
			
		||||
 | 
			
		||||
  logFiles: string[] = []
 | 
			
		||||
@@ -31,6 +29,8 @@ export class LogsComponent implements OnInit {
 | 
			
		||||
  reloadLogs() {
 | 
			
		||||
    this.logService.get(this.activeLog).subscribe(result => {
 | 
			
		||||
      this.logs = result
 | 
			
		||||
    }, error => {
 | 
			
		||||
      this.logs = []
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user