diff --git a/ui-ngx/proxy.conf.js b/ui-ngx/proxy.conf.js index 2e3817445b..1211280966 100644 --- a/ui-ngx/proxy.conf.js +++ b/ui-ngx/proxy.conf.js @@ -26,6 +26,10 @@ const PROXY_CONFIG = { "target": ruleNodeUiforwardUrl, "secure": false, }, + "/assets/help/*/rulenode/**": { + "target": ruleNodeUiforwardUrl, + "secure": false, + }, "/static/widgets": { "target": forwardUrl, "secure": false, diff --git a/ui-ngx/src/app/core/services/script/node-script-test.service.ts b/ui-ngx/src/app/core/services/script/node-script-test.service.ts index 63de227ab7..47b83e96dc 100644 --- a/ui-ngx/src/app/core/services/script/node-script-test.service.ts +++ b/ui-ngx/src/app/core/services/script/node-script-test.service.ts @@ -35,7 +35,7 @@ export class NodeScriptTestService { } testNodeScript(script: string, scriptType: string, functionTitle: string, - functionName: string, argNames: string[], ruleNodeId: string): Observable { + functionName: string, argNames: string[], ruleNodeId: string, helpId?: string): Observable { if (ruleNodeId) { return this.ruleChainService.getLatestRuleNodeDebugInput(ruleNodeId).pipe( switchMap((debugIn) => { @@ -52,18 +52,18 @@ export class NodeScriptTestService { msgType = debugIn.msgType; } return this.openTestScriptDialog(script, scriptType, functionTitle, - functionName, argNames, msg, metadata, msgType); + functionName, argNames, msg, metadata, msgType, helpId); }) ); } else { return this.openTestScriptDialog(script, scriptType, functionTitle, - functionName, argNames); + functionName, argNames, null, null, null, helpId); } } private openTestScriptDialog(script: string, scriptType: string, functionTitle: string, functionName: string, argNames: string[], - msg?: any, metadata?: {[key: string]: string}, msgType?: string): Observable { + msg?: any, metadata?: {[key: string]: string}, msgType?: string, helpId?: string): Observable { if (!msg) { msg = { temperature: 22.4, @@ -94,7 +94,8 @@ export class NodeScriptTestService { functionName, script, scriptType, - argNames + argNames, + helpId } }).afterClosed(); } diff --git a/ui-ngx/src/app/shared/components/dialog/node-script-test-dialog.component.html b/ui-ngx/src/app/shared/components/dialog/node-script-test-dialog.component.html index f270bc1162..1b23432829 100644 --- a/ui-ngx/src/app/shared/components/dialog/node-script-test-dialog.component.html +++ b/ui-ngx/src/app/shared/components/dialog/node-script-test-dialog.component.html @@ -78,6 +78,7 @@ [functionArgs]="data.argNames" [validationArgs]="[data.msg, data.metadata, data.msgType]" resultType="object" + [helpId]="data.helpId" [fillHeight]="true"> diff --git a/ui-ngx/src/app/shared/components/dialog/node-script-test-dialog.component.ts b/ui-ngx/src/app/shared/components/dialog/node-script-test-dialog.component.ts index d62cd630c7..1ea380591a 100644 --- a/ui-ngx/src/app/shared/components/dialog/node-script-test-dialog.component.ts +++ b/ui-ngx/src/app/shared/components/dialog/node-script-test-dialog.component.ts @@ -52,6 +52,7 @@ export interface NodeScriptTestDialogData { msg?: any; metadata?: {[key: string]: string}; msgType?: string; + helpId?: string; } // @dynamic