Node IDs are always upper case (ref #269)
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -191,6 +191,7 @@ func Load(rd io.Reader, myID string) (Configuration, error) {
|
|||||||
// Strip spaces and dashes
|
// Strip spaces and dashes
|
||||||
node.NodeID = strings.Replace(node.NodeID, "-", "", -1)
|
node.NodeID = strings.Replace(node.NodeID, "-", "", -1)
|
||||||
node.NodeID = strings.Replace(node.NodeID, " ", "", -1)
|
node.NodeID = strings.Replace(node.NodeID, " ", "", -1)
|
||||||
|
node.NodeID = strings.ToUpper(node.NodeID)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for missing, bad or duplicate repository ID:s
|
// Check for missing, bad or duplicate repository ID:s
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
|||||||
$scope.config.Options.ListenAddress = $scope.config.Options.ListenStr.split(',').map(function (x) { return x.trim(); });
|
$scope.config.Options.ListenAddress = $scope.config.Options.ListenStr.split(',').map(function (x) { return x.trim(); });
|
||||||
$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'}});
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#settings').modal("hide");
|
$('#settings').modal("hide");
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -340,7 +340,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
|||||||
$scope.configInSync = false;
|
$scope.configInSync = false;
|
||||||
$('#editNode').modal('hide');
|
$('#editNode').modal('hide');
|
||||||
nodeCfg = $scope.currentNode;
|
nodeCfg = $scope.currentNode;
|
||||||
nodeCfg.NodeID = nodeCfg.NodeID.replace(/ /g, '').replace(/-/g, '').trim();
|
nodeCfg.NodeID = nodeCfg.NodeID.replace(/ /g, '').replace(/-/g, '').toUpperCase().trim();
|
||||||
nodeCfg.Addresses = nodeCfg.AddressesStr.split(',').map(function (x) { return x.trim(); });
|
nodeCfg.Addresses = nodeCfg.AddressesStr.split(',').map(function (x) { return x.trim(); });
|
||||||
|
|
||||||
done = false;
|
done = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user