From 795c7831ee799732e360acd6c8f4d1eaab439bfe Mon Sep 17 00:00:00 2001 From: ssongliu Date: Mon, 4 Mar 2024 10:01:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E5=AF=BC=E8=87=B4=E7=9A=84=E5=86=85=E5=AD=98?= =?UTF-8?q?=E9=99=90=E5=88=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/dto/container.go | 4 ++-- backend/app/service/container.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/dto/container.go b/backend/app/dto/container.go index add8e3670d17..5907fcdc12fc 100644 --- a/backend/app/dto/container.go +++ b/backend/app/dto/container.go @@ -38,8 +38,8 @@ type ContainerInfo struct { } type ResourceLimit struct { - CPU int `json:"cpu"` - Memory int `json:"memory"` + CPU int `json:"cpu"` + Memory uint64 `json:"memory"` } type ContainerOperate struct { diff --git a/backend/app/service/container.go b/backend/app/service/container.go index 71ad92827638..e41decc21c90 100644 --- a/backend/app/service/container.go +++ b/backend/app/service/container.go @@ -337,7 +337,7 @@ func (u *ContainerService) LoadResourceLimit() (*dto.ResourceLimit, error) { data := dto.ResourceLimit{ CPU: cpuCounts, - Memory: int(memoryInfo.Total), + Memory: memoryInfo.Total, } return &data, nil }