From 0c0c1777f7b9b656beabba115e603a25c588ae66 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 17 Oct 2023 08:25:18 -0400 Subject: [PATCH] [8.11] [ML] Fix the model state column in the Trained Models UI (#169068) (#169086) # Backport This will backport the following commits from `main` to `8.11`: - [[ML] Fix the model state column in the Trained Models UI (#169068)](https://github.com/elastic/kibana/pull/169068) ### 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 | 3 ++- 1 file changed, 2 insertions(+), 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 c0249947ae16f..af9b9ba3015e7 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 @@ -35,6 +35,7 @@ import { BUILT_IN_MODEL_TAG, BUILT_IN_MODEL_TYPE, DEPLOYMENT_STATE, + DeploymentState, ELASTIC_MODEL_DEFINITIONS, ELASTIC_MODEL_TAG, ELASTIC_MODEL_TYPE, @@ -349,7 +350,7 @@ export const ModelsList: FC = ({ ); if (elasticModels.length > 0) { for (const model of elasticModels) { - if (model.state === MODEL_STATE.STARTED) { + if (Object.values(DEPLOYMENT_STATE).includes(model.state as DeploymentState)) { // no need to check for the download status if the model has been deployed continue; }