Skip to content

Commit

Permalink
feat: keep 2500 lines if too many lines are received
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Jun 20, 2024
1 parent beca2f5 commit b029b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/pages/monitor/[hostname].vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
let ansi_up = new AnsiUp();
this.socket.onmessage = (event) => {
if (this.lines.length > 5000) {
this.lines = [];
this.lines = this.lines.slice(0, 2500);
}
this.lines.push(ansi_up.ansi_to_html(event.data) + " <br/> ");
setTimeout(() => {
Expand Down

0 comments on commit b029b1a

Please sign in to comment.