mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-21 21:33:30 +08:00
feat: 存储卷清理增加清除所有标签
This commit is contained in:
parent
79c2ba2125
commit
c25e5b1e9a
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue