Fixes in scripts
This commit is contained in:
parent
cda8eb1232
commit
25d98341ac
3 changed files with 32 additions and 3 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<%inherit file="dashboard.phtml"/>
|
||||
<%block name="content">
|
||||
<p><a href="${url_for('.pastafari2_dashboard')}">${lang('pastafari2', 'servers', 'Servers')}</a> >> ${lang('pastafari2', 'task_progress', 'Task progress')}</p>
|
||||
<h2>${name_task}</h2>
|
||||
<p>${description_task}</p>
|
||||
<hr />
|
||||
|
|
@ -16,12 +17,15 @@
|
|||
<div id="finished" style="display:none;">
|
||||
<p><strong>All tasks were finished.</strong></p>
|
||||
</div>
|
||||
<p><a href="${url_for('.pastafari2_dashboard')}">${lang('pastafari2', 'servers', 'Servers')}</a> >> ${lang('pastafari2', 'task_progress', 'Task progress')}</p>
|
||||
</%block>
|
||||
<%block name="jscript_block">
|
||||
<script>
|
||||
|
||||
ids=[];
|
||||
|
||||
task_completed=0;
|
||||
|
||||
//Get all tasks, next process 50 next progress.
|
||||
$.ajax({
|
||||
url: "${url_for('.pastafari2_get_servers_task')}",
|
||||
|
|
@ -56,7 +60,7 @@ $.ajax({
|
|||
function get_log() {
|
||||
|
||||
$.ajax({
|
||||
url: "${url_for('.pastafari2_get_multiprogress')}",
|
||||
url: "${url_for('.pastafari2_get_multiprogress')}?position=",
|
||||
data: {ids: JSON.stringify(ids)},
|
||||
success: function (data) {
|
||||
|
||||
|
|
@ -78,6 +82,10 @@ function get_log() {
|
|||
|
||||
if(data[i].status==1) {
|
||||
|
||||
task_completed++;
|
||||
|
||||
|
||||
|
||||
if(data[i].error==0) {
|
||||
|
||||
$('#task_'+data[i].task_id).find('i').removeClass('fa-cog fa-spin fa-fw').addClass('fa-check');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue