From 261c91d8360895f554fbc422c17a5189c141ebe5 Mon Sep 17 00:00:00 2001 From: jaredevantabor Date: Mon, 31 Oct 2016 14:46:43 -0700 Subject: [PATCH] early styling of stdout --- .../job-results-stdout/job-results-stdout.partial.html | 4 ++-- awx/ui/client/src/job-results/parse-stdout.service.js | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/job-results/job-results-stdout/job-results-stdout.partial.html b/awx/ui/client/src/job-results/job-results-stdout/job-results-stdout.partial.html index b0d187a42e..13515095f8 100644 --- a/awx/ui/client/src/job-results/job-results-stdout/job-results-stdout.partial.html +++ b/awx/ui/client/src/job-results/job-results-stdout/job-results-stdout.partial.html @@ -13,8 +13,8 @@
{{line.end_line}}
-
- {{line.stdout}} +
+
diff --git a/awx/ui/client/src/job-results/parse-stdout.service.js b/awx/ui/client/src/job-results/parse-stdout.service.js index 7580c17219..482aa33812 100644 --- a/awx/ui/client/src/job-results/parse-stdout.service.js +++ b/awx/ui/client/src/job-results/parse-stdout.service.js @@ -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, ''); + line = line.replace(/\[0;32m=/g, ''); + line = line.replace(/\[0;32m1/g, ''); + line = line.replace(/\[0m/g, ''); + return line; }, parseStdout: function(event){ // this object will be used by the ng-repeat in the