<commit_before>function listServers() {
	console.log('listServers');
	$.ajax({
		url: '/list-servers',
		type: 'POST',
		success: function (response) {
		var serverHtml = '<table id="server-list"  class="table"> <thead><tr>'
			+ '<th>Name</th>'
			+ '</tr></thead><tbody>';
		$.each(response, function (name, val) {
		 	serverHtml += '<tr>'
			 	+ '<td><span style="display:inline-block;width:500px">'
				+   '<a href="/server?addr=' + name + '">' + name + '</a>'
				+ '</span>'
				+ '<button class="btn btn-default" type="button" width="200px" onclick="removeServer(\''+name+'\')">Remove</button></td>'
			 	+ '</tr>';
	 	});
		serverHtml += '<tr>'
		 	+ '<td><input id="add-server" type="text" size="50" placeholder="" style="margin-right: 30px;">'
			+ '<button class="btn btn-default" type="button" width="50px" onclick="addServer()">Add</button></td>'
		 	+ '</tr>';
	 	serverHtml += '</tbody></table>';
	 	$('#server-list').html(serverHtml);
	 	},
	 	error: function (error) {
		 	console.log(error);
	 	}
 	});
}

function addServer() {
	var addr = document.getElementById('add-server').value;
	if (addr.length < 10) {
		alert("addr error: " + addr);
		return;
	}
	console.log("add server: " + addr);
 	$.ajax({
	 	url: '/add-server?addr=' + addr,
	 	type: 'POST',<commit_msg>web: optimize main page layout<commit_after>function listServers() {
	console.log('listServers');
	$.ajax({
		url: '/list-servers',
		type: 'POST',
		success: function (response) {
		var serverHtml = '<table id="server-list"  class="table"> <thead><tr>'
			+ '<th>Name</th>'
			+ '</tr></thead><tbody>';
		$.each(response, function (name, val) {
		 	serverHtml += '<tr>'
			 	+ '<td><span style="display:inline-block;width:500px">'
				+   '<a href="/server?addr=' + name + '">' + name + '</a>'
				+ '</span>'
				+ '<button class="btn btn-default" type="button" style="width:80px" onclick="removeServer(\''+name+'\')">Remove</button></td>'
			 	+ '</tr>';
	 	});
		serverHtml += '<tr>'
			+ '<td><span style="display:inline-block;width:500px">'
		 	+ '<input id="add-server" type="text" size="50" placeholder="" style="margin-right: 30px;">'
			+ '</span>'
			+ '<button class="btn btn-default" type="button" style="width:80px" onclick="addServer()">Add</button></td>'
		 	+ '</tr>';
	 	serverHtml += '</tbody></table>';
	 	$('#server-list').html(serverHtml);
	 	},
	 	error: function (error) {
		 	console.log(error);
	 	}
 	});
}

function addServer() {
	var addr = document.getElementById('add-server').value;
	if (addr.length < 10) {
		alert("addr error: " + addr);
		return;
	}
	console.log("add server: " + addr);
 	$.ajax({
	 	url: '/add-server?addr=' + addr,
	 	type: 'POST',
{'fraction_non_alphanumeric': 0.24663173652694612, 'fraction_numerical': 0.01122754491017964, 'mean_word_length': 3.9684014869888475, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6788177', 'n_tokens_mistral': 1067, 'n_tokens_neox': 920, 'n_words': 174}