Skip to content

Commit ff787f5

Browse files
committed
refactor match and back and forth options
1 parent 9812408 commit ff787f5

28 files changed

+800
-446
lines changed

config/sample-config.yaml

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,46 +480,55 @@ frontend:
480480
- id: K8S_Name
481481
name: Names
482482
calculated: '[SrcK8S_Name,DstK8S_Name]'
483+
filter: name
483484
default: false
484485
width: 15
485486
- id: K8S_Type
486487
name: Kinds
487488
calculated: '[SrcK8S_Type,DstK8S_Type]'
489+
filter: kind
488490
default: false
489491
width: 10
490492
- id: K8S_OwnerName
491493
name: Owners
492494
calculated: '[SrcK8S_OwnerName,DstK8S_OwnerName]'
495+
filter: owner_name
493496
default: false
494497
width: 15
495498
- id: K8S_OwnerType
496499
name: Owner Kinds
497500
calculated: '[SrcK8S_OwnerType,DstK8S_OwnerType]'
501+
filter: kind
498502
default: false
499503
width: 10
500504
- id: K8S_Namespace
501505
name: Namespaces
502506
calculated: '[SrcK8S_Namespace,DstK8S_Namespace]'
507+
filter: namespace
503508
default: false
504509
width: 15
505510
- id: Addr
506511
name: IP
507512
calculated: '[SrcAddr,DstAddr]'
513+
filter: address
508514
default: false
509515
width: 10
510516
- id: Port
511517
name: Ports
512518
calculated: '[SrcPort,DstPort]'
519+
filter: port
513520
default: false
514521
width: 10
515522
- id: Mac
516523
name: MAC
517524
calculated: '[SrcMac,DstMac]'
525+
filter: mac
518526
default: false
519527
width: 10
520528
- id: K8S_HostIP
521529
name: Node IP
522530
calculated: '[SrcK8S_HostIP,DstK8S_HostIP]'
531+
filter: host_address
523532
default: false
524533
width: 10
525534
- id: Sampling
@@ -530,16 +539,19 @@ frontend:
530539
- id: K8S_HostName
531540
name: Node Name
532541
calculated: '[SrcK8S_HostName,DstK8S_HostName]'
542+
filter: host_name
533543
default: false
534544
width: 15
535545
- id: K8S_Object
536546
name: Kubernetes Objects
537547
calculated: '[column.SrcK8S_Object,column.DstK8S_Object]'
548+
filter: resource
538549
default: false
539550
width: 15
540551
- id: K8S_OwnerObject
541552
name: Owner Kubernetes Objects
542553
calculated: '[column.SrcK8S_OwnerObject,column.DstK8S_OwnerObject]'
554+
filter: resource
543555
default: false
544556
width: 15
545557
- id: K8S_FlowLayer
@@ -822,6 +834,22 @@ frontend:
822834
name: Cluster
823835
component: autocomplete
824836
hint: Specify a cluster ID or name.
837+
- id: namespace
838+
name: Namespace
839+
component: autocomplete
840+
autoCompleteAddsQuotes: true
841+
category: targeteable
842+
placeholder: 'E.g: netobserv'
843+
hint: Specify a single kubernetes name.
844+
examples: |-
845+
Specify a single kubernetes name following these rules:
846+
- Containing any alphanumeric, hyphen, underscrore or dot character
847+
- Partial text like cluster, cluster-image, image-registry
848+
- Exact match using quotes like "cluster-image-registry"
849+
- Case sensitive match using quotes like "Deployment"
850+
- Starting text like cluster, "cluster-*"
851+
- Ending text like "*-registry"
852+
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
825853
- id: src_namespace
826854
name: Namespace
827855
component: autocomplete
@@ -854,6 +882,21 @@ frontend:
854882
- Starting text like cluster, "cluster-*"
855883
- Ending text like "*-registry"
856884
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
885+
- id: name
886+
name: Name
887+
component: text
888+
category: targeteable
889+
placeholder: 'E.g: my-pod'
890+
hint: Specify a single kubernetes name.
891+
examples: |-
892+
Specify a single kubernetes name following these rules:
893+
- Containing any alphanumeric, hyphen, underscrore or dot character
894+
- Partial text like cluster, cluster-image, image-registry
895+
- Exact match using quotes like "cluster-image-registry"
896+
- Case sensitive match using quotes like "Deployment"
897+
- Starting text like cluster, "cluster-*"
898+
- Ending text like "*-registry"
899+
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
857900
- id: src_name
858901
name: Name
859902
component: text
@@ -884,6 +927,12 @@ frontend:
884927
- Starting text like cluster, "cluster-*"
885928
- Ending text like "*-registry"
886929
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
930+
- id: kind
931+
name: Kind
932+
component: autocomplete
933+
autoCompleteAddsQuotes: true
934+
category: targeteable
935+
placeholder: 'E.g: Pod, Service'
887936
- id: src_kind
888937
name: Kind
889938
component: autocomplete
@@ -896,6 +945,21 @@ frontend:
896945
autoCompleteAddsQuotes: true
897946
category: destination
898947
placeholder: 'E.g: Pod, Service'
948+
- id: owner_name
949+
name: Owner Name
950+
component: text
951+
category: targeteable
952+
placeholder: 'E.g: my-deployment'
953+
hint: Specify a single kubernetes name.
954+
examples: |-
955+
Specify a single kubernetes name following these rules:
956+
- Containing any alphanumeric, hyphen, underscrore or dot character
957+
- Partial text like cluster, cluster-image, image-registry
958+
- Exact match using quotes like "cluster-image-registry"
959+
- Case sensitive match using quotes like "Deployment"
960+
- Starting text like cluster, "cluster-*"
961+
- Ending text like "*-registry"
962+
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
899963
- id: src_owner_name
900964
name: Owner Name
901965
component: text
@@ -926,6 +990,11 @@ frontend:
926990
- Starting text like cluster, "cluster-*"
927991
- Ending text like "*-registry"
928992
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
993+
- id: zone
994+
name: Zone
995+
component: autocomplete
996+
category: targeteable
997+
hint: Specify a single zone.
929998
- id: src_zone
930999
name: Zone
9311000
component: autocomplete
@@ -936,6 +1005,11 @@ frontend:
9361005
component: autocomplete
9371006
category: destination
9381007
hint: Specify a single zone.
1008+
- id: subnet_label
1009+
name: Subnet Label
1010+
component: autocomplete
1011+
category: targeteable
1012+
hint: Specify a subnet label, or an empty string to get unmatched sources.
9391013
- id: src_subnet_label
9401014
name: Subnet Label
9411015
component: autocomplete
@@ -946,6 +1020,17 @@ frontend:
9461020
component: autocomplete
9471021
category: destination
9481022
hint: Specify a subnet label, or an empty string to get unmatched destinations.
1023+
- id: resource
1024+
name: Resource
1025+
component: autocomplete
1026+
category: targeteable
1027+
placeholder: 'E.g: Deployment.example.my-dep or Pod.default.my-pod'
1028+
hint: Specify an existing resource from its kind, namespace and name.
1029+
examples: |-
1030+
Specify a kind, namespace and name from existing:
1031+
- Select kind first from suggestions
1032+
- Then select namespace from suggestions
1033+
- Finally select name from suggestions
9491034
- id: src_resource
9501035
name: Resource
9511036
component: autocomplete
@@ -968,6 +1053,17 @@ frontend:
9681053
- Select kind first from suggestions
9691054
- Then select namespace from suggestions
9701055
- Finally select name from suggestions
1056+
- id: address
1057+
name: IP
1058+
component: text
1059+
category: targeteable
1060+
hint: Specify a single IP or range.
1061+
placeholder: 'E.g: 192.0.2.0'
1062+
examples: |-
1063+
Specify IP following one of these rules:
1064+
- A single IPv4 or IPv6 address like 192.0.2.0, ::1
1065+
- An IP address range like 192.168.0.1-192.189.10.12, 2001:db8::1-2001:db8::8
1066+
- A CIDR specification like 192.51.100.0/24, 2001:db8::/32
9711067
- id: src_address
9721068
name: IP
9731069
component: text
@@ -990,6 +1086,17 @@ frontend:
9901086
- A single IPv4 or IPv6 address like 192.0.2.0, ::1
9911087
- An IP address range like 192.168.0.1-192.189.10.12, 2001:db8::1-2001:db8::8
9921088
- A CIDR specification like 192.51.100.0/24, 2001:db8::/32
1089+
- id: port
1090+
name: Port
1091+
component: autocomplete
1092+
category: targeteable
1093+
hint: Specify a single port number or name.
1094+
placeholder: 'E.g: 80'
1095+
examples: |-
1096+
Specify a single port following one of these rules:
1097+
- A port number like 80, 21
1098+
- A IANA name like HTTP, FTP
1099+
docUrl: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
9931100
- id: src_port
9941101
name: Port
9951102
component: autocomplete
@@ -1012,6 +1119,12 @@ frontend:
10121119
- A port number like 80, 21
10131120
- A IANA name like HTTP, FTP
10141121
docUrl: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
1122+
- id: mac
1123+
name: MAC
1124+
component: text
1125+
category: targeteable
1126+
placeholder: 'E.g: 42:01:0A:00:00:01'
1127+
hint: Specify a single MAC address.
10151128
- id: src_mac
10161129
name: MAC
10171130
component: text
@@ -1024,6 +1137,17 @@ frontend:
10241137
category: destination
10251138
placeholder: 'E.g: 42:01:0A:00:00:01'
10261139
hint: Specify a single MAC address.
1140+
- id: host_address
1141+
name: Node IP
1142+
component: text
1143+
category: targeteable
1144+
placeholder: 'E.g: 10.0.0.1'
1145+
hint: Specify a single IP or range.
1146+
examples: |-
1147+
Specify IP following one of these rules:
1148+
- A single IPv4 or IPv6 address like 192.0.2.0, ::1
1149+
- An IP address range like 192.168.0.1-192.189.10.12, 2001:db8::1-2001:db8::8
1150+
- A CIDR specification like 192.51.100.0/24, 2001:db8::/32
10271151
- id: src_host_address
10281152
name: Node IP
10291153
component: text
@@ -1046,6 +1170,21 @@ frontend:
10461170
- A single IPv4 or IPv6 address like 192.0.2.0, ::1
10471171
- An IP address range like 192.168.0.1-192.189.10.12, 2001:db8::1-2001:db8::8
10481172
- A CIDR specification like 192.51.100.0/24, 2001:db8::/32
1173+
- id: host_name
1174+
name: Node Name
1175+
component: text
1176+
category: targeteable
1177+
placeholder: 'E.g: my-node'
1178+
hint: Specify a single kubernetes name.
1179+
examples: |-
1180+
Specify a single kubernetes name following these rules:
1181+
- Containing any alphanumeric, hyphen, underscrore or dot character
1182+
- Partial text like cluster, cluster-image, image-registry
1183+
- Exact match using quotes like "cluster-image-registry"
1184+
- Case sensitive match using quotes like "Deployment"
1185+
- Starting text like cluster, "cluster-*"
1186+
- Ending text like "*-registry"
1187+
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
10491188
- id: src_host_name
10501189
name: Node Name
10511190
component: text
@@ -1076,6 +1215,10 @@ frontend:
10761215
- Starting text like cluster, "cluster-*"
10771216
- Ending text like "*-registry"
10781217
- Pattern like "cluster-*-registry", "c*-*-r*y", -i*e-
1218+
- id: network
1219+
name: Network Name
1220+
component: text
1221+
category: targeteable
10791222
- id: src_network
10801223
name: Network Name
10811224
component: text

