Skip to content

Commit

Permalink
Merge branch 'master' into public
Browse files Browse the repository at this point in the history
  • Loading branch information
afourmy committed Sep 8, 2023
2 parents 5092aaa + 685d8f5 commit 6831ae6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/source/base/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Version 4.6.0: Clustering
worker table to display all runs executed by the worker.
- When loading the application, check whether the server's workers are running and if not,
delete them from the database
- Workers are created when they are detected by the application, ie when a service is run
by the worker
- Refactor get_workers REST endpoint to use workers in the database instead of storing
worker data in the redis queue
- When a worker is deleted from the worker table, send SIGTERM signal to underlying process
Expand Down
5 changes: 4 additions & 1 deletion eNMS/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,10 @@ def filtering(

def get(self, model, id, **kwargs):
if not kwargs:
kwargs = vs.properties["serialized"]["get"].get(model, {})
get_model = (
"service" if model == "workflow" or "service" in model else model
)
kwargs = vs.properties["serialized"]["get"].get(get_model, {})
func = "get_properties" if kwargs.pop("properties_only", None) else "to_dict"
return getattr(db.fetch(model, id=id), func)(**kwargs)

Expand Down
4 changes: 2 additions & 2 deletions eNMS/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,8 @@ class WorkerForm(BaseForm):
name = StringField("Name", render_kw={"readonly": True})
description = StringField(widget=TextArea(), render_kw={"rows": 6})
subtype = StringField("Subtype", render_kw={"readonly": True})
last_update = StringField("Subtype", render_kw={"readonly": True})
current_runs = StringField("Subtype", render_kw={"readonly": True})
last_update = StringField("Last Update", render_kw={"readonly": True})
current_runs = StringField("Current Runs", render_kw={"readonly": True})


class ServiceForm(BaseForm):
Expand Down
3 changes: 3 additions & 0 deletions setup/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@
},
"user": {
"include": ["groups"]
},
"service": {
"exclude": ["runs"]
}
}
},
Expand Down

0 comments on commit 6831ae6

Please sign in to comment.