feat: Add hint messages for compose environment variables (#11351)

This commit is contained in:
ssongliu 2025-12-16 16:35:59 +08:00 committed by GitHub
parent c6376541ed
commit 184a214bff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 3 deletions

View file

@ -299,7 +299,11 @@ func loadAppImage(list []dto.DataTree) []dto.DataTree {
for i := 0; i < len(list); i++ { for i := 0; i < len(list); i++ {
itemAppImage := dto.DataTree{ID: uuid.NewString(), Label: "appImage"} itemAppImage := dto.DataTree{ID: uuid.NewString(), Label: "appImage"}
stdout, err := cmd.RunDefaultWithStdoutBashCf("cat %s | grep image: ", list[i].Path) appPath := path.Join(global.Dir.DataDir, "apps", list[i].Key, list[i].Name)
if list[i].IsLocal {
appPath = path.Join(global.Dir.AppDir, "local", strings.TrimPrefix(list[i].Key, "local"), list[i].Name)
}
stdout, err := cmd.RunDefaultWithStdoutBashCf("cat %s | grep image: ", path.Join(appPath, "docker-compose.yml"))
if err != nil { if err != nil {
list[i].Children = append(list[i].Children, itemAppImage) list[i].Children = append(list[i].Children, itemAppImage)
continue continue

View file

@ -18,11 +18,17 @@
</el-button> </el-button>
</template> </template>
<template #default="{ read }"> <template #default="{ read }">
<el-input class="p-w-300" v-model="tmpLabels[index]" @blur="read" /> <el-input
clearable
placeholder="key=value"
class="p-w-300"
v-model="tmpLabels[index]"
@blur="read"
/>
</template> </template>
</fu-read-write-switch> </fu-read-write-switch>
</div> </div>
<el-input v-if="showAdd" v-model="labelItem"> <el-input v-if="showAdd" clearable placeholder="key=value" v-model="labelItem">
<template #append> <template #append>
<el-button icon="Check" @click="save()" /> <el-button icon="Check" @click="save()" />
<el-button icon="Close" @click="cancel()" /> <el-button icon="Close" @click="cancel()" />