Skip to content

Commit

Permalink
fix: 'No Data' label don't shows in process to load data
Browse files Browse the repository at this point in the history
  • Loading branch information
RFbkak37y3kIY committed Sep 9, 2022
1 parent 8005c92 commit 111ac27
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/app/pages/home.page/home.page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class HomePageComponent implements OnInit {
dictionary: Dictionary[] = [];

dataForFile: any = null;
isLoadingDetails = false;
isLoadingDetails = true;
details: any = [];
columns: any[] = [];
errorMessage: string = '';
Expand All @@ -69,6 +69,7 @@ export class HomePageComponent implements OnInit {
];
_SqlArchive: any = [];


set SqlArchive(value: any) {
this._SqlArchive[this.checkSqlHistory()] = value;

Expand Down Expand Up @@ -309,8 +310,9 @@ export class HomePageComponent implements OnInit {
}
if (!isAuthenticated) {
this.sqlRequest = sqlStr;
this.isLoadingDetails = true;
}
this.isLoadingDetails = true;

this.cdr.detectChanges();

this.details = [];
Expand All @@ -329,7 +331,9 @@ export class HomePageComponent implements OnInit {
this.dataForFile = response;
this.formatData(response);
this.errorMessage = '';
this.isLoadingDetails = false;
if (!isAuthenticated) {
this.isLoadingDetails = false;
}
this.cdr.detectChanges();
return true;

Expand All @@ -346,7 +350,9 @@ export class HomePageComponent implements OnInit {
this.cdr.detectChanges();
})
}
this.isLoadingDetails = false;
if (!isAuthenticated) {
this.isLoadingDetails = false;
}
this.cdr.detectChanges();

return false;
Expand All @@ -360,6 +366,7 @@ export class HomePageComponent implements OnInit {
this.SQL(this.sqlRequest);
}
async connectToDB(event?: any, isTestConnection = false) {
this.isLoadingDetails = true;
if (event) {
this.dbLink = event.dbLink;
this.dbLogin = event.dbLogin;
Expand All @@ -382,7 +389,7 @@ export class HomePageComponent implements OnInit {
this.isAccess = true;
this.getHash();

this.isLoadingDetails = true;

this.cdr.detectChanges();

await promiseWait(100);
Expand All @@ -391,7 +398,7 @@ export class HomePageComponent implements OnInit {
await this.initDbTree();
this.cdr.detectChanges();

this.isLoadingDetails = false;
// this.isLoadingDetails = false;
} else {
this.authSuccessMessage = 'Connection is successfully established.';
setTimeout(() => {
Expand Down

0 comments on commit 111ac27

Please sign in to comment.