Skip to content
Snippets Groups Projects
Commit ce13d3f4 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #13671 TIME 0:20 add msg if db exist

parent a675f321
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@
<mat-label>{{lang.dbName}}</mat-label>
<input matInput formControlName="dbNameCtrl" required>
</mat-form-field>
<div class="alert-message alert-message-info" *ngIf="dbExist" role="alert" style="margin-top: 30px;min-width: 100%;">
<div class="alert-message alert-message-info" *ngIf="dbExist" role="alert" style="margin-top: 0px;min-width: 100%;">
{{lang.stepEmptyDb}}
</div>
<mat-form-field appearance="outline" floatLabel="never">
......
......@@ -87,19 +87,14 @@ export class DatabaseComponent implements OnInit {
name: this.stepFormGroup.controls['dbNameCtrl'].value
};
this.http.get(`../rest/installer/databaseConnection`, { params: info }).pipe(
this.http.get(`../rest/installer/databaseConnection`, { observe: 'response', params: info }).pipe(
tap((data: any) => {
console.log(this.functionsService.empty(data.warning));
if (!this.functionsService.empty(data.warning)) {
this.dbExist = true;
this.stepFormGroup.controls['stateStep'].setValue('');
} else {
this.dbExist = false;
this.notify.success(this.lang.rightInformations);
this.stepFormGroup.controls['stateStep'].setValue('success');
}
this.dbExist = data.status === 200;
this.notify.success(this.lang.rightInformations);
this.stepFormGroup.controls['stateStep'].setValue('success');
}),
catchError((err: any) => {
this.dbExist = false;
this.notify.error(this.lang.badInformations);
this.stepFormGroup.markAllAsTouched();
this.stepFormGroup.controls['stateStep'].setValue('');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment