Monitor voting patterns and detect potential duplicate voting
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %}Devices that have voted multiple times:
{% if patterns %}| Device ID | Vote Count | Fixtures | MOTM Players | DotD Players | First Vote | Last Vote | IP Addresses | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ pattern.device_id }} | {{ pattern.vote_count }} | {{ pattern.fixtures_voted }} | {{ pattern.motm_players }} | {{ pattern.dotd_players }} | {{ pattern.first_vote.strftime('%Y-%m-%d %H:%M') if pattern.first_vote else 'N/A' }} | {{ pattern.last_vote.strftime('%Y-%m-%d %H:%M') if pattern.last_vote else 'N/A' }} | {{ pattern.ip_addresses }} |
Warning: {{ patterns|length }} device(s) have voted multiple times. This could indicate duplicate voting or shared devices.
All devices have voted only once per fixture.
Complete voting history for this device:
| Fixture Date | MOTM Vote | DotD Vote | IP Address | Vote Time |
|---|---|---|---|---|
| {{ vote.fixture_date }} | {{ vote.motm_player_name }} | {{ vote.dotd_player_name }} | {{ vote.ip_address }} | {{ vote.vote_timestamp.strftime('%Y-%m-%d %H:%M:%S') if vote.vote_timestamp else 'N/A' }} |
User Agent: {{ device_details[0].user_agent[:100] }}{% if device_details[0].user_agent|length > 100 %}...{% endif %}
Total Votes: {{ device_details|length }}
Unique Fixtures: {{ device_details|map(attribute='fixture_date')|unique|list|length }}
{% endif %}Last 50 votes cast:
| Device ID | Fixture Date | MOTM Vote | DotD Vote | IP Address | Vote Time |
|---|---|---|---|---|---|
| {{ vote.device_id }} | {{ vote.fixture_date }} | {{ vote.motm_player_name }} | {{ vote.dotd_player_name }} | {{ vote.ip_address }} | {{ vote.vote_timestamp.strftime('%Y-%m-%d %H:%M') if vote.vote_timestamp else 'N/A' }} |
No votes have been cast yet, or the device tracking table is empty.