Skip to content

Commit

Permalink
Merge 1fdcace into b2a7b81
Browse files Browse the repository at this point in the history
  • Loading branch information
AllForNothing committed Aug 26, 2020
2 parents b2a7b81 + 1fdcace commit ae7f3ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
<div class="row">
<div *ngIf="!isCardView" class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<clr-datagrid (clrDgRefresh)="clrLoad($event)" [clrDgLoading]="loading" [(clrDgSelected)]="selectedRow" (clrDgSelectedChange)="selectedChange()">
<clr-datagrid (clrDgRefresh)="clrLoad($event)" [clrDgLoading]="loading" [(clrDgSelected)]="selectedRow">
<clr-dg-action-bar>
<button *ngIf="withAdmiral" type="button" class="btn btn-sm btn-secondary" (click)="provisionItemEvent($event, selectedRow[0])" [disabled]="!(selectedRow.length===1 && hasProjectAdminRole)"><clr-icon shape="times" size="16"></clr-icon>&nbsp;{{'REPOSITORY.DEPLOY' | translate}}</button>
<button *ngIf="withAdmiral" type="button" class="btn btn-sm btn-secondary" (click)="itemAddInfoEvent($event, selectedRow[0])" [disabled]="!(selectedRow.length===1 && hasProjectAdminRole)"><clr-icon shape="times" size="16"></clr-icon>&nbsp;{{'REPOSITORY.ADDITIONAL_INFO' | translate}}</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import { errorHandler as errorHandFn } from "../shared/shared.utils";
selector: "hbr-repository-gridview",
templateUrl: "./repository-gridview.component.html",
styleUrls: ["./repository-gridview.component.scss"],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class RepositoryGridviewComponent implements OnChanges, OnInit {
signedCon: { [key: string]: any | string[] } = {};
Expand Down Expand Up @@ -94,7 +93,6 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
private tagService: TagService,
private operationService: OperationService,
public userPermissionService: UserPermissionService,
private ref: ChangeDetectorRef,
private router: Router) {
if (this.configInfo && this.configInfo.systemInfoEndpoint) {
this.downloadLink = this.configInfo.systemInfoEndpoint + "/getcert";
Expand Down Expand Up @@ -266,10 +264,7 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
{
repoName: repoName,
signedImages: signature,
}).pipe(finalize(() => {
let hnd = setInterval(() => this.ref.markForCheck(), 100);
setTimeout(() => clearInterval(hnd), 5000);
}))
})
.subscribe((res: string) => {
summaryKey = res;
let message = new ConfirmationMessage(
Expand All @@ -280,8 +275,6 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
ConfirmationTargets.REPOSITORY,
button);
this.confirmationDialog.open(message);


});
}

Expand Down Expand Up @@ -326,12 +319,6 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
evt.stopPropagation();
this.deleteRepos([item]);
}

selectedChange(): void {
let hnd = setInterval(() => this.ref.markForCheck(), 100);
setTimeout(() => clearInterval(hnd), 2000);
}

refresh() {
this.doSearchRepoNames("");
}
Expand All @@ -346,7 +333,7 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
this.projectId,
this.lastFilteredRepoName,
params
)
).pipe(finalize(() => this.loading = false))
.subscribe((repo: Repository) => {
this.totalCount = repo.metadata.xTotalCount;
this.repositoriesCopy = repo.data;
Expand All @@ -361,13 +348,9 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
this.currentState
);
this.repositories = this.repositories.concat(this.repositoriesCopy);
this.loading = false;
}, error => {
this.loading = false;
this.errorHandler.error(error);
});
let hnd = setInterval(() => this.ref.markForCheck(), 500);
setTimeout(() => clearInterval(hnd), 5000);
}

clrLoad(state: State): void {
Expand All @@ -392,7 +375,7 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
this.projectId,
this.lastFilteredRepoName,
params
)
).pipe(finalize(() => this.loading = false))
.subscribe((repo: Repository) => {

this.totalCount = repo.metadata.xTotalCount;
Expand All @@ -405,15 +388,9 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
state
);
this.repositories = doSorting<RepositoryItem>(this.repositories, state);
this.loading = false;
}, error => {
this.loading = false;
this.errorHandler.error(error);
});

// Force refresh view
let hnd = setInterval(() => this.ref.markForCheck(), 100);
setTimeout(() => clearInterval(hnd), 5000);
}

getStateAfterDeletion(): State {
Expand Down

0 comments on commit ae7f3ec

Please sign in to comment.