<commit_before><div class="filter" style="padding-bottom:9px;margin-bottom:0">
	<div class="container">
		<div class="caption"><span class="fa fa-cogs mr5"></span> @(System)</div>
	</div>
</div>
<br />
<div class="container hidden-xs">
	<div class="row">
		<div class="col-md-4 col-sm-4 m">
			<div class="b"><span class="fa fa-dashboard mr5"></span> MonitorGuru</div>
			<p class="silver">Simple and powerful website monitoring. Monitor your website availability 24/7.</p>
			<span class="fa fa-link mr5"></span><a href="https://monitorguru.com" target="_blank">@(Visit website)</a>
		</div>
		<div class="col-md-4 col-sm-4 m">
			<div class="b"><span class="fa fa-check-circle mr5"></span> Todomator</div>
			<p class="silver">Task manager system with time tracking. All your tasks under control.</p>
			<span class="fa fa-link mr5"></span><a href="https://www.todomator.com" target="_blank">@(Visit website)</a>
		</div>
		<div class="col-md-4 col-sm-4 m">
			<div class="b"><span class="fa fa-map mr5"></span> GPS Localization</div>
			<p class="silver">Real-time GPS Localization on the map. Track your family, friends or colleagues.</p>
			<span class="fa fa-link mr5"></span><a href="http://www.gpslocalization.com" target="_blank">@(Visit website)</a>
		</div>
	</div>
	<hr />
	<br />
</div>
<div class="container">
	<div class="b">@(Clearing)</div>
	<br />
	<table class="table table-bordered">
		<tr>
			<td><span class="fa w18 fa-navicon"></span> @(Clear all products)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_products">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-shopping-cart"></span> @(Clear all orders)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_orders">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-file-text"></span> @(Clear all pages)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_pages">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-navicon"></span> @(Clear all users)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_users">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-file-text"></span> @(Clear all widgets)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_widgets">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-image"></span> @(Clear all files)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_files">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-envelope"></span> @(Clear newsletter list)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_newsletter">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-bar-chart"></span> @(Clear visitor stats)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_webcounter">@(Clear now)</a></td>
		</tr>
	</table>
	<br />
	<br />
</div>

<!-- HELPERS -->
<input type="file" id="system_restore_backup" class="hidden" />

<script>
// Backup databases
function system_backup_database() {
	loading(true);
	window.location.href = managerurl + '/api/backup/database/';
	setTimeout(function() {
		loading(false);
	}, 5000);
}

// Restore databases
function system_restore_database() {
	$('#system_restore_backup').click();
}

// Backup website
function system_backup_website() {
	loading(true);
	window.location.href = managerurl + '/api/backup/website/';
	setTimeout(function() {
		loading(false);
	}, 5000);
}

function system_clear_products() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/products/clear/', null, function() {
		success();
		if (window.products_refresh)
			window.products_refresh(true);
	});
}

function system_clear_orders() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/orders/clear/', null, function() {
		success();
		if (window.orders_refresh)
			window.orders_refresh(true);
	});
}

function system_clear_users() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/users/clear/', null, function() {
		success();
		if (window.users_refresh)
			window.users_refresh(true);
	});
}

function system_clear_pages() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/pages/clear/', null, function() {
		success();
		if (window.pages_refresh)
			window.pages_refresh();
	});
}

function system_clear_widgets() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/widgets/clear/', null, function() {
		success();
		if (window.widgets_refresh)
			window.widgets_refresh();
	});
}

function system_clear_files() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/files/clear/', null, function() {
		success();
	});
}

function system_clear_newsletter() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/newsletter/clear/', null, function() {
		success();
		if (window.newsletter_refresh)
			window.newsletter_refresh(true);
	});
}

function system_clear_webcounter() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/dashboard/clear/', null, function() {
		success();
		setTimeout(function() {
			window.location.reload(true);
		}, 1500);
	});
}

$('#system_restore_backup').on('change', function(e) {
	e.preventDefault();
	e.stopPropagation();
	loading(true);
	var el = this;
	var data = new FormData();
	data.append('file', this.files[0]);
	$.components.UPLOAD(managerurl + '/api/restore/database/', data, function(response, err) {
		el.value = '';
		success(true);
		setTimeout(function() {
			window.location.reload(true);
		}, 1500);
	});
});
</script><commit_msg>Clean code.<commit_after><div class="filter" style="padding-bottom:9px;margin-bottom:0">
	<div class="container">
		<div class="caption"><span class="fa fa-cogs mr5"></span> @(System)</div>
	</div>
