diff --git a/backend/app/dto/container.go b/backend/app/dto/container.go index add8e3670..5907fcdc1 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 71ad92827..e41decc21 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 }