Skip to content

Commit

Permalink
fix: hide infernece app from app launcher (#2002)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyujin-cho authored Nov 1, 2023
1 parent 2a59656 commit a89b31b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/components/backend-ai-app-launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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({
Expand Down

0 comments on commit a89b31b

Please sign in to comment.