mirror of
https://github.com/goharbor/harbor
synced 2025-04-22 19:48:13 +00:00
fix2564 issue
This commit is contained in:
parent
186538010d
commit
66bfc02d5b
@ -54,6 +54,7 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr
|
|||||||
createProjectOpened: boolean;
|
createProjectOpened: boolean;
|
||||||
|
|
||||||
hasChanged: boolean;
|
hasChanged: boolean;
|
||||||
|
btnIsOk:boolean=false;
|
||||||
|
|
||||||
staticBackdrop: boolean = true;
|
staticBackdrop: boolean = true;
|
||||||
closable: boolean = false;
|
closable: boolean = false;
|
||||||
@ -90,6 +91,7 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr
|
|||||||
.checkProjectExists(cont.value).toPromise()
|
.checkProjectExists(cont.value).toPromise()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
//Project existing
|
//Project existing
|
||||||
|
this.btnIsOk=true;
|
||||||
this.isNameValid = false;
|
this.isNameValid = false;
|
||||||
this.nameTooltipText = 'PROJECT.NAME_ALREADY_EXISTS';
|
this.nameTooltipText = 'PROJECT.NAME_ALREADY_EXISTS';
|
||||||
this.checkOnGoing = false;
|
this.checkOnGoing = false;
|
||||||
@ -109,6 +111,7 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr
|
|||||||
}
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
this.btnIsOk=false;
|
||||||
this.projectService
|
this.projectService
|
||||||
.createProject(this.project.name, this.project.public ? 1 : 0)
|
.createProject(this.project.name, this.project.public ? 1 : 0)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
@ -181,9 +184,10 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr
|
|||||||
this.projectForm.reset();
|
this.projectForm.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
public get isValid(): boolean {
|
public get isValid(): boolean {git
|
||||||
return this.currentForm &&
|
return this.currentForm &&
|
||||||
this.currentForm.valid &&
|
this.currentForm.valid &&
|
||||||
|
this.btnIsOk&&
|
||||||
this.isNameValid &&
|
this.isNameValid &&
|
||||||
!this.checkOnGoing;
|
!this.checkOnGoing;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user