web/locales/en/plugin__netobserv-plugin.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
"Force": "Force",
7171
"Grid": "Grid",
7272
"Invalid": "Invalid",
73+
"Any": "Any",
74+
"One way": "One way",
75+
"Peers": "Peers",
7376
"rate": "rate",
7477
"Average": "Average",
7578
"Latest": "Latest",
@@ -95,8 +98,6 @@
9598
"Loki": "Loki",
9699
"Prometheus": "Prometheus",
97100
"Auto": "Auto",
98-
"Match all": "Match all",
99-
"Match any": "Match any",
100101
"Fully dropped": "Fully dropped",
101102
"Containing drops": "Containing drops",
102103
"Without drops": "Without drops",
@@ -109,8 +110,6 @@
109110
"Datasource": "Datasource",
110111
"Only available when FlowCollector.prometheus.enable is true for Overview and Topology tabs": "Only available when FlowCollector.prometheus.enable is true for Overview and Topology tabs",
111112
"Only available when FlowCollector.loki.enable is true": "Only available when FlowCollector.loki.enable is true",
112-
"Whether each query result has to match all the filters or just any of them": "Whether each query result has to match all the filters or just any of them",
113-
"Match filters": "Match filters",
114113
"Filter flows by their drop status. Only packets dropped by the kernel are monitored here.": "Filter flows by their drop status. Only packets dropped by the kernel are monitored here.",
115114
"Fully dropped shows the flows that are 100% dropped": "Fully dropped shows the flows that are 100% dropped",
116115
"Containing drops shows the flows having at least one packet dropped": "Containing drops shows the flows having at least one packet dropped",
@@ -373,23 +372,25 @@
373372
"Not equals": "Not equals",
374373
"More than": "More than",
375374
"Learn more": "Learn more",
375+
"Peer A": "Peer A",
376+
"Peer B": "Peer B",
377+
"Peer": "Peer",
376378
"Not": "Not",
377379
"more than": "more than",
378380
"Disable": "Disable",
379381
"Enable": "Enable",
380382
"group filter": "group filter",
381383
"filter": "filter",
382-
"Swap": "Swap",
384+
"As peer A": "As peer A",
385+
"As source": "As source",
386+
"As peer B": "As peer B",
387+
"As destination": "As destination",
383388
"Remove": "Remove",
384389
"Edit filters": "Edit filters",
385390
"Reset defaults": "Reset defaults",
386391
"Clear all": "Clear all",
387-
"Swap source and destination filters": "Swap source and destination filters",
388-
"Back and forth": "Back and forth",
389-
"One way": "One way",
390-
"Switch between one way / back and forth filtering": "Switch between one way / back and forth filtering",
391-
"One way shows traffic strictly as defined per your filters": "One way shows traffic strictly as defined per your filters",
392-
"Back and forth shows traffic according to your filters, plus the related return traffic": "Back and forth shows traffic according to your filters, plus the related return traffic",
392+
"Swap": "Swap",
393+
"Swap from and to filters": "Swap from and to filters",
393394
"Quick filters": "Quick filters",
394395
"More options": "More options",
395396
"Export overview": "Export overview",
@@ -425,7 +426,6 @@
425426
"Not a valid MAC address": "Not a valid MAC address",
426427
"Unknown protocol": "Unknown protocol",
427428
"Unknown direction": "Unknown direction",
428-
"Common": "Common",
429429
"(non nodes)": "(non nodes)",
430430
"(non pods)": "(non pods)",
431431
"internal": "internal",

0 commit comments

Comments
 (0)