mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-30 06:03:45 +01:00
'3022'
This commit is contained in:
parent
e4af0bdb10
commit
7393843bd0
@ -138,7 +138,7 @@ export class RepositoryStackviewComponent implements OnChanges, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges): void {
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
if (changes['projectId']) {
|
if (changes['projectId'] && changes['projectId'].currentValue) {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -171,24 +171,11 @@ export class RepositoryStackviewComponent implements OnChanges, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deleteRepo(repoName: string) {
|
deleteRepo(repoName: string) {
|
||||||
// get children tags data
|
|
||||||
|
|
||||||
let signature: string = '';
|
|
||||||
if (this.signedCon[repoName]) {
|
if (this.signedCon[repoName]) {
|
||||||
if (this.signedCon[repoName].length === 0) {
|
this.signedDataSet(repoName);
|
||||||
this.confirmationDialogSet('DELETION_TITLE_REPO', signature, repoName, 'REPOSITORY.DELETION_SUMMARY_REPO', ConfirmationButtons.DELETE_CANCEL);
|
} else {
|
||||||
return;
|
|
||||||
}
|
|
||||||
signature = this.signedCon[repoName].join(',');
|
|
||||||
this.confirmationDialogSet('DELETION_TITLE_REPO_SIGNED', signature, repoName, 'REPOSITORY.DELETION_SUMMARY_REPO_SIGNED', ConfirmationButtons.CLOSE);
|
|
||||||
} else {
|
|
||||||
this.getTagInfo(repoName).then(() => {
|
this.getTagInfo(repoName).then(() => {
|
||||||
if (this.signedCon[repoName].length) {
|
this.signedDataSet(repoName);
|
||||||
signature = this.signedCon[repoName].join(',');
|
|
||||||
this.confirmationDialogSet('DELETION_TITLE_REPO_SIGNED', signature, repoName, 'REPOSITORY.DELETION_SUMMARY_REPO_SIGNED', ConfirmationButtons.CLOSE);
|
|
||||||
} else {
|
|
||||||
this.confirmationDialogSet('DELETION_TITLE_REPO', signature, repoName, 'REPOSITORY.DELETION_SUMMARY_REPO', ConfirmationButtons.DELETE_CANCEL);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -207,6 +194,16 @@ export class RepositoryStackviewComponent implements OnChanges, OnInit {
|
|||||||
.catch(error => this.errorHandler.error(error));
|
.catch(error => this.errorHandler.error(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signedDataSet(repoName: string): void {
|
||||||
|
let signature: string = '';
|
||||||
|
if (this.signedCon[repoName].length === 0) {
|
||||||
|
this.confirmationDialogSet('DELETION_TITLE_REPO', signature, repoName, 'REPOSITORY.DELETION_SUMMARY_REPO', ConfirmationButtons.DELETE_CANCEL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
signature = this.signedCon[repoName].join(',');
|
||||||
|
this.confirmationDialogSet('DELETION_TITLE_REPO_SIGNED', signature, repoName, 'REPOSITORY.DELETION_SUMMARY_REPO_SIGNED', ConfirmationButtons.CLOSE);
|
||||||
|
}
|
||||||
|
|
||||||
confirmationDialogSet(summaryTitle: string, signature: string, repoName: string, summaryKey: string, button: ConfirmationButtons): void {
|
confirmationDialogSet(summaryTitle: string, signature: string, repoName: string, summaryKey: string, button: ConfirmationButtons): void {
|
||||||
this.translate.get(summaryKey,
|
this.translate.get(summaryKey,
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user