partials
process_manager.views.partials
View functions for partials.
Classes
Functions
filter_table(search, table)
Filter table data based on search parameter.
If the search parameter is empty, the table data is returned unfiltered. Otherwise, the table data is filtered based on the search parameter. The search parameter can be a string or a string with a column name and search string separated by a colon. If the search parameter is a column name, the search string is matched against the values in that column only. Otherwise, the search string is matched against all columns.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
search
|
str
|
The search string to filter the table data. |
required |
table
|
list[dict[str, str | int]]
|
The table data to filter. |
required |
Returns:
Type | Description |
---|---|
list[dict[str, str | int]]
|
The filtered table data. |
Source code in process_manager/views/partials.py
handle_errors(view_func)
Decorator to handle errors.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
view_func
|
Callable[[HttpRequest], HttpResponse]
|
The view function to be wrapped. |
required |
Returns:
Type | Description |
---|---|
Callable[[HttpRequest], HttpResponse]
|
The wrapped view function. |
Source code in process_manager/views/partials.py
messages(request)
Search and render Kafka messages from the database.
Source code in process_manager/views/partials.py
process_table(request)
Renders the process table.
This view may be called using either GET or POST methods. GET renders the table with no check boxes selected. POST renders the table with checked boxes for any table row with a uuid provided in the select key of the request data.