...
|
...
|
@@ -210,7 +210,7 @@ export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> { |
210
|
210
|
icon: 'more_horiz',
|
211
|
211
|
isEnabled: (entity) => entity.body.metadata ? entity.body.metadata.length > 0 : false,
|
212
|
212
|
onAction: ($event, entity) => this.showContent($event, entity.body.metadata,
|
213
|
|
- 'event.metadata', ContentType.JSON)
|
|
213
|
+ 'event.metadata', ContentType.JSON, true)
|
214
|
214
|
},
|
215
|
215
|
'40px'),
|
216
|
216
|
new EntityActionTableColumn<Event>('error', 'event.error',
|
...
|
...
|
@@ -230,21 +230,20 @@ export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> { |
230
|
230
|
}
|
231
|
231
|
}
|
232
|
232
|
|
233
|
|
- showContent($event: MouseEvent, content: string, title: string, contentType: ContentType = null): void {
|
|
233
|
+ showContent($event: MouseEvent, content: string, title: string, contentType: ContentType = null, sortKeys = false): void {
|
234
|
234
|
if ($event) {
|
235
|
235
|
$event.stopPropagation();
|
236
|
236
|
}
|
237
|
|
- let sortedContent: string;
|
238
|
|
- try {
|
239
|
|
- sortedContent = JSON.stringify(sortObjectKeys(JSON.parse(content)));
|
240
|
|
- } catch() {
|
241
|
|
- sortedContent = content;
|
|
237
|
+ if (contentType === ContentType.JSON && sortKeys) {
|
|
238
|
+ try {
|
|
239
|
+ content = JSON.stringify(sortObjectKeys(JSON.parse(content)));
|
|
240
|
+ } catch (e) {}
|
242
|
241
|
}
|
243
|
242
|
this.dialog.open<EventContentDialogComponent, EventContentDialogData>(EventContentDialogComponent, {
|
244
|
243
|
disableClose: true,
|
245
|
244
|
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
|
246
|
245
|
data: {
|
247
|
|
- constent: sortedContent,
|
|
246
|
+ content,
|
248
|
247
|
title,
|
249
|
248
|
contentType
|
250
|
249
|
}
|
...
|
...
|
|