diff --git a/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts b/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts index 168b7b8..0588504 100644 --- a/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts +++ b/ogWebconsole/src/app/components/repositories/show-git-images/show-git-images.component.ts @@ -110,6 +110,11 @@ export class ShowGitCommitsComponent implements OnInit{ if (this.repositories.length > 0) { this.selectedRepository = this.repositories[0]; this.loadBranches(); + } else { + this.selectedRepository = ''; + this.branches = []; + this.selectedBranch = ''; + this.dataSource.data = []; } }, error => { @@ -344,7 +349,7 @@ export class ShowGitCommitsComponent implements OnInit{ this.http.post(`${this.baseUrl}/image-repositories/server/git/${this.data.repositoryUuid}/delete`, payload).subscribe({ next: () => { this.toastService.success(this.translate.instant('repositoryDeletedSuccessfully')); - this.dialogRef.close(true); + this.loadRepositories(); }, error: (error) => { console.error(this.translate.instant('errorDeletingRepository1'), error);