mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-25 01:02:19 +00:00
WIP
This commit is contained in:
parent
988e88211b
commit
54376299d9
3 changed files with 49 additions and 2 deletions
|
@ -63,6 +63,30 @@
|
|||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="logsModal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Details</span></h4><br>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<h5>Message</h5>
|
||||
<figure class="highlight"><pre><code class="zmdi-language-python-alt" role="alert" id="logs_message_span"></code></pre></figure>
|
||||
<h5 id="except_tag">Exception</h5>
|
||||
<figure class="highlight"><pre><code class="zmdi-language-python-alt" role="alert" id="logs_exception_span"></code></pre></figure>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock body %}
|
||||
|
||||
{% block tail %}
|
||||
|
@ -175,6 +199,29 @@
|
|||
table.column(0).search('').draw();
|
||||
}
|
||||
});
|
||||
|
||||
$('#logs').on('click', 'tr', function() {
|
||||
var data = table.row( this ).data();
|
||||
|
||||
$("#logs_message_span").html(data[3]);
|
||||
let exception = data[4];
|
||||
exception = exception.replace(/'/g,"");
|
||||
exception = exception.replace(/\\n\s\s\s\s/g, "\\n  ");
|
||||
exception = exception.replace(/\\n\s\s/g, "\\n ");
|
||||
exception = exception.replace(/\\n/g, "<br />");
|
||||
$("#logs_exception_span").html(exception);
|
||||
if (exception.length > 1) {
|
||||
$('#except_tag').show();
|
||||
$('#logs_exception_span').parent().parent().show();
|
||||
} else {
|
||||
$('#except_tag').hide();
|
||||
$('#logs_exception_span').parent().parent().hide();
|
||||
}
|
||||
$('#logsModal')
|
||||
.modal({
|
||||
focus: false
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{% endblock tail %}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{% endblock bcright %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid" style="padding-top: 3em;">
|
||||
<span id="releases"></span>
|
||||
</div>
|
||||
{% endblock body %}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{% endblock bcright %}
|
||||
|
||||
{% block body %}
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid" style="padding-top: 3em;">
|
||||
<h2>About</h2><hr/>
|
||||
<div class="row">
|
||||
<div class="col-sm-2 text-right">
|
||||
|
|
Loading…
Reference in a new issue