diff --git a/x-pack/plugins/security_solution/public/entity_analytics/common/entity_model.ts b/x-pack/plugins/security_solution/public/entity_analytics/common/entity_model.ts index 88a0949155891..e9ba720b84e2e 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/common/entity_model.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/common/entity_model.ts @@ -31,11 +31,13 @@ export const useEntityModel = () => { body: JSON.stringify(entityDefinition), }) .then((response) => { + // eslint-disable-next-line no-console console.log(response); }); }, [http]); const get = useCallback(() => { + // eslint-disable-next-line no-console console.log('Getting entity model'); if (!http) return Promise.resolve([]); @@ -50,6 +52,7 @@ export const useEntityModel = () => { }, [http]); const deleteAPI = useCallback(() => { + // eslint-disable-next-line no-console console.log('Deleting entity model'); if (!http) return Promise.resolve([]); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/common/vector_search.ts b/x-pack/plugins/security_solution/public/entity_analytics/common/vector_search.ts index f9f96a4aa4c56..ce5677151c595 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/common/vector_search.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/common/vector_search.ts @@ -61,36 +61,43 @@ const createComponentTemplate = async (http: HttpSetup) => }); const installModelSettings = async (http: HttpSetup) => { + // eslint-disable-next-line no-console console.log('create ingest pipeline'); await createIngestPipelineAPI(http); - + // eslint-disable-next-line no-console console.log('create component template'); await createComponentTemplate(http); }; const installModel = async (http: HttpSetup) => { - const [model] = await getModelAPI(http); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const [model] = (await getModelAPI(http)) as [any]; if (model) { + // eslint-disable-next-line no-console console.log('-------------- model already installed'); } else { + // eslint-disable-next-line no-console console.log('install model api call'); await installModelAPI(http); } - + // eslint-disable-next-line no-console console.log('await for model to be ready'); await waitForModelInstallation(http); - + // eslint-disable-next-line no-console console.log('deploy model api call'); await deployModelAPI(http); }; const waitForModelInstallation = async (http: HttpSetup) => { - let [tempModel] = await getModelAPI(http); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let [tempModel] = (await getModelAPI(http)) as [any]; while (!tempModel.fully_defined) { + // eslint-disable-next-line no-console console.log('waiting 2 seconds for model installation...'); await new Promise((resolve) => setTimeout(resolve, 2000)); // wait 2 seconds - [tempModel] = await getModelAPI(http); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [tempModel] = (await getModelAPI(http)) as [any]; } };