mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
logs monospace no new line in between
This commit is contained in:
committed by
Aiden McClelland
parent
cc957beacc
commit
80e48cfd8e
@@ -11,7 +11,7 @@
|
|||||||
<text-spinner *ngIf="loading" text="Loading Logs"></text-spinner>
|
<text-spinner *ngIf="loading" text="Loading Logs"></text-spinner>
|
||||||
|
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="template" style="white-space: pre-line;"></div>
|
<div id="template" style="white-space: pre-line; font-family: monospace;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="button-div" *ngIf="!loading" style="width: 100%; text-align: center;">
|
<div id="button-div" *ngIf="!loading" style="width: 100%; text-align: center;">
|
||||||
<ion-button *ngIf="!loadingMore" (click)="loadMore()" strong color="dark">
|
<ion-button *ngIf="!loadingMore" (click)="loadMore()" strong color="dark">
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export class LogsPage {
|
|||||||
const container = document.getElementById('container')
|
const container = document.getElementById('container')
|
||||||
const beforeContainerHeight = container.scrollHeight
|
const beforeContainerHeight = container.scrollHeight
|
||||||
const newLogs = document.getElementById('template').cloneNode(true) as HTMLElement
|
const newLogs = document.getElementById('template').cloneNode(true) as HTMLElement
|
||||||
newLogs.innerHTML = logs.map(l => `${l.timestamp} ${convert.toHtml(l.message)}`).join('\n\n') + (logs.length ? '\n\n' : '')
|
newLogs.innerHTML = logs.map(l => `${l.timestamp} ${convert.toHtml(l.message)}`).join('\n') + (logs.length ? '\n' : '')
|
||||||
container.prepend(newLogs)
|
container.prepend(newLogs)
|
||||||
const afterContainerHeight = container.scrollHeight
|
const afterContainerHeight = container.scrollHeight
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ export class LogsPage {
|
|||||||
|
|
||||||
const container = document.getElementById('container')
|
const container = document.getElementById('container')
|
||||||
const newLogs = document.getElementById('template').cloneNode(true) as HTMLElement
|
const newLogs = document.getElementById('template').cloneNode(true) as HTMLElement
|
||||||
newLogs.innerHTML = logs.map(l => `${l.timestamp} ${convert.toHtml(l.message)}`).join('\n\n') + (logs.length ? '\n\n' : '')
|
newLogs.innerHTML = logs.map(l => `${l.timestamp} ${convert.toHtml(l.message)}`).join('\n') + (logs.length ? '\n' : '')
|
||||||
container.append(newLogs)
|
container.append(newLogs)
|
||||||
this.loadingMore = false
|
this.loadingMore = false
|
||||||
this.scrollEvent()
|
this.scrollEvent()
|
||||||
|
|||||||
Reference in New Issue
Block a user