Merge pull request #6819 from jwangyangls/harbor_style_change

style_change
This commit is contained in:
Qian Deng 2019-01-26 21:18:08 +08:00 committed by GitHub
commit 6888c3247c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 21 deletions

View File

@ -13,6 +13,7 @@ $size60:60px;
overflow: hidden;
.rightPos {
@include grid-left-top-pos;
margin-top: 20px;
.filter-divider {
display: inline-block;
height: 16px;

View File

@ -7,7 +7,6 @@
position: absolute;
z-index: 100;
right: 35px;
margin-top: 14px;
height: 24px;
.option-right {
padding-right: 16px;

View File

@ -1,5 +1,5 @@
<div class="list-rule">
<clr-datagrid [clrDgLoading]="loading" [(clrDgSingleSelected)]="selectedRow" [clrDgRowSelection]="true">
<clr-datagrid [clrDgLoading]="loading" [(clrDgSingleSelected)]="selectedRow" (clrDgSingleSelectedChange)="selectRule($event)" [clrDgRowSelection]="true">
<clr-dg-action-bar>
<button type="button" class="btn btn-sm btn-secondary" *ngIf="isSystemAdmin" (click)="openModal()"><clr-icon shape="plus" size="16"></clr-icon>&nbsp;{{'REPLICATION.NEW_REPLICATION_RULE' | translate}}</button>
<button type="button" class="btn btn-sm btn-secondary" *ngIf="isSystemAdmin" [disabled]="!selectedRow" (click)="editRule(selectedRow)"><clr-icon shape="pencil" size="16"></clr-icon>&nbsp;{{'REPLICATION.EDIT_POLICY' | translate}}</button>
@ -13,7 +13,7 @@
<clr-dg-column >{{'REPLICATION.DESTINATION_NAME' | translate}}</clr-dg-column>
<clr-dg-column [clrDgField]="'trigger'">{{'REPLICATION.TRIGGER_MODE' | translate}}</clr-dg-column>
<clr-dg-placeholder>{{'REPLICATION.PLACEHOLDER' | translate }}</clr-dg-placeholder>
<clr-dg-row *clrDgItems="let p of changedRules" [clrDgItem]="p" (click)="selectRule(p)" [style.backgroundColor]="(projectScope && withReplicationJob && selectedId === p.id) ? '#eee' : ''">
<clr-dg-row *clrDgItems="let p of changedRules" [clrDgItem]="p" [style.backgroundColor]="(projectScope && withReplicationJob && selectedId === p.id) ? '#eee' : ''">
<clr-dg-cell>{{p.name}}</clr-dg-cell>
<clr-dg-cell>
<div [ngSwitch]="hasDeletedLabel(p)">

View File

@ -16,7 +16,7 @@
.rightPos{
position: absolute;
right: 35px;
margin-top: 15px;
margin-top: 20px;
z-index: 100;
height: 32px;
}

View File

@ -65,7 +65,8 @@
position: relative;
padding-left: .5rem;
padding-right: .5rem;
line-height: 1.0
line-height: 1.0;
height: 1.2rem;
}
.dropdown-menu input {

View File

@ -30,7 +30,7 @@
</div>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 datagrid-margin-top ">
<clr-datagrid (clrDgRefresh)="retrieve($event)">
<clr-datagrid (clrDgRefresh)="retrievePage($event)">
<clr-dg-column>{{'AUDIT_LOG.USERNAME' | translate}}</clr-dg-column>
<clr-dg-column>{{'AUDIT_LOG.REPOSITORY_NAME' | translate}}</clr-dg-column>
<clr-dg-column>{{'AUDIT_LOG.TAGS' | translate}}</clr-dg-column>

View File

@ -95,31 +95,35 @@ export class AuditLogComponent implements OnInit {
}
retrieve(state?: State): void {
if (state) {
this.queryParam.page = Math.ceil((state.page.to + 1) / this.pageSize);
this.currentPage = this.queryParam.page;
}
private retrieve(): void {
this.auditLogService
.listAuditLogs(this.queryParam)
.subscribe(
response => {
this.totalRecordCount = Number.parseInt(response.headers.get('x-total-count'));
this.auditLogs = response.json();
},
error => {
this.router.navigate(['/harbor', 'projects']);
this.messageHandlerService.handleError(error);
}
response => {
this.totalRecordCount = Number.parseInt(response.headers.get('x-total-count'));
this.auditLogs = response.json();
},
error => {
this.router.navigate(['/harbor', 'projects']);
this.messageHandlerService.handleError(error);
}
);
}
retrievePage(state: State) {
if (state && state.page) {
this.queryParam.page = Math.ceil((state.page.to + 1) / this.pageSize);
this.currentPage = this.queryParam.page;
this.retrieve();
}
}
doSearchAuditLogs(searchUsername: string): void {
this.queryParam.username = searchUsername;
this.retrieve();
}
doSearchByStartTime(fromTimestamp: string): void {
doSearchByStartTime(fromTimestamp: string): void {
this.queryParam.begin_timestamp = fromTimestamp;
this.retrieve();
}

View File

@ -7,7 +7,9 @@ clr-datagrid {
.row {
margin-top: 12px;
}
.flex-items-xs-between{
display: flex;
}
.modeSelectradios {
margin-top: 21px;
}