Display Local State Summary (All Folders)

This commit is contained in:
Frank Isemann 2015-06-19 21:52:19 +02:00
parent a7ce2a7aa5
commit 510d309b8a
2 changed files with 15 additions and 0 deletions

4
gui/index.html Normal file → Executable file
View File

@ -327,6 +327,10 @@
<th><span class="glyphicon glyphicon-cloud-upload"></span>&nbsp;<span translate>Upload Rate</span></th>
<td class="text-right">{{connectionsTotal.outbps | binary}}B/s ({{connectionsTotal.outBytesTotal | binary}}B)</td>
</tr>
<tr>
<th><span class="glyphicon glyphicon-home"></span>&nbsp;<span translate>Local State (Total)</span> </th>
<td class="text-right">{{foldersTotalLocalFiles | alwaysNumber}} <span translate>items</span>, ~{{ foldersTotalLocalBytes | binary}}B</td>
</tr>
<tr>
<th><span class="glyphicon glyphicon-th"></span>&nbsp;<span translate>RAM Utilization</span></th>
<td class="text-right">{{system.sys | binary}}B</td>

View File

@ -45,6 +45,8 @@ angular.module('syncthing.core')
$scope.neededTotal = 0;
$scope.neededCurrentPage = 1;
$scope.neededPageSize = 10;
$scope.foldersTotalLocalBytes = 0;
$scope.foldersTotalLocalFiles = 0;
$(window).bind('beforeunload', function () {
navigatingAway = true;
@ -340,6 +342,15 @@ angular.module('syncthing.core')
}
}
$scope.announceServersFailed = failed;
$scope.foldersTotalLocalBytes = 0;
$scope.foldersTotalLocalFiles = 0;
for (var f in $scope.model) {
$scope.foldersTotalLocalBytes += $scope.model[f].localBytes;
$scope.foldersTotalLocalFiles += $scope.model[f].localFiles;
};
console.log("refreshSystem", data);
}).error($scope.emitHTTPError);
}