Skip to content

Commit

Permalink
feat(ui): display color on log
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Mar 14, 2022
1 parent 4b29949 commit a697274
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
15 changes: 15 additions & 0 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"dependencies": {
"@vue/composition-api": "^1.4.5",
"ansi-to-html": "^0.7.2",
"axios": "^0.25.0",
"bootstrap": "^4.6.1",
"bootstrap-vue": "^2.21.2",
Expand Down
8 changes: 7 additions & 1 deletion ui/src/components/logs/LogLine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
{{ meta.value }}
</span>
</span>
<span class="message">{{ log.message }}</span>
<span class="message" v-html="message" />
</div>
</template>
<script>
import Convert from "ansi-to-html"
let convert = new Convert();
export default {
props: {
log: {
Expand Down Expand Up @@ -66,6 +69,9 @@
this.log.message.toLowerCase().includes(this.filter)
);
},
message() {
return convert.toHtml(this.log.message);
}
},
};
</script>
Expand Down

0 comments on commit a697274

Please sign in to comment.