From 67d0fecc7bb1fcc5bda39b9d417a46ad482746e9 Mon Sep 17 00:00:00 2001 From: Jim Chen Date: Sat, 12 Oct 2024 11:07:13 +0800 Subject: [PATCH] feat: support Alibaba ACR proxy cache type (#19692) * feat: support Alibaba ACR proxy cache type Signed-off-by: njucjc * chore: replace 'Alibaba ACR' to 'Alibaba Cloud ACR' Signed-off-by: njucjc --------- Signed-off-by: njucjc Co-authored-by: chenjici.cjc --- make/photon/prepare/templates/core/env.jinja | 2 +- .../projects/create-project/create-project.component.ts | 2 +- src/portal/src/app/shared/services/endpoint.service.ts | 2 +- src/portal/src/i18n/lang/de-de-lang.json | 2 +- src/portal/src/i18n/lang/en-us-lang.json | 2 +- src/portal/src/i18n/lang/pt-br-lang.json | 2 +- src/portal/src/i18n/lang/tr-tr-lang.json | 2 +- src/portal/src/i18n/lang/zh-cn-lang.json | 2 +- src/portal/src/i18n/lang/zh-tw-lang.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/make/photon/prepare/templates/core/env.jinja b/make/photon/prepare/templates/core/env.jinja index acfa34467..6be51d8dd 100644 --- a/make/photon/prepare/templates/core/env.jinja +++ b/make/photon/prepare/templates/core/env.jinja @@ -40,7 +40,7 @@ REGISTRY_CREDENTIAL_USERNAME={{registry_username}} REGISTRY_CREDENTIAL_PASSWORD={{registry_password}} CSRF_KEY={{csrf_key}} ROBOT_SCANNER_NAME_PREFIX={{scan_robot_prefix}} -PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE=docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory +PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE=docker-hub,harbor,azure-acr,ali-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory HTTP_PROXY={{core_http_proxy}} HTTPS_PROXY={{core_https_proxy}} diff --git a/src/portal/src/app/base/left-side-nav/projects/create-project/create-project.component.ts b/src/portal/src/app/base/left-side-nav/projects/create-project/create-project.component.ts index bec770403..1c572ee57 100644 --- a/src/portal/src/app/base/left-side-nav/projects/create-project/create-project.component.ts +++ b/src/portal/src/app/base/left-side-nav/projects/create-project/create-project.component.ts @@ -107,7 +107,7 @@ export class CreateProjectComponent registries: Registry[] = []; supportedRegistryTypeQueryString: string = - 'type={docker-hub harbor azure-acr aws-ecr google-gcr quay docker-registry github-ghcr jfrog-artifactory}'; + 'type={docker-hub harbor azure-acr ali-acr aws-ecr google-gcr quay docker-registry github-ghcr jfrog-artifactory}'; // **Added property for bandwidth error message** bandwidthError: string | null = null; diff --git a/src/portal/src/app/shared/services/endpoint.service.ts b/src/portal/src/app/shared/services/endpoint.service.ts index 0b007bca0..ad60f2654 100644 --- a/src/portal/src/app/shared/services/endpoint.service.ts +++ b/src/portal/src/app/shared/services/endpoint.service.ts @@ -13,7 +13,7 @@ import { catchError, map } from 'rxjs/operators'; import { ReplicationPolicy } from '../../../../ng-swagger-gen/models/replication-policy'; export const ADAPTERS_MAP = { - 'ali-acr': 'Alibaba ACR', + 'ali-acr': 'Alibaba Cloud ACR', 'aws-ecr': 'Aws ECR', 'azure-acr': 'Azure ACR', 'docker-hub': 'Docker Hub', diff --git a/src/portal/src/i18n/lang/de-de-lang.json b/src/portal/src/i18n/lang/de-de-lang.json index 7523ab2ed..259acc69e 100644 --- a/src/portal/src/i18n/lang/de-de-lang.json +++ b/src/portal/src/i18n/lang/de-de-lang.json @@ -257,7 +257,7 @@ "QUOTA_UNLIMIT_TIP": "The maximum logical space that can be used by the project. Für eine unbegrenzte Speicherbeschränkung '-1' eingeben.", "TYPE": "Typ", "PROXY_CACHE": "Proxy Cache", - "PROXY_CACHE_TOOLTIP": "Die Aktivierung der Funktion erlaubt es dem Projekt, als Cache für eine andere Registry Instanz zu dienen. Harbor unterstützt die Proxy Funktion nur für DockerHub, Docker Registry, Harbor, Aws ECR, Azure ACR, Quay, Google GCR, JFrog Artifactory, und Github GHCR", + "PROXY_CACHE_TOOLTIP": "Die Aktivierung der Funktion erlaubt es dem Projekt, als Cache für eine andere Registry Instanz zu dienen. Harbor unterstützt die Proxy Funktion nur für DockerHub, Docker Registry, Harbor, Aws ECR, Azure ACR, Alibaba Cloud ACR, Quay, Google GCR, JFrog Artifactory, und Github GHCR", "ENDPOINT": "Endpunkt", "PROXY_CACHE_ENDPOINT": "Proxy Cache Endpunkt", "NO_PROJECT": "Es konnte kein Projekt gefunden werden" diff --git a/src/portal/src/i18n/lang/en-us-lang.json b/src/portal/src/i18n/lang/en-us-lang.json index f02db8665..2b9fadbdf 100644 --- a/src/portal/src/i18n/lang/en-us-lang.json +++ b/src/portal/src/i18n/lang/en-us-lang.json @@ -257,7 +257,7 @@ "QUOTA_UNLIMIT_TIP": "The maximum logical space that can be used by the project. For unlimited quota enter '-1'.", "TYPE": "Type", "PROXY_CACHE": "Proxy Cache", - "PROXY_CACHE_TOOLTIP": "Enable this to allow this project to act as a pull-through cache for a particular target registry instance. Harbor can only act a proxy for DockerHub, Docker Registry, Harbor, Aws ECR, Azure ACR, Quay, Google GCR, Github GHCR, and JFrog Artifactory registries.", + "PROXY_CACHE_TOOLTIP": "Enable this to allow this project to act as a pull-through cache for a particular target registry instance. Harbor can only act a proxy for DockerHub, Docker Registry, Harbor, Aws ECR, Azure ACR, Alibaba Cloud ACR, Quay, Google GCR, Github GHCR, and JFrog Artifactory registries.", "ENDPOINT": "Endpoint", "PROXY_CACHE_ENDPOINT": "Proxy Cache Endpoint", "NO_PROJECT": "We couldn't find any projects" diff --git a/src/portal/src/i18n/lang/pt-br-lang.json b/src/portal/src/i18n/lang/pt-br-lang.json index d9a244a89..d92517705 100644 --- a/src/portal/src/i18n/lang/pt-br-lang.json +++ b/src/portal/src/i18n/lang/pt-br-lang.json @@ -256,7 +256,7 @@ "QUOTA_UNLIMIT_TIP": "The maximum logical space that can be used by the project. Para não ter limite, utilize -1.", "TYPE": "Tipo", "PROXY_CACHE": "Cache do Proxy", - "PROXY_CACHE_TOOLTIP": "Habilite para fazer deste projeto um cache local de outros repositórios remotos (registries). O Harbor pode servir de cache apenas para outros repositórios Harbor, Docker Hub, AWS ECR, Azure ACR, Quay, Google GCR, Github GHCR, JFrog Artifactory, e repositórios compatíveis com o protocolo Docker Registry", + "PROXY_CACHE_TOOLTIP": "Habilite para fazer deste projeto um cache local de outros repositórios remotos (registries). O Harbor pode servir de cache apenas para outros repositórios Harbor, Docker Hub, AWS ECR, Azure ACR, Alibaba Cloud ACR, Quay, Google GCR, Github GHCR, JFrog Artifactory, e repositórios compatíveis com o protocolo Docker Registry", "ENDPOINT": "Endereço", "PROXY_CACHE_ENDPOINT": "Endereço do Proxy Cache" }, diff --git a/src/portal/src/i18n/lang/tr-tr-lang.json b/src/portal/src/i18n/lang/tr-tr-lang.json index bc6a35d9a..fa671e35f 100644 --- a/src/portal/src/i18n/lang/tr-tr-lang.json +++ b/src/portal/src/i18n/lang/tr-tr-lang.json @@ -257,7 +257,7 @@ "QUOTA_UNLIMIT_TIP": "The maximum logical space that can be used by the project. Bu kotayı sınırsız istiyorsanız, lütfen -1 girin.", "TYPE": "Type", "PROXY_CACHE": "Proxy Cache", - "PROXY_CACHE_TOOLTIP": "Enable this to allow this project to act as a pull-through cache for a particular target registry instance. Harbor can only act a proxy for DockerHub, Docker Registry, Harbor, Aws ECR, Azure ACR, Quay, Google GCR, JFrog Artifactory, and Github GHCR registries.", + "PROXY_CACHE_TOOLTIP": "Enable this to allow this project to act as a pull-through cache for a particular target registry instance. Harbor can only act a proxy for DockerHub, Docker Registry, Harbor, Aws ECR, Azure ACR, Alibaba Cloud ACR, Quay, Google GCR, JFrog Artifactory, and Github GHCR registries.", "ENDPOINT": "Endpoint", "PROXY_CACHE_ENDPOINT": "Proxy Cache Endpoint", "NO_PROJECT": "We couldn't find any projects" diff --git a/src/portal/src/i18n/lang/zh-cn-lang.json b/src/portal/src/i18n/lang/zh-cn-lang.json index cb304a456..cd8494279 100644 --- a/src/portal/src/i18n/lang/zh-cn-lang.json +++ b/src/portal/src/i18n/lang/zh-cn-lang.json @@ -256,7 +256,7 @@ "QUOTA_UNLIMIT_TIP": "项目可以使用的最大逻辑空间。如果您想要不设置上限,请输入-1。", "TYPE": "类型", "PROXY_CACHE": "镜像代理", - "PROXY_CACHE_TOOLTIP": "开启此项,以使得该项目成为目标仓库的镜像代理.仅支持 DockerHub, Docker Registry, Harbor, Aws ECR, Azure ACR, Quay, Google GCR, JFrog Artifactory, 和 Github GHCR 类型的仓库", + "PROXY_CACHE_TOOLTIP": "开启此项,以使得该项目成为目标仓库的镜像代理.仅支持 DockerHub, Docker Registry, Harbor, Aws ECR, Azure ACR, Alibaba Cloud ACR, Quay, Google GCR, JFrog Artifactory, 和 Github GHCR 类型的仓库", "ENDPOINT": "地址", "PROXY_CACHE_ENDPOINT": "镜像代理地址", "NO_PROJECT": "未发现任何项目" diff --git a/src/portal/src/i18n/lang/zh-tw-lang.json b/src/portal/src/i18n/lang/zh-tw-lang.json index 9f6031a54..e669ea0b2 100644 --- a/src/portal/src/i18n/lang/zh-tw-lang.json +++ b/src/portal/src/i18n/lang/zh-tw-lang.json @@ -256,7 +256,7 @@ "QUOTA_UNLIMIT_TIP": "專案所能使用的最大邏輯空間。輸入 '-1' 表示無限制配額。", "TYPE": "類型", "PROXY_CACHE": "代理快取", - "PROXY_CACHE_TOOLTIP": "啟用此選項可讓此專案作為特定目標 Registry 實例的拉取快取。Harbor 僅可作為 DockerHub、Docker Registry、Harbor、AWS ECR、Azure ACR、Quay、Google GCR、GitHub GHCR 和 JFrog Artifactory Registry 的代理。", + "PROXY_CACHE_TOOLTIP": "啟用此選項可讓此專案作為特定目標 Registry 實例的拉取快取。Harbor 僅可作為 DockerHub、Docker Registry、Harbor、AWS ECR、Azure ACR、Alibaba Cloud ACR、Quay、Google GCR、GitHub GHCR 和 JFrog Artifactory Registry 的代理。", "ENDPOINT": "端點", "PROXY_CACHE_ENDPOINT": "代理快取端點", "NO_PROJECT": "找不到任何專案"