mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 09:35:37 -05:00
Fix more floating promises (#8460)
This commit is contained in:
@@ -64,9 +64,8 @@ export class InsightAction extends Action {
|
||||
super(id, label);
|
||||
}
|
||||
|
||||
run(actionContext: InsightActionContext): Promise<boolean> {
|
||||
this._insightsDialogService.show(actionContext.insight, actionContext.profile);
|
||||
return Promise.resolve(true);
|
||||
async run(actionContext: InsightActionContext): Promise<void> {
|
||||
await this._insightsDialogService.show(actionContext.insight, actionContext.profile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,12 +72,12 @@ export default class FileBrowserTreeComponent extends ComponentBase implements I
|
||||
}
|
||||
}
|
||||
|
||||
private handleOnAddFileTree(rootNode: FileNode, selectedNode: FileNode, expandedNodes: FileNode[]) {
|
||||
this.updateFileTree(rootNode, selectedNode, expandedNodes);
|
||||
private async handleOnAddFileTree(rootNode: FileNode, selectedNode: FileNode, expandedNodes: FileNode[]): Promise<void> {
|
||||
await this.updateFileTree(rootNode, selectedNode, expandedNodes);
|
||||
}
|
||||
|
||||
private updateFileTree(rootNode: FileNode, selectedNode: FileNode, expandedNodes: FileNode[]): void {
|
||||
this._treeView.renderBody(this._treeContainer.nativeElement, rootNode, selectedNode, expandedNodes);
|
||||
private async updateFileTree(rootNode: FileNode, selectedNode: FileNode, expandedNodes: FileNode[]): Promise<void> {
|
||||
await this._treeView.renderBody(this._treeContainer.nativeElement, rootNode, selectedNode, expandedNodes);
|
||||
this._treeView.setVisible(true);
|
||||
this.layoutTree();
|
||||
this._changeRef.detectChanges();
|
||||
|
||||
@@ -10,13 +10,11 @@ import {
|
||||
RunQueryOnConnectionMode, IConnectionResult
|
||||
} from 'sql/platform/connection/common/connectionManagement';
|
||||
import { EditDataInput } from 'sql/workbench/contrib/editData/browser/editDataInput';
|
||||
import { IInsightsDialogService } from 'sql/workbench/services/insights/browser/insightsDialogService';
|
||||
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/browser/objectExplorerService';
|
||||
import { DashboardInput } from 'sql/workbench/contrib/dashboard/browser/dashboardInput';
|
||||
import { ProfilerInput } from 'sql/workbench/contrib/profiler/browser/profilerInput';
|
||||
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IInsightsConfig } from 'sql/platform/dashboard/browser/insightRegistry';
|
||||
import { QueryEditorInput } from 'sql/workbench/contrib/query/common/queryEditorInput';
|
||||
|
||||
export function replaceConnection(oldUri: string, newUri: string, connectionService: IConnectionManagementService): Promise<IConnectionResult> {
|
||||
@@ -56,10 +54,6 @@ export function replaceConnection(oldUri: string, newUri: string, connectionServ
|
||||
});
|
||||
}
|
||||
|
||||
export function openInsight(query: IInsightsConfig, profile: IConnectionProfile, insightDialogService: IInsightsDialogService) {
|
||||
insightDialogService.show(query, profile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current global connection, which is the connection from the active editor, unless OE
|
||||
* is focused or there is no such editor, in which case it comes from the OE selection. Returns
|
||||
|
||||
Reference in New Issue
Block a user