Skip to content

Commit 3468c48

Browse files
authored
NETOBSERV-1992: explain partial flows [backport 1.8] (#704)
* NETOBSERV-1992: explain partial flows * format
1 parent 13cab91 commit 3468c48

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

web/locales/en/plugin__netobserv-plugin.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"Switch {{name}} option": "Switch {{name}} option",
5353
"Conversation event information": "Conversation event information",
5454
"Flow information": "Flow information",
55+
"This is a partial flow: it contains only enrichment data and is missing some basic information such as byte and packet counters, TCP flags or MAC addresses. This information can likely be found in adjacent flows.": "This is a partial flow: it contains only enrichment data and is missing some basic information such as byte and packet counters, TCP flags or MAC addresses. This information can likely be found in adjacent flows.",
5556
"More info": "More info",
5657
"Raw": "Raw",
5758
"JSON": "JSON",

web/src/components/drawer/record/record-panel.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,13 @@ div.record-field-popover-body,
8787
div.record-field-popover-footer {
8888
white-space: pre-line;
8989
word-break: break-word;
90-
}
90+
}
91+
92+
.record-panel-warning {
93+
color: #2B9AF3;
94+
margin-right: 5px;
95+
}
96+
97+
#partial-flow-text {
98+
margin-bottom: 10px;
99+
}

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
TextContent,
2121
TextVariants
2222
} from '@patternfly/react-core';
23+
import { InfoCircleIcon } from '@patternfly/react-icons';
2324
import _ from 'lodash';
2425
import * as React from 'react';
2526
import { useTranslation } from 'react-i18next';
@@ -342,6 +343,8 @@ export const RecordPanel: React.FC<RecordDrawerProps> = ({
342343
)
343344
);
344345

346+
const isPartialFlow = !record.fields.Bytes && !record.fields.Packets;
347+
345348
return (
346349
<DrawerPanelContent
347350
data-test-id={id}
@@ -370,6 +373,14 @@ export const RecordPanel: React.FC<RecordDrawerProps> = ({
370373
role="region"
371374
>
372375
<Tab className="drawer-tab" eventKey={'details'} title={<TabTitleText>{t('Details')}</TabTitleText>}>
376+
{isPartialFlow && (
377+
<Text id="partial-flow-text" component={TextVariants.p}>
378+
<InfoCircleIcon className="record-panel-warning" />
379+
{t(
380+
'This is a partial flow: it contains only enrichment data and is missing some basic information such as byte and packet counters, TCP flags or MAC addresses. This information can likely be found in adjacent flows.'
381+
)}
382+
</Text>
383+
)}
373384
<Accordion asDefinitionList={false}>
374385
{groups.map((g, i) =>
375386
getGroup(

0 commit comments

Comments
 (0)