Sort list of sharing nodes (fixes #266)

This commit is contained in:
Jakob Borg 2014-05-24 21:13:35 +02:00
parent 8644bf30a9
commit 5454ca1cf7
3 changed files with 12 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@ -447,6 +447,15 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
$http.post(urlbase + '/config', JSON.stringify($scope.config), {headers: {'Content-Type': 'application/json'}});
};
$scope.sharesRepo = function(repoCfg) {
var names = [];
repoCfg.Nodes.forEach(function (node) {
names.push($scope.nodeName($scope.findNode(node.NodeID)));
});
names.sort();
return names.join(", ");
};
$scope.deleteRepo = function () {
$('#editRepo').modal('hide');
if (!$scope.editingExisting) {

View File

@ -175,11 +175,7 @@
</tr>
<tr>
<th><span class="glyphicon glyphicon-share-alt"></span>&emsp;Shared With</th>
<td class="text-right">
<span ng-repeat="n in repo.Nodes">
{{nodeName(findNode(n.NodeID))}}<span ng-if="!$last">, </span>
</span>
</td>
<td class="text-right">{{sharesRepo(repo)}}</td>
</tr>
</tbody>
</table>