mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 04:35:16 +01:00
Merge pull request #2454 from steven-zou/release-1.1.0
enable pagination for user list
This commit is contained in:
commit
0eaa6a4868
@ -12,12 +12,12 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<clr-datagrid>
|
<clr-datagrid [clrDgLoading]="inProgress">
|
||||||
<clr-dg-column>{{'USER.COLUMN_NAME' | translate}}</clr-dg-column>
|
<clr-dg-column>{{'USER.COLUMN_NAME' | translate}}</clr-dg-column>
|
||||||
<clr-dg-column>{{'USER.COLUMN_ADMIN' | translate}}</clr-dg-column>
|
<clr-dg-column>{{'USER.COLUMN_ADMIN' | translate}}</clr-dg-column>
|
||||||
<clr-dg-column>{{'USER.COLUMN_EMAIL' | translate}}</clr-dg-column>
|
<clr-dg-column>{{'USER.COLUMN_EMAIL' | translate}}</clr-dg-column>
|
||||||
<clr-dg-column>{{'USER.COLUMN_REG_NAME' | translate}}</clr-dg-column>
|
<clr-dg-column>{{'USER.COLUMN_REG_NAME' | translate}}</clr-dg-column>
|
||||||
<clr-dg-row *ngFor="let user of users" [clrDgItem]="user">
|
<clr-dg-row *clrDgItems="let user of users" [clrDgItem]="user">
|
||||||
<clr-dg-action-overflow [hidden]="isMySelf(user.user_id)">
|
<clr-dg-action-overflow [hidden]="isMySelf(user.user_id)">
|
||||||
<button class="action-item" (click)="changeAdminRole(user)">{{adminActions(user)}}</button>
|
<button class="action-item" (click)="changeAdminRole(user)">{{adminActions(user)}}</button>
|
||||||
<button class="action-item" (click)="deleteUser(user)">{{'USER.DEL_ACTION' | translate}}</button>
|
<button class="action-item" (click)="deleteUser(user)">{{'USER.DEL_ACTION' | translate}}</button>
|
||||||
@ -27,7 +27,10 @@
|
|||||||
<clr-dg-cell>{{user.email}}</clr-dg-cell>
|
<clr-dg-cell>{{user.email}}</clr-dg-cell>
|
||||||
<clr-dg-cell>{{user.creation_time | date: 'short'}}</clr-dg-cell>
|
<clr-dg-cell>{{user.creation_time | date: 'short'}}</clr-dg-cell>
|
||||||
</clr-dg-row>
|
</clr-dg-row>
|
||||||
<clr-dg-footer>{{users.length}} {{'USER.ITEMS' | translate}}</clr-dg-footer>
|
<clr-dg-footer>{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} of {{pagination.totalItems}} users
|
||||||
|
<clr-dg-pagination #pagination [clrDgPageSize]="15" [clrDgTotalItems]="users.length"> {{'USER.ITEMS' | translate}}
|
||||||
|
</clr-dg-pagination>
|
||||||
|
</clr-dg-footer>
|
||||||
</clr-datagrid>
|
</clr-datagrid>
|
||||||
</div>
|
</div>
|
||||||
<new-user-modal (addNew)="addUserToList($event)"></new-user-modal>
|
<new-user-modal (addNew)="addUserToList($event)"></new-user-modal>
|
||||||
|
@ -38,7 +38,7 @@ import { AppConfigService } from '../app-config.service';
|
|||||||
export class UserComponent implements OnInit, OnDestroy {
|
export class UserComponent implements OnInit, OnDestroy {
|
||||||
users: User[] = [];
|
users: User[] = [];
|
||||||
originalUsers: Promise<User[]>;
|
originalUsers: Promise<User[]>;
|
||||||
private onGoing: boolean = false;
|
private onGoing: boolean = true;
|
||||||
private adminMenuText: string = "";
|
private adminMenuText: string = "";
|
||||||
private adminColumn: string = "";
|
private adminColumn: string = "";
|
||||||
private deletionSubscription: Subscription;
|
private deletionSubscription: Subscription;
|
||||||
|
Loading…
Reference in New Issue
Block a user