Sfoglia il codice sorgente

Fixed disk space viewing bug on phone

TC pushbot 5 2 anni fa
parent
commit
b229bbef23

+ 2 - 1
mod/fileservers/servers/ftpserv/ftpserv.go

@@ -37,7 +37,7 @@ type Manager struct {
 	option ManagerOption
 }
 
-//Create a new FTP Manager
+// Create a new FTP Manager
 func NewFTPManager(option *ManagerOption) *Manager {
 	//Create database related tables
 	option.Sysdb.NewTable("ftp")
@@ -152,6 +152,7 @@ func (m *Manager) StopFtpServer() {
 	if m.option.FtpServer != nil {
 		m.option.FtpServer.Close()
 	}
+
 	m.option.Sysdb.Write("ftp", "default", false)
 	m.option.Logger.PrintAndLog("FTP", "FTP Server Stopped", nil)
 }

+ 7 - 3
web/SystemAO/disk/space/diskspace.html

@@ -10,6 +10,9 @@
             #diskInfo{
                 padding-left:22px;
             }
+            .usedSpace{
+                margin-top: -0.8em;
+            }
         </style>
     </head>
     <body>
@@ -56,10 +59,11 @@
                                     </div>
                                     <div class="extra text" style="width:100% !important;">
                                     <div class="ui small ${color} active progress">
-                                        <div class="bar" style="width:${usedPercentage}%;"></div>
-                                        <div class="label">Remaining: ${bytesToSize(thisDev.Available)} / ${bytesToSize(thisDev.Volume)}</div>
+                                        <div class="bar" style="width:${usedPercentage}%;">
+                                            <div class="progress">${usedPercentage}%</div>
+                                        </div>
+                                        <div class="label">Free: ${bytesToSize(thisDev.Available)} / Total: ${bytesToSize(thisDev.Volume)}</div>
                                     </div>
-                                    <p style="margin-top:-20px;">Used Space: ${thisDev.UsedPercentage}</p>
                                     </div>
                                 </div>
                             </div>`);