feat: 容器列表支持搜索镜像 (#6736)
Some checks failed
sync2gitee / repo-sync (push) Failing after 2s

This commit is contained in:
ssongliu 2024-10-16 17:36:43 +08:00 committed by GitHub
parent bfa111541b
commit 14bbb8c65d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -126,7 +126,7 @@ func (u *ContainerService) Page(req dto.PageContainer) (int64, interface{}, erro
if len(req.Name) != 0 {
length, count := len(list), 0
for count < length {
if !strings.Contains(list[count].Names[0][1:], req.Name) {
if !strings.Contains(list[count].Names[0][1:], req.Name) && !strings.Contains(list[count].Image, req.Name) {
list = append(list[:count], list[(count+1):]...)
length--
} else {