<commit_before>@extends(Config::get('pragmarx/tracker::stats_layout'))

@section('page-contents')
	<div class="table-responsive">
		<table class="table table-striped">
			<thead>
				<tr>
					<th>ID</th>
					<th>IP address</th>
					<th>Country / City</th>
					<th>User</th>
					<th>Device</th>
					<th>Browser</th>
					<th>Referer</th>
					<th>Page Views</th>
					<th>Last activity</th>
				</tr>
			</thead>

			<tbody>
				@foreach($sessions as $session)
					<?php
						$cityName = $session->geoip && $session->geoip->city ? ' - '.$session->geoip->city : '';
						$countryName = ($session->geoip ? $session->geoip->country_name : '') . $cityName;
						$countryCode = strtolower($session->geoip ? $session->geoip->country_code : '');

						$flag = $countryCode
							? "<img src=\"\" class=\"flag $countryCode\" alt=\"$countryName\" />"
							: '';
					?>

					<tr>
						<td>{{ link_to_route('tracker.stats.log', $session->id, ['uuid' => $session->uuid]) }}</td>
						<td>{{ $session->client_ip }}</td>
						<td>{{ $flag }} {{ $countryName }}</td>
						<td>{{ $session->user ? $session->user->email : 'guest' }}</td>
						<td>{{ $session->device ? $session->device->kind . ' ' . ($session->device->model && $session->device->model !== 'unavailable' ? '['.$session->device->model.']' : '').' '.($session->device->platform ? ' ['.trim($session->device->platform.' '.$session->device->platform_version).']' : '').' '.($session->device->is_mobile ? ' [mobile device]' : '') : '' }}</td>
						<td>{{ $session->agent && $session->agent ? $session->agent->browser . ' ('.$session->agent->browser_version.')' : '' }}</td>
						<td>{{ $session->referer ? $session->referer->domain->name : '' }}</td>
						<td>{{ $session->page_views }}</td>
						<td>{{ $session->updated_at->diffForHumans() }}</td>
					</tr><commit_msg>Fix country flag not showing<commit_after>@extends(Config::get('pragmarx/tracker::stats_layout'))

@section('page-contents')
	<div class="table-responsive">
		<table class="table table-striped">
			<thead>
				<tr>
					<th>ID</th>
					<th>IP address</th>
					<th>Country / City</th>
					<th>User</th>
					<th>Device</th>
					<th>Browser</th>
					<th>Referer</th>
					<th>Page Views</th>
					<th>Last activity</th>
				</tr>
			</thead>

			<tbody>
				@foreach($sessions as $session)
					<?php
						$cityName = $session->geoip && $session->geoip->city ? ' - '.$session->geoip->city : '';
						$countryName = ($session->geoip ? $session->geoip->country_name : '') . $cityName;
						$countryCode = strtolower($session->geoip ? $session->geoip->country_code : '');

						$flag = $countryCode
							? "<span class=\"f16\"><span class=\"flag $countryCode\" alt=\"$countryName\" /></span></span>"
							: '';
					?>

					<tr>
						<td>{{ link_to_route('tracker.stats.log', $session->id, ['uuid' => $session->uuid]) }}</td>
						<td>{{ $session->client_ip }}</td>
						<td>{{ $flag }} {{ $countryName }}</td>
						<td>{{ $session->user ? $session->user->email : 'guest' }}</td>
						<td>{{ $session->device ? $session->device->kind . ' ' . ($session->device->model && $session->device->model !== 'unavailable' ? '['.$session->device->model.']' : '').' '.($session->device->platform ? ' ['.trim($session->device->platform.' '.$session->device->platform_version).']' : '').' '.($session->device->is_mobile ? ' [mobile device]' : '') : '' }}</td>
						<td>{{ $session->agent && $session->agent ? $session->agent->browser . ' ('.$session->agent->browser_version.')' : '' }}</td>
						<td>{{ $session->referer ? $session->referer->domain->name : '' }}</td>
						<td>{{ $session->page_views }}</td>
						<td>{{ $session->updated_at->diffForHumans() }}</td>
					</tr>
{'fraction_non_alphanumeric': 0.26229508196721313, 'fraction_numerical': 0.0005374899220639613, 'mean_word_length': 3.215175537938845, 'pattern_counts': {'":': 0, '<': 100, '<?xml version=': 0, '>': 196, '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': '5417474', 'n_tokens_mistral': 1595, 'n_tokens_neox': 1272, 'n_words': 198}