Browse Source

bug fix: summary of folder analysis

Steve L. Nyemba 8 years ago
parent
commit
a9d1ad6d68
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/monitor.py
  2. 1 1
      src/utils/workers.py

+ 1 - 1
src/monitor.py

@@ -286,7 +286,7 @@ class FileWatch(Analysis):
 				xo_raw = self.evaluate(folder)
 				xo = np.array(ML.Extract(['size','age'],xo_raw))
 				
-				xo = {"label":folder,"details":xo_raw,"summary":{"size":round(np.mean(xo[:,0]),2),"age":round(np.mean(xo[:,1]),2),"count":len(xo[:,1])}}
+				xo = {"label":folder,"details":xo_raw,"summary":{"size":round(np.sum(xo[:,0]),2),"age":round(np.mean(xo[:,1]),2),"count":len(xo[:,1])}}
 				xo['day'] = now.day
 				xo['month'] = now.month
 				xo['year'] = now.year

+ 1 - 1
src/utils/workers.py

@@ -180,7 +180,7 @@ class FileWatchWorker(BasicWorker):
 				
 				xo_age = [row['age'] for row in xo[0]['details']]
 				xo_size= [row['size'] for row in xo[0]['details']]
-				xo[0]['details'] = {"age":ML.distribution(xo_age,self.lock),"size":ML.distribution(xo_size,self.lock)}
+				xo[0]['details'] = {"id":id, "age":ML.distribution(xo_age,self.lock),"size":ML.distribution(xo_size,self.lock)}
 				
 				#
 				# Now we can save the file