From 510d309b8a8b9a469fc5b279d3c2aced240c5585 Mon Sep 17 00:00:00 2001 From: Frank Isemann Date: Fri, 19 Jun 2015 21:52:19 +0200 Subject: [PATCH] Display Local State Summary (All Folders) --- gui/index.html | 4 ++++ .../syncthing/core/controllers/syncthingController.js | 11 +++++++++++ 2 files changed, 15 insertions(+) mode change 100644 => 100755 gui/index.html mode change 100644 => 100755 gui/scripts/syncthing/core/controllers/syncthingController.js diff --git a/gui/index.html b/gui/index.html old mode 100644 new mode 100755 index b42bfd175..02fc34f25 --- a/gui/index.html +++ b/gui/index.html @@ -327,6 +327,10 @@  Upload Rate {{connectionsTotal.outbps | binary}}B/s ({{connectionsTotal.outBytesTotal | binary}}B) + +  Local State (Total) + {{foldersTotalLocalFiles | alwaysNumber}} items, ~{{ foldersTotalLocalBytes | binary}}B +  RAM Utilization {{system.sys | binary}}B diff --git a/gui/scripts/syncthing/core/controllers/syncthingController.js b/gui/scripts/syncthing/core/controllers/syncthingController.js old mode 100644 new mode 100755 index dc7aa212f..06ad5d331 --- a/gui/scripts/syncthing/core/controllers/syncthingController.js +++ b/gui/scripts/syncthing/core/controllers/syncthingController.js @@ -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); }