Skip to content

Commit 3a6a6a2

Browse files
authored
feat: [5077]: Fixed logs container for fault execution (#5198)
Signed-off-by: Amit Kumar Das <[email protected]>
1 parent 92e8e95 commit 3a6a6a2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

chaoscenter/web/src/controllers/CustomStepLog/CustomStepLog.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,15 @@ export default function CustomStepLogController({
6767
? (() => {
6868
try {
6969
return Object.entries(JSON.parse(podLogs.getPodLog.log))
70-
.map(([key, value]) => `${key}: ${value}`)
70+
.map(([key, value]) => {
71+
if (typeof value === 'object' && value !== null) {
72+
// Flatten chaosLogs inner object
73+
return `${key}:\n${Object.entries(value)
74+
.map(([k, v]) => ` ${k}: ${v}`)
75+
.join('\n')}`;
76+
}
77+
return `${key}: ${value}`;
78+
})
7179
.join('\n');
7280
} catch (e) {
7381
return podLogs.getPodLog.log;

0 commit comments

Comments
 (0)