Moved task routes into base labthing
This commit is contained in:
parent
f2af359b8b
commit
1047257242
21 changed files with 123 additions and 1481 deletions
|
|
@ -49,17 +49,6 @@ _actions = {
|
|||
}
|
||||
|
||||
|
||||
def enabled_actions():
|
||||
def enabled_root_actions():
|
||||
global _actions
|
||||
return {k: v for k, v in _actions.items() if v["conditions"]}
|
||||
|
||||
|
||||
def add_actions_to_labthing(labthing, prefix=""):
|
||||
"""
|
||||
Add all capture resources to a labthing
|
||||
"""
|
||||
for name, action in enabled_actions().items():
|
||||
view_class = action["view_class"]
|
||||
rule = action["rule"]
|
||||
labthing.add_resource(view_class, f"{prefix}/actions{rule}")
|
||||
labthing.register_action(view_class)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue