File tree Expand file tree Collapse file tree 4 files changed +23
-2
lines changed
base/web/template/content Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public function getDetails(string $uuid): array
53
53
$ asyncEventId = $ collection ->getFirstItem ()->getData ('subscription_id ' );
54
54
55
55
try {
56
- $ asyncEvent = $ this ->asyncEventRepository ->get ($ asyncEventId )->getData ();
56
+ $ asyncEvent = $ this ->asyncEventRepository ->get (( int ) $ asyncEventId )->getData ();
57
57
$ this ->traceCache [$ uuid ] = [
58
58
'traces ' => $ traces ['items ' ],
59
59
'async_event ' => $ asyncEvent
Original file line number Diff line number Diff line change @@ -61,10 +61,18 @@ public function getData(): array
61
61
{
62
62
$ uuid = $ this ->request ->getParam ($ this ->requestFieldName );
63
63
$ details = $ this ->traceDetails ->getDetails ($ uuid );
64
+ $ trace = current ($ details ['traces ' ]);
65
+
66
+ /**
67
+ * Prettify JSON by decoding and re-encoding with the JSON_PRETTY_PRINT flag
68
+ */
69
+ $ prettyPrint = json_decode ($ trace ['serialized_data ' ], true );
70
+ $ prettyPrint = json_encode ($ prettyPrint , JSON_PRETTY_PRINT );
71
+ $ trace ['serialized_data ' ] = $ prettyPrint ;
64
72
65
73
return [
66
74
$ uuid => [
67
- 'general ' => current ( $ details [ ' traces ' ])
75
+ 'general ' => $ trace
68
76
]
69
77
];
70
78
}
Original file line number Diff line number Diff line change 61
61
</item >
62
62
</argument >
63
63
<settings >
64
+ <elementTmpl >Aligent_AsyncEvents/content/json</elementTmpl >
64
65
<dataType >text</dataType >
65
66
<label translate =" true" >Serialized Data</label >
66
67
</settings >
Original file line number Diff line number Diff line change
1
+ < pre data-bind ="text: value "
2
+ style ="background: #f6f6f6;
3
+ border: 1px solid #cccccc;
4
+ color: #111111;
5
+ line-height: calc(20/14);
6
+ margin: 0 0 10px;
7
+ padding: 10px;
8
+ font-size: 1.2rem;
9
+ display: block;
10
+ word-wrap: break-word; "
11
+ >
12
+ </ pre >
You can’t perform that action at this time.
0 commit comments