浏览代码

Finalized everything I guess

Toby Chui 3 年之前
父节点
当前提交
94368c0f15
共有 5 个文件被更改,包括 9 次插入19 次删除
  1. 5 16
      file_system.go
  2. 0 1
      main.router.go
  3. 0 1
      mod/network/reverseproxy/reverse.go
  4. 3 0
      web/SystemAO/disk/webdav.html
  5. 1 1
      web/SystemAO/storage/fshBridge.html

+ 5 - 16
file_system.go

@@ -2263,33 +2263,22 @@ func system_fs_listRoot(w http.ResponseWriter, r *http.Request) {
 		common.SendJSONResponse(w, string(jsonString))
 	} else {
 		type rootObject struct {
-			rootID      string //The vroot id
-			RootName    string //The name of this vroot
-			RootPath    string //The path of this vroot
-			RootBackups bool   //If there are backup for this vroot
+			rootID     string //The vroot id
+			RootName   string //The name of this vroot
+			RootPath   string //The path of this vroot
+			BufferedFs bool   //If buffer typed FS
 		}
 
 		roots := []*rootObject{}
-		backupRoots := []string{}
 		for _, store := range userinfo.GetAllFileSystemHandler() {
 			var thisDevice = new(rootObject)
 			thisDevice.RootName = store.Name
 			thisDevice.RootPath = store.UUID + ":/"
 			thisDevice.rootID = store.UUID
+			thisDevice.BufferedFs = store.RequireBuffer
 			roots = append(roots, thisDevice)
 		}
 
-		//Update root configs for backup roots
-		for _, backupRoot := range backupRoots {
-			//For this backup root, check if the parent root mounted
-			for _, root := range roots {
-				if root.rootID == backupRoot {
-					//Parent root mounted. Label the parent root as "have backup"
-					root.RootBackups = true
-				}
-			}
-		}
-
 		jsonString, _ := json.Marshal(roots)
 		common.SendJSONResponse(w, string(jsonString))
 	}

+ 0 - 1
main.router.go

@@ -118,7 +118,6 @@ func mrouter(h http.Handler) http.Handler {
 				//Enable subservice access
 				//Check if this path is reverse proxy path. If yes, serve with proxyserver
 				isRP, proxy, rewriteURL, subserviceObject := ssRouter.CheckIfReverseProxyPath(r)
-
 				if isRP {
 					//Check user permission on that module
 					ssRouter.HandleRoutingRequest(w, r, proxy, subserviceObject, rewriteURL)

+ 0 - 1
mod/network/reverseproxy/reverse.go

@@ -312,7 +312,6 @@ func (p *ReverseProxy) ProxyHTTP(rw http.ResponseWriter, req *http.Request) erro
 	// close now, instead of defer, to populate res.Trailer
 	res.Body.Close()
 	copyHeader(rw.Header(), res.Trailer)
-
 	return nil
 }
 

+ 3 - 0
web/SystemAO/disk/webdav.html

@@ -169,6 +169,9 @@
                     }
                 }
                 data.forEach(vroot => {
+                    if (vroot.BufferedFs){
+                        return;
+                    }
                     $("#vrootList").append(`<div class="item">
                     <i class="disk icon"></i>
                     <div class="content">

+ 1 - 1
web/SystemAO/storage/fshBridge.html

@@ -134,7 +134,7 @@
         if (window.location.hash.length > 0){
             var input = JSON.parse(decodeURIComponent(window.location.hash.substr(1)));
             editingStoragePool = input.group;
-            $("#poolid").text("(" + editingStoragePool + ":/)");
+            $("#poolid").text("(" + editingStoragePool + ")");
         }
 
         initBridgingOptions();