Skip to content

Commit 1e75d6c

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

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
@@ -17,7 +17,6 @@ import { formatProtocol, getProtocolDocUrl } from '../../../utils/protocol';
1717
import { decomposeTCPFlagsBitfield, getTCPFlagsDocUrl } from '../../../utils/tcp-flags';
1818
import { Size } from '../../dropdowns/table-display-dropdown';
1919
import './record-field.css';
20-
import { networkEventToString } from '../../../model/network-events';
2120

2221
export type RecordFieldFilter = {
2322
type: 'filter' | 'switch';
@@ -514,16 +513,6 @@ export const RecordField: React.FC<RecordFieldProps> = ({
514513
: emptyText()
515514
);
516515
}
517-
case ColumnsId.networkEvents: {
518-
if (flow.fields.NetworkEvents && flow.fields.NetworkEvents.length > 0) {
519-
const asStrings = flow.fields.NetworkEvents.map(networkEventToString);
520-
if (asStrings.length === 2) {
521-
return doubleContainer(simpleTextWithTooltip(asStrings[0]), simpleTextWithTooltip(asStrings[1]));
522-
}
523-
// else we will show values as single joigned string
524-
return singleContainer(simpleTextWithTooltip(asStrings.join(', ')));
525-
}
526-
}
527516
default:
528517
if (value === undefined) {
529518
return emptyText();

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
@@ -79,8 +79,7 @@ export enum ColumnsId {
7979
packetsab = 'Packets_AB',
8080
packetsba = 'Packets_BA',
8181
isfirst = 'IsFirst',
82-
numflow = 'numFlowLogs',
83-
networkEvents = 'NetworkEvents'
82+
numflow = 'numFlowLogs'
8483
}
8584

8685
export interface ColumnConfigDef {

0 commit comments

Comments
 (0)