Skip to content

Commit

Permalink
feat: 存储卷清理增加清除所有标签 (#4994)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssongliu committed May 13, 2024
1 parent f3fe40e commit 115b64a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions backend/app/service/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,13 @@ func (u *ContainerService) Prune(req dto.ContainerPrune) (dto.ContainerPruneRepo
}
report.DeletedNumber = len(rep.NetworksDeleted)
case "volume":
versions, err := client.ServerVersion(context.Background())
if err != nil {
return report, err
}
if common.ComparePanelVersion(versions.APIVersion, "1.42") {
pruneFilters.Add("all", "true")
}
rep, err := client.VolumesPrune(context.Background(), pruneFilters)
if err != nil {
return report, err
Expand Down

0 comments on commit 115b64a

Please sign in to comment.