<commit_before><!DOCTYPE html>
<html 
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head><th:block th:replace="fragments/head :: header"/>
	<title>Mensajes</title>

	<script th:src="@{/js/simple-datatables-2.1.10.min.js}"></script>
	<link th:href="@{/css/simple-datatables-2.1.10.css}" rel="stylesheet">
</head>
<body>
	<nav th:replace="fragments/nav.html :: nav">
		Nav goes here
	</nav>
	
	<div class="container">
	<div class="main">
	<h1>Mensajes recibidos</h1>
	
	<table class="datatable" id="datatable"></table>
	
	</div>
	</div>	
	<script>
	new simpleDatatables.DataTable(
		'#datatable', { 
		    ajax: {
		        url: "received", // relativo a url actual
		        load: function(xhr) {
		        	let data = JSON.parse(xhr.responseText);
		        	for (let i=0; i<data.length; i++) {
		        		let row = data[i];
		        		row.sent = new Date(row.sent).toLocaleString("es-ES").split(" ").join("@");
		        		if (row.received) {
		        			row.received = new Date(row.received).toLocaleString("es-ES").split(" ").join("@");
		        		}
		        	}
		        	
		        	return JSON.stringify(data);
		        }
		    }
		}
	);
	</script>
</body>
</html><commit_msg>Mejoras esteticas en messages, y usa config.rootUrl<commit_after><!DOCTYPE html>
<html 
	xmlns:th="http://www.thymeleaf.org"
	xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head><th:block th:replace="fragments/head :: header"/>
	<title>Mensajes</title>

	<script th:src="@{/js/simple-datatables-2.1.10.min.js}"></script>
	<link th:href="@{/css/simple-datatables-2.1.10.css}" rel="stylesheet">
</head>
<body>
	<nav th:replace="fragments/nav.html :: nav">
		Nav goes here
	</nav>
	
	<div class="container">
	<div class="main">
	<h1>Mensajes recibidos</h1>
	
	<table class="datatable" id="datatable"></table>
	
	</div>
	</div>	
	<script>
	function formatDate(d) {
		// 2020-03-23T10:48:11.074 => 23/3/2020@10:48:18
		return new Date(d).toLocaleString("es-ES").split(" ").join("@")
	}
	new simpleDatatables.DataTable(
		'#datatable', { 
		    ajax: {
		        url: config.rootUrl + "message/received", // empieza siempre por config.rootUrl
		        load: function(xhr) {
		        	let data = JSON.parse(xhr.responseText);
		        	for (let i=0; i<data.length; i++) {
		        		let row = data[i];
		        		row.sent = formatDate(row.sent);
		        		if (row.received) {
		        			row.received = formatDate(row.received);
		        		}
		        	}
		        	
		        	return JSON.stringify(data);
		        }
		    }
		}
	);
	</script>
</body>
</html>
{'fraction_non_alphanumeric': 0.1919847328244275, 'fraction_numerical': 0.01984732824427481, 'mean_word_length': 2.660614525139665, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 54, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5708021', 'n_tokens_mistral': 1107, 'n_tokens_neox': 983, 'n_words': 156}