From 11fad1dd8da2c2695ea09e8f1b48f67737a384ea Mon Sep 17 00:00:00 2001 From: mlhiter <3076438032@qq.com> Date: Thu, 7 Nov 2024 15:07:55 +0800 Subject: [PATCH] fix: runtimeNamespace bug --- .../devbox/app/api/platform/getRuntime/route.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/providers/devbox/app/api/platform/getRuntime/route.ts b/frontend/providers/devbox/app/api/platform/getRuntime/route.ts index b22ceef4647..de50f1c05e2 100644 --- a/frontend/providers/devbox/app/api/platform/getRuntime/route.ts +++ b/frontend/providers/devbox/app/api/platform/getRuntime/route.ts @@ -85,6 +85,10 @@ export async function GET(req: NextRequest) { ) const sortedVersions = defaultVersion ? [defaultVersion, ...otherVersions] : versions + sortedVersions.forEach((version: any) => { + runtimeNamespaceMap[version.metadata.name] = item.metadata.namespace + }) + languageVersionMap[language] = sortedVersions.map((version: any) => ({ id: version.metadata.name, label: version.spec.version, @@ -110,6 +114,10 @@ export async function GET(req: NextRequest) { ) const sortedVersions = defaultVersion ? [defaultVersion, ...otherVersions] : versions + sortedVersions.forEach((version: any) => { + runtimeNamespaceMap[version.metadata.name] = item.metadata.namespace + }) + frameworkVersionMap[framework] = sortedVersions.map((version: any) => ({ id: version.metadata.name, label: version.spec.version, @@ -135,6 +143,10 @@ export async function GET(req: NextRequest) { ) const sortedVersions = defaultVersion ? [defaultVersion, ...otherVersions] : versions + sortedVersions.forEach((version: any) => { + runtimeNamespaceMap[version.metadata.name] = item.metadata.namespace + }) + osVersionMap[os] = sortedVersions.map((version: any) => ({ id: version.metadata.name, label: version.spec.version,