Implement Manticore fully and re-theme
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
{% block content %}
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<h1 class="title is-4">Availability Settings</h1>
|
||||
<h1 class="title is-4">Behavioral Signals</h1>
|
||||
<p class="subtitle is-6">Presence is only one slice. This page exposes the broader behavioral event surface used for timing, read, typing, and response analysis.</p>
|
||||
<form method="post" class="box">
|
||||
{% csrf_token %}
|
||||
<div class="columns is-multiline">
|
||||
@@ -24,44 +25,92 @@
|
||||
</form>
|
||||
|
||||
<div class="box">
|
||||
<h2 class="title is-6">Availability Event Statistics Per Contact</h2>
|
||||
<div class="level mb-3">
|
||||
<div class="level-left">
|
||||
<div>
|
||||
<h2 class="title is-6 mb-1">Behavioral Event Statistics</h2>
|
||||
<p class="help is-size-7">Primary source is `gia_events` in Manticore. When unavailable, this page falls back to Django `ConversationEvent` shadow rows.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-right">
|
||||
<span class="tag is-light">Source: {{ behavioral_stats_source }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tags mb-4">
|
||||
<span class="tag is-info is-light">Contacts: {{ behavioral_totals.contacts }}</span>
|
||||
<span class="tag is-light">Events: {{ behavioral_totals.total_events }}</span>
|
||||
<span class="tag is-light">Presence: {{ behavioral_totals.presence_events }}</span>
|
||||
<span class="tag is-light">Read: {{ behavioral_totals.read_events }}</span>
|
||||
<span class="tag is-light">Typing: {{ behavioral_totals.typing_events }}</span>
|
||||
<span class="tag is-light">Messages: {{ behavioral_totals.message_events }}</span>
|
||||
<span class="tag is-light">Abandoned: {{ behavioral_totals.abandoned_events }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="title is-7">By Transport</h3>
|
||||
<table class="table is-fullwidth is-striped is-size-7 mb-5">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Service</th>
|
||||
<th>Contacts</th>
|
||||
<th>Total</th>
|
||||
<th>Presence</th>
|
||||
<th>Read</th>
|
||||
<th>Typing</th>
|
||||
<th>Messages</th>
|
||||
<th>Abandoned</th>
|
||||
<th>Last Event TS</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in transport_stats %}
|
||||
<tr>
|
||||
<td>{{ row.service }}</td>
|
||||
<td>{{ row.contacts }}</td>
|
||||
<td>{{ row.total_events }}</td>
|
||||
<td>{{ row.presence_events }}</td>
|
||||
<td>{{ row.read_events }}</td>
|
||||
<td>{{ row.typing_events }}</td>
|
||||
<td>{{ row.message_events }}</td>
|
||||
<td>{{ row.abandoned_events }}</td>
|
||||
<td>{{ row.last_event_ts }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan="9">No behavioral transport summaries available.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3 class="title is-7">By Contact</h3>
|
||||
<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>Presence</th>
|
||||
<th>Read</th>
|
||||
<th>Typing</th>
|
||||
<th>Msg Activity</th>
|
||||
<th>Timeout</th>
|
||||
<th>Messages</th>
|
||||
<th>Abandoned</th>
|
||||
<th>Last Event TS</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in contact_stats %}
|
||||
{% for row in behavioral_stats %}
|
||||
<tr>
|
||||
<td>{{ row.person__name }}</td>
|
||||
<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.presence_events }}</td>
|
||||
<td>{{ row.read_events }}</td>
|
||||
<td>{{ row.typing_events }}</td>
|
||||
<td>{{ row.message_activity_events }}</td>
|
||||
<td>{{ row.inferred_timeout_events }}</td>
|
||||
<td>{{ row.message_events }}</td>
|
||||
<td>{{ row.abandoned_events }}</td>
|
||||
<td>{{ row.last_event_ts }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan="13">No availability events found.</td></tr>
|
||||
<tr><td colspan="9">No behavioral events found in either Manticore or ConversationEvent shadow rows.</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
<span class="tag is-light">Messages: {{ counts.messages }}</span>
|
||||
<span class="tag is-light">Queued: {{ counts.queued_messages }}</span>
|
||||
<span class="tag is-light">Events: {{ counts.message_events }}</span>
|
||||
<span class="tag is-info is-light">Behavioral Events: {{ counts.behavioral_event_rows }}</span>
|
||||
<span class="tag is-light">Event Shadow Rows: {{ counts.conversation_event_shadow_rows }}</span>
|
||||
<span class="tag is-light">Workspace: {{ counts.workspace_conversations }}</span>
|
||||
<span class="tag is-light">Snapshots: {{ counts.workspace_snapshots }}</span>
|
||||
<span class="tag is-light">AI Requests: {{ counts.ai_requests }}</span>
|
||||
@@ -71,7 +73,7 @@
|
||||
<div class="control">
|
||||
<input class="input is-small" name="minutes" value="120" type="number" min="1" max="10080">
|
||||
</div>
|
||||
<p class="help is-size-7" title="Use this to check that recent traffic is actually writing canonical events.">Checks whether recent actions were written to `ConversationEvent`.</p>
|
||||
<p class="help is-size-7" title="Use this to check that recent traffic is actually writing canonical events.">Checks whether recent actions were written to the behavioral event ledger in Manticore, with Django shadow rows as fallback context.</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
|
||||
Reference in New Issue
Block a user