app_tree
controller.app_tree
Application tree information.
Classes
AppTree(name, children, host, detector='')
dataclass
Application tree information.
Attributes
children
instance-attribute
The children of the application.
detector = ''
class-attribute
instance-attribute
The detector of the application.
host
instance-attribute
The hostname of the application.
name
instance-attribute
The name of the application.
Functions
to_list(indent='')
Convert the app tree to a list of dicts with name indentation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indent
|
str
|
The string to use to indent the app name in the table. |
''
|
Returns:
| Type | Description |
|---|---|
list[dict[str, str]]
|
The list of dicts with the app tree information, indenting the name based |
list[dict[str, str]]
|
on the depth within the tree. |
Source code in controller/app_tree.py
Functions
get_app_tree(user, status=None, hostnames=None, detectors=None)
Get the application tree for the controller.
It recursively gets the tree of applications and their children.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
str
|
The user to get the tree for. |
required |
status
|
Status | None
|
The status to get the tree for. If None, the root controller status is used as the starting point. |
None
|
hostnames
|
dict[str, str] | None
|
The hostnames of the applications. If None, the hostnames are retrieved from the process manager. |
None
|
detectors
|
dict[str, str] | None
|
The detectors reported by the controller for each application. |
None
|
Returns:
| Type | Description |
|---|---|
AppTree
|
The application tree as a AppType object. |