From 99c2eb04c92eed43e9ecda41bc5f4344cc18c9e3 Mon Sep 17 00:00:00 2001 From: CityFun <31820853+zhengkunwang223@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:05:05 +0800 Subject: [PATCH] feat: Add memory requirement field display for local applications (#11018) Refs https://github.com/1Panel-dev/1Panel/issues/11015 --- agent/app/dto/app.go | 6 +++--- agent/app/service/app_utils.go | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/agent/app/dto/app.go b/agent/app/dto/app.go index 6d28b2e7a..ccea2d7c4 100644 --- a/agent/app/dto/app.go +++ b/agent/app/dto/app.go @@ -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"` diff --git a/agent/app/service/app_utils.go b/agent/app/service/app_utils.go index fadda6158..f8e86d64e 100644 --- a/agent/app/service/app_utils.go +++ b/agent/app/service/app_utils.go @@ -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