commit
5c00655d14
|
@ -1,7 +1,10 @@
|
||||||
package model
|
package model
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
type Path struct {
|
type Path struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
IsDir bool `json:"is_dir"`
|
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()
|
output, err := exec.CommandContext(ctx, "smartctl", "-a", path, "-j").Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("smartctl", err)
|
fmt.Println("smartctl", err)
|
||||||
|
fmt.Println("output", string(output))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return output
|
return output
|
||||||
|
|
|
@ -205,7 +205,7 @@ func InitRouter() *gin.Engine {
|
||||||
v1FileGroup.PUT("/rename", v1.RenamePath)
|
v1FileGroup.PUT("/rename", v1.RenamePath)
|
||||||
v1FileGroup.GET("/read", v1.GetFilerContent)
|
v1FileGroup.GET("/read", v1.GetFilerContent)
|
||||||
v1FileGroup.POST("/upload", v1.PostFileUpload)
|
v1FileGroup.POST("/upload", v1.PostFileUpload)
|
||||||
v1FileGroup.GET("/dirpath", v1.DirPath)
|
v1FileGroup.GET("/catalog", v1.DirPath)
|
||||||
//创建目录
|
//创建目录
|
||||||
v1FileGroup.POST("/mkdir", v1.MkdirAll)
|
v1FileGroup.POST("/mkdir", v1.MkdirAll)
|
||||||
v1FileGroup.POST("/create", v1.PostCreateFile)
|
v1FileGroup.POST("/create", v1.PostCreateFile)
|
||||||
|
|
|
@ -118,10 +118,10 @@ func GetSystemConfigDebug(c *gin.Context) {
|
||||||
for _, v := range *list {
|
for _, v := range *list {
|
||||||
systemAppStatus += v.Image + ",\n\t"
|
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(`
|
var bugContent string = fmt.Sprintf(`
|
||||||
**Desktop (please complete the following information):**
|
|
||||||
- OS: %s
|
- OS: %s
|
||||||
- CasaOS Version: %s
|
- CasaOS Version: %s
|
||||||
- Disk Total: %v
|
- Disk Total: %v
|
||||||
|
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/IceWhaleTech/CasaOS/model"
|
"github.com/IceWhaleTech/CasaOS/model"
|
||||||
"github.com/IceWhaleTech/CasaOS/pkg/config"
|
"github.com/IceWhaleTech/CasaOS/pkg/config"
|
||||||
|
@ -86,10 +87,10 @@ func (c *zima) GetDirPath(path string) []model.Path {
|
||||||
|
|
||||||
if strings.Count(path, "/") > 0 {
|
if strings.Count(path, "/") > 0 {
|
||||||
for _, l := range ls {
|
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 {
|
} 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
|
return dirs
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,11 +10,11 @@ version_0_2_3() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# add in v0.2.5
|
# add in v0.2.5
|
||||||
readonly CASA_DEPANDS="curl smartmontools"
|
|
||||||
|
readonly CASA_DEPANDS="curl smartmontools parted fdisk partprobe"
|
||||||
|
|
||||||
version_0_2_5() {
|
version_0_2_5() {
|
||||||
install_depends "$CASA_DEPANDS"
|
install_depends "$CASA_DEPANDS"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package types
|
package types
|
||||||
|
|
||||||
const CURRENTVERSION = "0.2.5"
|
const CURRENTVERSION = "0.2.6"
|
||||||
|
|
||||||
const BODY = "<li>Storage Manager</li><li>File synchronization issues</li><li>Fix the app store classification problem</li>"
|
|
||||||
|
|
||||||
|
const BODY = "<li>Fix a disk that cannot be formatted under certain circumstances</li>"
|
||||||
|
|
Loading…
Reference in a new issue