mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-06-21 19:05:07 -04:00
More promise cleanup (#8100)
* Some promise cleanup * Handle more promise issues * Remove changes that aren't needed anymore * Use log service * another one * Be more explicit * Some more promises cleaned up * Handle promises here too * Strings for errors * Some more cleanup * Remove unused imports
This commit is contained in:
@@ -77,7 +77,7 @@ export class DashboardEditor extends BaseEditor {
|
||||
this._dashboardService.layout(dimension);
|
||||
}
|
||||
|
||||
public setInput(input: DashboardInput, options: EditorOptions): Promise<void> {
|
||||
public async setInput(input: DashboardInput, options: EditorOptions): Promise<void> {
|
||||
if (this.input && this.input.matches(input)) {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
@@ -93,10 +93,10 @@ export class DashboardEditor extends BaseEditor {
|
||||
container.style.height = '100%';
|
||||
this._dashboardContainer = DOM.append(parentElement, container);
|
||||
this.input.container = this._dashboardContainer;
|
||||
return Promise.resolve(input.initializedPromise.then(() => this.bootstrapAngular(input)));
|
||||
await input.initializedPromise;
|
||||
this.bootstrapAngular(input);
|
||||
} else {
|
||||
this._dashboardContainer = DOM.append(parentElement, this.input.container);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -578,29 +578,29 @@ export class QueryEditor extends BaseEditor {
|
||||
/**
|
||||
* Calls the runCurrent method of this editor's RunQueryAction
|
||||
*/
|
||||
public runCurrentQuery(): void {
|
||||
this._runQueryAction.runCurrent();
|
||||
public async runCurrentQuery(): Promise<void> {
|
||||
return this._runQueryAction.runCurrent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the runCurrentQueryWithActualPlan method of this editor's ActualQueryPlanAction
|
||||
*/
|
||||
public runCurrentQueryWithActualPlan(): void {
|
||||
this._actualQueryPlanAction.run();
|
||||
public async runCurrentQueryWithActualPlan(): Promise<void> {
|
||||
return this._actualQueryPlanAction.run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the run method of this editor's RunQueryAction
|
||||
*/
|
||||
public runQuery(): void {
|
||||
this._runQueryAction.run();
|
||||
public async runQuery(): Promise<void> {
|
||||
return this._runQueryAction.run();
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the run method of this editor's CancelQueryAction
|
||||
*/
|
||||
public cancelQuery(): void {
|
||||
this._cancelQueryAction.run();
|
||||
public async cancelQuery(): Promise<void> {
|
||||
return this._cancelQueryAction.run();
|
||||
}
|
||||
|
||||
public registerQueryModelViewTab(title: string, componentId: string): void {
|
||||
|
||||
Reference in New Issue
Block a user