From 1cf8b9dfd145500e3dd09235b05c8f94032510d7 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Sat, 26 Oct 2024 03:41:39 +1100 Subject: [PATCH] [8.x] [ML] Update allocations tooltip to clarify that it's per node (#197099) (#197846) # Backport This will backport the following commits from `main` to `8.x`: - [[ML] Update allocations tooltip to clarify that it's per node (#197099)](https://github.com/elastic/kibana/pull/197099) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) \n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com> --- .../nodes_overview/allocated_models.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/ml/public/application/memory_usage/nodes_overview/allocated_models.tsx b/x-pack/plugins/ml/public/application/memory_usage/nodes_overview/allocated_models.tsx index bce892a26b678..4dd04780e2e92 100644 --- a/x-pack/plugins/ml/public/application/memory_usage/nodes_overview/allocated_models.tsx +++ b/x-pack/plugins/ml/public/application/memory_usage/nodes_overview/allocated_models.tsx @@ -24,6 +24,7 @@ import type { NodeDeploymentStatsResponse, } from '../../../../common/types/trained_models'; import { useFieldFormatter } from '../../contexts/kibana/use_field_formatter'; +import { useEnabledFeatures } from '../../contexts/ml'; interface AllocatedModelsProps { models: NodeDeploymentStatsResponse['allocated_models']; @@ -38,6 +39,7 @@ export const AllocatedModels: FC = ({ const dateFormatter = useFieldFormatter(FIELD_FORMAT_IDS.DATE); const durationFormatter = useFieldFormatter(FIELD_FORMAT_IDS.DURATION); const euiTheme = useEuiTheme(); + const { showNodeInfo } = useEnabledFeatures(); const columns: Array> = [ { @@ -105,9 +107,20 @@ export const AllocatedModels: FC = ({ width: '8%', name: ( {i18n.translate('xpack.ml.trainedModels.nodesList.modelsList.allocationHeader', {