diff --git a/gui/app.js b/gui/app.js index 333a5342c..6932edc7d 100644 --- a/gui/app.js +++ b/gui/app.js @@ -666,15 +666,21 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http, $translate, $loca }; $scope.addDevice = function () { - $scope.currentDevice = { - AddressesStr: 'dynamic', - Compression: true, - Introducer: false - }; - $scope.editingExisting = false; - $scope.editingSelf = false; - $scope.deviceEditor.$setPristine(); - $('#editDevice').modal(); + $http.get(urlbase + '/discovery') + .success(function (registry) { + $scope.discovery = registry; + }) + .then(function () { + $scope.currentDevice = { + AddressesStr: 'dynamic', + Compression: true, + Introducer: false + }; + $scope.editingExisting = false; + $scope.editingSelf = false; + $scope.deviceEditor.$setPristine(); + $('#editDevice').modal(); + }); }; $scope.deleteDevice = function () { diff --git a/gui/index.html b/gui/index.html index 85c525bfb..e6e8f28e9 100644 --- a/gui/index.html +++ b/gui/index.html @@ -383,7 +383,10 @@