early styling of stdout

This commit is contained in:
jaredevantabor 2016-10-31 14:46:43 -07:00
parent 777a15f763
commit 261c91d836
2 changed files with 9 additions and 3 deletions

View File

@ -13,8 +13,8 @@
<div class="JobResultsStdOut-lineNumberColumn">
{{line.end_line}}
</div>
<div class="JobResultsStdOut-stdoutColumn">
{{line.stdout}}
<div class="JobResultsStdOut-stdoutColumn" ng-bind-html="line.stdout">
<!-- {{line.stdout}} -->
</div>
</div>
</div>

View File

@ -11,7 +11,13 @@ export default [function(){
// that i'm currently seeing on this branch on the beginning
// and end of each event string. In the future it could be
// used to add styling classes to the actual lines of stdout
return line.replace(/rn/g, '');
line = line.replace(/rn/g, '\r\n');
line = line.replace(/u001b/g, '');
line = line.replace(/\[0;32m/g, '<span class="ansi33">');
line = line.replace(/\[0;32m=/g, '<span class="ansi32">');
line = line.replace(/\[0;32m1/g, '<span class="ansi36">');
line = line.replace(/\[0m/g, '</span>');
return line;
},
parseStdout: function(event){
// this object will be used by the ng-repeat in the