/trunk/interfaces/index.php |
---|
28,7 → 28,6 |
<script type="text/javascript" src="interfaces/squelettes/js/jquery-1.4.2.min.js"></script> |
<script type="text/javascript" src="interfaces/squelettes/js/jquery-ui-1.8.2.custom.min.js"></script> |
<script type="text/javascript" src="interfaces/squelettes/js/jquery.chromatable.js"></script> |
</head> |
<body xml:lang="fr" lang="fr"> |
<div id="zone-centrale"> |
/trunk/interfaces/squelettes/form_tests.tpl.html |
---|
8,8 → 8,6 |
} |
return ok; |
}); |
// Rend les tables portant la classe "defilante" srollable |
$('.defilante').chromatable(); |
}); |
</script> |
<h1>Tests du référentiel « <?=$ref;?> »</h1> |
40,7 → 38,7 |
<?php endif; ?> |
<h2>Tests</h2> |
<table class="defilante"> |
<table> |
<caption>Traitements <?=strftime('à %H:%M:%S le %d %B %Y')?></caption> |
<thead> |
<tr> |
/trunk/interfaces/squelettes/css/referentiel/referentiel.css |
---|
54,19 → 54,16 |
hr{ |
color:#62210F;} |
table{ |
border-collapse: collapse; |
width:100%; |
margin:0;} |
border-collapse:collapse;} |
table{ |
border:1px solid #36560B; |
border-collapse: collapse;} |
td,th{ |
border:1px solid #36560B; |
padding:7px 5px;} |
th{ |
background-color:#EEE;} |
padding:5px;} |
caption{ |
border:1px solid #36560B; |
background-color:#EEE; |
font-weight:bold; |
padding:2px;} |
margin:2px;} |
img{ |
border:0;} |
img a{ |
/trunk/interfaces/squelettes/form_version.tpl.html |
---|
8,8 → 8,6 |
} |
return ok; |
}); |
// Rend les tables portant la classe "defilante" srollable |
$('.defilante').chromatable(); |
}); |
</script> |
<h1>Versionnage du référentiel « <?=$ref?> »</h1> |
152,7 → 150,7 |
<h2>Versions</h2> |
<table class="defilante"> |
<table> |
<caption>Versions <?=strftime('à %H:%M:%S le %d %B %Y')?></caption> |
<thead> |
<tr> |
/trunk/interfaces/squelettes/js/jquery.chromatable.js |
---|
File deleted |
\ No newline at end of file |
/trunk/interfaces/squelettes/traitement.tpl.html |
---|
13,49 → 13,31 |
<?php endforeach; ?> |
<?php endif; ?> |
<?php if (isset($urls_zip)) : ?> |
<h2>Téléchargements</h2> |
<ul> |
<?php foreach ($urls_zip as $nom => $url) : ?> |
<li><a href="<?=$url?>"><?=$nom?></a></li> |
<?php endforeach; ?> |
</ul> |
<?php endif; ?> |
<h2>Résultats</h2> |
<?php if (isset($resultats)) : ?> |
<?php if ($traitement['script'] == 'tests') : ?> |
<table id="resultats"> |
<caption>Résultats</caption> |
<thead> |
<tr> |
<th>Numero</th> |
<th>Nom</th> |
<th>Résultat</th> |
<th>Description</th> |
</tr> |
</thead> |
<tbody> |
<?php $i=1; ?> |
<?php foreach ($resultats as $resultat) : ?> |
<tr> |
<td class="numero <?=$resultat['resultat'] ? 'ok' : 'ko';?>" title="Id:<?=$resultat['id_resultat']?>"><?=$i++?></td> |
<td class="nom <?=$resultat['resultat'] ? 'ok' : 'ko';?>"><a href="<?=$resultat['url']?>"><?=$resultat['nom']?></a></td> |
<td class="<?=$resultat['resultat'] ? 'ok' : 'ko';?>"><span class="resultat"><?=$resultat['resultat'] ? 'ok' : 'ko';?></span></td> |
<td class="description"><?=$resultat['description']?></td> |
</tr> |
<?php endforeach; ?> |
</tbody> |
</table> |
<?php endif; ?> |
<?php if ($traitement['script'] == 'versionnage') : ?> |
<?php $i=1; ?> |
<?php foreach ($resultats as $resultat) : ?> |
<h3><?=$resultat['nom']?> (Id:<?=$resultat['id_resultat']?>)</h3> |
<p><?=$resultat['message']?></p> |
<?php endforeach; ?> |
<?php endif; ?> |
<table id="resultats"> |
<caption>Résultats</caption> |
<thead> |
<tr> |
<th>Numero</th> |
<th>Nom</th> |
<th>Résultat</th> |
<th>Description</th> |
</tr> |
</thead> |
<tbody> |
<?php $i=1; ?> |
<?php foreach ($resultats as $resultat) : ?> |
<tr> |
<td class="numero <?=$resultat['resultat'] ? 'ok' : 'ko';?>" title="Id:<?=$resultat['id_resultat']?>"><?=$i++?></td> |
<td class="nom <?=$resultat['resultat'] ? 'ok' : 'ko';?>"><a href="<?=$resultat['url']?>"><?=$resultat['nom']?></a></td> |
<td class="<?=$resultat['resultat'] ? 'ok' : 'ko';?>"><span class="resultat"><?=$resultat['resultat'] ? 'ok' : 'ko';?></span></td> |
<td class="description"><?=$resultat['description']?></td> |
</tr> |
<?php endforeach; ?> |
</tbody> |
</table> |
<?php else : ?> |
<p class="information">Aucun resultat pour ce traitement.</p> |
<p class="information">Aucun resultat pour ce traitement.</p> |
<?php endif; ?> |
<!-- REF - FIN TRAITEMENT --> |
/trunk/interfaces/controleurs/Versionnage.php |
---|
59,7 → 59,6 |
$donnees['url_action_rafraichir'] = 'afficherInterface'; |
$donnees['version'] = $this->instancierChampsVersionnage(); |
$donnees['version'] = $this->traiterCasesACocher($donnees['version']); |
// Récupération des paramètres de configuration du manuel des référentiels |
$donnees['domaine_geo'] = explode(';', $this->manuel['domaine_geo']); |
102,6 → 101,7 |
foreach ($this->version as $champ) { |
if (isset($_POST[$champ])) { |
$version[$champ] = $this->supprimerSlash($_POST[$champ]); |
$version[$champ] = $this->traiterCasesACocher($version[$champ]); |
} else { |
$version[$champ] = $this->getValeurParDefaut($champ); |
110,6 → 110,13 |
return $version; |
} |
private function traiterCasesACocher($valeur_post) { |
if (is_array($valeur_post)) { |
$valeur_post = array_flip($valeur_post); |
} |
return $valeur_post; |
} |
public function getValeurParDefaut($champ) { |
$valeur = ''; |
if ('date_prod' == $champ) { |
117,16 → 124,6 |
} |
return $valeur; |
} |
private function traiterCasesACocher(Array $donnees) { |
foreach ($donnees as $cle => $valeur) { |
if (is_array($valeur)) { |
$this->traiterEsperluette($valeur); |
$donnees[$cle] = array_flip($valeur); |
} |
} |
return $donnees; |
} |
/** |
* Lance l'ajout d'un traitement |
/trunk/interfaces/controleurs/AppliControleur.php |
---|
150,9 → 150,11 |
protected function supprimerSlash($doc) { |
if (is_string($doc)) { |
$doc = stripslashes($doc); |
} else if (is_array($doc) && count($doc) > 0) { |
foreach ($doc as $cle => $valeur) { |
$doc[$cle] = $this->supprimerSlash($valeur); |
} else if (is_array($doc)) { |
if (count($doc) > 0) { |
foreach ($doc as $cle => $valeur) { |
$doc[$cle] = $this->supprimerSlash($valeur); |
} |
} |
} |
return $doc; |
/trunk/interfaces/controleurs/Traitement.php |
---|
15,7 → 15,6 |
class Traitement extends AppliControleur { |
private $referentiel = null; |
private $traitement = null; |
private $traitementId = null; |
private $traitementDao = null; |
private $resultatDao = null; |
58,15 → 57,11 |
// Recherche d'info sur le traitement |
$infos = $this->traitementDao->getInfos($this->traitementId); |
if ($infos != false) { |
$this->traitement = $infos; |
$donnees['traitement'] = $this->traitement; |
$donnees['traitement'] = $infos; |
} else { |
$this->addMessage("L'identifiant de traitement n'est pas indexé dans la base de données."); |
} |
// Spécificité du script de versionnage |
$donnees['urls_zip'] = $this->traiterScriptVersionnage(); |
// Recherche des résultats du traitement |
$infos = $this->resultatDao->getResultatsTraitement($this->traitementId); |
if ($infos != false) { |
86,30 → 81,5 |
$this->construireMenu($this->referentiel); |
$this->construireFilAriane($this->referentiel, $this->traitementId); |
} |
private function traiterScriptVersionnage() { |
$urls_zip = null; |
if (isset($this->traitement['script']) && $this->traitement['script'] == 'versionnage') { |
$meta = unserialize($this->traitement['script_parametres']); |
$projet = strtolower($this->traitement['referentiel_code']); |
$version = str_replace('.', '_', $meta['version']); |
$fichier_zip_bdnt = $projet.'_v'.$version.'.zip'; |
$fichier_zip_partiel = $projet.'_v'.$version.'_partiel.zip'; |
$url_zip_bdnt = sprintf(Config::get('url_zip_tpl'), $fichier_zip_bdnt); |
if ($this->testerUrl($url_zip_bdnt)) { |
$urls_zip[$fichier_zip_bdnt] = $url_zip_bdnt; |
} |
$url_zip_partiel = sprintf(Config::get('url_zip_tpl'), $fichier_zip_partiel); |
if ($this->testerUrl($url_zip_partiel)) { |
$urls_zip[$fichier_zip_partiel] = $url_zip_partiel; |
} |
} |
return $urls_zip; |
} |
private function testerUrl($url) { |
ini_set('allow_url_fopen', '1'); |
return (@fclose(@fopen($url, 'r'))) ? true : false; |
} |
} |
?> |
/trunk/interfaces/configurations/config.default.ini |
---|
55,8 → 55,6 |
ddv_traitement_attente = 300 |
; Durée de vie en seconde d'un traitement en cours |
ddv_traitement_en_cours = 300 |
; Squelete de l'url de téléchargement des fichiers zip |
url_zip_tpl = "{url_base}zip/%s" |
; +------------------------------------------------------------------------------------------------------+ |
; Url du Jrest utilisé pour les services web fournissant les données à l'application |