diff --git a/fssc/fssc b/fssc/fssc index 6d03f3d..f2995c8 100644 Binary files a/fssc/fssc and b/fssc/fssc differ diff --git a/fssc/internal/handler/nfhandler.go b/fssc/internal/handler/nfhandler.go index f8a1d2f..7b7b42a 100644 --- a/fssc/internal/handler/nfhandler.go +++ b/fssc/internal/handler/nfhandler.go @@ -20,7 +20,7 @@ type Response struct { // 文件输出的结构 type FileJson struct { Fname string `json:"fname"` - Dirflag int `json:dirflag` + Dirflag bool `json:"dirflag"` } type FilesListJson struct { @@ -69,12 +69,14 @@ func NfTest(w http.ResponseWriter, r *http.Request) { // data.Files = files for _, v := range files { - flist.Flist = append(flist.Flist, FileJson{Fname: v.Name(), Dirflag: 1}) + + // drflag:= v.IsDir()?"1":"0" + flist.Flist = append(flist.Flist, FileJson{Fname: v.Name(), Dirflag: v.IsDir()}) } } else { - //data.FileName = filepath.Base(realFilePath) - flist.Flist = append(flist.Flist, FileJson{Fname: filepath.Base(realFilePath), Dirflag: 0}) + data.FileName = filepath.Base(realFilePath) + // flist.Flist = append(flist.Flist, FileJson{Fname: filepath.Base(realFilePath), Dirflag: "1"}) } // respone file list diff --git a/fssc/web/wbconsole.tmpl b/fssc/web/wbconsole.tmpl index caebc01..296eacf 100644 --- a/fssc/web/wbconsole.tmpl +++ b/fssc/web/wbconsole.tmpl @@ -21,6 +21,11 @@ overflow:scroll; } + .flist{ + height:360px; + overflow:auto; + } + .icon { display: inline-block; width: 24px; @@ -57,21 +62,13 @@
-
- -
- -
- -
-
服务器ip
- +
- +
@@ -149,9 +146,7 @@
运行状态
- +
@@ -159,7 +154,15 @@ diff --git a/fsv2/fstc b/fsv2/fstc index 78f27f1..0049f54 100644 Binary files a/fsv2/fstc and b/fsv2/fstc differ diff --git a/fsv2/handler/serverinfo.go b/fsv2/handler/serverinfo.go index 508978a..0f771ea 100644 --- a/fsv2/handler/serverinfo.go +++ b/fsv2/handler/serverinfo.go @@ -20,7 +20,7 @@ type Response struct { // 文件输出的结构 type FileJson struct { Fname string `json:"fname"` - Dirflag string `json:"dirflag"` + Dirflag bool `json:"dirflag"` } type FilesListJson struct { @@ -69,12 +69,11 @@ func SerInfo(w http.ResponseWriter, r *http.Request) { // data.Files = files for _, v := range files { - flist.Flist = append(flist.Flist, FileJson{Fname: v.Name(), Dirflag: 1}) + flist.Flist = append(flist.Flist, FileJson{Fname: v.Name(), Dirflag: v.IsDir()}) } } else { - //data.FileName = filepath.Base(realFilePath) - flist.Flist = append(flist.Flist, FileJson{Fname: filepath.Base(realFilePath), Dirflag: 0}) + data.FileName = filepath.Base(realFilePath) } // respone file list