Skip to content

Commit

Permalink
Fetch history in log stream in Dev UI on hot-reload
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Kruger <[email protected]>
  • Loading branch information
phillip-kruger authored and bschuhmann committed Nov 16, 2024
1 parent 7695f6c commit 8593668
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ export class QwcServerLog extends QwcAbstractLogElement {
connectedCallback() {
super.connectedCallback();
this._toggleOnOff(true);
this.jsonRpc.history().then(jsonRpcResponse => {
jsonRpcResponse.result.forEach(entry => {
this._addLogEntry(entry);
});
});
this._loadAllLoggers();
}

Expand Down Expand Up @@ -616,9 +611,18 @@ export class QwcServerLog extends QwcAbstractLogElement {
// Stop then start / start then stop
this._stopStartLog();
this._stopStartLog();
this._history();
this._loadAllLoggers();
}

_history(){
this.jsonRpc.history().then(jsonRpcResponse => {
jsonRpcResponse.result.forEach(entry => {
this._addLogEntry(entry);
});
});
}

_toggleFollowLog(e){
this._followLog = e;
this._scrollToBottom();
Expand Down

0 comments on commit 8593668

Please sign in to comment.