<commit_before>{% extends "admin/base.html" %}

{% block stylesheets %}
{% endblock %}

{% block content %}
<div id="user-info-modal" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h2 class="modal-action text-center w-100">Edit User</h2>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body clearfix">
				{% include "admin/modals/users/edit.html" %}
			</div>
		</div>
	</div>
</div>

<div id="user-award-modal" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h2 class="modal-action text-center w-100">Award User</h2>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body clearfix">
				{% include "admin/modals/awards/create.html" %}
			</div>
		</div>
	</div>
</div>

<div id="user-email-modal" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h2 class="modal-action text-center w-100">Email User</h2>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body clearfix">
				{% include "admin/modals/mail/send.html" %}
			</div>
		</div>
	</div>
</div>

<div id="user-addresses-modal" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h2 class="modal-action text-center w-100">IP Addresses</h2>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body clearfix">
				{% include "admin/modals/users/addresses.html" %}
			</div>
		</div>
	</div>
</div>

<div class="jumbotron">
	<div class="container">
		<h1 id="team-id" class="text-center p-0 m-0">{{ user.name }}</h1>
		<div class="mb-2">
			{% if user.type == 'admin' %}
				<span class="badge badge-primary">admin</span>
			{% endif %}
			{% if user.verified %}
				<span class="badge badge-success">verified</span>
			{% endif %}
			{% if user.hidden %}
				<span class="badge badge-danger">hidden</span>
			{% endif %}
			{% if user.banned %}
				<span class="badge badge-danger">banned</span>
			{% endif %}
		</div>

			{% if user.affiliation %}
				<h3 class="d-inline-block">
					<span class="badge badge-primary">{{ user.affiliation }}</span>
				</h3>
			{% endif %}

			{% if user.country %}
				<h3 class="d-inline-block">
					<span class="badge badge-primary">
						<i class="flag-{{ user.country.lower() }}"></i>
						{{ lookup_country_code(user.country) }}
					</span>
				</h3>
			{% endif %}

		<h2 id="team-email" class="text-center">{{ user.email }}</h2>
		{% if user.oauth_id %}
			<a href="https://majorleaguecyber.org/u/{{ user.name }}">
				<h3><span class="badge badge-primary">Official</span></h3>
			</a>
		{% endif %}

		{% if user.team_id %}
			<h2 id="team-acc" class="text-center">
				<a href="{{ url_for('admin.teams_detail', team_id=user.team_id) }}">
					{{ user.team.name }}
				</a>
			</h2>
		{% endif %}

		<h3 id="team-place" class="text-center">
			{% if place %}
				{{ place }}
				<small>place</small>
			{% endif %}
		</h3>
		<h3 id="team-score" class="text-center">
			{% if score %}
				{{ score }}
				<small>points</small>
			{% endif %}
		</h3>
		<hr class="w-50">
		<div class="pt-3">
			<a class="edit-user text-dark">
				<i class="btn-fa fas fa-user-edit fa-2x px-2" data-toggle="tooltip" data-placement="top" title="Edit User"></i>
			</a>
			<a class="award-user text-dark">
				<i class="btn-fa fas fa-trophy fa-2x px-2" data-toggle="tooltip" data-placement="top" title="Award User"></i>
			</a>
			<a class="email-user text-dark">
				<i class="btn-fa fas fa-envelope fa-2x px-2" data-toggle="tooltip" data-placement="top" title="Email User"></i>
			</a>
			<a class="delete-user text-dark">
				<i class="btn-fa fas fa-trash-alt fa-2x px-2" data-toggle="tooltip" data-placement="top" title="Delete User"></i>
			</a>
		</div>
		<div class="pt-3">
			<a class="addresses-user text-dark">
				<i class="btn-fa fas fa-network-wired fa-2x px-2" data-toggle="tooltip" data-placement="top" title="IP Addresses"></i>
			</a>
			{% if user.website %}
			<a href="{{ user.website }}" target="_blank" class="text-decoration-none text-dark">
				<i class="btn-fa fas fa-external-link-alt fa-2x px-2" data-toggle="tooltip" data-placement="top"
					title="{{ user.website }}" aria-hidden="true"></i>
			</a>
			{% endif %}
		</div>
	</div>
</div>

