Browse Source

Sort list of sharing nodes (fixes #266)

Jakob Borg 11 years ago
parent
commit
5454ca1cf7
3 changed files with 10 additions and 5 deletions
  1. 0 0
      auto/gui.files.go
  2. 9 0
      gui/app.js
  3. 1 5
      gui/index.html

File diff suppressed because it is too large
+ 0 - 0
auto/gui.files.go


+ 9 - 0
gui/app.js

@@ -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) {

+ 1 - 5
gui/index.html

@@ -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>

Some files were not shown because too many files changed in this diff