mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-11-23 23:49:08 -06:00
Fixhancement: truncate large logs, improve auto-scroll (#11239)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { HttpClient } from '@angular/common/http'
|
||||
import { HttpClient, HttpParams } from '@angular/common/http'
|
||||
import { Injectable, inject } from '@angular/core'
|
||||
import { Observable } from 'rxjs'
|
||||
import { environment } from 'src/environments/environment'
|
||||
@@ -13,7 +13,13 @@ export class LogService {
|
||||
return this.http.get<string[]>(`${environment.apiBaseUrl}logs/`)
|
||||
}
|
||||
|
||||
get(id: string): Observable<string[]> {
|
||||
return this.http.get<string[]>(`${environment.apiBaseUrl}logs/${id}/`)
|
||||
get(id: string, limit?: number): Observable<string[]> {
|
||||
let params = new HttpParams()
|
||||
if (limit !== undefined) {
|
||||
params = params.set('limit', limit.toString())
|
||||
}
|
||||
return this.http.get<string[]>(`${environment.apiBaseUrl}logs/${id}/`, {
|
||||
params,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user