Skip to content

Commit 066c5e9

Browse files
committed
fix(flows): showing url domain if available
1 parent 72bc23b commit 066c5e9

4 files changed

Lines changed: 18 additions & 27 deletions

File tree

src/components/standalone/monitoring/flows/FlowDetail.vue

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,17 @@ const facts = computed<FactsGroup[]>(() => {
8585
if (hostnameInformationVisible.value) {
8686
const hostnameFacts: Fact[] = []
8787
88-
if (_flow.value.flow.host_server_name) {
89-
hostnameFacts.push({
90-
label: t('standalone.flows.hostname'),
91-
value: _flow.value.flow.host_server_name
92-
})
93-
}
94-
9588
if (_flow.value.flow.dns_host_name) {
9689
hostnameFacts.push({
97-
label: t('standalone.flows.domain'),
90+
label: t('standalone.flows.associated_dns'),
9891
value: _flow.value.flow.dns_host_name
9992
})
10093
}
10194
102-
if (_flow.value.flow.ssl?.client_sni) {
95+
if (_flow.value.flow.host_server_name) {
10396
hostnameFacts.push({
104-
label: t('standalone.flows.tls_sni_hostname'),
105-
value: _flow.value.flow.ssl.client_sni
97+
label: t('standalone.flows.hostname'),
98+
value: _flow.value.flow.host_server_name
10699
})
107100
}
108101
@@ -279,8 +272,7 @@ const downloadBytes = computed(() => {
279272
const hostnameInformationVisible = computed<boolean>(() => {
280273
return [
281274
_flow.value?.flow.host_server_name != undefined,
282-
_flow.value?.flow.dns_host_name != undefined,
283-
_flow.value?.flow.ssl?.client_sni != undefined
275+
_flow.value?.flow.dns_host_name != undefined
284276
].some((value) => value)
285277
})
286278
</script>

src/components/standalone/monitoring/flows/FlowTableRow.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,23 @@ const destinationPort = computed<number>(() =>
8181
{{ sourceIp }}:{{ sourcePort }}
8282
</NeTableCell>
8383
<NeTableCell :data-label="t('standalone.flows.destination')">
84-
<NeTooltip v-if="item.flow.host_server_name != undefined" trigger-event="mouseenter click">
84+
<NeTooltip
85+
v-if="item.flow.host_server_name != undefined || item.flow.dns_host_name != undefined"
86+
trigger-event="mouseenter click"
87+
>
8588
<template #content>
8689
<p>{{ t('standalone.flows.destination_ip') }}: {{ destinationIp }}</p>
8790
<p>{{ t('standalone.flows.destination_port') }}: {{ destinationPort }}</p>
8891
<p v-if="item.flow.dns_host_name != undefined">
89-
{{ t('standalone.flows.destination_dns') }} : {{ item.flow.dns_host_name }}
92+
{{ t('standalone.flows.associated_dns') }} : {{ item.flow.dns_host_name }}
9093
</p>
94+
<p v-if="item.flow.host_server_name">
95+
{{ t('standalone.flows.server_name_hint') }}: {{ item.flow.host_server_name }}
96+
</p>
97+
</template>
98+
<template #trigger>
99+
{{ item.flow.dns_host_name ?? item.flow.host_server_name }}:{{ destinationPort }}
91100
</template>
92-
<template #trigger> {{ item.flow.host_server_name }}:{{ destinationPort }} </template>
93101
</NeTooltip>
94102
<template v-else> {{ destinationIp }}:{{ destinationPort }} </template>
95103
</NeTableCell>

src/composables/useFlows.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
faArrowDown,
33
faArrowUp,
44
faBroadcastTower,
5-
faMagnifyingGlass,
65
faQuestion,
76
faUsers,
87
faCancel
@@ -136,15 +135,6 @@ export function matchBadge(tag: string): Badge {
136135
content: 'standalone.flows.broadcast_description'
137136
}
138137
}
139-
case 'scanning': {
140-
return {
141-
id: 'scanning',
142-
text: 'standalone.flows.scanning',
143-
icon: faMagnifyingGlass,
144-
customClasses: ['bg-gray-100', 'text-gray-800', 'dark:bg-gray-700', 'dark:text-gray-100'],
145-
content: 'standalone.flows.scanning_description'
146-
}
147-
}
148138
case 'blocked': {
149139
return {
150140
id: 'blocked',

src/i18n/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2390,7 +2390,8 @@
23902390
"source_port": "Source port",
23912391
"source_mac": "Source MAC",
23922392
"destination_ip": "Destination IP",
2393-
"destination_dns": "Destination DNS",
2393+
"associated_dns": "Associated DNS",
2394+
"server_name_hint": "Server name hint",
23942395
"destination_port": "Destination port",
23952396
"destination_mac": "Destination MAC",
23962397
"traffic_inspection_details": "Traffic Inspection Details",

0 commit comments

Comments
 (0)