<commit_before>
wn.pages['modules_setup'].onload = function(wrapper) { 
	wn.ui.make_app_page({
		parent: wrapper,
		title: 'Show or Hide Modules',
		single_column: true
	});
	
	wrapper.appframe.add_button("Update", function() {
		wn.modules_setup.update(this);
	})
	
	$('<div class="alert alert-info">Select modules to be shown.</div>').appendTo($(wrapper).find(".layout-main"));
	$('<div id="modules-list">').appendTo($(wrapper).find(".layout-main"));
	
	wn.modules_setup.refresh_page();
}

wn.modules_setup = {
	refresh_page: function() {
		$('#modules-list').empty();

		$.each(keys(wn.modules).sort(), function(i, m) {
			if(m!="Setup") {
				var $chk = $("<input type='checkbox' data-module='"+m+"' style='margin-top: -2px'>")
					.prependTo($('<p><span> '+m+'</span></p>').appendTo("#modules-list"));
				if(!wn.boot.hidden_modules || wn.boot.hidden_modules.indexOf(m)==-1) {
					$chk.prop("checked", true);
				}
			}
		});
	},
	update: function(btn) {
		var ml = [];
		$('#modules-list [data-module]:checkbox:not(:checked)').each(function() {
			ml.push($(this).attr('data-module'));
		});
		
		return wn.call({
			method: 'core.page.modules_setup.modules_setup.update',<commit_msg>[minor] fixed button in show hide modules<commit_after>
wn.pages['modules_setup'].onload = function(wrapper) { 
	wn.ui.make_app_page({
		parent: wrapper,
		title: 'Show or Hide Modules',
		single_column: true
	});
	
	wrapper.appframe.set_title_right("Update", function() {
		wn.modules_setup.update(this);
	})
	
	$('<div class="alert alert-info">Select modules to be shown.</div>').appendTo($(wrapper).find(".layout-main"));
	$('<div id="modules-list">').appendTo($(wrapper).find(".layout-main"));
	
	wn.modules_setup.refresh_page();
}

wn.modules_setup = {
	refresh_page: function() {
		$('#modules-list').empty();

		$.each(keys(wn.modules).sort(), function(i, m) {
			if(m!="Setup") {
				var $chk = $("<input type='checkbox' data-module='"+m+"' style='margin-top: -2px'>")
					.prependTo($('<p><span> '+m+'</span></p>').appendTo("#modules-list"));
				if(!wn.boot.hidden_modules || wn.boot.hidden_modules.indexOf(m)==-1) {
					$chk.prop("checked", true);
				}
			}
		});
	},
	update: function(btn) {
		var ml = [];
		$('#modules-list [data-module]:checkbox:not(:checked)').each(function() {
			ml.push($(this).attr('data-module'));
		});
		
		return wn.call({
			method: 'core.page.modules_setup.modules_setup.update',
{'fraction_non_alphanumeric': 0.23582954075299958, 'fraction_numerical': 0.0016549441456350847, 'mean_word_length': 4.610208816705336, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '5203674', 'n_tokens_mistral': 948, 'n_tokens_neox': 857, 'n_words': 121}