-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
193cbeb
commit f320e24
Showing
7 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...rule/nop-rule-web/src/main/resources/_vfs/nop/rule/pages/RuleService/RuleService.view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<view x:extends="_RuleService.view.xml" x:schema="/nop/schema/xui/xview.xdef" xmlns:x="/nop/schema/xdsl.xdef"> | ||
|
||
<forms> | ||
<form id="RuleRequestBean" size="md"> | ||
<cells> | ||
<cell id="inputs"> | ||
<gen-control> | ||
<editor language="json"> | ||
<value> | ||
<_ j:key="$schema">/p/NopRuleDefinition__getInputJsonSchema?ruleName=$ruleName&ruleVersion=$ruleVersion</_> | ||
</value> | ||
<!-- | ||
editorDidMount函数传入 (editor, monaco) 两个参数,通过它们可以定制代码编辑器 | ||
--> | ||
<editorDidMount><![CDATA[ | ||
debugger; let monaco = {} | ||
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({ | ||
validate: true, enableSchemaRequest: true | ||
}) | ||
]]></editorDidMount> | ||
</editor> | ||
</gen-control> | ||
</cell> | ||
</cells> | ||
</form> | ||
|
||
<form id="rule-result"> | ||
<layout> | ||
response | ||
</layout> | ||
|
||
<cells> | ||
<cell id="response"> | ||
<gen-control> | ||
<code language="json" /> | ||
</gen-control> | ||
</cell> | ||
</cells> | ||
</form> | ||
</forms> | ||
<pages> | ||
<tabs name="main"/> | ||
|
||
<simple name="test-rule" form="RuleRequestBean"> | ||
<actions> | ||
<action id="submit-rule-service" label="提交" actionType="ajax"> | ||
<api url="/r/RuleService__executeRule" > | ||
</api> | ||
|
||
<feedback page="rule-result"/> | ||
</action> | ||
</actions> | ||
</simple> | ||
|
||
<simple name="rule-result" form="rule-result" /> | ||
</pages> | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
nop-rule/nop-rule-web/src/main/resources/_vfs/nop/rule/pages/RuleService/test-rule.page.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
x:gen-extends: | | ||
<web:GenPage view="RuleService.view.xml" page="test-rule" xpl:lib="/nop/web/xlib/web.xlib" /> |