From a89b31b5f3f87c1cd3aad24fd9fbb14dde2689b6 Mon Sep 17 00:00:00 2001 From: Kyujin Cho Date: Tue, 31 Oct 2023 21:54:58 -0700 Subject: [PATCH] fix: hide infernece app from app launcher (#2002) --- src/components/backend-ai-app-launcher.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/backend-ai-app-launcher.ts b/src/components/backend-ai-app-launcher.ts index 1c9291caf7..f2ffb841a5 100644 --- a/src/components/backend-ai-app-launcher.ts +++ b/src/components/backend-ai-app-launcher.ts @@ -491,8 +491,14 @@ export default class BackendAiAppLauncher extends BackendAIPage { } this.preOpenedPortList = []; const preOpenAppNameList = servicePorts - ?.filter((item) => item.protocol === 'preopen') + ?.filter( + (item) => item.protocol === 'preopen' && item.is_inference === false, + ) .map((item) => item.name); + const inferenceAppNameList = servicePorts + ?.filter((item) => item.is_inference === true) + .map((item) => item.name); + preOpenAppNameList?.forEach((elm) => { this.preOpenedPortList.push({ name: elm, @@ -502,8 +508,11 @@ export default class BackendAiAppLauncher extends BackendAIPage { }); }); const filteredAppServices = - appServices?.filter((item) => !preOpenAppNameList?.includes(item)) ?? - appServices; + appServices?.filter( + (item) => + !preOpenAppNameList?.includes(item) && + !inferenceAppNameList?.includes(item), + ) ?? appServices; this.appSupportList = []; if (!filteredAppServices?.includes('ttyd')) { this.appSupportList.push({