consultar();
//Consultar all
function dataTable(){
        $.ajax({
            url: 'back-end/importacion.php',
            type: 'GET',
            success: function(response){
            let o = JSON.parse(response);;
                $('#list_files').dataTable( {
                    retrieve: true,
                    data : o,
                    columns: [
                        {"data" : "archivo"}, 
                        {"data" : "estado"},
                        {"data" : "fecha"},
                        {"data" : "usuario"},
                        {"data" : "detalles"}                             
                    ],
                    "language": {
                        url: "lib/js/es.json"
                    }
                });
            
            }
        })
}
function consultar(){
    $(document).ready(function(){
        if ( $.fn.dataTable.isDataTable( '#list_files' ) ) {
            table = $('#list_files').DataTable();
            table.destroy();
            dataTable();
        }else{
            dataTable();
        }
    })
}