<commit_before>{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block styles %}
{{super()}}
<link rel="stylesheet" href="{{url_for('static', filename='monitor/home.css')}}">
{% endblock %}

{% block page_content %}
	<div class="monitor">
		<div class="panel panel-primary">
			<div class="panel-heading">
				<h3 class="form-heading">Current Configuration Status</h3>
			</div>
			<div class="panel-body">
			{% if configuration %}
				<h3>Current configuration '{{configuration.name}}'</h3>
				{% if configuration.active %}
				<h3>
					Alarm Active
					{% if current_user.is_alarm_setter() %}
					{# TODO add confirm box #}
					<a class="btn btn-primary" href="{{ url_for('monitor.deactivate_config') }}" role="button">Deactivate</a>
					{% endif %}
				</h3>
				{% else %}
				<h3>
					Alarm Not Active
					{% if current_user.is_alarm_setter() %}
					{# TODO add confirm box #}
					<a class="btn btn-primary" href="{{ url_for('monitor.activate_config') }}" role="button">Activate</a>
					{% endif %}
				</h3>
				{% endif %}
				{# TODO show events history #}
				{# TODO link/button to access realtime status (on map when possible) #}
			{% else %}
				<h3>No current configuration created yet!</h3>
			{% endif %}
			</div>
		</div>
	</div>
{% endblock %}
<commit_msg>Added confirmation box for alarm activation/deactivation.<commit_after>{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block styles %}
{{super()}}
<link rel="stylesheet" href="{{url_for('static', filename='monitor/home.css')}}">
{% endblock %}

{% block page_content %}
	<div class="monitor">
		<div class="panel panel-primary">
			<div class="panel-heading">
				<h3 class="form-heading">Current Configuration Status</h3>
			</div>
			<div class="panel-body">
			{% if configuration %}
				<h3>Current configuration '{{configuration.name}}'</h3>
				{% if configuration.active %}
				<h3>
					Alarm Active
					{% if current_user.is_alarm_setter() %}
					{# TODO add confirm box #}
					<a	class="btn btn-primary" role="button" 
						href="{{ url_for('monitor.deactivate_config') }}"
						onclick="return window.confirm('Are you sure you want to deactivate the alarm system?');">
						Deactivate
					</a>
					{% endif %}
				</h3>
				{% else %}
				<h3>
					Alarm Not Active
					{% if current_user.is_alarm_setter() %}
					{# TODO add confirm box #}
					<a	class="btn btn-primary" role="button" 
						href="{{ url_for('monitor.activate_config') }}"
						onclick="return window.confirm('Are you sure you want to activate the alarm system?');">
						Activate
					</a>
					{% endif %}
				</h3>
				{% endif %}
				{# TODO show events history #}
				{# TODO link/button to access realtime status (on map when possible) #}
			{% else %}
				<h3>No current configuration created yet!</h3>
			{% endif %}
			</div>
		</div>
	</div>
{% endblock %}

{'fraction_non_alphanumeric': 0.17923875432525951, 'fraction_numerical': 0.006920415224913495, 'mean_word_length': 3.2640117994100293, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '241742', 'n_tokens_mistral': 1227, 'n_tokens_neox': 931, 'n_words': 231}