Skip to content

Commit

Permalink
Merge pull request #1751 from OpenC3/sr_log_color
Browse files Browse the repository at this point in the history
Better handle script output coloring
  • Loading branch information
jmthomas authored Dec 12, 2024
2 parents 5b40329 + 3cc9886 commit ad545d3
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,15 @@ export default {
},
methods: {
messageClass(message) {
if (message.match(/CHECK:.*success with value.*after waiting/)) {
if (
message.match(/(CHECK|WAIT): .*(success|was within range.*) with value/)
) {
return 'openc3-green'
} else if (message.match(/CHECK:.*failed with value.*after waiting/)) {
} else if (
message.match(
/(CHECK|WAIT): .*(failed|failed to be within range.*) with value/,
)
) {
return 'openc3-red'
} else {
return ''
Expand Down

0 comments on commit ad545d3

Please sign in to comment.