Skip to content

Commit 6fee23a

Browse files
committed
fix: add summary fields
1 parent 356531d commit 6fee23a

File tree

2 files changed

+9
-30
lines changed

2 files changed

+9
-30
lines changed

frontend/src/app/shared/components/utm/table/utm-table/dynamic-table/dynamic-table.component.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,12 @@ export class UtmDynamicTableComponent implements OnInit, OnDestroy {
9090
utmDateFormat = UtmDateFormatEnum;
9191
destroy$: Subject<void> = new Subject<void>();
9292

93-
summaryColumns = [];
93+
summaryColumns = SUMMARY_COLUMNS;
9494

9595
constructor(private indexPatternBehavior: IndexPatternBehavior) {
9696
}
9797

9898
ngOnInit(): void {
99-
this.indexPatternBehavior.pattern$
100-
.pipe(takeUntil(this.destroy$))
101-
.subscribe((log) => {
102-
this.summaryColumns = SUMMARY_COLUMNS.filter( s =>
103-
s.pattern.toLowerCase().includes(log.pattern.pattern.toLowerCase()))[0].fields;
104-
});
10599
}
106100

107101
onSort($event: SortEvent) {
Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
11
export const SUMMARY_COLUMNS = [
2-
{
3-
pattern: 'v11-log-wineventlog-*',
4-
fields: [
5-
{key: {field: 'log.eventName'}, title: 'Event'},
6-
{key: {field: 'dataType'}, title: 'Data Type'},
7-
{key: {field: 'dataSource'}, title: 'Data Source'},
8-
]
9-
},
10-
{
11-
pattern: 'v11-alert-*',
12-
fields: [
13-
{key: {field: 'description'}, title: 'Description'},
14-
{key: {field: 'dataType'}, title: 'Data Type'},
15-
{key: {field: 'dataSource'}, title: 'Data Source'},
16-
]
17-
},
18-
{
19-
pattern: 'v11-log-*',
20-
fields: [
21-
{key: {field: 'tenantName'}, title: 'Tenant'},
2+
223
{key: {field: 'dataType'}, title: 'Data Type'},
234
{key: {field: 'dataSource'}, title: 'Data Source'},
24-
]
25-
}
5+
{key: {field: 'protocol'}, title: 'Protocol'},
6+
{key: {field: 'connectionStatus'}, title: 'Connection status'},
7+
{key: {field: 'statusCode'}, title: 'Status code'},
8+
{key: {field: 'actionResult'}, title: 'Action result'},
9+
{key: {field: 'command'}, title: 'Command'},
10+
{key: {field: 'severity'}, title: 'Severity'},
11+
{key: {field: 'origin.host'}, title: 'Origin host'}
2612
];
27-

0 commit comments

Comments
 (0)