HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/sigedo-dev.allup.com.co/resources/js/views/logs.js
$(document).ready(function() {
  $("#button_search").on("click", function(e) {
    getLogs();
  });

  function getLogs() {
    var module_id = document.getElementById("module_id").value;
    var start_date = document.getElementById("start_date").value;
    var final_date = document.getElementById("final_date").value;

    if (!module_id || module_id == 0) {
      Swal.fire({
        type: "error",
        title: "Oops...",
        text: Lang.get("fronjs.module_id_required"),
      });
      return;
    }

    if (!start_date || start_date == "") {
      Swal.fire({
        type: "error",
        title: "Oops...",
        text: Lang.get("fronjs.start_date_required"),
      });
      return;
    }

    if (!final_date || final_date == "") {
      Swal.fire({
        type: "error",
        title: "Oops...",
        text: Lang.get("fronjs.final_date_required"),
      });
      return;
    }

    var language = $("#button_search").attr("language");
    var url_lang = "";
    if (language == "es") {
      url_lang = "https://cdn.datatables.net/plug-ins/1.10.19/i18n/Spanish.json";
    }

    $("#table-list")
      .dataTable()
      .fnDestroy();
    _table = $("#table-list").DataTable({
      responsive: true,
      processing: true,
      serverSide: true,
      'searching': true,
      "bPaginate": false,
      "info": false,
      order: [],
      language: {
        url: url_lang,
      },

      ajax: (url = "/logs/showByModule/" + module_id + "/" + start_date + "/" + final_date),
      columns: [
        { data: 'data_operation', 
          name: 'data_operation',       
        },
        { data: "registry_id", 
          name: "registry_id",
        },
        { data: "module.display_name",
          name: "module.display_name",
        },
        { data: "operation.name", 
          name: "operation.name",
        },
        {
          data: "user.name",
          name: "user.name",
          render: function(data, type, info) {
            return info["user"]["name"] + " " + info["user"]["last_name"];
           },
        },
      ],
    });
  }
});