Skip to content

Commit

Permalink
feat: support ansi output
Browse files Browse the repository at this point in the history
  • Loading branch information
eatradish committed Jun 19, 2024
1 parent 00e288b commit 791ebf5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/pages/monitor/[hostname].vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</template>

<script lang="ts">
import { AnsiUp } from 'ansi_up';
export default {
mounted() {
this.fetchData();
Expand All @@ -25,7 +26,8 @@ export default {
this.lines = 0;
}
const data = event.data;
this.html += data + " <br/> ";
let ansi_up = new AnsiUp();
this.html += ansi_up.ansi_to_html(data) + " <br/> ";
this.line += 1;
window.scrollTo(0, document.body.scrollHeight);
};
Expand Down

0 comments on commit 791ebf5

Please sign in to comment.