Merge pull request #13072 from AllForNothing/registry

Disable endpoint input for docker-hub and helm-hub
This commit is contained in:
Will Sun 2020-09-17 10:43:27 +08:00 committed by GitHub
commit 7ae96f7dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,7 @@ const FAKE_PASSWORD = "rjGcfuRu";
const FAKE_JSON_KEY = "No Change"; const FAKE_JSON_KEY = "No Change";
const METADATA_URL = CURRENT_BASE_HREF + "/replication/adapterinfos"; const METADATA_URL = CURRENT_BASE_HREF + "/replication/adapterinfos";
const HELM_HUB = "helm-hub"; const HELM_HUB = "helm-hub";
const FIXED_PATTERN_TYPE: string = "EndpointPatternTypeFix";
@Component({ @Component({
selector: "hbr-create-edit-endpoint", selector: "hbr-create-edit-endpoint",
templateUrl: "./create-edit-endpoint.component.html", templateUrl: "./create-edit-endpoint.component.html",
@ -271,6 +272,9 @@ export class CreateEditEndpointComponent
if (this.endpointList.length === 1) { if (this.endpointList.length === 1) {
this.target.url = this.endpointList[0].value; this.target.url = this.endpointList[0].value;
} }
if (this.adapterInfo[selectValue].endpoint_pattern.endpoint_type === FIXED_PATTERN_TYPE) {
this.urlDisabled = true;
}
} else { } else {
this.endpointList = []; this.endpointList = [];
} }