mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-05 08:42:35 +08:00
feat: 存储卷清理增加清除所有标签 (#4994)
This commit is contained in:
parent
79c2ba2125
commit
5979e8b5d4
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)
|
report.DeletedNumber = len(rep.NetworksDeleted)
|
||||||
case "volume":
|
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)
|
rep, err := client.VolumesPrune(context.Background(), pruneFilters)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return report, err
|
return report, err
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue