diff --git a/gui/app.js b/gui/app.js index 098c4131..ad432259 100644 --- a/gui/app.js +++ b/gui/app.js @@ -28,10 +28,23 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) { data[id].outbps = 0; } } - $scope.connections = data; }); $http.get("/rest/need").success(function (data) { + var i, name; + for (i = 0; i < data.length; i++) { + name = data[i].Name.split("/"); + data[i].ShortName = name[name.length-1]; + } + data.sort(function (a, b) { + if (a.ShortName < b.ShortName) { + return -1; + } + if (a.ShortName > b.ShortName) { + return 1; + } + return 0; + }); $scope.need = data; }); }; diff --git a/gui/index.html b/gui/index.html index ed843451..1c1e77aa 100644 --- a/gui/index.html +++ b/gui/index.html @@ -56,10 +56,10 @@ body {

Files to Synchronize

- +
- - + +
{{file.Name}}{{file.Size | binary}}B{{file.ShortName}}{{file.Size | binary}}B