Provide a data-list of locally discovered nodes when adding a new node.

This commit is contained in:
Phill Luby
2014-10-15 21:02:57 +01:00
parent 609294deee
commit 36431b3dcd
2 changed files with 19 additions and 10 deletions

View File

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