mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
Sort list of sharing nodes (fixes #266)
This commit is contained in:
parent
8644bf30a9
commit
5454ca1cf7
File diff suppressed because one or more lines are too long
@ -447,6 +447,15 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
|||||||
$http.post(urlbase + '/config', JSON.stringify($scope.config), {headers: {'Content-Type': 'application/json'}});
|
$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 () {
|
$scope.deleteRepo = function () {
|
||||||
$('#editRepo').modal('hide');
|
$('#editRepo').modal('hide');
|
||||||
if (!$scope.editingExisting) {
|
if (!$scope.editingExisting) {
|
||||||
|
@ -175,11 +175,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><span class="glyphicon glyphicon-share-alt"></span> Shared With</th>
|
<th><span class="glyphicon glyphicon-share-alt"></span> Shared With</th>
|
||||||
<td class="text-right">
|
<td class="text-right">{{sharesRepo(repo)}}</td>
|
||||||
<span ng-repeat="n in repo.Nodes">
|
|
||||||
{{nodeName(findNode(n.NodeID))}}<span ng-if="!$last">, </span>
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
Reference in New Issue
Block a user