Update action run return type (#15568)

* Update action run return type

* fix tests

* Update rest

* Add back null checks
This commit is contained in:
Charles Gagnon
2021-05-25 14:52:39 -07:00
committed by GitHub
parent 25352fa39c
commit 399406b732
29 changed files with 379 additions and 637 deletions

View File

@@ -45,13 +45,11 @@ export class ManageAction extends Action {
super(id, label);
}
async run(actionContext: ManageActionContext): Promise<boolean> {
async run(actionContext: ManageActionContext): Promise<void> {
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;
}
}

View File

@@ -26,8 +26,8 @@ export class ScriptSelectAction extends Action {
super(id, label);
}
public async run(actionContext: BaseActionContext): Promise<boolean> {
return scriptSelect(
public async run(actionContext: BaseActionContext): Promise<void> {
await scriptSelect(
actionContext.profile!,
actionContext.object!,
this._connectionManagementService,
@@ -51,8 +51,8 @@ export class ScriptExecuteAction extends Action {
super(id, label);
}
public async run(actionContext: BaseActionContext): Promise<boolean> {
return script(
public async run(actionContext: BaseActionContext): Promise<void> {
await script(
actionContext.profile!,
actionContext.object!,
this._connectionManagementService,
@@ -78,8 +78,8 @@ export class ScriptAlterAction extends Action {
super(id, label);
}
public async run(actionContext: BaseActionContext): Promise<boolean> {
return script(
public async run(actionContext: BaseActionContext): Promise<void> {
await script(
actionContext.profile!,
actionContext.object!,
this._connectionManagementService,
@@ -104,8 +104,8 @@ export class EditDataAction extends Action {
super(id, label);
}
public async run(actionContext: BaseActionContext): Promise<boolean> {
return scriptEditSelect(
public async run(actionContext: BaseActionContext): Promise<void> {
await scriptEditSelect(
actionContext.profile!,
actionContext.object!,
this._connectionManagementService,
@@ -129,8 +129,8 @@ export class ScriptCreateAction extends Action {
super(id, label);
}
public async run(actionContext: BaseActionContext): Promise<boolean> {
return script(
public async run(actionContext: BaseActionContext): Promise<void> {
await script(
actionContext.profile!,
actionContext.object!,
this._connectionManagementService,
@@ -156,8 +156,8 @@ export class ScriptDeleteAction extends Action {
super(id, label);
}
public async run(actionContext: BaseActionContext): Promise<boolean> {
return script(
public async run(actionContext: BaseActionContext): Promise<void> {
await script(
actionContext.profile!,
actionContext.object!,
this._connectionManagementService,