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
c840212f
Commit
c840212f
authored
Jan 07, 2023
by
Sarah Abrishami
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugged problems
parent
d5a27f71
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
app/main/views/rulegroup.py
app/main/views/rulegroup.py
+5
-0
app/main/views/ruleset.py
app/main/views/ruleset.py
+6
-0
app/main/views/validate.py
app/main/views/validate.py
+0
-1
No files found.
app/main/views/rulegroup.py
View file @
c840212f
...
...
@@ -8,6 +8,11 @@ from datetime import datetime
@
main
.
post
(
'/rg/<uuid:rsid>'
)
def
create_rg
(
rsid
):
'''
create rulegroup
json should have rules and name values to create the rulegroup
rulegroup's uid will be returned
'''
req
=
request
.
get_json
()
try
:
configs
=
{
'name'
:
req
[
'name'
],
'rules'
:
req
[
'rules'
],
'created_date'
:
str
(
datetime
.
now
()),
...
...
app/main/views/ruleset.py
View file @
c840212f
...
...
@@ -7,6 +7,12 @@ from datetime import datetime
@
main
.
post
(
'/rs'
)
def
create_rs
():
'''
create a ruleset
request should have data value
for now data structure is {"uid": "", "type": "rp"} type rp means rabit project
uid value would be returned
'''
req
=
request
.
get_json
()
try
:
req
[
'created_date'
]
=
datetime
.
now
()
...
...
app/main/views/validate.py
View file @
c840212f
...
...
@@ -9,7 +9,6 @@ from datetime import datetime
def
validate
(
rsid
,
rgid
):
configs
,
rs
=
read_rules
(
rsid
,
rgid
,
where
=
'db'
)
rg
=
RulesGroup
()
.
from_dict
(
configs
)
# TODO fix get target
# cols = rg.get_target()
data
=
read_data
(
rsid
,
rs
)
rg
.
reset_data
(
data
)
...
...
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