diff --git a/web/src/components/netflow-traffic.tsx b/web/src/components/netflow-traffic.tsx index d4df841f7..c06f0a3a8 100644 --- a/web/src/components/netflow-traffic.tsx +++ b/web/src/components/netflow-traffic.tsx @@ -122,6 +122,18 @@ export const NetflowTraffic: React.FC = ({ return model.config.features.includes('pktDrop'); }, [model.config.features]); + const isUdn = React.useCallback(() => { + return model.config.features.includes('udnMapping'); + }, [model.config.features]); + + const isPktXlat = React.useCallback(() => { + return model.config.features.includes('packetTranslation'); + }, [model.config.features]); + + const isNetEvents = React.useCallback(() => { + return model.config.features.includes('networkEvents'); + }, [model.config.features]); + const isPromOnly = React.useCallback(() => { return !allowLoki() || model.dataSource === 'prom'; }, [allowLoki, model.dataSource]); @@ -209,6 +221,9 @@ export const NetflowTraffic: React.FC = ({ (isDNSTracking() || !fd.id.startsWith('dns_')) && (isPktDrop() || !fd.id.startsWith('pkt_drop_')) && (isFlowRTT() || fd.id !== 'time_flow_rtt') && + (isUdn() || fd.id !== 'udns') && + (isPktXlat() || !fd.id.startsWith('xlat_')) && + (isNetEvents() || fd.id !== 'network_events') && (!isPromOnly() || checkFilterAvailable(fd, model.config.promLabels)) ); // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/web/src/model/config.ts b/web/src/model/config.ts index a944ad35f..e0db74930 100644 --- a/web/src/model/config.ts +++ b/web/src/model/config.ts @@ -5,7 +5,15 @@ import { RecordType } from './flow-query'; import { RawQuickFilter } from './quick-filters'; import { ScopeConfigDef } from './scope'; -export type Feature = 'multiCluster' | 'zones' | 'pktDrop' | 'dnsTracking' | 'flowRTT'; +export type Feature = + | 'multiCluster' + | 'zones' + | 'pktDrop' + | 'dnsTracking' + | 'flowRTT' + | 'udnMapping' + | 'packetTranslation' + | 'networkEvents'; export type Deduper = { mark: boolean; diff --git a/web/src/model/filters.ts b/web/src/model/filters.ts index 598ad8e75..b34b66285 100644 --- a/web/src/model/filters.ts +++ b/web/src/model/filters.ts @@ -32,6 +32,7 @@ export type FilterId = | 'dscp' | 'icmp_type' | 'icmp_code' + | 'udns' | 'id' | 'pkt_drop_state' | 'pkt_drop_cause' @@ -39,7 +40,13 @@ export type FilterId = | 'dns_latency' | 'dns_flag_response_code' | 'dns_errno' - | 'time_flow_rtt'; + | 'time_flow_rtt' + | 'network_events' + | 'xlat_zone_id' + | 'xlat_src_address' + | 'xlat_dst_address' + | 'xlat_src_port' + | 'xlat_dst_port'; export interface FilterConfigDef { id: string;