mirror of https://github.com/portainer/portainer
feat(registries): remove actual password from registry password input (#1687)
parent
73e6498d2f
commit
28bca85e01
|
@ -56,7 +56,7 @@
|
|||
<div class="form-group">
|
||||
<label for="credentials_password" class="col-sm-3 col-lg-2 control-label text-left">Password</label>
|
||||
<div class="col-sm-9 col-lg-10">
|
||||
<input type="password" class="form-control" id="credentials_password" ng-model="registry.Password">
|
||||
<input type="password" class="form-control" id="credentials_password" ng-model="formValues.Password" placeholder="*******">
|
||||
</div>
|
||||
</div>
|
||||
<!-- !credentials-password -->
|
||||
|
@ -64,7 +64,7 @@
|
|||
<!-- !authentication-credentials -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !registry.Name || !registry.URL || (registry.Authentication && (!registry.Username || !registry.Password))" ng-click="updateRegistry()" button-spinner="state.actionInProgress">
|
||||
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || !registry.Name || !registry.URL || (registry.Authentication && (!registry.Username || !formValues.Password))" ng-click="updateRegistry()" button-spinner="state.actionInProgress">
|
||||
<span ng-hide="state.actionInProgress">Update registry</span>
|
||||
<span ng-show="state.actionInProgress">Updating registry...</span>
|
||||
</button>
|
||||
|
|
|
@ -6,8 +6,13 @@ function ($scope, $state, $transition$, $filter, RegistryService, Notifications)
|
|||
actionInProgress: false
|
||||
};
|
||||
|
||||
$scope.formValues = {
|
||||
Password: ''
|
||||
};
|
||||
|
||||
$scope.updateRegistry = function() {
|
||||
var registry = $scope.registry;
|
||||
registry.Password = $scope.formValues.Password;
|
||||
$scope.state.actionInProgress = true;
|
||||
RegistryService.updateRegistry(registry)
|
||||
.then(function success(data) {
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<div class="form-group">
|
||||
<label for="hub_password" class="col-sm-3 col-lg-2 control-label text-left">Password</label>
|
||||
<div class="col-sm-9 col-lg-10">
|
||||
<input type="password" class="form-control" id="hub_password" ng-model="dockerhub.Password">
|
||||
<input type="password" class="form-control" id="hub_password" ng-model="formValues.dockerHubPassword" placeholder="*******">
|
||||
</div>
|
||||
</div>
|
||||
<!-- !credentials-password -->
|
||||
|
@ -56,7 +56,7 @@
|
|||
<!-- !authentication-credentials -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || dockerhub.Authentication && (!dockerhub.Username || !dockerhub.Password)" ng-click="updateDockerHub()" button-spinner="state.actionInProgress">
|
||||
<button type="button" class="btn btn-primary btn-sm" ng-disabled="state.actionInProgress || dockerhub.Authentication && (!dockerhub.Username || !formValues.dockerHubPassword)" ng-click="updateDockerHub()" button-spinner="state.actionInProgress">
|
||||
<span ng-hide="state.actionInProgress">Update</span>
|
||||
<span ng-show="state.actionInProgress">Updating DockerHub settings...</span>
|
||||
</button>
|
||||
|
|
|
@ -6,8 +6,13 @@ function ($q, $scope, $state, RegistryService, DockerHubService, ModalService, N
|
|||
actionInProgress: false
|
||||
};
|
||||
|
||||
$scope.formValues = {
|
||||
dockerHubPassword: ''
|
||||
};
|
||||
|
||||
$scope.updateDockerHub = function() {
|
||||
var dockerhub = $scope.dockerhub;
|
||||
dockerhub.Password = $scope.formValues.dockerHubPassword;
|
||||
$scope.state.actionInProgress = true;
|
||||
DockerHubService.update(dockerhub)
|
||||
.then(function success(data) {
|
||||
|
|
Loading…
Reference in New Issue