Give friendly names to nodes (fixes #54)

This commit is contained in:
Jakob Borg
2014-02-05 22:49:26 +01:00
parent ea41acfff5
commit 2297e29502
4 changed files with 15 additions and 2 deletions

View File

@@ -162,6 +162,13 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
return "";
};
$scope.nodeName = function (nodeCfg) {
if (nodeCfg.Name) {
return nodeCfg.Name;
}
return nodeCfg.NodeID.substr(0, 6);
};
$scope.saveSettings = function () {
$http.post('/rest/config', JSON.stringify($scope.config), {headers: {'Content-Type': 'application/json'}});
$('#settingsTable').collapse('hide');