add boot param to logs subscription

This commit is contained in:
Matt Hill
2024-06-20 10:07:39 -06:00
parent 355452cdb3
commit c6c97491ac
5 changed files with 17 additions and 8 deletions

View File

@@ -35,7 +35,9 @@ function convertAnsi(entries: readonly any[]): string {
@Injectable({ providedIn: 'root' })
export class LogsService extends Observable<readonly string[]> {
private readonly api = inject(ApiService)
private readonly log$ = defer(() => this.api.initFollowLogs({})).pipe(
private readonly log$ = defer(() =>
this.api.initFollowLogs({ boot: 0 }),
).pipe(
switchMap(({ guid }) => this.api.openWebsocket$<Log>(guid, {})),
bufferTime(250),
filter(logs => !!logs.length),