Skip to content

Log data Visualization User

akshay31057 edited this page Jul 2, 2017 · 3 revisions

Description:

  • This sub-module visualizes the event log data for finding a user along with performed operations using a pie chart. The other feature is to find a list of N users with top usage for which N (input) is provided using a textfield.

  • This allows the administrator to keep a track of the operations performed by various users.

  • This module makes use of the d3.js module of Drupal. This caters various libraries and predefined functions for the development of various SVG data visualization techniques with minimal overhead.

  • There are two dependencies for the log_data_visualization_analysis module:

Implementation:

  • A new sub-module named log_data_visualization_user is added. The .module file implements the desired action using hook api functions namely, hook_menu and hook_permission.
  • Details about this functions can be found at :
  • Besides the above hook api functions, some user defined functions in the sub-module are:
    • log_data_visualization_user_admin_form: This function uses text field form api to create the required text field and submit button api to create a button.
    • log_data_visualization_user_select: This function is called when the ‘Go to Visualization’ button is clicked and it redirects the user to the visualizations page using drupal_goto(). Further, it also sends the selected user’s uid to the visualization page.
    • log_data_visualization_user_pie: This function is the callback function(this function is executed on redirection) for the visualization page which retrieves the operations and maintains their count for a particular uid (received as argument). Finally, it converts that data to the desired format for calling the d3_draw() function from d3 module.
    • log_data_visualization_user_active: After entering the number of users required to view, who are extensively using operations and then pressing the submit button, drupal_goto() will be called to redirect the user to a page wherein data will be rendered by executing this function.