Skip to content

Commit 184a214

Browse files
authored
feat: Add hint messages for compose environment variables (#11351)
1 parent c637654 commit 184a214

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

agent/app/service/snapshot.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,11 @@ func loadAppImage(list []dto.DataTree) []dto.DataTree {
299299

300300
for i := 0; i < len(list); i++ {
301301
itemAppImage := dto.DataTree{ID: uuid.NewString(), Label: "appImage"}
302-
stdout, err := cmd.RunDefaultWithStdoutBashCf("cat %s | grep image: ", list[i].Path)
302+
appPath := path.Join(global.Dir.DataDir, "apps", list[i].Key, list[i].Name)
303+
if list[i].IsLocal {
304+
appPath = path.Join(global.Dir.AppDir, "local", strings.TrimPrefix(list[i].Key, "local"), list[i].Name)
305+
}
306+
stdout, err := cmd.RunDefaultWithStdoutBashCf("cat %s | grep image: ", path.Join(appPath, "docker-compose.yml"))
303307
if err != nil {
304308
list[i].Children = append(list[i].Children, itemAppImage)
305309
continue

frontend/src/components/label/index.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@
1818
</el-button>
1919
</template>
2020
<template #default="{ read }">
21-
<el-input class="p-w-300" v-model="tmpLabels[index]" @blur="read" />
21+
<el-input
22+
clearable
23+
placeholder="key=value"
24+
class="p-w-300"
25+
v-model="tmpLabels[index]"
26+
@blur="read"
27+
/>
2228
</template>
2329
</fu-read-write-switch>
2430
</div>
25-
<el-input v-if="showAdd" v-model="labelItem">
31+
<el-input v-if="showAdd" clearable placeholder="key=value" v-model="labelItem">
2632
<template #append>
2733
<el-button icon="Check" @click="save()" />
2834
<el-button icon="Close" @click="cancel()" />

0 commit comments

Comments
 (0)