Merge branch 'feature/bootstrap5' into nightly

This commit is contained in:
DerLinkman 2022-10-18 14:20:55 +02:00
commit 51b80f6fa1
6 changed files with 29 additions and 21 deletions

View File

@ -248,7 +248,7 @@ class DockerUtils:
for container in (await self.docker_client.containers.list()):
if container._id == container_id:
postcat_exec = await container.exec(["/bin/bash", "-c", "/usr/sbin/postcat -q " + sanitized_string], user='postfix')
return exec_run_handler('utf8_text_only', postcat_exec)
return await exec_run_handler('utf8_text_only', postcat_exec)
# api call: container_post - post_action: exec - cmd: mailq - task: unhold
async def container_post__exec__mailq__unhold(self, container_id, request_json):

View File

@ -6,6 +6,9 @@ jQuery(function($){
$('#' + table_name).DataTable().ajax.reload();
});
function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e<B.length-1);return i.toFixed(1)+" "+B[e]}
// Queue item
$('#showQueuedMsg').on('show.bs.modal', function (e) {
$('#queue_msg_content').text(lang.loading);
@ -18,6 +21,7 @@ jQuery(function($){
url: '/api/v1/get/postcat/' + button.data('queue-id'),
dataType: 'text',
complete: function (data) {
console.log(data);
$('#queue_msg_content').text(data.responseText);
}
});
@ -78,7 +82,7 @@ jQuery(function($){
defaultContent: ''
},
{
title: lang.arrival_time,
title: lang_admin.arrival_time,
data: 'arrival_time',
defaultContent: '',
render: function (data, type){
@ -87,7 +91,7 @@ jQuery(function($){
}
},
{
title: lang.message_size,
title: lang_admin.message_size,
data: 'message_size',
defaultContent: '',
render: function (data, type){
@ -95,17 +99,17 @@ jQuery(function($){
}
},
{
title: lang.sender,
title: lang_admin.sender,
data: 'sender',
defaultContent: ''
},
{
title: lang.recipients,
title: lang_admin.recipients,
data: 'recipients',
defaultContent: ''
},
{
title: lang.action,
title: lang_admin.action,
data: 'action',
className: 'text-md-end dt-sm-head-hidden dt-body-right',
defaultContent: ''

View File

@ -19,6 +19,7 @@ $template_data = [
'acl_json' => json_encode($_SESSION['acl']),
'role' => $role,
'lang_admin' => json_encode($lang['admin']),
'lang_queue' => json_encode($lang['queue']),
'lang_datatables' => json_encode($lang['datatables'])
];

View File

@ -233,20 +233,6 @@
</div>
</div>
</div><!-- test transport modal -->
<!-- show queue item modal -->
<div class="modal fade" id="showQueuedMsg" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title"><i class="bi bi-card-checklist" style="font-size:18px"></i> ID <span id="queue_id"></span></h3>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<textarea class="form-control" id="queue_msg_content" name="content" rows="40"></textarea>
</div>
</div>
</div>
</div><!-- show queue item modal -->
<!-- priv key modal -->
<div class="modal fade" id="showDKIMprivKey" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">

View File

@ -0,0 +1,14 @@
<!-- show queue item modal -->
<div class="modal fade" id="showQueuedMsg" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title"><i class="bi bi-card-checklist" style="font-size:18px"></i> ID <span id="queue_id"></span></h3>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<textarea class="form-control" id="queue_msg_content" name="content" rows="40"></textarea>
</div>
</div>
</div>
</div><!-- show queue item modal -->

View File

@ -41,8 +41,11 @@
</div>
</div>
{% include 'modals/queue.twig' %}
<script type='text/javascript'>
var lang = {{ lang_admin|raw }};
var lang_admin = {{ lang_admin|raw }};
var lang = {{ lang_queue|raw }};
var lang_datatables = {{ lang_datatables|raw }};
var csrf_token = '{{ csrf_token }}';
var pagination_size = '{{ pagination_size }}';