();
+ 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;
+ }
+
}