Commit ea039008b148453dfa166cf92bc40b26e487e660
1 parent
952b9038
Add help support for rule node script test dialog
Showing
4 changed files
with
12 additions
and
5 deletions
... | ... | @@ -26,6 +26,10 @@ const PROXY_CONFIG = { |
26 | 26 | "target": ruleNodeUiforwardUrl, |
27 | 27 | "secure": false, |
28 | 28 | }, |
29 | + "/assets/help/*/rulenode/**": { | |
30 | + "target": ruleNodeUiforwardUrl, | |
31 | + "secure": false, | |
32 | + }, | |
29 | 33 | "/static/widgets": { |
30 | 34 | "target": forwardUrl, |
31 | 35 | "secure": false, | ... | ... |
... | ... | @@ -35,7 +35,7 @@ export class NodeScriptTestService { |
35 | 35 | } |
36 | 36 | |
37 | 37 | testNodeScript(script: string, scriptType: string, functionTitle: string, |
38 | - functionName: string, argNames: string[], ruleNodeId: string): Observable<string> { | |
38 | + functionName: string, argNames: string[], ruleNodeId: string, helpId?: string): Observable<string> { | |
39 | 39 | if (ruleNodeId) { |
40 | 40 | return this.ruleChainService.getLatestRuleNodeDebugInput(ruleNodeId).pipe( |
41 | 41 | switchMap((debugIn) => { |
... | ... | @@ -52,18 +52,18 @@ export class NodeScriptTestService { |
52 | 52 | msgType = debugIn.msgType; |
53 | 53 | } |
54 | 54 | return this.openTestScriptDialog(script, scriptType, functionTitle, |
55 | - functionName, argNames, msg, metadata, msgType); | |
55 | + functionName, argNames, msg, metadata, msgType, helpId); | |
56 | 56 | }) |
57 | 57 | ); |
58 | 58 | } else { |
59 | 59 | return this.openTestScriptDialog(script, scriptType, functionTitle, |
60 | - functionName, argNames); | |
60 | + functionName, argNames, null, null, null, helpId); | |
61 | 61 | } |
62 | 62 | } |
63 | 63 | |
64 | 64 | private openTestScriptDialog(script: string, scriptType: string, |
65 | 65 | functionTitle: string, functionName: string, argNames: string[], |
66 | - msg?: any, metadata?: {[key: string]: string}, msgType?: string): Observable<string> { | |
66 | + msg?: any, metadata?: {[key: string]: string}, msgType?: string, helpId?: string): Observable<string> { | |
67 | 67 | if (!msg) { |
68 | 68 | msg = { |
69 | 69 | temperature: 22.4, |
... | ... | @@ -94,7 +94,8 @@ export class NodeScriptTestService { |
94 | 94 | functionName, |
95 | 95 | script, |
96 | 96 | scriptType, |
97 | - argNames | |
97 | + argNames, | |
98 | + helpId | |
98 | 99 | } |
99 | 100 | }).afterClosed(); |
100 | 101 | } | ... | ... |