Views

Below are the views of the audit app.

logs_models_list

View to provide the frontend with the list of model change event logs. To access this view, the user must be logged in and belong to the management group.

  • URL: /manage/audit/models.

  • GET: Provide the data to the frontend; these data are:

    • component: AuditModelsLogs

    • props:

      props = {
        "logs": #log list,
        "count": # Number of logs recorded,
        "paginateBy": # Number of logs displayed per page,
        "pages": # Number of pages needed to show the total number of logs,
        "currentPage": # Actual page,
        "search": # Search criteria, used to filter the list.
      }
    

model_logs_list

View to provide the frontend with the list of models that the system has (ModelListLog model) and their status. To access this view, the user must be logged in and belong to the management group.

  • URL: /manage/settings/global/audit/models

  • GET: Provide the data to the frontend; these data are:

    • component: AuditModelsLogsSetup

    • props:

    {
      "modelsLogsList": # List of registered models
    }
    

active_deactive_model

View to enable/disable the tracking of changes from a model to the auditlog3 logging system. To access this view, the user must be logged in and belong to the management group.

  • URL: /manage/audit/models/<model_id>/change/status

  • GET: Receives the id of the model registered in ModelListLog and changes the status of the is_active field. Additionally activates/deactivates the monitoring of the indicated model. It is then redirected to the model_logs_list view.

logs_urls_list

View to provide the frontend with the list of logs of the urls visited by the users. To access this view, the user must be logged in and belong to the management group.

  • URL: /manage/audit/urls

  • GET: Provide the data to the frontend; these data are:

    • component: AuditUrlsLogs

    • props:

    props = {
      "logs": #log list,
      "count": # Number of logs recorded,
      "paginateBy": # Number of logs displayed per page,
      "pages": # Number of pages needed to show the total number of logs,
      "currentPage": # Actual page,
      "search": # Search criteria, used to filter the list.
    }
    

urls_logs_list

View to provide the frontend with the list of urls that the system has (UrlListLog model) and their status. To access this view, the user must be logged in and belong to the management group.

  • URL: /manage/settings/global/audit/urls

  • GET: Provide the data to the frontend; these data are:

    • component: AuditUrlLogsSetup

    • props:

    props = {
      "strategies": # Array of available strategies,
      "strategy": # Id of the currently selected strategy,
      "strategyName": # Name of the selected strategy,
      "urlsLogsList": # List of urls enabled to be logged,
      "count": # Number of records,
      "paginateBy": # Number of urls displayed per page,
      "pages": # Number of pages needed to show the total number of urls,
      "currentPage": # Actual page,
    }
    

active_deactive_url

View to activate/deactivate the tracking of url visits made by the user. To access this view, the user must be logged in and belong to the management group.

  • URL: /manage/audit/url/<url_id>/change/status

  • GET: Receives the url id registered in UrlListLog and changes the status of the is_active field. It is then redirected to the urls_logs_list view.

change_strategy

View to change the log tracking strategy for urls. To access this view, the user must be logged in and belong to the management group.

  • URL: /manage/audit/change/url/log/strategy

  • POST: Validates that the data is sent to set the url tracking strategy. If valid, the strategy is changed in the AuditSettings model. If invalid, the error is added to the general inertia props. In both cases it is redirected to the urls_logs_list view.

logs_events_list

View to provide the frontend with the list of custom events inserted by the developer in the system code. To access this view, the user must be logged in and belong to the management group.

  • URL: /manage/audit/events

  • GET: Provide the data to the frontend; these data are:

    • component: AuditEventsLogs

    • props:

    props = {
      "logs": #log list,
      "count": # Number of logs recorded,
      "paginateBy": # Number of logs displayed per page,
      "pages": # Number of pages needed to show the total number of logs,
      "currentPage": # Actual page,
      "search": # Search criteria, used to filter the list.
    }