Skip to content

Commit 5c00655

Browse files
authored
Merge pull request #81 from IceWhaleTech/dev
Dev
2 parents 4c3b414 + eb36c26 commit 5c00655

File tree

7 files changed

+18
-14
lines changed

7 files changed

+18
-14
lines changed

model/zima.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package model
22

3+
import "time"
4+
35
type Path struct {
4-
Name string `json:"name"`
5-
Path string `json:"path"`
6-
IsDir bool `json:"is_dir"`
6+
Name string `json:"name"`
7+
Path string `json:"path"`
8+
IsDir bool `json:"is_dir"`
9+
Date time.Time `json:"date"`
710
}

pkg/utils/command/command_helper.go

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ func ExecSmartCTLByPath(path string) []byte {
101101
output, err := exec.CommandContext(ctx, "smartctl", "-a", path, "-j").Output()
102102
if err != nil {
103103
fmt.Println("smartctl", err)
104+
fmt.Println("output", string(output))
104105
return nil
105106
}
106107
return output

route/route.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func InitRouter() *gin.Engine {
205205
v1FileGroup.PUT("/rename", v1.RenamePath)
206206
v1FileGroup.GET("/read", v1.GetFilerContent)
207207
v1FileGroup.POST("/upload", v1.PostFileUpload)
208-
v1FileGroup.GET("/dirpath", v1.DirPath)
208+
v1FileGroup.GET("/catalog", v1.DirPath)
209209
//创建目录
210210
v1FileGroup.POST("/mkdir", v1.MkdirAll)
211211
v1FileGroup.POST("/create", v1.PostCreateFile)

route/v1/system.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ func GetSystemConfigDebug(c *gin.Context) {
118118
for _, v := range *list {
119119
systemAppStatus += v.Image + ",\n\t"
120120
}
121-
systemAppStatus += "Sync Key: " + config.SystemConfigInfo.SyncKey + "\n\t"
121+
122+
systemAppStatus += "Sync Key length: " + strconv.Itoa(len(config.SystemConfigInfo.SyncKey))
122123

123124
var bugContent string = fmt.Sprintf(`
124-
**Desktop (please complete the following information):**
125125
- OS: %s
126126
- CasaOS Version: %s
127127
- Disk Total: %v

service/zima_info.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"runtime"
88
"strconv"
99
"strings"
10+
"time"
1011

1112
"github.com/IceWhaleTech/CasaOS/model"
1213
"github.com/IceWhaleTech/CasaOS/pkg/config"
@@ -86,10 +87,10 @@ func (c *zima) GetDirPath(path string) []model.Path {
8687

8788
if strings.Count(path, "/") > 0 {
8889
for _, l := range ls {
89-
dirs = append(dirs, model.Path{Name: l.Name(), Path: path + "/" + l.Name(), IsDir: l.IsDir()})
90+
dirs = append(dirs, model.Path{Name: l.Name(), Path: path + "/" + l.Name(), IsDir: l.IsDir(), Date: l.ModTime()})
9091
}
9192
} else {
92-
dirs = append(dirs, model.Path{Name: "DATA", Path: "/DATA/", IsDir: true})
93+
dirs = append(dirs, model.Path{Name: "DATA", Path: "/DATA/", IsDir: true, Date: time.Now()})
9394
}
9495
return dirs
9596
}

shell/assist.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ version_0_2_3() {
1010
}
1111

1212
# add in v0.2.5
13-
readonly CASA_DEPANDS="curl smartmontools"
14-
version_0_2_5() {
15-
install_depends "$CASA_DEPANDS"
1613

14+
readonly CASA_DEPANDS="curl smartmontools parted fdisk partprobe"
1715

16+
version_0_2_5() {
17+
install_depends "$CASA_DEPANDS"
1818
}
1919

2020

types/system.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package types
22

3-
const CURRENTVERSION = "0.2.5"
4-
5-
const BODY = "<li>Storage Manager</li><li>File synchronization issues</li><li>Fix the app store classification problem</li>"
3+
const CURRENTVERSION = "0.2.6"
64

5+
const BODY = "<li>Fix a disk that cannot be formatted under certain circumstances</li>"

0 commit comments

Comments
 (0)