<commit_before><?php
App::import('Vendor', 'Z.PasswordHash');
?>
<?php
echo $this->Html->script('/z/js/jquery.min.js');
echo $this->Html->script('/z/js/jquery.jqplot.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.categoryAxisRenderer.min.js');
//echo $this->Html->script('/z/js/plugins/jqplot.logAxisRenderer.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.dateAxisRenderer.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.canvasTextRenderer.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.canvasAxisTickRenderer.js');
echo $this->Html->script('/z/js/plugins/jqplot.canvasAxisLabelRenderer.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.barRenderer.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.pointLabels.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.highlighter.min.js');
echo $this->Html->css('/z/js/jquery.jqplot.min.css');
?>

<div class="accounts index">
<?php //debug($this); ?>
<?php //debug($z_wordlists); ?>
	<h2><?php echo __d('z', 'Settings and Dashboard'); ?></h2>
	<li>version=<?php echo $z_version; ?>
	<li>mt_getrandmax=<?php echo mt_getrandmax(); ?>
	<li>token_length=<?php echo $z_token_length; ?>
	<li>password hash cost=<?php echo $z_hash_cost; ?>
	<li>password minimal length=<?php echo $z_password_min_len; ?>
	<li>word lists (used: <?php echo $z_use_password_blacklist?"yes":"no" ?>) : <?php echo implode(', ', $z_wordlists); ?>
	<li>accounts total=<?php echo $accounts_total; ?>
	<li>accounts active=<?php echo $accounts_active; ?>
	<li>tokens active=<?php echo $tokens; ?>
	<?php //debug(json_encode($logins['good']));?>
	<?php //debug(json_encode($logins['bad']));?>
	<?php //debug(max($logins['good']));?>
	<?php //debug(max($logins['bad']));?>
	<?php //debug(json_encode($accounts['good']));?>
	<?php //debug(json_encode($accounts['bad']));?>

	<div id="logins_chartdiv" class="resetcss" style="height:400px;width:500px; margin:auto; text-align:left;"></div>
	<div id="accounts_chartdiv" class="resetcss" style="height:400px;width:500px; margin:auto; text-align:left;"></div>

</div>
<div class="actions">
	<h3><?php echo __d('z', 'Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__d('z', 'Accounts'), array('action' => 'accounts')); ?></li>
		<li><?php echo $this->Html->link(__d('z', 'Tokens'), array('action' => 'tokens')); ?></li>
		<li><?php echo $this->Html->link(__d('z', 'Cryptography tests'), array('action' => 'cryptotest')); ?></li>
	</ul>
</div>

<?php
	if ( empty($logins['good']) ) {
		$log_good = '[[null]]';
		$max_log['good'] = 0;
	} else {
		$log_good = json_encode($logins['good']);
		$max_log['good'] = max($logins['good'])[1];
	}
	if ( empty($logins['bad']) ) {
		$log_bad = '[[null]]';
		$max_log['bad'] = 0;
	} else {
		$log_bad = json_encode($logins['bad']);
		$max_log['bad'] = max($logins['bad'])[1];
	}
	$logtodate = date("Y-m-d", strtotime("+1 day"));
?>
<script><commit_msg>corrected the max value for login charts to the second column of the data array, oops :)<commit_after><?php
App::import('Vendor', 'Z.PasswordHash');
?>
<?php
echo $this->Html->script('/z/js/jquery.min.js');
echo $this->Html->script('/z/js/jquery.jqplot.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.categoryAxisRenderer.min.js');
//echo $this->Html->script('/z/js/plugins/jqplot.logAxisRenderer.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.dateAxisRenderer.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.canvasTextRenderer.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.canvasAxisTickRenderer.js');
echo $this->Html->script('/z/js/plugins/jqplot.canvasAxisLabelRenderer.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.barRenderer.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.pointLabels.min.js');
echo $this->Html->script('/z/js/plugins/jqplot.highlighter.min.js');
echo $this->Html->css('/z/js/jquery.jqplot.min.css');
?>

<div class="accounts index">
<?php //debug($this); ?>
<?php //debug($z_wordlists); ?>
	<h2><?php echo __d('z', 'Settings and Dashboard'); ?></h2>
	<li>version=<?php echo $z_version; ?>
	<li>mt_getrandmax=<?php echo mt_getrandmax(); ?>
	<li>token_length=<?php echo $z_token_length; ?>
	<li>password hash cost=<?php echo $z_hash_cost; ?>
	<li>password minimal length=<?php echo $z_password_min_len; ?>
	<li>word lists (used: <?php echo $z_use_password_blacklist?"yes":"no" ?>) : <?php echo implode(', ', $z_wordlists); ?>
	<li>accounts total=<?php echo $accounts_total; ?>
	<li>accounts active=<?php echo $accounts_active; ?>
	<li>tokens active=<?php echo $tokens; ?>
	<?php //debug(json_encode($logins['good']));?>
	<?php //debug(json_encode($logins['bad']));?>
	<?php //debug(max($logins['good']));?>
	<?php //debug(max($logins['bad']));?>
	<?php //debug(json_encode($accounts['good']));?>
	<?php //debug(json_encode($accounts['bad']));?>

	<div id="logins_chartdiv" class="resetcss" style="height:400px;width:500px; margin:auto; text-align:left;"></div>
	<div id="accounts_chartdiv" class="resetcss" style="height:400px;width:500px; margin:auto; text-align:left;"></div>

</div>
<div class="actions">
	<h3><?php echo __d('z', 'Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__d('z', 'Accounts'), array('action' => 'accounts')); ?></li>
		<li><?php echo $this->Html->link(__d('z', 'Tokens'), array('action' => 'tokens')); ?></li>
		<li><?php echo $this->Html->link(__d('z', 'Cryptography tests'), array('action' => 'cryptotest')); ?></li>
	</ul>
</div>

<?php
	if ( empty($logins['good']) ) {
		$log_good = '[[null]]';
		$max_log['good'] = 0;
	} else {
		$log_good = json_encode($logins['good']);
		$numbers = array_map(function($details) {
			return $details[1];
		}, $logins['good']);
		$max_log['good'] = max($numbers);
	}
	if ( empty($logins['bad']) ) {
		$log_bad = '[[null]]';
		$max_log['bad'] = 0;
	} else {
		$log_bad = json_encode($logins['bad']);
		$numbers = array_map(function($details) {
			return $details[1];
		}, $logins['bad']);
		$max_log['bad'] = max($numbers);
	}
	$logtodate = date("Y-m-d", strtotime("+1 day"));
	//debug($logins['good']);
	//debug($logins['bad']);
	//debug($max_log);
?>
<script>
{'fraction_non_alphanumeric': 0.2610893672537508, 'fraction_numerical': 0.00684931506849315, 'mean_word_length': 6.073817762399077, 'pattern_counts': {'":': 2, '<': 115, '<?xml version=': 0, '>': 181, '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': '3682373', 'n_tokens_mistral': 2399, 'n_tokens_neox': 2338, 'n_words': 364}