mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 01:47:31 -02:30
Merge pull request #9264 from jakemcdermott/fix-output-error-attr-no-stdout
Handle error state with traceback and no stdout Reviewed-by: Jake McDermott <yo@jakemcdermott.me> https://github.com/jakemcdermott
This commit is contained in:
@@ -347,7 +347,7 @@ class JobOutput extends Component {
|
|||||||
let countOffset = 1;
|
let countOffset = 1;
|
||||||
if (job?.result_traceback) {
|
if (job?.result_traceback) {
|
||||||
const tracebackEvent = {
|
const tracebackEvent = {
|
||||||
counter: -1,
|
counter: 1,
|
||||||
created: null,
|
created: null,
|
||||||
event: null,
|
event: null,
|
||||||
type: null,
|
type: null,
|
||||||
@@ -357,7 +357,7 @@ class JobOutput extends Component {
|
|||||||
const firstIndex = newResults.findIndex(
|
const firstIndex = newResults.findIndex(
|
||||||
jobEvent => jobEvent.counter === 1
|
jobEvent => jobEvent.counter === 1
|
||||||
);
|
);
|
||||||
if (firstIndex) {
|
if (firstIndex && newResults[firstIndex]?.stdout) {
|
||||||
const stdoutLines = newResults[firstIndex].stdout.split('\r\n');
|
const stdoutLines = newResults[firstIndex].stdout.split('\r\n');
|
||||||
stdoutLines[0] = tracebackEvent.stdout;
|
stdoutLines[0] = tracebackEvent.stdout;
|
||||||
newResults[firstIndex].stdout = stdoutLines.join('\r\n');
|
newResults[firstIndex].stdout = stdoutLines.join('\r\n');
|
||||||
|
|||||||
Reference in New Issue
Block a user