Show scan rate in web GUI

This commit is contained in:
Jakob Borg
2015-11-17 21:08:36 +01:00
parent 37f866b47f
commit a8a2192cf9
7 changed files with 80 additions and 16 deletions

View File

@@ -321,7 +321,8 @@ angular.module('syncthing.core')
var data = arg.data;
$scope.scanProgress[data.folder] = {
current: data.current,
total: data.total
total: data.total,
rate: data.rate,
};
console.log("FolderScanProgress", data);
});
@@ -668,6 +669,13 @@ angular.module('syncthing.core')
return Math.floor(pct);
}
$scope.scanRate = function (folder) {
if (!$scope.scanProgress[folder]) {
return 0;
}
return $scope.scanProgress[folder].rate;
}
$scope.deviceStatus = function (deviceCfg) {
if ($scope.deviceFolders(deviceCfg).length === 0) {
return 'unused';