<div class="container">
	<div class="row min-vh-25">
		{% if solves %}
			<div id="keys-pie-graph" class="col-md-6">
				<div class="text-center">
					<i class="fas fa-circle-notch fa-spin fa-3x fa-fw spinner"></i>
				</div>
			</div>
			<div id="categories-pie-graph" class="col-md-6">
				<div class="text-center">
					<i class="fas fa-circle-notch fa-spin fa-3x fa-fw spinner"></i>
				</div>
			</div>
			<div id="score-graph" class="col-md-12">
				<div class="text-center">
					<i class="fas fa-circle-notch fa-spin fa-3x fa-fw spinner"></i>
				</div>
			</div>
		{% else %}
			<h3 class="opacity-50 text-center w-100 justify-content-center align-self-center">No solves yet</h3>
		{% endif %}
	</div>


	<nav class="nav nav-tabs nav-fill pt-5" id="myTab" role="tablist">
		<a class="nav-item nav-link active" id="nav-solves-tab" data-toggle="tab" href="#nav-solves" role="tab"
		   aria-controls="nav-solves" aria-selected="true">Solves</a>

		<a class="nav-item nav-link" id="nav-wrong-tab" data-toggle="tab" href="#nav-wrong" role="tab"
		   aria-controls="nav-wrong" aria-selected="false">Fails</a>

		<a class="nav-item nav-link" id="nav-awards-tab" data-toggle="tab" href="#nav-awards" role="tab"
		   aria-controls="nav-awards" aria-selected="false">Awards</a>

		<a class="nav-item nav-link" id="nav-missing-tab" data-toggle="tab" href="#nav-missing" role="tab"
		   aria-controls="nav-missing" aria-selected="false">Missing</a>
	</nav>

	<div class="tab-content min-vh-25" id="nav-tabContent">
		<div class="tab-pane fade show active" id="nav-solves" role="tabpanel" aria-labelledby="nav-solves-tab">
			<h3 class="text-center pt-5 d-block">Solves</h3>
			<div class="row">
				<div class="col-md-12">
					<div class="float-right pb-3">
						<div class="btn-group" role="group">
							<button type="button" class="btn btn-outline-danger" id="solves-delete-button">
								<i class="btn-fa fas fa-trash-alt"></i>
							</button><commit_msg>Bump min-vh<commit_after>{% extends "admin/base.html" %}

{% block stylesheets %}
{% endblock %}

{% block content %}
<div id="user-info-modal" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h2 class="modal-action text-center w-100">Edit User</h2>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body clearfix">
				{% include "admin/modals/users/edit.html" %}
			</div>
		</div>
	</div>
</div>

<div id="user-award-modal" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h2 class="modal-action text-center w-100">Award User</h2>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body clearfix">
				{% include "admin/modals/awards/create.html" %}
			</div>
		</div>
	</div>
</div>

<div id="user-email-modal" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h2 class="modal-action text-center w-100">Email User</h2>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body clearfix">
				{% include "admin/modals/mail/send.html" %}
			</div>
		</div>
	</div>
</div>

<div id="user-addresses-modal" class="modal fade">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h2 class="modal-action text-center w-100">IP Addresses</h2>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body clearfix">
				{% include "admin/modals/users/addresses.html" %}
			</div>
		</div>
	</div>
</div>

