Skip to content

Commit ef0042e

Browse files
committed
issue-1622: Minor bug fixes.
1 parent 41ba6f4 commit ef0042e

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

src/app/pages/console/components/console-query-result/components/console-query-result-json-view/console-query-result-json-view.component.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class ConsoleQueryResultJsonViewComponent implements OnInit, OnDestroy, A
1818
result: QueryResponse = null;
1919

2020
@ViewChild('jsonViewer', {static: false, read: NgxJsonViewerComponent})
21-
jsonView: NgxJsonViewerComponent;
21+
jsonView: NgxJsonViewerComponent = null;
2222

2323
prettyView: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
2424

@@ -54,12 +54,14 @@ export class ConsoleQueryResultJsonViewComponent implements OnInit, OnDestroy, A
5454
}
5555

5656
toggleJsonPaths() {
57-
this.jsonView.segments.filter(segment => {
58-
if (segment.key === 'result' || segment.key === 'status') {
59-
this.jsonView.toggle(segment);
60-
}
61-
});
62-
this.cdr.markForCheck();
57+
if (this.jsonView !== null) {
58+
this.jsonView.segments.filter(segment => {
59+
if (segment.key === 'result' || segment.key === 'status') {
60+
this.jsonView.toggle(segment);
61+
}
62+
});
63+
this.cdr.markForCheck();
64+
}
6365
}
6466

6567
}

src/app/pages/schema/schema.component.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@
1818
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
1919
</table>
2020

21-
<ng-container *ngIf="dataSource.data.length === 0">
21+
<ng-container *ngIf="dataSource.data.length === 0 && !(loading$ | async)">
2222
<div style="padding: 20px;">
2323
No results found.
2424
</div>
2525
</ng-container>
26+
27+
<ng-container *ngIf="dataSource.data.length === 0 && (loading$ | async)">
28+
<div style="padding: 20px;">
29+
Waiting for database response...
30+
</div>
31+
</ng-container>
2632
</ng-template>
2733

2834
<ng-template #connectToDB>

0 commit comments

Comments
 (0)