utils.views package#
Submodules#
utils.views.cobalt_batch module#
- class utils.views.cobalt_batch.CobaltBatch(name, schedule, instance=None, rerun=False)[source]#
Bases:
object
Class to handle batch jobs within Cobalt. We use cron (or whatever you like) to trigger the jobs which are set up using django-extensions.
- Parameters:
name (str)
schedule (str)
instance (str)
rerun (bool)
- Returns:
CobaltBatch
utils.views.cobalt_lock module#
utils.views.general module#
- utils.views.general.download_csv(self, request, queryset)[source]#
Copied from Stack Overflow - generic CSV download
- utils.views.general.masterpoint_query(query)[source]#
Generic function to talk to the masterpoints server and return data
Takes in a SQLServer query e.g. “select count(*) from table”
Returns an iterable, either an empty list or the response from the server.
In case there is a problem connecting to the server, this will do everything it can to fail silently.
utils.views.monitoring module#
- utils.views.monitoring.admin_show_aws_app_version_htmx(request)[source]#
Show the Elastic Beanstalk App details for a version
- utils.views.monitoring.admin_show_aws_infrastructure_info(request)[source]#
Show some AWS info to check on health of system
- utils.views.monitoring.admin_show_database_details_htmx(request)[source]#
Show the database info for an environment
- utils.views.monitoring.admin_system_activity_cobalt_messages_htmx(request)[source]#
Provide latest data from the cobalt messages log
- utils.views.monitoring.admin_system_activity_nginx_htmx(request)[source]#
Provide latest data from the nginx access.log
- utils.views.monitoring.admin_system_activity_users_htmx(request)[source]#
Provide latest data from user activity