<div class="jumbotron">
	<div class="container">
		<h1 id="team-id" class="text-center p-0 m-0">{{ user.name }}</h1>
		<div class="mb-2">
			{% if user.type == 'admin' %}
				<span class="badge badge-primary">admin</span>
			{% endif %}
			{% if user.verified %}
				<span class="badge badge-success">verified</span>
			{% endif %}
			{% if user.hidden %}
				<span class="badge badge-danger">hidden</span>
			{% endif %}
			{% if user.banned %}
				<span class="badge badge-danger">banned</span>
			{% endif %}
		</div>

			{% if user.affiliation %}
				<h3 class="d-inline-block">
					<span class="badge badge-primary">{{ user.affiliation }}</span>
				</h3>
			{% endif %}

			{% if user.country %}
				<h3 class="d-inline-block">
					<span class="badge badge-primary">
						<i class="flag-{{ user.country.lower() }}"></i>
						{{ lookup_country_code(user.country) }}
					</span>
				</h3>
			{% endif %}

		<h2 id="team-email" class="text-center">{{ user.email }}</h2>
		{% if user.oauth_id %}
			<a href="https://majorleaguecyber.org/u/{{ user.name }}">
				<h3><span class="badge badge-primary">Official</span></h3>
			</a>
		{% endif %}

		{% if user.team_id %}
			<h2 id="team-acc" class="text-center">
				<a href="{{ url_for('admin.teams_detail', team_id=user.team_id) }}">
					{{ user.team.name }}
				</a>
			</h2>
		{% endif %}

		<h3 id="team-place" class="text-center">
			{% if place %}
				{{ place }}
				<small>place</small>
			{% endif %}
		</h3>
		<h3 id="team-score" class="text-center">
			{% if score %}
				{{ score }}
				<small>points</small>
			{% endif %}
		</h3>
		<hr class="w-50">
		<div class="pt-3">
			<a class="edit-user text-dark">
				<i class="btn-fa fas fa-user-edit fa-2x px-2" data-toggle="tooltip" data-placement="top" title="Edit User"></i>
			</a>
			<a class="award-user text-dark">
				<i class="btn-fa fas fa-trophy fa-2x px-2" data-toggle="tooltip" data-placement="top" title="Award User"></i>
			</a>
			<a class="email-user text-dark">
				<i class="btn-fa fas fa-envelope fa-2x px-2" data-toggle="tooltip" data-placement="top" title="Email User"></i>
			</a>
			<a class="delete-user text-dark">
				<i class="btn-fa fas fa-trash-alt fa-2x px-2" data-toggle="tooltip" data-placement="top" title="Delete User"></i>
			</a>
		</div>
		<div class="pt-3">
			<a class="addresses-user text-dark">
				<i class="btn-fa fas fa-network-wired fa-2x px-2" data-toggle="tooltip" data-placement="top" title="IP Addresses"></i>
			</a>
			{% if user.website %}
			<a href="{{ user.website }}" target="_blank" class="text-decoration-none text-dark">
				<i class="btn-fa fas fa-external-link-alt fa-2x px-2" data-toggle="tooltip" data-placement="top"
					title="{{ user.website }}" aria-hidden="true"></i>
			</a>
			{% endif %}
		</div>
	</div>
</div>

<div class="container">
	<div class="row min-vh-25">
		{% if solves %}
			<div id="keys-pie-graph" class="col-md-6">
				<div class="text-center">
					<i class="fas fa-circle-notch fa-spin fa-3x fa-fw spinner"></i>
				</div>
			</div>
			<div id="categories-pie-graph" class="col-md-6">
				<div class="text-center">
					<i class="fas fa-circle-notch fa-spin fa-3x fa-fw spinner"></i>
				</div>
			</div>
			<div id="score-graph" class="col-md-12">
				<div class="text-center">
					<i class="fas fa-circle-notch fa-spin fa-3x fa-fw spinner"></i>
				</div>
			</div>
		{% else %}
			<h3 class="opacity-50 text-center w-100 justify-content-center align-self-center">No solves yet</h3>
		{% endif %}
	</div>


	<nav class="nav nav-tabs nav-fill pt-5" id="myTab" role="tablist">
		<a class="nav-item nav-link active" id="nav-solves-tab" data-toggle="tab" href="#nav-solves" role="tab"
		   aria-controls="nav-solves" aria-selected="true">Solves</a>

		<a class="nav-item nav-link" id="nav-wrong-tab" data-toggle="tab" href="#nav-wrong" role="tab"
		   aria-controls="nav-wrong" aria-selected="false">Fails</a>

		<a class="nav-item nav-link" id="nav-awards-tab" data-toggle="tab" href="#nav-awards" role="tab"
		   aria-controls="nav-awards" aria-selected="false">Awards</a>

		<a class="nav-item nav-link" id="nav-missing-tab" data-toggle="tab" href="#nav-missing" role="tab"
		   aria-controls="nav-missing" aria-selected="false">Missing</a>
	</nav>

	<div class="tab-content min-vh-50" id="nav-tabContent">
		<div class="tab-pane fade show active" id="nav-solves" role="tabpanel" aria-labelledby="nav-solves-tab">
			<h3 class="text-center pt-5 d-block">Solves</h3>
			<div class="row">
				<div class="col-md-12">
					<div class="float-right pb-3">
						<div class="btn-group" role="group">
							<button type="button" class="btn btn-outline-danger" id="solves-delete-button">
								<i class="btn-fa fas fa-trash-alt"></i>
							</button>
{'fraction_non_alphanumeric': 0.21706631142687982, 'fraction_numerical': 0.011841326228537596, 'mean_word_length': 3.46415592996366, 'pattern_counts': {'":': 0, '<': 371, '<?xml version=': 0, '>': 371, 'https://': 2, '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': '5000975', 'n_tokens_mistral': 6001, 'n_tokens_neox': 4997, 'n_words': 986}