Clear inlineAlert when reopen create project;change add robot error handle

clear inlineAlert when reopen create project;change add robot error handle

Signed-off-by: Yogi_Wang <yawang@vmware.com>
This commit is contained in:
Yogi_Wang 2019-05-15 11:59:31 +08:00
parent cb9251b685
commit 26d34d8b19
3 changed files with 4 additions and 1 deletions

View File

@ -135,6 +135,7 @@ export class CreateProjectComponent implements OnInit, OnDestroy {
this.isNameValid = true;
this.createProjectOpened = true;
this.inlineAlert.close();
}
public get isValid(): boolean {

View File

@ -1,6 +1,7 @@
<clr-modal [(clrModalOpen)]="addRobotOpened"
[clrModalStaticBackdrop]="staticBackdrop" [clrModalClosable]="closable">
<h3 class="modal-title">{{'ROBOT_ACCOUNT.CREAT_ROBOT_ACCOUNT' | translate}}</h3>
<inline-alert #copyAlert class="modal-title"></inline-alert>
<div class="modal-body">
<form #robotForm="ngForm">
<section class="form-block">

View File

@ -103,6 +103,7 @@ export class AddRobotComponent implements OnInit, OnDestroy {
this.isRobotNameValid = true;
this.robot = new Robot();
this.nameTooltipText = "ROBOT_ACCOUNT.ROBOT_NAME";
this.copyAlert.close();
}
onCancel(): void {
@ -143,7 +144,7 @@ export class AddRobotComponent implements OnInit, OnDestroy {
},
error => {
this.isSubmitOnGoing = false;
this.errorHandler.error(error);
this.copyAlert.showInlineError(error);
}
);
}