72 lines
3.1 KiB
HTML
72 lines
3.1 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<section class="section">
|
|
<div class="container">
|
|
<h1 class="title is-4">Availability Settings</h1>
|
|
<form method="post" class="box">
|
|
{% csrf_token %}
|
|
<div class="columns is-multiline">
|
|
<div class="column is-3"><label class="checkbox"><input type="checkbox" name="enabled" {% if settings_row.enabled %}checked{% endif %}> Enabled</label></div>
|
|
<div class="column is-3"><label class="checkbox"><input type="checkbox" name="show_in_chat" {% if settings_row.show_in_chat %}checked{% endif %}> Show In Chat</label></div>
|
|
<div class="column is-3"><label class="checkbox"><input type="checkbox" name="show_in_groups" {% if settings_row.show_in_groups %}checked{% endif %}> Show In Groups</label></div>
|
|
<div class="column is-3"><label class="checkbox"><input type="checkbox" name="inference_enabled" {% if settings_row.inference_enabled %}checked{% endif %}> Inference Enabled</label></div>
|
|
<div class="column is-3">
|
|
<label class="label is-size-7">Retention Days</label>
|
|
<input class="input is-small" type="number" min="1" name="retention_days" value="{{ settings_row.retention_days }}">
|
|
</div>
|
|
<div class="column is-3">
|
|
<label class="label is-size-7">Fade Threshold (seconds)</label>
|
|
<input class="input is-small" type="number" min="30" name="fade_threshold_seconds" value="{{ settings_row.fade_threshold_seconds }}">
|
|
</div>
|
|
</div>
|
|
<button class="button is-link is-small" type="submit">Save</button>
|
|
</form>
|
|
|
|
<div class="box">
|
|
<h2 class="title is-6">Availability Event Statistics Per Contact</h2>
|
|
<table class="table is-fullwidth is-striped is-size-7">
|
|
<thead>
|
|
<tr>
|
|
<th>Contact</th>
|
|
<th>Service</th>
|
|
<th>Total</th>
|
|
<th>Available</th>
|
|
<th>Fading</th>
|
|
<th>Unavailable</th>
|
|
<th>Unknown</th>
|
|
<th>Native</th>
|
|
<th>Read</th>
|
|
<th>Typing</th>
|
|
<th>Msg Activity</th>
|
|
<th>Timeout</th>
|
|
<th>Last Event TS</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in contact_stats %}
|
|
<tr>
|
|
<td>{{ row.person__name }}</td>
|
|
<td>{{ row.service }}</td>
|
|
<td>{{ row.total_events }}</td>
|
|
<td>{{ row.available_events }}</td>
|
|
<td>{{ row.fading_events }}</td>
|
|
<td>{{ row.unavailable_events }}</td>
|
|
<td>{{ row.unknown_events }}</td>
|
|
<td>{{ row.native_presence_events }}</td>
|
|
<td>{{ row.read_receipt_events }}</td>
|
|
<td>{{ row.typing_events }}</td>
|
|
<td>{{ row.message_activity_events }}</td>
|
|
<td>{{ row.inferred_timeout_events }}</td>
|
|
<td>{{ row.last_event_ts }}</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr><td colspan="13">No availability events found.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|