diff --git a/model/zima.go b/model/zima.go index 7b72982..eaf5669 100644 --- a/model/zima.go +++ b/model/zima.go @@ -1,7 +1,10 @@ package model +import "time" + type Path struct { - Name string `json:"name"` - Path string `json:"path"` - IsDir bool `json:"is_dir"` + Name string `json:"name"` + Path string `json:"path"` + IsDir bool `json:"is_dir"` + Date time.Time `json:"date"` } diff --git a/pkg/utils/command/command_helper.go b/pkg/utils/command/command_helper.go index 9a2fded..67dcb2b 100644 --- a/pkg/utils/command/command_helper.go +++ b/pkg/utils/command/command_helper.go @@ -101,6 +101,7 @@ func ExecSmartCTLByPath(path string) []byte { output, err := exec.CommandContext(ctx, "smartctl", "-a", path, "-j").Output() if err != nil { fmt.Println("smartctl", err) + fmt.Println("output", string(output)) return nil } return output diff --git a/route/route.go b/route/route.go index 1c54b7d..c1e9881 100644 --- a/route/route.go +++ b/route/route.go @@ -205,7 +205,7 @@ func InitRouter() *gin.Engine { v1FileGroup.PUT("/rename", v1.RenamePath) v1FileGroup.GET("/read", v1.GetFilerContent) v1FileGroup.POST("/upload", v1.PostFileUpload) - v1FileGroup.GET("/dirpath", v1.DirPath) + v1FileGroup.GET("/catalog", v1.DirPath) //创建目录 v1FileGroup.POST("/mkdir", v1.MkdirAll) v1FileGroup.POST("/create", v1.PostCreateFile) diff --git a/route/v1/system.go b/route/v1/system.go index 377ff3e..65f6b48 100644 --- a/route/v1/system.go +++ b/route/v1/system.go @@ -118,10 +118,10 @@ func GetSystemConfigDebug(c *gin.Context) { for _, v := range *list { systemAppStatus += v.Image + ",\n\t" } - systemAppStatus += "Sync Key: " + config.SystemConfigInfo.SyncKey + "\n\t" + + systemAppStatus += "Sync Key length: " + strconv.Itoa(len(config.SystemConfigInfo.SyncKey)) var bugContent string = fmt.Sprintf(` - **Desktop (please complete the following information):** - OS: %s - CasaOS Version: %s - Disk Total: %v diff --git a/service/zima_info.go b/service/zima_info.go index fa7930c..eeb344f 100644 --- a/service/zima_info.go +++ b/service/zima_info.go @@ -7,6 +7,7 @@ import ( "runtime" "strconv" "strings" + "time" "github.com/IceWhaleTech/CasaOS/model" "github.com/IceWhaleTech/CasaOS/pkg/config" @@ -86,10 +87,10 @@ func (c *zima) GetDirPath(path string) []model.Path { if strings.Count(path, "/") > 0 { for _, l := range ls { - dirs = append(dirs, model.Path{Name: l.Name(), Path: path + "/" + l.Name(), IsDir: l.IsDir()}) + dirs = append(dirs, model.Path{Name: l.Name(), Path: path + "/" + l.Name(), IsDir: l.IsDir(), Date: l.ModTime()}) } } else { - dirs = append(dirs, model.Path{Name: "DATA", Path: "/DATA/", IsDir: true}) + dirs = append(dirs, model.Path{Name: "DATA", Path: "/DATA/", IsDir: true, Date: time.Now()}) } return dirs } diff --git a/shell/assist.sh b/shell/assist.sh index 87fc6cd..c156aa5 100644 --- a/shell/assist.sh +++ b/shell/assist.sh @@ -10,11 +10,11 @@ version_0_2_3() { } # add in v0.2.5 -readonly CASA_DEPANDS="curl smartmontools" + +readonly CASA_DEPANDS="curl smartmontools parted fdisk partprobe" + version_0_2_5() { install_depends "$CASA_DEPANDS" - - } diff --git a/types/system.go b/types/system.go index b00addf..c0b42c0 100644 --- a/types/system.go +++ b/types/system.go @@ -1,6 +1,5 @@ package types -const CURRENTVERSION = "0.2.5" - -const BODY = "
  • Storage Manager
  • File synchronization issues
  • Fix the app store classification problem
  • " +const CURRENTVERSION = "0.2.6" +const BODY = "
  • Fix a disk that cannot be formatted under certain circumstances
  • "