Add email field to registry config

This commit is contained in:
Girish Ramakrishnan
2019-10-23 06:11:27 -07:00
parent 7c978f6c1c
commit 28025cfb44
2 changed files with 21 additions and 13 deletions

View File

@@ -313,7 +313,8 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
if (error) return console.error(error);
$scope.registryConfig.serverAddress = result.serverAddress;
$scope.registryConfig.username = result.username;
$scope.registryConfig.username = result.username || '';
$scope.registryConfig.email = result.email || '';
$scope.registryConfig.password = result.password;
});
}
@@ -369,6 +370,7 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
serverAddress: '',
username: '',
password: '',
email: '',
reset: function () {
$scope.cloudronNameChange.busy = false;
@@ -388,15 +390,16 @@ angular.module('Application').controller('SettingsController', ['$scope', '$loca
var data = {
serverAddress: $scope.registryConfig.serverAddress,
username: $scope.registryConfig.username,
password: $scope.registryConfig.password
username: $scope.registryConfig.username || '',
password: $scope.registryConfig.password,
email: $scope.registryConfig.email || '',
};
Client.setRegistryConfig(data, function (error) {
$scope.registryConfig.busy = false;
if (error) {
$scope.registryConfig.error = error;
$scope.registryConfig.error = error.message;
return;
}