commit
5c00655d14
7 changed files with 18 additions and 14 deletions
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package types
|
||||
|
||||
const CURRENTVERSION = "0.2.5"
|
||||
|
||||
const BODY = "<li>Storage Manager</li><li>File synchronization issues</li><li>Fix the app store classification problem</li>"
|
||||
const CURRENTVERSION = "0.2.6"
|
||||
|
||||
const BODY = "<li>Fix a disk that cannot be formatted under certain circumstances</li>"
|
||||
|
|
Loading…
Reference in a new issue