Hi, I want to create a table with the following values:
controllerScope.logsData = {
ajax: {
url: '/api/organizations/'+$rootScope.organization.id+'/alerts?type=logevent',
dataSrc: '',
beforeSend: function (xhr) {
xhr.setRequestHeader("Authorization", AuthService.authToken());
}
},
columns: [
{"data":"timestamp", render: function(data,type,row){
return $filter('date')(row.timestamp, 'dd-MM-yyyy HH:mm:ss');
}},
{"data":"data.serial","defaultContent":""},
{"data":"data.type","defaultContent":""},
{"data":null, "orderable":false, "render":function(data){
if(data.data.body){
return JSON.stringify(data.data.body);
} else {
return '';
}
}}
],
order: [[0, 'desc']]
However this ordering is not working ... Can anyone help?