Skip to content

Commit

Permalink
fix: button show bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhiter committed Sep 11, 2024
1 parent c662ee6 commit 472d694
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ const DevboxList = ({
}
]
: []),
...(item.status.value === 'Running'
// maybe Error or other status,all can restart
...(item.status.value !== 'Stopped'
? [
{
child: (
Expand All @@ -319,7 +320,11 @@ const DevboxList = ({
</>
),
onClick: () => handleRestartDevbox(item)
},
}
]
: []),
...(item.status.value === 'Running'
? [
{
child: (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export async function GET(req: NextRequest) {
runtimeNamespaceMap[version.metadata.name] = item.metadata.namespace
languageVersionMap[language].push({
id: version.metadata.name,
label: version.spec.title
label: version.spec.version
})
})
if (languageVersionMap[language].length === 0) {
Expand All @@ -98,7 +98,7 @@ export async function GET(req: NextRequest) {
runtimeNamespaceMap[version.metadata.name] = item.metadata.namespace
frameworkVersionMap[framework].push({
id: version.metadata.name,
label: version.spec.title
label: version.spec.version
})
})
if (frameworkVersionMap[framework].length === 0) {
Expand All @@ -117,7 +117,7 @@ export async function GET(req: NextRequest) {
runtimeNamespaceMap[version.metadata.name] = item.metadata.namespace
osVersionMap[os].push({
id: version.metadata.name,
label: version.spec.title
label: version.spec.version
})
})
if (osVersionMap[os].length === 0) {
Expand Down
10 changes: 7 additions & 3 deletions frontend/providers/devbox/types/k8s.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,12 @@ export type KBRuntimeType = {
apiVersion: 'devbox.sealos.io/v1alpha1'
kind: 'Runtime'
metadata: {
name: string
name: string // go-v1-22-5 name+version
namespace: string
uid: string
creationTimestamp: string
}
spec: {
category: string[]
classRef: string
config: {
image: string
Expand All @@ -122,7 +121,12 @@ export type KBRuntimeType = {
user: string
}
description: string
title: string
version: string
components: {
name: string // go
kind: string // language
version: string // v1.22.5
}[]
}
}

Expand Down

0 comments on commit 472d694

Please sign in to comment.