management.views.logging ======================== .. py:module:: management.views.logging .. autoapi-nested-parse:: Logging setting specific views. Module Contents --------------- .. py:class:: IndexView(**kwargs) Bases: :py:obj:`django.views.generic.base.RedirectView` Index view. .. py:attribute:: permanent :value: True .. py:attribute:: pattern_name :value: 'management:language' .. py:function:: language(request) Handle language Configuration. Returns: HTTPResponse .. py:class:: LoggingFilesTableView(**kwargs) Bases: :py:obj:`trustpoint.page_context.PageContextMixin`, :py:obj:`trustpoint.logger.LoggerMixin`, :py:obj:`trustpoint.views.base.SortableTableFromListMixin`, :py:obj:`django.views.generic.list.ListView` View to display all log files in the log directory in a table. .. py:attribute:: http_method_names :value: ('get',) .. py:attribute:: template_name :value: 'management/logging/logging_files.html' .. py:attribute:: context_object_name :value: 'log_files' .. py:attribute:: default_sort_param :value: 'updated_at' .. py:attribute:: paginate_by :value: None .. py:attribute:: page_category :value: 'management' .. py:attribute:: page_name :value: 'logging' .. py:method:: get_queryset() Gets a queryset of all valid Trustpoint log files in the log directory. .. py:class:: LoggingFilesDetailsView(**kwargs) Bases: :py:obj:`trustpoint.page_context.PageContextMixin`, :py:obj:`trustpoint.logger.LoggerMixin`, :py:obj:`django.views.generic.TemplateView` Log file detail view, allows to view the content of a single log file without download. .. py:attribute:: http_method_names :value: ('get',) .. py:attribute:: template_name :value: 'management/logging/logging_files_details.html' .. py:attribute:: log_directory .. py:attribute:: page_category :value: 'settings' .. py:attribute:: page_name :value: 'logging' .. py:method:: get_context_data(**kwargs) Get the context data for the view. .. py:class:: LoggingFilesDownloadView(**kwargs) Bases: :py:obj:`trustpoint.page_context.PageContextMixin`, :py:obj:`trustpoint.logger.LoggerMixin`, :py:obj:`django.views.generic.TemplateView` View to download a single log file. .. py:attribute:: http_method_names :value: ('get',) .. py:attribute:: page_category :value: 'settings' .. py:attribute:: page_name :value: 'logging' .. py:method:: get(*_args, **kwargs) The HTTP GET method for the view. .. py:class:: LoggingFilesDownloadMultipleView(**kwargs) Bases: :py:obj:`trustpoint.page_context.PageContextMixin`, :py:obj:`trustpoint.logger.LoggerMixin`, :py:obj:`django.views.generic.View` View to download multiple log files as a single archive. .. py:attribute:: http_method_names :value: ('get',) .. py:attribute:: page_category :value: 'settings' .. py:attribute:: page_name :value: 'logging' .. py:method:: get(*_args, **kwargs) :classmethod: The HTTP GET method for the view. .. py:class:: LoggingViewSet(**kwargs) Bases: :py:obj:`rest_framework.viewsets.GenericViewSet`\ [\ :py:obj:`Any`\ ] ViewSet for managing Backup instances. Supports standard CRUD operations such as list, retrieve, create, update, and delete. .. py:attribute:: serializer_class .. py:attribute:: filter_backends :value: () .. py:method:: list_files(_request) Retrieve detailed info for all log files. .. py:method:: download(_request, file_name) Download a log file by name. /logs/download/trustpoint.log/ .. py:method:: delete(_request, file_name) Delete a log file by name. DELETE /logs/delete/trustpoint.log/