Skip to content

Commit adc4f9c

Browse files
committed
Revert "get net events messages - web reimpl"
This reverts commit 8efee4c.
1 parent 25c2f5b commit adc4f9c

File tree

4 files changed

+3
-80
lines changed

4 files changed

+3
-80
lines changed

web/src/api/ipfix.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* eslint-disable max-len */
22
import { TFunction } from 'i18next';
33
import { RecordType } from '../model/flow-query';
4-
import { NetworkEvent } from '../model/network-events';
54

65
// Please keep this file documented: it is used in doc generation
76
// To regenerate doc, run `make generate-doc` - and also check this page:
@@ -19,7 +18,7 @@ export const getRecordValue = (record: Record, fieldOrLabel: string, defaultValu
1918
* This is mandatory to ensure fields types
2019
*/
2120
if (record.fields[fieldOrLabel as keyof Fields] !== undefined) {
22-
return record.fields[fieldOrLabel as keyof Fields] as string | number | string[] | undefined;
21+
return record.fields[fieldOrLabel as keyof Fields];
2322
}
2423
// check if label exists
2524
if (record.labels[fieldOrLabel as keyof Labels] !== undefined) {
@@ -117,7 +116,7 @@ export interface Fields {
117116
/** Flow direction array from the network interface observation point */
118117
IfDirections?: IfDirection[];
119118
/** Network Events */
120-
NetworkEvents?: NetworkEvent[];
119+
NetworkEvents?: string[];
121120
/** Logical OR combination of unique TCP flags comprised in the flow, as per RFC-9293, with additional custom flags to represent the following per-packet combinations: SYN+ACK (0x100), FIN+ACK (0x200) and RST+ACK (0x400). */
122121
Flags?: number;
123122
/** Number of packets */

web/src/components/drawer/record/record-field.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import { formatProtocol, getProtocolDocUrl } from '../../../utils/protocol';
2424
import { decomposeTCPFlagsBitfield, getTCPFlagsDocUrl } from '../../../utils/tcp-flags';
2525
import { Size } from '../../dropdowns/table-display-dropdown';
2626
import './record-field.css';
27-
import { networkEventToString } from '../../../model/network-events';
2827

2928
export type RecordFieldFilter = {
3029
type: 'filter' | 'switch';
@@ -648,16 +647,6 @@ export const RecordField: React.FC<RecordFieldProps> = ({
648647
: emptyText()
649648
);
650649
}
651-
case ColumnsId.networkEvents: {
652-
if (flow.fields.NetworkEvents && flow.fields.NetworkEvents.length > 0) {
653-
const asStrings = flow.fields.NetworkEvents.map(networkEventToString);
654-
if (asStrings.length === 2) {
655-
return doubleContainer(simpleTextWithTooltip(asStrings[0]), simpleTextWithTooltip(asStrings[1]));
656-
}
657-
// else we will show values as single joigned string
658-
return singleContainer(simpleTextWithTooltip(asStrings.join(', ')));
659-
}
660-
}
661650
default:
662651
if (Array.isArray(value) && value.length) {
663652
// we can only show two values properly with containers

web/src/model/network-events.ts

Lines changed: 0 additions & 64 deletions
This file was deleted.

web/src/utils/columns.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ export enum ColumnsId {
8080
packetsab = 'Packets_AB',
8181
packetsba = 'Packets_BA',
8282
isfirst = 'IsFirst',
83-
numflow = 'numFlowLogs',
84-
networkEvents = 'NetworkEvents'
83+
numflow = 'numFlowLogs'
8584
}
8685

8786
export interface ColumnConfigDef {

0 commit comments

Comments
 (0)