Skip to content

Commit

Permalink
chg: [website] history add input attr
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCruciani committed Feb 12, 2024
1 parent 443f1f5 commit ad6397b
Show file tree
Hide file tree
Showing 11 changed files with 118 additions and 663 deletions.
4 changes: 3 additions & 1 deletion website/app/db_class/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ class Module(db.Model):
description = db.Column(db.String)
is_active = db.Column(db.Boolean, default=True)
request_on_query = db.Column(db.Boolean, default=False)
input_attr = db.Column(db.String)

def to_json(self):
json_dict = {
"id": self.id,
"name": self.name,
"description": self.description,
"is_active": self.is_active,
"request_on_query": self.request_on_query
"request_on_query": self.request_on_query,
"input_attr": self.input_attr
}
return json_dict

Expand Down
2 changes: 2 additions & 0 deletions website/app/home_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def get_modules_config():
modules_list = []
for module in modules:
loc_module = module.to_json()
if loc_module["input_attr"]:
loc_module["input_attr"] = json.loads(loc_module["input_attr"])
loc_module["config"] = []
mcs = Module_Config.query.filter_by(module_id=module.id).all()
for mc in mcs:
Expand Down
Loading

0 comments on commit ad6397b

Please sign in to comment.