Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
Rule Engine Service
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
brooklyn
Rule Engine Service
Commits
b0bb0cd5
Commit
b0bb0cd5
authored
Nov 08, 2022
by
Sarah Abrishami
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
776d9129
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
app/main/utils/common.py
app/main/utils/common.py
+3
-1
app/main/views/CRUD.py
app/main/views/CRUD.py
+13
-0
No files found.
app/main/utils/common.py
View file @
b0bb0cd5
...
...
@@ -8,6 +8,7 @@ import gc
from
rulemall.utils.rule_builder
import
rule_builder
from
app
import
db
from
app.models
import
Validation
import
yaml
def
response_message
(
data
=
None
,
status
=
200
):
...
...
@@ -63,7 +64,8 @@ def read_data():
def
read_rules
():
return
rule_builder
(
'app/main/static/rule_config.yml'
)
path
=
'app/main/static/rule_config.yml'
return
rule_builder
(
yaml
.
load
(
open
(
path
),
Loader
=
yaml
.
FullLoader
))
def
write_validations
(
data
):
...
...
app/main/views/CRUD.py
0 → 100644
View file @
b0bb0cd5
from
app.main
import
main
from
app.main.utils.common
import
response_message
from
flask
import
request
from
rulemall
import
RuleSet
@
main
.
route
(
'/create'
,
methods
=
[
'POST'
])
def
create
():
req
=
request
.
get_json
()
data
=
req
[
'data'
]
rgs
=
req
[
'rulesgroup'
]
rs
=
RuleSet
(
data
)
return
response_message
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment