%PDF- %PDF-
| Direktori : /opt/pyxsoft/templates/scanner/ |
| Current File : //opt/pyxsoft/templates/scanner/scan_in_progress.tmpl |
{% extends "template-base/index.tmpl" %}
{% block HTMLTitle %}{{ HTMLTitle }}{% endblock %}
{% block PageTitle %}{{ PageTitle }}{% endblock %}
{% block contenido %}
<div>
<div class="panel" style="margin: 24px auto">
<div class="panel-title">{{ Tr(Lang,"scanall.scan_in_progress") }}</div>
<div class="panel-body">
<p>{{ Tr(Lang,"scanall.scan_progress_message")|safe}}</p>
<p>{{ Tr(Lang,"scanall.scan_progress_message2")|safe}}</p>
<hr />
<p class="text-center"><strong>{{ Tr(Lang,"scanall.general_progress",globalProgress) }}</strong></p>
<div class="progress">
<div class="progress-bar progress-bar-info progress-bar-striped active" style="width: {{ globalProgress }}%"></div>
</div>
<p class="text-center" style="margin-top: 6px">{{ Tr(Lang,"scanall.scanning_account", currentAccount) }}</p>
<div style="background-color: whitesmoke; border: #1a1f23 1px solid; padding: 8px;">
<strong>{{ Tr(Lang,"scanall.currently_scanning") }}</strong><br><br>
{% for v in progressDetails.ThreadWork %}
{% if forloop.Counter0 < progressDetails.Threads %}
Thread #{{ forloop.Counter0 }}: {{ v }}<br>
{% endif %}
{% endfor %}
</div>
</div>
<div class="panel-footer">
<div style="text-align: right">
<button type="button" name="refresh" id="btnRefresh" value="stop" class="btn btn-primary">{{ Tr(Lang,"scanall.refresh") }}</button>
<button type="button" name="stop" value="stop" class="btn btn-danger">{{ Tr(Lang,"scanall.scan_stop") }}</button>
</div>
</div>
</div>
</div>
{% endblock %}
{% block finalScripts %}
<script>
$("[name='stop']").on("click", function () {
urlPost = '/scaninprogress/stop';
$(this).attr("disabled", "disabled");
$(this).text('Stopping');
$.ajax({
url: urlPost,
type: 'POST',
data: jQuery.param({ stop:"Yes"}),
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
success: function (response) {
// $.growl({ title: "Success", message: "Your file was deleted!", style: "notice", size: "large" });
location.href = "/scanall"
},
error: function () {
//Do Something
location.href = "/scanall"
}
});
});
$("#btnRefresh").on("click", function() {
location.reload();
});
$(function() {
var myVar = setInterval(myTimer, 1000);
myTimer.currentTime=8;
});
function myTimer() {
var d = myTimer.currentTime-1;
if (d==0) {
location.reload();
return;
}
$("#btnRefresh").html('{{ Tr(Lang,"scanall.refresh") }} ' + d);
myTimer.currentTime=d
}
</script>
{% endblock %}