|
|
@ -210,7 +210,7 @@ export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> { |
|
|
icon: 'more_horiz', |
|
|
icon: 'more_horiz', |
|
|
isEnabled: (entity) => entity.body.metadata ? entity.body.metadata.length > 0 : false, |
|
|
isEnabled: (entity) => entity.body.metadata ? entity.body.metadata.length > 0 : false, |
|
|
onAction: ($event, entity) => this.showContent($event, entity.body.metadata, |
|
|
onAction: ($event, entity) => this.showContent($event, entity.body.metadata, |
|
|
'event.metadata', ContentType.JSON) |
|
|
'event.metadata', ContentType.JSON, true) |
|
|
}, |
|
|
}, |
|
|
'40px'), |
|
|
'40px'), |
|
|
new EntityActionTableColumn<Event>('error', 'event.error', |
|
|
new EntityActionTableColumn<Event>('error', 'event.error', |
|
|
@ -230,21 +230,20 @@ export class EventTableConfig extends EntityTableConfig<Event, TimePageLink> { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
showContent($event: MouseEvent, content: string, title: string, contentType: ContentType = null): void { |
|
|
showContent($event: MouseEvent, content: string, title: string, contentType: ContentType = null, sortKeys = false): void { |
|
|
if ($event) { |
|
|
if ($event) { |
|
|
$event.stopPropagation(); |
|
|
$event.stopPropagation(); |
|
|
} |
|
|
} |
|
|
let sortedContent: string; |
|
|
if (contentType === ContentType.JSON && sortKeys) { |
|
|
try { |
|
|
try { |
|
|
sortedContent = JSON.stringify(sortObjectKeys(JSON.parse(content))); |
|
|
content = JSON.stringify(sortObjectKeys(JSON.parse(content))); |
|
|
} catch() { |
|
|
} catch (e) {} |
|
|
sortedContent = content; |
|
|
|
|
|
} |
|
|
} |
|
|
this.dialog.open<EventContentDialogComponent, EventContentDialogData>(EventContentDialogComponent, { |
|
|
this.dialog.open<EventContentDialogComponent, EventContentDialogData>(EventContentDialogComponent, { |
|
|
disableClose: true, |
|
|
disableClose: true, |
|
|
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], |
|
|
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], |
|
|
data: { |
|
|
data: { |
|
|
constent: sortedContent, |
|
|
content, |
|
|
title, |
|
|
title, |
|
|
contentType |
|
|
contentType |
|
|
} |
|
|
} |
|
|
|