mirror of https://github.com/portainer/portainer
feat(registries): update registry Password wording to Access Token for Dockerhub (#6557)
parent
f154e6e0f1
commit
167825ff3f
|
@ -1,4 +1,13 @@
|
|||
<form class="form-horizontal" name="registryFormDockerhub" ng-submit="$ctrl.formAction()">
|
||||
<div class="col-sm-12 form-section-title"> Important notice </div>
|
||||
<div class="form-group">
|
||||
<span class="col-sm-12 text-muted small">
|
||||
<p>
|
||||
For information on how to generate a DockerHub Access Token, follow the
|
||||
<a href="https://docs.docker.com/docker-hub/access-tokens/" target="_blank">dockerhub guide</a>.
|
||||
</p>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-sm-12 form-section-title"> DockerHub account details </div>
|
||||
<!-- name-input -->
|
||||
<div class="form-group">
|
||||
|
@ -32,7 +41,7 @@
|
|||
<!-- !credentials-user -->
|
||||
<!-- credentials-password -->
|
||||
<div class="form-group">
|
||||
<label for="registry_password" class="col-sm-3 col-lg-2 control-label text-left">DockerHub password</label>
|
||||
<label for="registry_password" class="col-sm-3 col-lg-2 control-label text-left">DockerHub access token</label>
|
||||
<div class="col-sm-9 col-lg-10">
|
||||
<input type="password" class="form-control" id="registry_password" name="registry_password" ng-model="$ctrl.model.Password" required />
|
||||
</div>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<!-- credentials-password -->
|
||||
<div class="form-group">
|
||||
<label for="credentials_password" class="col-sm-3 col-lg-2 control-label text-left">
|
||||
{{ registry.Type === RegistryTypes.ECR ? 'AWS Secret Access Key' : 'Password' }}
|
||||
{{ passwordLabel() }}
|
||||
</label>
|
||||
<div class="col-sm-9 col-lg-10">
|
||||
<input type="password" class="form-control" id="credentials_password" ng-model="formValues.Password" placeholder="*******" />
|
||||
|
|
|
@ -16,6 +16,18 @@ angular.module('portainer.app').controller('RegistryController', [
|
|||
|
||||
$scope.RegistryTypes = RegistryTypes;
|
||||
|
||||
$scope.passwordLabel = () => {
|
||||
const type = $scope.registry.Type;
|
||||
switch (type) {
|
||||
case RegistryTypes.ECR:
|
||||
return 'AWS Secret Access Key';
|
||||
case RegistryTypes.DOCKERHUB:
|
||||
return 'Access token';
|
||||
default:
|
||||
return 'Password';
|
||||
}
|
||||
};
|
||||
|
||||
$scope.updateRegistry = function () {
|
||||
var registry = $scope.registry;
|
||||
registry.Password = $scope.formValues.Password;
|
||||
|
|
Loading…
Reference in New Issue