Skip to content

Commit bde4078

Browse files
committed
Add version to the table
1 parent ed805b8 commit bde4078

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/collectors/components/collectors_status_bar.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,16 @@ export const CollectorsStatusBar: React.FC<CollectorsStatusBarProps> = ({
163163
isOpen={isGroupByOpen}
164164
closePopover={() => setIsGroupByOpen(false)}
165165
panelPaddingSize="none"
166-
anchorPosition="downRight"
166+
anchorPosition="downCenter"
167167
>
168168
<EuiSelectable
169169
singleSelection
170170
options={selectableOptions}
171171
onChange={handleGroupByChange}
172172
listProps={{ bordered: false }}
173+
css={`
174+
min-width: 200px;
175+
`}
173176
>
174177
{(list) => list}
175178
</EuiSelectable>

x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/collectors/components/collectors_table.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import {
2222
import { i18n } from '@kbn/i18n';
2323
import { FormattedDate, FormattedMessage, FormattedRelative } from '@kbn/i18n-react';
2424

25+
import { pipelineConfigLabel } from '../../../../../../common/services/pipeline_config_label';
26+
2527
import type { Agent } from '../../../../../../common/types';
2628
import {
2729
getOtelCollectorDisplayName,
@@ -91,7 +93,16 @@ export const CollectorsTable: React.FC<CollectorsTableProps> = ({
9193
defaultMessage: 'Version',
9294
}),
9395
// TODO not implemented yet, waiting for backend to populate the field
94-
render: (_: unknown, collector: Agent) => <EuiBadge>TODO</EuiBadge>,
96+
render: (_: unknown, collector: Agent) => {
97+
if (!collector.pipeline_config) return '-';
98+
return (
99+
<EuiToolTip content={collector.pipeline_config}>
100+
<EuiBadge tabIndex={0} color="hollow">
101+
{pipelineConfigLabel(collector.pipeline_config)}
102+
</EuiBadge>
103+
</EuiToolTip>
104+
);
105+
},
95106
},
96107
{
97108
field: 'signals',

0 commit comments

Comments
 (0)