Add email field to registry config
This commit is contained in:
+14
-9
@@ -108,18 +108,23 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="registryConfigServerAddress">Registry Server</label>
|
||||
<input type="text" class="form-control" ng-model="registryConfig.serverAddress" id="registryConfigServerAddress" name="serveraddress" ng-disabled="registryConfig.busy" ng-required>
|
||||
<input type="text" class="form-control" ng-model="registryConfig.serverAddress" id="registryConfigServerAddress" name="serveraddress" ng-disabled="registryConfig.busy" placeholder=" https://index.docker.io/v2/" ng-required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="registryConfigUsername">Username</label>
|
||||
<input type="text" class="form-control" ng-model="registryConfig.username" id="registryConfigUsername" name="username" ng-disabled="registryConfig.busy" ng-required>
|
||||
</div>
|
||||
<label class="control-label" for="registryConfigUsername">Username</label>
|
||||
<input type="text" class="form-control" ng-model="registryConfig.username" id="registryConfigUsername" name="username" ng-disabled="registryConfig.busy" ng-required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="registryConfigPassword">Password</label>
|
||||
<input type="text" class="form-control" ng-model="registryConfig.password" id="registryConfigPassword" name="password" ng-disabled="registryConfig.busy" ng-required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="registryConfigEmail">Email</label>
|
||||
<input type="text" class="form-control" ng-model="registryConfig.email" id="registryConfigEmail" name="email" ng-disabled="registryConfig.busy" ng-required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="registryConfigPassword">Password</label>
|
||||
<input type="text" class="form-control" ng-model="registryConfig.password" id="registryConfigPassword" name="password" ng-disabled="registryConfig.busy" ng-required>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
@@ -329,7 +334,7 @@
|
||||
<span class="text-muted">Username</span>
|
||||
</div>
|
||||
<div class="col-xs-6 text-right">
|
||||
<span>{{ registryConfig.username || 'Not set' }}</span>
|
||||
<span>{{ registryConfig.username || registryConfig.email || 'Not set' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user