mirror of
https://github.com/goharbor/harbor
synced 2025-04-09 20:12:36 +00:00
Merge pull request #3475 from pengpengshui/master
add checkbox on config-email page and test code, modify project access level label
This commit is contained in:
commit
26cf27f327
|
@ -71,6 +71,7 @@ export class Configuration {
|
|||
email_ssl: BoolValueItem;
|
||||
email_username?: StringValueItem;
|
||||
email_password?: StringValueItem;
|
||||
email_insecure: BoolValueItem;
|
||||
verify_remote_cert: BoolValueItem;
|
||||
token_expiration: NumberValueItem;
|
||||
cfg_expiration: NumberValueItem;
|
||||
|
@ -95,6 +96,7 @@ export class Configuration {
|
|||
this.email_ssl = new BoolValueItem(false, true);
|
||||
this.email_username = new StringValueItem("", true);
|
||||
this.email_password = new StringValueItem("", true);
|
||||
this.email_insecure = new BoolValueItem(false, true);
|
||||
this.token_expiration = new NumberValueItem(30, true);
|
||||
this.cfg_expiration = new NumberValueItem(30, true);
|
||||
this.verify_remote_cert = new BoolValueItem(false, true);
|
||||
|
|
|
@ -68,5 +68,14 @@
|
|||
</a>
|
||||
</clr-checkbox>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="insecure">{{'CONFIG.MAIL_INSECURE' | translate}}</label>
|
||||
<clr-checkbox name="emaiInsecure" id="emailInsecure" [(ngModel)]="currentConfig.email_insecure.value" [disabled]="disabled(currentConfig.email_insecure)">
|
||||
<a href="javascript:void(0)" role="tooltip" aria-haspopup="true" class="tooltip tooltip-top-right" style="top:-7px;">
|
||||
<clr-icon shape="info-circle" class="info-tips-icon" size="24"></clr-icon>
|
||||
<span class="tooltip-content">{{'CONFIG.INSECURE_TOOLTIP' | translate}}</span>
|
||||
</a>
|
||||
</clr-checkbox>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
|
@ -25,7 +25,7 @@
|
|||
<div class="checkbox-inline">
|
||||
<input type="checkbox" id="create_project_public" [(ngModel)]="project.metadata.public" name="public">
|
||||
<label for="create_project_public"></label>
|
||||
<span class="access-level-label">{{ accessLevelDisplayText | translate}}</span>
|
||||
<span class="access-level-label">{{ 'PROJECT.PUBLIC' | translate}}</span>
|
||||
<a href="javascript:void(0)" role="tooltip" aria-haspopup="true" class="tooltip tooltip-md tooltip-bottom-right" style="top:-8px; left:-8px;">
|
||||
<clr-icon shape="info-circle" class="info-tips-icon" size="24"></clr-icon>
|
||||
<span class="tooltip-content" style="margin-left: 5px;">{{'PROJECT.INLINE_HELP_PUBLIC' | translate }}</span>
|
||||
|
|
|
@ -71,10 +71,7 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr
|
|||
constructor(private projectService: ProjectService,
|
||||
private translateService: TranslateService,
|
||||
private messageHandlerService: MessageHandlerService) { }
|
||||
|
||||
public get accessLevelDisplayText(): string {
|
||||
return this.project.metadata.public ? 'PROJECT.PUBLIC' : 'PROJECT.PRIVATE';
|
||||
}
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
this.proNameChecker
|
||||
|
|
|
@ -395,6 +395,8 @@
|
|||
"MAIL_PASSWORD": "Email Password",
|
||||
"MAIL_FROM": "Email From",
|
||||
"MAIL_SSL": "Email SSL",
|
||||
"MAIL_INSECURE": "Verify Certificate",
|
||||
"INSECURE_TOOLTIP": "Determine whether should verify the certificate of a remote Harbor registry. Uncheck this box when the remote registry uses a self-signed or untrusted certificate.",
|
||||
"SSL_TOOLTIP": "Enable SSL for email server connection",
|
||||
"VERIFY_REMOTE_CERT": "Verify Remote Cert",
|
||||
"TOKEN_EXPIRATION": "Token Expiration (Minutes)",
|
||||
|
|
|
@ -396,6 +396,8 @@
|
|||
"MAIL_PASSWORD": "Contraseña del servidor de email",
|
||||
"MAIL_FROM": "Email De",
|
||||
"MAIL_SSL": "Email SSL",
|
||||
"MAIL_INSECURE": "Verify Certificate",
|
||||
"INSECURE_TOOLTIP": "Determina si la verificar el certificado de un registro Harbor remoto. Desmarque esta opción cuando el registro remoto use un certificado de confianza o autofirmado.",
|
||||
"SSL_TOOLTIP": "Activar SSL en conexiones al servidor de correo",
|
||||
"VERIFY_REMOTE_CERT": "Verificar Certificado Remoto",
|
||||
"TOKEN_EXPIRATION": "Expiración del Token (Minutos)",
|
||||
|
|
|
@ -395,6 +395,8 @@
|
|||
"MAIL_PASSWORD": "密码",
|
||||
"MAIL_FROM": "邮件来源",
|
||||
"MAIL_SSL": "邮件 SSL",
|
||||
"MAIL_INSECURE": "验证证书",
|
||||
"INSECURE_TOOLTIP": "确定是否要验证远程Harbor实例的证书。如果远程实例使用的是自签或者非信任证书,不要勾选此项。",
|
||||
"SSL_TOOLTIP": "启用SSL到邮件服务器连接。",
|
||||
"VERIFY_REMOTE_CERT": "验证远程证书",
|
||||
"TOKEN_EXPIRATION": "令牌过期时间(分钟)",
|
||||
|
|
|
@ -147,6 +147,9 @@ Config Email
|
|||
Mouse Down xpath=//*[@id="clr-checkbox-emailSSL"]
|
||||
Mouse Up xpath=//*[@id="clr-checkbox-emailSSL"]
|
||||
Sleep 1
|
||||
Mouse Down xpath=//*[@id="clr-checkbox-emailInsecure"]
|
||||
Mouse Up xpath=//*[@id="clr-checkbox-emailInsecure"]
|
||||
Sleep 1
|
||||
Click Element xpath=/html/body/harbor-app/harbor-shell/clr-main-container/div/div/config/div/div/div/button[1]
|
||||
Sleep 6
|
||||
|
||||
|
@ -155,7 +158,8 @@ Verify Email
|
|||
Textfield Value Should Be xpath=//*[@id="emailPort"] 25
|
||||
Textfield Value Should Be xpath=//*[@id="emailUsername"] example@vmware.com
|
||||
Textfield Value Should Be xpath=//*[@id="emailFrom"] example<example@vmware.com>
|
||||
Checkbox Should Be Selected xpath=//*[@id="clr-checkbox-emailSSL"]
|
||||
Checkbox Should Be Selected xpath=//*[@id="clr-checkbox-emailSSL"]
|
||||
Checkbox Should Be Selected xpath=//*[@id="clr-checkbox-emailInsecure"]
|
||||
|
||||
Set Scan All To None
|
||||
click element //vulnerability-config//select
|
||||
|
|
Loading…
Reference in New Issue
Block a user