diff --git a/src/portal/src/app/project/repository/artifact/artifact-tag/artifact-tag.component.ts b/src/portal/src/app/project/repository/artifact/artifact-tag/artifact-tag.component.ts index 9112f02cc..2c3233196 100644 --- a/src/portal/src/app/project/repository/artifact/artifact-tag/artifact-tag.component.ts +++ b/src/portal/src/app/project/repository/artifact/artifact-tag/artifact-tag.component.ts @@ -34,7 +34,7 @@ class InitTag { name = ""; } const DeleteTagWithNotoryCommand1 = 'notary -s https://'; -const DeleteTagWithNotoryCommand2 = ' -d ~/.docker/trust remove -p '; +const DeleteTagWithNotoryCommand2 = ':4443 -d ~/.docker/trust remove -p '; @Component({ selector: 'artifact-tag', templateUrl: './artifact-tag.component.html', @@ -256,7 +256,12 @@ export class ArtifactTagComponent implements OnInit, OnDestroy { } } } - + deletePort(url): string { + if (url && url.indexOf(':') !== -1) { + return url.split(':')[0]; + } + return url; + } delOperate(tag: Tag): Observable | null { // init operation info let operMessage = new OperateInfo(); @@ -268,10 +273,10 @@ export class ArtifactTagComponent implements OnInit, OnDestroy { if (tag.signed) { forkJoin(this.translateService.get("BATCH.DELETED_FAILURE"), this.translateService.get("REPOSITORY.DELETION_SUMMARY_TAG_DENIED")).subscribe(res => { - let wrongInfo: string = res[1] + DeleteTagWithNotoryCommand1 + this.registryUrl + + const wrongInfo: string = res[1] + DeleteTagWithNotoryCommand1 + this.deletePort(this.registryUrl) + DeleteTagWithNotoryCommand2 + this.registryUrl + "/" + this.repositoryName + - " " + name; + " " + tag.name; operateChanges(operMessage, OperationState.failure, wrongInfo); }); return of(null);