MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / loadWebsiteLogTree

Function loadWebsiteLogTree

agent/app/service/device_clean.go:686–704  ·  view source on GitHub ↗
(fileOp fileUtils.FileOp)

Source from the content-addressed store, hash-verified

684}
685
686func loadWebsiteLogTree(fileOp fileUtils.FileOp) []dto.CleanTree {
687 websites, _ := websiteRepo.List()
688 if len(websites) == 0 {
689 return nil
690 }
691 var res []dto.CleanTree
692 for _, website := range websites {
693 size3, _ := fileOp.GetDirSize(path.Join(GetSiteDir(website.Alias), "log"))
694 res = append(res, dto.CleanTree{
695 ID: uuid.NewString(),
696 Label: website.PrimaryDomain,
697 Size: uint64(size3),
698 Type: "website_log",
699 Name: website.Alias,
700 CanDelete: true,
701 })
702 }
703 return res
704}
705
706func loadAppTmpDownloadTree(fileOp fileUtils.FileOp) []dto.CleanTree {
707 appDirs, err := os.ReadDir(global.Dir.RemoteAppResourceDir)

Callers 1

loadLogTreeFunction · 0.85

Calls 3

GetSiteDirFunction · 0.85
GetDirSizeMethod · 0.80
ListMethod · 0.65

Tested by

no test coverage detected