<commit_before>'use strict';

if (!waitlist) {
	var waitlist = {};
}

waitlist.history.historysearch = (function() {

	var getMetaData = waitlist.base.getMetaData;
	var createHistoryEntryDOM = waitlist.history.base.createHistoryEntryDOM;

	function loadData(sources, targets, actions, startdate, enddate) {
		var data = {};
		if (sources !== null) {
			data.accs = sources;
		}
		if (targets !== null) {
			data.chars = targets;
		}
		if (actions !== null) {
			data.actions = actions;
		}
		data.start = startdate;
		data.end = enddate;
		$.getJSON(getMetaData('api-history-search'), data, function(data) {
			var hbody = $('#historybody');
			hbody.empty();
			for (var i = 0; i < data.history.length; i++) {
				var hEntryDOM = createHistoryEntryDOM(data.history[i]);
				hbody.trigger("hentry-adding", hEntryDOM);
				hbody.prepend(hEntryDOM);
				hbody.trigger("hentry-added", hEntryDOM);
			}
			if (data.history.length > 0) {
				data.laststamp = (new Date(Date
					.parse(data.history[data.history.length - 1].time)))
					.getTime();
			}
		});
	}

	function search_click_handler() {<commit_msg>added a "No Results found" column, when a search returns empty<commit_after>'use strict';

if (!waitlist) {
	var waitlist = {};
}

waitlist.history.historysearch = (function() {

	var getMetaData = waitlist.base.getMetaData;
	var createHistoryEntryDOM = waitlist.history.base.createHistoryEntryDOM;

	function loadData(sources, targets, actions, startdate, enddate) {
		var data = {};
		if (sources !== null) {
			data.accs = sources;
		}
		if (targets !== null) {
			data.chars = targets;
		}
		if (actions !== null) {
			data.actions = actions;
		}
		data.start = startdate;
		data.end = enddate;
		$.getJSON(getMetaData('api-history-search'), data, function(data) {
			var hbody = $('#historybody');
			hbody.empty();
			if (data.history.length <= 0) {
				 hbody.append('<td cospan="5">No Results Found</td>');
				 return;
			}
			for (var i = 0; i < data.history.length; i++) {
				var hEntryDOM = createHistoryEntryDOM(data.history[i]);
				hbody.trigger("hentry-adding", hEntryDOM);
				hbody.prepend(hEntryDOM);
				hbody.trigger("hentry-added", hEntryDOM);
			}
			if (data.history.length > 0) {
				data.laststamp = (new Date(Date
					.parse(data.history[data.history.length - 1].time)))
					.getTime();
			}
		});
	}

	function search_click_handler() {
{'fraction_non_alphanumeric': 0.16026992830029524, 'fraction_numerical': 0.003374103753690426, 'mean_word_length': 3.5968992248062017, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 7, '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': '7362658', 'n_tokens_mistral': 932, 'n_tokens_neox': 806, 'n_words': 166}