</div>
<br />
<div class="container hidden-xs">
	<div class="row">
		<div class="col-md-4 col-sm-4 m">
			<div class="b"><span class="fa fa-dashboard mr5"></span> MonitorGuru</div>
			<p class="silver">Simple and powerful website monitoring. Monitor your website availability 24/7.</p>
			<span class="fa fa-link mr5"></span><a href="https://monitorguru.com" target="_blank">@(Visit website)</a>
		</div>
		<div class="col-md-4 col-sm-4 m">
			<div class="b"><span class="fa fa-check-circle mr5"></span> Todomator</div>
			<p class="silver">Task manager system with time tracking. All your tasks under control.</p>
			<span class="fa fa-link mr5"></span><a href="https://www.todomator.com" target="_blank">@(Visit website)</a>
		</div>
		<div class="col-md-4 col-sm-4 m">
			<div class="b"><span class="fa fa-map mr5"></span> GPS Localization</div>
			<p class="silver">Real-time GPS Localization on the map. Track your family, friends or colleagues.</p>
			<span class="fa fa-link mr5"></span><a href="http://www.gpslocalization.com" target="_blank">@(Visit website)</a>
		</div>
	</div>
	<hr />
	<br />
</div>
<div class="container">
	<div class="b">@(Clearing)</div>
	<br />
	<table class="table table-bordered">
		<tr>
			<td><span class="fa w18 fa-navicon"></span> @(Clear all products)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_products">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-shopping-cart"></span> @(Clear all orders)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_orders">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-file-text"></span> @(Clear all pages)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_pages">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-navicon"></span> @(Clear all users)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_users">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-file-text"></span> @(Clear all widgets)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_widgets">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-image"></span> @(Clear all files)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_files">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-envelope"></span> @(Clear newsletter list)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_newsletter">@(Clear now)</a></td>
		</tr>
		<tr>
			<td><span class="fa w18 fa-bar-chart"></span> @(Clear visitor stats)</td>
			<td class="ui-center bg-smoke" style="width:120px"><a href="javascript:void(0)" data-component="click" data-component-path="system_clear_webcounter">@(Clear now)</a></td>
		</tr>
	</table>
	<br />
	<br />
</div>

<script>
function system_clear_products() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/products/clear/', null, function() {
		success();
		if (window.products_refresh)
			window.products_refresh(true);
	});
}

function system_clear_orders() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/orders/clear/', null, function() {
		success();
		if (window.orders_refresh)
			window.orders_refresh(true);
	});
}

function system_clear_users() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/users/clear/', null, function() {
		success();
		if (window.users_refresh)
			window.users_refresh(true);
	});
}

function system_clear_pages() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/pages/clear/', null, function() {
		success();
		if (window.pages_refresh)
			window.pages_refresh(true);
	});
}

function system_clear_widgets() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/widgets/clear/', null, function() {
		success();
		if (window.widgets_refresh)
			window.widgets_refresh();
	});
}

function system_clear_files() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/files/clear/', null, function() {
		success();
	});
}

function system_clear_newsletter() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/newsletter/clear/', null, function() {
		success();
		if (window.newsletter_refresh)
			window.newsletter_refresh(true);
	});
}

function system_clear_webcounter() {
	if (!confirm('@(Please, confirm clearing of the database.)'))
		return;
	loading(true);
	$.components.GET(managerurl + '/api/dashboard/clear/', null, function() {
		success();
		setTimeout(function() {
			window.location.reload(true);
		}, 1500);
	});
}

$('#system_restore_backup').on('change', function(e) {
	e.preventDefault();
	e.stopPropagation();
	loading(true);
	var el = this;
	var data = new FormData();
	data.append('file', this.files[0]);
	$.components.UPLOAD(managerurl + '/api/restore/database/', data, function(response, err) {
		el.value = '';
		success(true);
		setTimeout(function() {
			window.location.reload(true);
		}, 1500);
	});
});
</script>
{'fraction_non_alphanumeric': 0.20604073987356591, 'fraction_numerical': 0.012331226098493717, 'mean_word_length': 5.055765595463138, 'pattern_counts': {'":': 0, '<': 289, '<?xml version=': 0, '>': 289, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '2002944', 'n_tokens_mistral': 4745, 'n_tokens_neox': 4424, 'n_words': 906}