From d93b5089a6e7896d26ee1a84f48bd2380407a481 Mon Sep 17 00:00:00 2001 From: Kyujin Cho Date: Sat, 28 Oct 2023 16:45:28 +0900 Subject: [PATCH] fix: hide infernece app from app launcher --- 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 e49f5c653a..1a433d1a42 100644 --- a/src/components/backend-ai-app-launcher.ts +++ b/src/components/backend-ai-app-launcher.ts @@ -487,8 +487,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, @@ -498,8 +504,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({