2023-08-18 09:05:21 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
2023-11-02 15:28:33 +00:00
|
|
|
<title>Sub-Channel Messages - AIL</title>
|
2023-08-18 09:05:21 +00:00
|
|
|
<link rel="icon" href="{{ url_for('static', filename='image/ail-icon.png') }}">
|
|
|
|
|
|
|
|
<!-- Core CSS -->
|
|
|
|
<link href="{{ url_for('static', filename='css/bootstrap4.min.css') }}" rel="stylesheet">
|
|
|
|
<link href="{{ url_for('static', filename='css/font-awesome.min.css') }}" rel="stylesheet">
|
|
|
|
<link href="{{ url_for('static', filename='css/dataTables.bootstrap.min.css') }}" rel="stylesheet">
|
|
|
|
{# <link href="{{ url_for('static', filename='css/daterangepicker.min.css') }}" rel="stylesheet">#}
|
|
|
|
|
|
|
|
<!-- JS -->
|
|
|
|
<script src="{{ url_for('static', filename='js/jquery.js')}}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/popper.min.js')}}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/bootstrap4.min.js')}}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/jquery.dataTables.min.js')}}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/dataTables.bootstrap.min.js')}}"></script>
|
|
|
|
{# <script src="{{ url_for('static', filename='js/moment.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/jquery.daterangepicker.min.js') }}"></script>#}
|
|
|
|
<script src="{{ url_for('static', filename='js/d3.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/d3/sparklines.js')}}"></script>
|
2024-03-05 09:56:36 +00:00
|
|
|
<script src="{{ url_for('static', filename='js/d3/heatmap_week_hour.js')}}"></script>
|
2023-08-18 09:05:21 +00:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.chat-message-left,
|
|
|
|
.chat-message-right {
|
|
|
|
display: flex;
|
|
|
|
flex-shrink: 0;
|
|
|
|
}
|
|
|
|
.chat-message-right {
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
margin-left: auto
|
|
|
|
}
|
2023-11-06 13:08:23 +00:00
|
|
|
.divider:after,
|
|
|
|
.divider:before {
|
|
|
|
content: "";
|
|
|
|
flex: 1;
|
|
|
|
height: 2px;
|
|
|
|
background: #eee;
|
|
|
|
}
|
2023-08-18 09:05:21 +00:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
{% include 'nav_bar.html' %}
|
|
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
{% include 'sidebars/sidebar_objects.html' %}
|
|
|
|
|
|
|
|
<div class="col-12 col-lg-10" id="core_content">
|
|
|
|
|
2024-03-19 10:11:56 +00:00
|
|
|
{% with meta=subchannel %}
|
|
|
|
{% include 'chats_explorer/card_chat_subchannel.html' %}
|
|
|
|
{% endwith %}
|
2023-12-04 09:26:02 +00:00
|
|
|
|
|
|
|
{% if subchannel['threads'] %}
|
|
|
|
<table id="tablethreads" class="table">
|
|
|
|
<thead class="bg-dark text-white">
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Created at</th>
|
|
|
|
<th>First seen</th>
|
|
|
|
<th>Last seen</th>
|
|
|
|
<th>Nb Messages</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
{% for thread in subchannel['threads'] %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
2024-03-05 13:14:04 +00:00
|
|
|
<a href="{{ url_for('chats_explorer.objects_thread_messages')}}?subtype={{ thread['subtype'] }}&id={{ thread['id'] }}">{{ thread['name'] }} <i class="far fa-comment"></i> {{ thread['nb_messages'] }} Messages</a>
|
2023-12-04 09:26:02 +00:00
|
|
|
</td>
|
|
|
|
<td>{{ thread["created_at"] }}</td>
|
|
|
|
<td>
|
|
|
|
{% if thread['first_seen'] %}
|
|
|
|
{{ thread['first_seen'][0:4] }}-{{ thread['first_seen'][4:6] }}-{{ thread['first_seen'][6:8] }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% if thread['last_seen'] %}
|
|
|
|
{{ thread['last_seen'][0:4] }}-{{ thread['last_seen'][4:6] }}-{{ thread['last_seen'][6:8] }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>{{ thread['nb_messages'] }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
|
2023-11-06 13:08:23 +00:00
|
|
|
{% for tag in subchannel['tags_messages'] %}
|
|
|
|
<span class="badge badge-{{ bootstrap_label[loop.index0 % 5] }}">{{ tag }} <span class="badge badge-light">{{ subchannel['tags_messages'][tag] }}</span></span>
|
2023-11-02 15:28:33 +00:00
|
|
|
{% endfor %}
|
|
|
|
|
2024-03-05 09:56:36 +00:00
|
|
|
<h5 class="mx-5 mt-2 text-secondary">All Messages:</h5>
|
|
|
|
<div id="heatmapweekhourall"></div>
|
|
|
|
|
|
|
|
<h5 class="mx-5 text-secondary">This week:</h5>
|
|
|
|
<div id="heatmapweekhour"></div>
|
|
|
|
|
2023-11-02 15:28:33 +00:00
|
|
|
<div>
|
|
|
|
<div class="list-group d-inline-block">
|
|
|
|
{% for date in messages %}
|
|
|
|
<a class="list-group-item list-group-item-action" href="#date_section_{{ date }}">{{ date }}</a>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-11-16 13:50:03 +00:00
|
|
|
<span class="mt-3">
|
|
|
|
{% include 'objects/image/block_blur_img_slider.html' %}
|
|
|
|
</span>
|
2024-03-05 13:14:04 +00:00
|
|
|
{% with translate_url=url_for('chats_explorer.objects_subchannel_messages', subtype=subchannel['subtype']), obj_id=subchannel['id'], pagination=subchannel['pagination'] %}
|
2023-12-04 14:47:58 +00:00
|
|
|
{% include 'chats_explorer/block_translation.html' %}
|
|
|
|
{% endwith %}
|
2023-12-10 23:46:15 +00:00
|
|
|
{% with obj_subtype=subchannel['subtype'], obj_id=subchannel['id'], url_endpoint=url_for("chats_explorer.objects_subchannel_messages"), nb=subchannel['pagination']['nb'] %}
|
|
|
|
{% set date_from=subchannel['first_seen'] %}
|
|
|
|
{% set date_to=subchannel['last_seen'] %}
|
|
|
|
{% include 'block_obj_time_search.html' %}
|
|
|
|
{% endwith %}
|
2024-03-05 13:14:04 +00:00
|
|
|
{% with endpoint_url=url_for('chats_explorer.objects_subchannel_messages', subtype=subchannel['subtype']), pagination=subchannel['pagination'] %}
|
2023-12-10 23:46:15 +00:00
|
|
|
{% set endpoint_url = endpoint_url + "&id=" + subchannel['id'] + "&nb=" + subchannel['pagination']['nb'] | string %}
|
|
|
|
{% if translation_target %}
|
|
|
|
{% set endpoint_url = endpoint_url + "&target=" + translation_target %}
|
|
|
|
{% endif %}
|
|
|
|
{% include 'chats_explorer/pagination.html' %}
|
|
|
|
{% endwith %}
|
2023-11-16 13:50:03 +00:00
|
|
|
|
2023-08-18 09:05:21 +00:00
|
|
|
<div class="position-relative">
|
2023-11-06 13:08:23 +00:00
|
|
|
<div class="chat-messages p-2">
|
2023-08-18 09:05:21 +00:00
|
|
|
|
2023-11-02 15:28:33 +00:00
|
|
|
{% for date in subchannel['messages'] %}
|
2023-11-06 13:08:23 +00:00
|
|
|
|
|
|
|
<div class="divider d-flex align-items-center mb-4">
|
|
|
|
<p class="text-center h2 mx-3 mb-0" style="color: #a2aab7;">
|
|
|
|
<span class="badge badge-secondary mb-2" id="date_section_{{ date }}">{{ date }}</span>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
2023-11-02 15:28:33 +00:00
|
|
|
{% for mess in subchannel['messages'][date] %}
|
2023-08-18 09:05:21 +00:00
|
|
|
|
2023-11-16 13:50:03 +00:00
|
|
|
{% with message=mess %}
|
|
|
|
{% include 'chats_explorer/block_message.html' %}
|
|
|
|
{% endwith %}
|
2023-08-18 09:05:21 +00:00
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
<br>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-03-05 13:14:04 +00:00
|
|
|
{% with endpoint_url=url_for('chats_explorer.objects_subchannel_messages', subtype=subchannel['subtype']), pagination=subchannel['pagination'] %}
|
2023-12-10 23:46:15 +00:00
|
|
|
{% set endpoint_url = endpoint_url + "&id=" + subchannel['id'] + "&nb=" + subchannel['pagination']['nb'] | string %}
|
|
|
|
{% if translation_target %}
|
|
|
|
{% set endpoint_url = endpoint_url + "&target=" + translation_target %}
|
|
|
|
{% endif %}
|
|
|
|
{% include 'chats_explorer/pagination.html' %}
|
|
|
|
{% endwith %}
|
|
|
|
|
2023-08-18 09:05:21 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
var chart = {};
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#page-Decoded").addClass("active");
|
|
|
|
$("#nav_chat").addClass("active");
|
2023-12-04 09:26:02 +00:00
|
|
|
{% if subchannel['threads'] %}
|
|
|
|
$('#tablethreads').DataTable({
|
|
|
|
"aLengthMenu": [[5, 10, 15, -1], [5, 10, 15, "All"]],
|
|
|
|
"iDisplayLength": 10,
|
|
|
|
"order": [[ 3, "desc" ]]
|
|
|
|
});
|
|
|
|
{% endif %}
|
2023-08-18 09:05:21 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
function toggle_sidebar(){
|
|
|
|
if($('#nav_menu').is(':visible')){
|
|
|
|
$('#nav_menu').hide();
|
|
|
|
$('#side_menu').removeClass('border-right')
|
|
|
|
$('#side_menu').removeClass('col-lg-2')
|
|
|
|
$('#core_content').removeClass('col-lg-10')
|
|
|
|
}else{
|
|
|
|
$('#nav_menu').show();
|
|
|
|
$('#side_menu').addClass('border-right')
|
|
|
|
$('#side_menu').addClass('col-lg-2')
|
|
|
|
$('#core_content').addClass('col-lg-10')
|
|
|
|
}
|
|
|
|
}
|
2024-03-05 09:56:36 +00:00
|
|
|
|
|
|
|
d3.json("{{ url_for('chats_explorer.chats_explorer_messages_stats_week_all') }}?type=chat-subchannel&subtype={{ subchannel['subtype'] }}&id={{ subchannel['id'] }}")
|
|
|
|
.then(function(data) {
|
|
|
|
create_heatmap_week_hour('#heatmapweekhourall', data);
|
|
|
|
})
|
|
|
|
|
|
|
|
d3.json("{{ url_for('chats_explorer.chats_explorer_messages_stats_week') }}?type=chat-subchannel&subtype={{ subchannel['subtype'] }}&id={{ subchannel['id'] }}")
|
|
|
|
.then(function(data) {
|
|
|
|
create_heatmap_week_hour('#heatmapweekhour', data);
|
|
|
|
})
|
|
|
|
|
2023-08-18 09:05:21 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|