Allow to load sibling parameters in loadOptionsMethod

This commit is contained in:
Jan Oberhauser
2021-05-16 18:16:24 -05:00
parent a68145a88b
commit 002f53a4af
6 changed files with 20 additions and 14 deletions

View File

@@ -131,7 +131,7 @@ export interface IRestApi {
getSettings(): Promise<IN8nUISettings>;
getNodeTypes(): Promise<INodeTypeDescription[]>;
getNodesInformation(nodeList: string[]): Promise<INodeTypeDescription[]>;
getNodeParameterOptions(nodeType: string, methodName: string, currentNodeParameters: INodeParameters, credentials?: INodeCredentials): Promise<INodePropertyOptions[]>;
getNodeParameterOptions(nodeType: string, path: string, methodName: string, currentNodeParameters: INodeParameters, credentials?: INodeCredentials): Promise<INodePropertyOptions[]>;
removeTestWebhook(workflowId: string): Promise<boolean>;
runWorkflow(runData: IStartRunData): Promise<IExecutionPushResponse>;
createNewWorkflow(sendData: IWorkflowData): Promise<IWorkflowDb>;
@@ -444,4 +444,4 @@ export interface ILinkMenuItemProperties {
icon: string;
href: string;
newWindow?: boolean;
}
}

View File

@@ -484,7 +484,7 @@ export default mixins(
const resolvedNodeParameters = this.getResolveNodeParameters(currentNodeParameters);
try {
const options = await this.restApi().getNodeParameterOptions(this.node.type, this.remoteMethod, resolvedNodeParameters, this.node.credentials);
const options = await this.restApi().getNodeParameterOptions(this.node.type, this.path, this.remoteMethod, resolvedNodeParameters, this.node.credentials);
this.remoteParameterOptions.push.apply(this.remoteParameterOptions, options);
} catch (error) {
this.remoteParameterOptionsLoadingIssues = error.message;

View File

@@ -157,9 +157,10 @@ export const restApi = Vue.extend({
},
// Returns all the parameter options from the server
getNodeParameterOptions: (nodeType: string, methodName: string, currentNodeParameters: INodeParameters, credentials?: INodeCredentials): Promise<INodePropertyOptions[]> => {
getNodeParameterOptions: (nodeType: string, path: string, methodName: string, currentNodeParameters: INodeParameters, credentials?: INodeCredentials): Promise<INodePropertyOptions[]> => {
const sendData = {
nodeType,
path,
methodName,
credentials,
currentNodeParameters,