From e3c75d19d796c366aedc5788960b2c6cc868014f Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 22 Nov 2024 23:21:14 +1100 Subject: [PATCH] [8.17] [ML] Trained Models: fix NaN in a progress bar during the download task initialization (#201221) (#201342) # Backport This will backport the following commits from `main` to `8.17`: - [[ML] Trained Models: fix `NaN` in a progress bar during the download task initialization (#201221)](https://github.com/elastic/kibana/pull/201221) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Dima Arnautov --- .../ml/public/application/model_management/models_list.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/ml/public/application/model_management/models_list.tsx b/x-pack/plugins/ml/public/application/model_management/models_list.tsx index a717995d4ee14..d66ab1ab3db16 100644 --- a/x-pack/plugins/ml/public/application/model_management/models_list.tsx +++ b/x-pack/plugins/ml/public/application/model_management/models_list.tsx @@ -697,7 +697,7 @@ export const ModelsList: FC = ({ <> {downloadState ? ( - (downloadState.downloaded_parts / downloadState.total_parts) * + (downloadState.downloaded_parts / (downloadState.total_parts || -1)) * 100 ).toFixed(0) + '%' : '100%'}