feat: Add memory requirement field display for local applications (#11018)

Refs https://github.com/1Panel-dev/1Panel/issues/11015
This commit is contained in:
CityFun 2025-11-21 12:05:05 +08:00 committed by GitHub
parent d83b673c90
commit 99c2eb04c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -91,13 +91,13 @@ type AppProperty struct {
Key string `json:"key"`
Required []string `json:"Required"`
CrossVersionUpdate bool `json:"crossVersionUpdate"`
Limit int `json:"limit"`
Recommend int `json:"recommend"`
Limit int `json:"limit" yaml:"memoryRequired"`
Recommend int `json:"recommend" yaml:"memoryRequired"`
Website string `json:"website"`
Github string `json:"github"`
Document string `json:"document"`
Architectures []string `json:"architectures"`
MemoryRequired int `json:"memoryRequired"`
MemoryRequired int `json:"memoryRequired" yaml:"memoryRequired"`
GpuSupport bool `json:"gpuSupport"`
Version float64 `json:"version"`
Deprecated float64 `json:"deprecated"`

View file

@ -1414,6 +1414,7 @@ func handleLocalApp(appDir string) (app *model.App, err error) {
app.Key = "local" + appDefine.Key
app.Architectures = strings.Join(appDefine.Architectures, ",")
app.GpuSupport = appDefine.GpuSupport
app.MemoryRequired = appDefine.MemoryRequired
app.Resource = constant.AppResourceLocal
app.Status = constant.AppNormal