<commit_before>/*
 * Build.js
 */

if (typeof(_XUKA_) == 'undefined') {
	_XUKA_= {};
} 

_XUKA_.init = function () {
	// bind inputs
	for (key in _XUKA_.input) {
		if (_XUKA_.input.hasOwnProperty(key)) {
			$('#' + key)[_XUKA_.input[key].action_type](_XUKA_.input[key].call);
		}
	}
}

_XUKA_.input = {
	build_now : {
		action_type: 'click',
		call: function(){
			console.log("Build now");
			$.ajax({
				type: "POST", 
				url: _XUKA_.url.build + "/build",
				data: {_csrf:_XUKA_.csrftoken},
				success: function(data) {
					console.log(data);
				},
				dataType: 'json'
			});
		}
	},
	select_log: {
		action_type: 'click',
		call: function(){
			console.log("Select Log now");
			var selectedValue = $('#select_log option:selected').val();
			console.log("Select Value: " + selectedValue);
			if (selectedValue == "SELECT ONE" || selectedValue == "") {
				return;
			}
			$.ajax({
				type: "POST", 
				url: _XUKA_.url.build + "/log",
				data: {_csrf:_XUKA_.csrftoken, fileName:selectedValue},
				success: function(data) {
					console.log(data);
					$('#logContentTextArea').val(data.logContent);
				},
				dataType: 'text'
			});
		}
	}
}


$(document).ready(function(){
	_XUKA_.init();
});<commit_msg>show log data<commit_after>/*
 * Build.js
 */

if (typeof(_XUKA_) == 'undefined') {
	_XUKA_= {};
} 

_XUKA_.init = function () {
	// bind inputs
	for (key in _XUKA_.input) {
		if (_XUKA_.input.hasOwnProperty(key)) {
			$('#' + key)[_XUKA_.input[key].action_type](_XUKA_.input[key].call);
		}
	}
}

_XUKA_.input = {
	build_now : {
		action_type: 'click',
		call: function(){
			console.log("Build now");
			$.ajax({
				type: "POST", 
				url: _XUKA_.url.build + "/build",
				data: {_csrf:_XUKA_.csrftoken},
				success: function(data) {
					console.log(data);
				},
				dataType: 'json'
			});
		}
	},
	select_log: {
		action_type: 'click',
		call: function(){
			console.log("Select Log now");
			var selectedValue = $('#select_log option:selected').val();
			console.log("Select Value: " + selectedValue);
			if (selectedValue == "SELECT ONE" || selectedValue == "") {
				return;
			}
			$.ajax({
				type: "POST", 
				url: _XUKA_.url.build + "/log",
				data: {_csrf:_XUKA_.csrftoken, fileName:selectedValue},
				success: function(data) {
					console.log(data);
					$('#logContentTextArea').val(data.logContent);
				},
				dataType: 'json'
			});
		}
	}
}


$(document).ready(function(){
	_XUKA_.init();
});
{'fraction_non_alphanumeric': 0.20016406890894176, 'fraction_numerical': 0.0, 'mean_word_length': 3.197934595524957, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4521541', 'n_tokens_mistral': 1099, 'n_tokens_neox': 940, 'n_words': 154}