Strict nulls for contrib/restore and contrib/views (#12044)

* strict nulls for contrib/restore and contrib/views

* remove unnecessary function

* compile error
This commit is contained in:
Anthony Dresser
2020-09-01 17:53:29 -07:00
committed by GitHub
parent 9dde80ce1c
commit d8dcc90857
13 changed files with 148 additions and 200 deletions

View File

@@ -45,13 +45,13 @@ export class ManageAction extends Action {
super(id, label);
}
run(actionContext: ManageActionContext): Promise<boolean> {
return this._connectionManagementService.connect(actionContext.profile, actionContext.uri, { showDashboard: true, saveTheConnection: false, params: undefined, showConnectionDialogOnError: false, showFirewallRuleOnError: true }).then(
() => {
this._angularEventingService.sendAngularEvent(actionContext.uri, AngularEventType.NAV_DATABASE);
return true;
}
);
async run(actionContext: ManageActionContext): Promise<boolean> {
if (actionContext.profile) {
await this._connectionManagementService.connect(actionContext.profile, actionContext.uri, { showDashboard: true, saveTheConnection: false, params: undefined, showConnectionDialogOnError: false, showFirewallRuleOnError: true });
this._angularEventingService.sendAngularEvent(actionContext.uri, AngularEventType.NAV_DATABASE);
return true;
}
return false;
}
}
@@ -67,7 +67,9 @@ export class InsightAction extends Action {
}
async run(actionContext: InsightActionContext): Promise<void> {
await this._insightsDialogService.show(actionContext.insight, actionContext.profile);
if (actionContext.profile) {
await this._insightsDialogService.show(actionContext.insight, actionContext.profile);
}
}
}