diff --git a/src/ui_ng/lib/src/config/vulnerability/vulnerability-config.component.ts b/src/ui_ng/lib/src/config/vulnerability/vulnerability-config.component.ts
index b8cceb360..2dd09463c 100644
--- a/src/ui_ng/lib/src/config/vulnerability/vulnerability-config.component.ts
+++ b/src/ui_ng/lib/src/config/vulnerability/vulnerability-config.component.ts
@@ -41,6 +41,8 @@ export class VulnerabilityConfigComponent {
this.configChange.emit(this.config);
}
+ @Input() showSubTitle: boolean = false
+
//UTC time
get dailyTime(): string {
if (!(this.config &&
diff --git a/src/ui_ng/package.json b/src/ui_ng/package.json
index 56b3f804d..2e1f8c052 100644
--- a/src/ui_ng/package.json
+++ b/src/ui_ng/package.json
@@ -31,7 +31,7 @@
"clarity-icons": "^0.9.8",
"clarity-ui": "^0.9.8",
"core-js": "^2.4.1",
- "harbor-ui": "^0.2.52",
+ "harbor-ui": "^0.2.55",
"intl": "^1.2.5",
"mutationobserver-shim": "^0.3.2",
"ngx-cookie": "^1.0.0",
diff --git a/src/ui_ng/src/app/app-config.ts b/src/ui_ng/src/app/app-config.ts
index a3166745b..f2595b2ac 100644
--- a/src/ui_ng/src/app/app-config.ts
+++ b/src/ui_ng/src/app/app-config.ts
@@ -16,6 +16,7 @@ export class AppConfig {
//Set default value
this.with_notary = false;
this.with_admiral = false;
+ this.with_clair = false;
this.admiral_endpoint = "";
this.auth_mode = "db_auth";
this.registry_url = "";
@@ -27,6 +28,7 @@ export class AppConfig {
with_notary: boolean;
with_admiral: boolean;
+ with_clair: boolean;
admiral_endpoint: string;
auth_mode: string;
registry_url: string;
diff --git a/src/ui_ng/src/app/config/config.component.html b/src/ui_ng/src/app/config/config.component.html
index b5b19707f..cdc9f58c4 100644
--- a/src/ui_ng/src/app/config/config.component.html
+++ b/src/ui_ng/src/app/config/config.component.html
@@ -15,7 +15,7 @@
+
diff --git a/src/ui_ng/src/app/config/config.component.ts b/src/ui_ng/src/app/config/config.component.ts
index f239e8d45..eeeffb885 100644
--- a/src/ui_ng/src/app/config/config.component.ts
+++ b/src/ui_ng/src/app/config/config.component.ts
@@ -71,6 +71,19 @@ export class ConfigurationComponent implements OnInit, OnDestroy {
private appConfigService: AppConfigService,
private session: SessionService) { }
+ public get hasAdminRole(): boolean {
+ return this.session.getCurrentUser() &&
+ this.session.getCurrentUser().has_admin_role > 0;
+ }
+
+ public get hasCAFile(): boolean {
+ return this.appConfigService.getConfig().has_ca_root;
+ }
+
+ public get withClair(): boolean {
+ return this.appConfigService.getConfig().with_clair;
+ }
+
isCurrentTabLink(tabId: string): boolean {
return this.currentTabId === tabId;
}
diff --git a/src/ui_ng/src/app/shared/list-project-ro/list-project-ro.component.ts b/src/ui_ng/src/app/shared/list-project-ro/list-project-ro.component.ts
index 741c08a34..e8adc027d 100644
--- a/src/ui_ng/src/app/shared/list-project-ro/list-project-ro.component.ts
+++ b/src/ui_ng/src/app/shared/list-project-ro/list-project-ro.component.ts
@@ -40,7 +40,7 @@ export class ListProjectROComponent {
goToLink(proId: number): void {
this.searchTrigger.closeSearch(true);
- let linkUrl = ['harbor', 'projects', proId, 'repository'];
+ let linkUrl = ['harbor', 'projects', proId, 'repositories'];
this.router.navigate(linkUrl);
}
diff --git a/src/ui_ng/src/i18n/lang/en-us-lang.json b/src/ui_ng/src/i18n/lang/en-us-lang.json
index e241087d7..2b48113ad 100644
--- a/src/ui_ng/src/i18n/lang/en-us-lang.json
+++ b/src/ui_ng/src/i18n/lang/en-us-lang.json
@@ -83,8 +83,7 @@
"PROFILE": "User Profile",
"CHANGE_PWD": "Change Password",
"ABOUT": "About",
- "LOGOUT": "Log Out",
- "ROOT_CERT": "Download Root Cert"
+ "LOGOUT": "Log Out"
},
"GLOBAL_SEARCH": {
"PLACEHOLDER": "Search Harbor...",
@@ -383,6 +382,8 @@
"SCOPE_SUBTREE": "Subtree",
"PRO_CREATION_EVERYONE": "Everyone",
"PRO_CREATION_ADMIN": "Admin Only",
+ "ROOT_CERT": "Registry Root Certificate",
+ "ROOT_CERT_LINK": "Download",
"TOOLTIP": {
"SELF_REGISTRATION": "Enable sign up.",
"VERIFY_REMOTE_CERT": "Determine whether the image replication should verify the certificate of a remote Harbor registry. Uncheck this box when the remote registry uses a self-signed or untrusted certificate.",
@@ -390,9 +391,11 @@
"LDAP_SEARCH_DN": "A user's DN who has the permission to search the LDAP/AD server. If your LDAP/AD server does not support anonymous search, you should configure this DN and ldap_search_pwd.",
"LDAP_BASE_DN": "The base DN from which to look up a user in LDAP/AD.",
"LDAP_UID": "The attribute used in a search to match a user. It could be uid, cn, email, sAMAccountName or other attributes depending on your LDAP/AD.",
- "LDAP_SCOPE": "The scope to search for users",
+ "LDAP_SCOPE": "The scope to search for users.",
"TOKEN_EXPIRATION": "The expiration time (in minutes) of a token created by the token service. Default is 30 minutes.",
- "PRO_CREATION_RESTRICTION": "The flag to define what users have permission to create projects. By default, everyone can create a project. Set to 'Admin Only' so that only an administrator can create a project."
+ "PRO_CREATION_RESTRICTION": "The flag to define what users have permission to create projects. By default, everyone can create a project. Set to 'Admin Only' so that only an administrator can create a project.",
+ "ROOT_CERT_DOWNLOAD": "Download the root certificate of registry.",
+ "SCANNING_POLICY": "Set image scanning policy based on different requirements. 'None': No active policy; 'Daily At': Triggering scanning at the specified time everyday; 'Upon Refresh': Triggering scanning when database refreshed."
},
"LDAP": {
"URL": "LDAP URL",
diff --git a/src/ui_ng/src/i18n/lang/es-es-lang.json b/src/ui_ng/src/i18n/lang/es-es-lang.json
index 8cd8f33a9..4f14ed47f 100644
--- a/src/ui_ng/src/i18n/lang/es-es-lang.json
+++ b/src/ui_ng/src/i18n/lang/es-es-lang.json
@@ -83,8 +83,7 @@
"PROFILE": "Perfil de usuario",
"CHANGE_PWD": "Cambiar contraseña",
"ABOUT": "Acerca de",
- "LOGOUT": "Cerrar sesión",
- "ROOT_CERT": "Descargar Certificado Raíz"
+ "LOGOUT": "Cerrar sesión"
},
"GLOBAL_SEARCH": {
"PLACEHOLDER": "Buscar en Harbor...",
@@ -384,6 +383,8 @@
"SCOPE_SUBTREE": "Subárbol",
"PRO_CREATION_EVERYONE": "Todos",
"PRO_CREATION_ADMIN": "Solo Administradores",
+ "ROOT_CERT": "Registro Certificado Raíz",
+ "ROOT_CERT_LINK": "Descargar",
"TOOLTIP": {
"SELF_REGISTRATION": "Activar registro.",
"VERIFY_REMOTE_CERT": "Determina si la replicación de la imagen debería verificar el certificado de un registro Harbor remoto. Desmarque esta opción cuando el registro remoto use un certificado de confianza o autofirmado.",
@@ -393,7 +394,9 @@
"LDAP_UID": "El atributo usado en una búsqueda para encontrar un usuario. Debe ser el uid, cn, email, sAMAccountName u otro atributo dependiendo del LDAP/AD.",
"LDAP_SCOPE": "El ámbito de búsqueda para usuarios",
"TOKEN_EXPIRATION": "El tiempo de expiración (en minutos) del token creado por el servicio de tokens. Por defecto son 30 minutos.",
- "PRO_CREATION_RESTRICTION": "Marca para definir qué usuarios tienen permisos para crear proyectos. Por defecto, todos pueden crear proyectos. Seleccione 'Solo Administradores' para que solamente los administradores puedan crear proyectos."
+ "PRO_CREATION_RESTRICTION": "Marca para definir qué usuarios tienen permisos para crear proyectos. Por defecto, todos pueden crear proyectos. Seleccione 'Solo Administradores' para que solamente los administradores puedan crear proyectos.",
+ "ROOT_CERT_DOWNLOAD": "Download the root certificate of registry.",
+ "SCANNING_POLICY": "Set image scanning policy based on different requirements. 'None': No active policy; 'Daily At': Triggering scanning at the specified time everyday; 'Upon Refresh': Triggering scanning when database refreshed."
},
"LDAP": {
"URL": "LDAP URL",
diff --git a/src/ui_ng/src/i18n/lang/zh-cn-lang.json b/src/ui_ng/src/i18n/lang/zh-cn-lang.json
index 1f79be8a7..7a64d09ae 100644
--- a/src/ui_ng/src/i18n/lang/zh-cn-lang.json
+++ b/src/ui_ng/src/i18n/lang/zh-cn-lang.json
@@ -83,8 +83,7 @@
"PROFILE": "用户设置",
"CHANGE_PWD": "修改密码",
"ABOUT": "关于",
- "LOGOUT": "退出",
- "ROOT_CERT": "下载根证书"
+ "LOGOUT": "退出"
},
"GLOBAL_SEARCH": {
"PLACEHOLDER": "搜索 Harbor...",
@@ -383,6 +382,8 @@
"SCOPE_SUBTREE": "子树",
"PRO_CREATION_EVERYONE": "所有人",
"PRO_CREATION_ADMIN": "仅管理员",
+ "ROOT_CERT": "镜像库根证书",
+ "ROOT_CERT_LINK": "下载",
"TOOLTIP": {
"SELF_REGISTRATION": "激活注册功能。",
"VERIFY_REMOTE_CERT": "确定镜像复制是否要验证远程Harbor实例的证书。如果远程实例使用的是自签或者非信任证书,不要勾选此项。",
@@ -392,7 +393,9 @@
"LDAP_UID": "在搜索中用来匹配用户的属性,可以是uid,cn,email,sAMAccountName或者其它LDAP/AD服务器支持的属性。",
"LDAP_SCOPE": "搜索用户的范围。",
"TOKEN_EXPIRATION": "由令牌服务创建的令牌的过期时间(分钟),默认为30分钟。",
- "PRO_CREATION_RESTRICTION": "用来确定哪些用户有权限创建项目,默认为’所有人‘,设置为’仅管理员‘则只有管理员可以创建项目。"
+ "PRO_CREATION_RESTRICTION": "用来确定哪些用户有权限创建项目,默认为’所有人‘,设置为’仅管理员‘则只有管理员可以创建项目。",
+ "ROOT_CERT_DOWNLOAD": "下载镜像库根证书.",
+ "SCANNING_POLICY": "基于不同需求设置镜像扫描策略。‘无’:不设置任何策略;‘每日定时’:每天在设置的时间定时执行扫描;‘缺陷库刷新后’:当缺陷数据库刷新后。"
},
"LDAP": {
"URL": "LDAP URL",
@@ -409,7 +412,7 @@
"SCAN_ALL": "扫描所有",
"SCAN_NOW": "开始扫描",
"NONE_POLICY": "无",
- "DAILY_POLICY": "每日",
+ "DAILY_POLICY": "每日定时",
"REFRESH_POLICY": "缺陷库刷新后"
},
"TEST_MAIL_SUCCESS": "邮件服务器的连通正常。",