diff --git a/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.css.ts b/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.css.ts index c0e232338..aa63742f4 100644 --- a/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.css.ts +++ b/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.css.ts @@ -27,7 +27,6 @@ h4{ .filterSelect clr-icon{margin-left: 15px;} .filterSelect label{width: 136px;} .filterSelect label input{width: 100%;} -.cursor{cursor: pointer;} .pull-left{float: left;} .padLeft0{padding-left: 0;} .floatSetPar{display: inline-block; width: 120px;margin-right: 10px;} @@ -56,6 +55,7 @@ h4{ .selectBox ul li{ list-style: none; padding: 3px 20px + cursor: pointer; } .selectBox ul li:hover{ color: #262626; diff --git a/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.html.ts b/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.html.ts index 8817523d7..206170115 100644 --- a/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.html.ts +++ b/src/ui_ng/lib/src/create-edit-rule/create-edit-rule.component.html.ts @@ -69,7 +69,7 @@ export const CREATE_EDIT_RULE_TEMPLATE: string = ` - {{'SIDE_NAV.SYSTEM_MGMT.REGISTRY' | translate}} + {{'SIDE_NAV.SYSTEM_MGMT.REGISTRY' | translate}} diff --git a/src/ui_ng/lib/src/datetime-picker/datetime-picker.component.ts b/src/ui_ng/lib/src/datetime-picker/datetime-picker.component.ts index 72270a4e9..7eb061849 100644 --- a/src/ui_ng/lib/src/datetime-picker/datetime-picker.component.ts +++ b/src/ui_ng/lib/src/datetime-picker/datetime-picker.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core'; +import {Component, Input, Output, EventEmitter, ViewChild, OnChanges} from '@angular/core'; import { NgModel } from '@angular/forms'; import { DATETIME_PICKER_TEMPLATE } from './datetime-picker.component.html'; @@ -7,7 +7,7 @@ import { DATETIME_PICKER_TEMPLATE } from './datetime-picker.component.html'; selector: 'hbr-datetime', template: DATETIME_PICKER_TEMPLATE }) -export class DatePickerComponent { +export class DatePickerComponent implements OnChanges{ @Input() dateInput: string; @Input() oneDayOffset: boolean; @@ -17,6 +17,10 @@ export class DatePickerComponent { @Output() search = new EventEmitter(); + ngOnChanges(): void { + this.dateInput = this.dateInput.trim(); + } + get dateInvalid(): boolean { return (this.searchTime.errors && this.searchTime.errors.dateValidator && (this.searchTime.dirty || this.searchTime.touched)) || false; } diff --git a/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.html.ts b/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.html.ts index 47c006bad..327c8d334 100644 --- a/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.html.ts +++ b/src/ui_ng/lib/src/list-replication-rule/list-replication-rule.component.html.ts @@ -1,11 +1,11 @@ export const LIST_REPLICATION_RULE_TEMPLATE: string = `
- - - - - + + + + + {{'REPLICATION.NAME' | translate}} {{'REPLICATION.PROJECT' | translate}} diff --git a/src/ui_ng/lib/src/replication/replication.component.ts b/src/ui_ng/lib/src/replication/replication.component.ts index 5479f9ad5..09b2ab0f7 100644 --- a/src/ui_ng/lib/src/replication/replication.component.ts +++ b/src/ui_ng/lib/src/replication/replication.component.ts @@ -388,6 +388,9 @@ export class ReplicationComponent implements OnInit, OnDestroy { refreshJobs() { + this.currentJobStatus = this.jobStatus[0]; + this.search.startTime = ' '; + this.search.endTime = ' '; this.search.repoName = ""; this.search.startTimestamp = ""; this.search.endTimestamp = ""; diff --git a/src/ui_ng/package.json b/src/ui_ng/package.json index 88b5993f2..7ddb87599 100644 --- a/src/ui_ng/package.json +++ b/src/ui_ng/package.json @@ -31,7 +31,7 @@ "clarity-icons": "^0.10.17", "clarity-ui": "^0.10.17", "core-js": "^2.4.1", - "harbor-ui": "0.6.46", + "harbor-ui": "0.6.47", "intl": "^1.2.5", "mutationobserver-shim": "^0.3.2", "ngx-cookie": "^1.0.0", diff --git a/src/ui_ng/src/app/project/create-project/create-project.component.html b/src/ui_ng/src/app/project/create-project/create-project.component.html index ff0303a21..af0f97cad 100644 --- a/src/ui_ng/src/app/project/create-project/create-project.component.html +++ b/src/ui_ng/src/app/project/create-project/create-project.component.html @@ -12,7 +12,8 @@ required pattern="^[a-z0-9]+(?:[._-][a-z0-9]+)*$" minlength="2" - #projectName="ngModel" + #projectName="ngModel" + autocomplete="off" (keyup)='handleValidation()'> {{ nameTooltipText | translate }} diff --git a/src/ui_ng/src/app/project/create-project/create-project.component.ts b/src/ui_ng/src/app/project/create-project/create-project.component.ts index 9fa6e3515..1f4c3e6ce 100644 --- a/src/ui_ng/src/app/project/create-project/create-project.component.ts +++ b/src/ui_ng/src/app/project/create-project/create-project.component.ts @@ -74,7 +74,7 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr ngOnInit(): void { this.proNameChecker .debounceTime(500) - .distinctUntilChanged() + //.distinctUntilChanged() .subscribe((name: string) => { let cont = this.currentForm.controls["create_project_name"]; if (cont && this.hasChanged) { @@ -166,6 +166,8 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr newProject() { this.project = new Project(); this.hasChanged = false; + this.isNameValid = true; + this.createProjectOpened = true; } diff --git a/src/ui_ng/src/app/user/user.component.ts b/src/ui_ng/src/app/user/user.component.ts index f44b888ae..e436696c8 100644 --- a/src/ui_ng/src/app/user/user.component.ts +++ b/src/ui_ng/src/app/user/user.component.ts @@ -49,10 +49,6 @@ import {BatchInfo, BathInfoChanges} from '../shared/confirmation-dialog/confirma export class UserComponent implements OnInit, OnDestroy { users: User[] = []; originalUsers: Promise; - private onGoing: boolean = true; - private adminMenuText: string = ""; - private adminColumn: string = ""; - private deletionSubscription: Subscription; selectedRow: User[] = []; ISADMNISTRATOR: string = "USER.ENABLE_ADMIN_ACTION"; batchDelectionInfos: BatchInfo[] = []; @@ -60,12 +56,15 @@ export class UserComponent implements OnInit, OnDestroy { currentTerm: string; totalCount: number = 0; currentPage: number = 1; + timerHandler: any; + private onGoing: boolean = true; + private adminMenuText: string = ""; + private adminColumn: string = ""; + private deletionSubscription: Subscription; @ViewChild(NewUserModalComponent) newUserDialog: NewUserModalComponent; - timerHandler: any; - constructor( private userService: UserService, private translate: TranslateService, @@ -98,10 +97,6 @@ export class UserComponent implements OnInit, OnDestroy { return this.selectedRow.length === 1 && this.isMySelf(this.selectedRow[0].user_id); } - private isMatchFilterTerm(terms: string, testedItem: string): boolean { - return testedItem.toLowerCase().indexOf(terms.toLowerCase()) !== -1; - } - public get canCreateUser(): boolean { let appConfig = this.appConfigService.getConfig(); if (appConfig) { @@ -173,9 +168,12 @@ export class UserComponent implements OnInit, OnDestroy { if (terms.trim() === "") { this.refreshUser((this.currentPage - 1) * 15, this.currentPage * 15); } else { - this.users = users.filter(user => { + let selectUsers = users.filter(user => { return this.isMatchFilterTerm(terms, user.username); }); + this.totalCount = selectUsers.length; + this.users = selectUsers.slice((this.currentPage - 1) * 15, this.currentPage * 15);//First page + this.forceRefreshView(5000); } }); @@ -367,4 +365,8 @@ export class UserComponent implements OnInit, OnDestroy { }, duration); } + private isMatchFilterTerm(terms: string, testedItem: string): boolean { + return testedItem.toLowerCase().indexOf(terms.toLowerCase()) !== -1; + } + }