mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
clear insights view before showing error (#1050)
This commit is contained in:
committed by
Karl Burtram
parent
596f09f754
commit
86748e6d69
@@ -187,13 +187,14 @@ export class InsightsWidget extends DashboardWidget implements IDashboardWidget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _updateChild(result: SimpleExecuteResult): void {
|
private _updateChild(result: SimpleExecuteResult): void {
|
||||||
|
this.componentHost.viewContainerRef.clear();
|
||||||
|
|
||||||
if (result.rowCount === 0) {
|
if (result.rowCount === 0) {
|
||||||
this.showError(nls.localize('noResults', 'No results to show'));
|
this.showError(nls.localize('noResults', 'No results to show'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let componentFactory = this._componentFactoryResolver.resolveComponentFactory<IInsightsView>(insightRegistry.getCtorFromId(this._typeKey));
|
let componentFactory = this._componentFactoryResolver.resolveComponentFactory<IInsightsView>(insightRegistry.getCtorFromId(this._typeKey));
|
||||||
this.componentHost.viewContainerRef.clear();
|
|
||||||
|
|
||||||
let componentRef = this.componentHost.viewContainerRef.createComponent(componentFactory);
|
let componentRef = this.componentHost.viewContainerRef.createComponent(componentFactory);
|
||||||
let componentInstance = componentRef.instance;
|
let componentInstance = componentRef.instance;
|
||||||
|
|||||||
Reference in New Issue
Block a user