102 lines
2.2 KiB
PHTML
102 lines
2.2 KiB
PHTML
<ul class="chemin clearfix rounded_t">
|
|
<li class="e0"><a class="lir" href="/">Accueil</a></li>
|
|
<li>
|
|
<a href="<?=$this->url(array('controller'=>'dashboard', 'action'=>'index'))?>">
|
|
<span>Tableau de bord</span>
|
|
</a>
|
|
</li>
|
|
<li class="last">
|
|
<span>Enrichissements</span>
|
|
</li>
|
|
</ul>
|
|
|
|
<div id="dashboard">
|
|
|
|
<h2>Fichiers en cours d'enrichissement</h2>
|
|
|
|
<?php if(count($this->encours) > 0):?>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Référence</th>
|
|
<th>Nombre de lignes totales</th>
|
|
<th>Nombre de lignes traitées</th>
|
|
<th>Date</th>
|
|
<th>Etat</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php $i=0; foreach($this->encours as $item):?>
|
|
<tr>
|
|
<td><?=$item['reference']?></td>
|
|
<td><?=number_format($item['nbLigneTotales'], 0, ',', ' ')?></td>
|
|
<td><?=number_format($item['nbLigneTraites'], 0, ',', ' ')?></td>
|
|
<td><?=$item['dateAdded']?></td>
|
|
<td>
|
|
<?php if ( $item['dateStart']!='0000-00-00 00:00:00' ) {?>
|
|
En cours de traitement
|
|
<?php } else {?>
|
|
En attente de traitement
|
|
<?php } ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach;?>
|
|
</tbody>
|
|
</table>
|
|
<?php else:?>
|
|
<p>Aucun enrichissement en cours.<p>
|
|
<?php endif;?>
|
|
|
|
<h2>Fichiers enrichis</h2>
|
|
|
|
<?php if(count($this->fini) > 0):?>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Référence</th>
|
|
<th>Nombre de lignes totales</th>
|
|
<th>Date</th>
|
|
<th>Fichier</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach($this->fini as $item):?>
|
|
<tr>
|
|
<td><?=$item['reference']?></td>
|
|
<td><?=number_format($item['nbLigneTotales'], 0, ',', ' ')?></td>
|
|
<td><?=$item['dateAdded']?></td>
|
|
<td><a href="/enrichissement/download/id/<?php echo $item['id'];?>"><?php echo $item['fichier']; ?></a></td>
|
|
</tr>
|
|
<?php endforeach;?>
|
|
</tbody>
|
|
</table>
|
|
<?php else:?>
|
|
<p>Aucun enrichissement.<p>
|
|
<?php endif;?>
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function()
|
|
{
|
|
$(document).focusin(function(){
|
|
timer = setInterval(updateInfo, 10000);
|
|
});
|
|
$(document).focusout(function(){
|
|
clearInterval(timer);
|
|
});
|
|
timer = setInterval(updateInfo, 10000);
|
|
});
|
|
|
|
var timer;
|
|
function updateInfo()
|
|
{
|
|
$('tr.encours').each(function(){
|
|
var objet = $(this);
|
|
var id = $(this).attr('id');
|
|
$.getJSON('/index/getinfo', {id: id}, function(data){
|
|
if (data!=''){ objet.find('td.ligne').text(data.nbLigneT); }
|
|
});
|
|
});
|
|
}
|
|
</script>
|