2016-10-18 14:03:03 +00:00
|
|
|
<?php define('__ROOT__', dirname(dirname(dirname(__FILE__))) );
|
2017-09-19 14:38:16 +00:00
|
|
|
require_once __ROOT__.'/vendor/autoload.php';
|
2017-01-30 17:39:21 +00:00
|
|
|
use \api\core\Request;
|
2017-09-23 17:05:54 +00:00
|
|
|
use \database\core\Repo;
|
|
|
|
use \viewer\core\Viewer;
|
2016-02-03 22:22:18 +00:00
|
|
|
?>
|
|
|
|
|
|
|
|
|
2016-02-02 13:03:22 +00:00
|
|
|
<!-- [1] Gestion du sous-menu de gauche -->
|
|
|
|
|
2016-02-02 22:29:30 +00:00
|
|
|
<nav class='sub-menu-side'>
|
2017-09-23 17:05:54 +00:00
|
|
|
<span data-sublink='view'>
|
|
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/permission.svg' ); ?></span>
|
2017-09-23 13:44:06 +00:00
|
|
|
<span>Général</span>
|
2016-02-03 07:45:42 +00:00
|
|
|
</span>
|
|
|
|
|
2017-09-23 17:05:54 +00:00
|
|
|
<span data-sublink='manage' >
|
2016-10-18 14:03:03 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/view.svg' ); ?></span>
|
2016-02-03 09:13:31 +00:00
|
|
|
<span>Consulter le suivi</span>
|
2016-02-03 07:45:42 +00:00
|
|
|
</span>
|
|
|
|
|
2016-02-03 09:13:31 +00:00
|
|
|
<span data-sublink='start' >
|
2016-10-18 14:03:03 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/sync.svg' ); ?></span>
|
2016-02-03 09:13:31 +00:00
|
|
|
<span>Demarrer un suivi</span>
|
2016-02-03 07:45:42 +00:00
|
|
|
</span>
|
|
|
|
|
|
|
|
<span data-sublink='search' >
|
2016-10-18 14:03:03 +00:00
|
|
|
<span class='svg'><?php echo file_get_contents( __PUBLIC__.'/src/static/sub-menu-side/search.svg' ); ?></span>
|
2016-02-03 07:45:42 +00:00
|
|
|
<span>Recherche</span>
|
|
|
|
</span>
|
|
|
|
|
2016-02-02 13:03:22 +00:00
|
|
|
</nav>
|
|
|
|
|
2016-02-03 10:30:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-03 11:40:01 +00:00
|
|
|
<?php
|
2016-02-03 10:30:46 +00:00
|
|
|
|
2016-07-04 13:45:29 +00:00
|
|
|
$post = [];
|
2016-02-03 11:40:01 +00:00
|
|
|
foreach($_POST as $k=>$v)
|
|
|
|
array_push($post, $k);
|
2016-02-03 10:30:46 +00:00
|
|
|
|
2016-02-03 11:40:01 +00:00
|
|
|
$sublink = $post[0];
|
2016-02-03 10:30:46 +00:00
|
|
|
|
2016-02-03 11:40:01 +00:00
|
|
|
|
2017-09-23 17:05:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* [1] Affichage des groupes de machines
|
|
|
|
=========================================================*/
|
|
|
|
debug();
|
|
|
|
echo "<section data-sublink='view' class='list'>";
|
|
|
|
|
|
|
|
$extensionView = new Viewer('extension.view', []);
|
|
|
|
$extensionView->view();
|
|
|
|
|
|
|
|
echo '</section>';
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-03 11:40:01 +00:00
|
|
|
/* PAGE DES STATISTIQUES
|
|
|
|
*
|
|
|
|
*/
|
2016-02-06 10:41:50 +00:00
|
|
|
// if( $sublink == 'analytics' ){
|
2016-02-03 11:40:01 +00:00
|
|
|
|
2017-09-23 17:05:54 +00:00
|
|
|
echo "<section data-sublink='manage'>";
|
|
|
|
|
|
|
|
/* (1) Modules de l'entrepot
|
|
|
|
---------------------------------------------------------*/
|
|
|
|
echo "<pre><u>Modules entrepot:</u>\n";
|
|
|
|
|
|
|
|
/* (1) Requete de récupération */
|
|
|
|
$req_mods = new Repo('warehouse/getModules', [$_SESSION['WAREHOUSE']['id']]);
|
|
|
|
|
|
|
|
/* (2) Gestion erreur */
|
|
|
|
if( $req_mods->answer() === false )
|
|
|
|
die('fetch error: '.$req_mods->error->get());
|
|
|
|
|
|
|
|
/* (3) Affichage de la liste */
|
|
|
|
foreach($req_mods->answer() as $module)
|
|
|
|
echo " * ".$module['name']."\n";
|
|
|
|
|
|
|
|
|
|
|
|
echo "\n\n\n";
|
|
|
|
|
|
|
|
|
|
|
|
/* (2) Modules par groupes de machines
|
|
|
|
---------------------------------------------------------*/
|
|
|
|
echo "<u>Modules par groupes de machines:</u> \n";
|
|
|
|
|
|
|
|
/* (1) Requête de récupération des groupes */
|
|
|
|
$req_mc = new Repo('machine_cluster/getAll', [$_SESSION['WAREHOUSE']['id']]);
|
|
|
|
|
|
|
|
/* (2) Gestion erreur */
|
|
|
|
if( !$req_mc->answer() )
|
|
|
|
die('fetch error: '.$req_mc->error->get());
|
|
|
|
|
|
|
|
/* (3) Parcours des groupes */
|
|
|
|
foreach($req_mc->answer() as $mc){
|
|
|
|
echo " ".$mc['name']."\n";
|
|
|
|
|
|
|
|
|
|
|
|
/* (4) Requête récupération des modules */
|
|
|
|
$req_mc_mods = new Request('clusterDefault/getModules', [
|
|
|
|
'id_cluster' => $mc['id_machine_cluster']
|
|
|
|
]);
|
|
|
|
|
|
|
|
$res = $req_mc_mods->dispatch();
|
|
|
|
|
|
|
|
/* (5) Gestion erreur */
|
|
|
|
if( $res->error->get() !== 0 )
|
|
|
|
die('fetch error: '.$res->error->get());
|
|
|
|
|
|
|
|
/* (6) Pour chaque module : affichage */
|
|
|
|
foreach($res->get('modules') as $mod){
|
|
|
|
$id = $mod['id_module'];
|
|
|
|
$name = $mod['name'];
|
|
|
|
echo " * $name ($id)\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "</pre>";
|
|
|
|
|
|
|
|
|
2016-02-03 11:40:01 +00:00
|
|
|
echo '</section>';
|
|
|
|
|
2016-02-06 10:41:50 +00:00
|
|
|
// }
|
2016-02-03 11:40:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* CONSULTATION DU SUIVI
|
|
|
|
*
|
|
|
|
*/
|
2016-02-06 10:41:50 +00:00
|
|
|
// if( $sublink == 'view' ){
|
2016-02-03 11:40:01 +00:00
|
|
|
|
2016-02-06 10:41:50 +00:00
|
|
|
echo "<section data-sublink='view'>";
|
2016-02-03 11:40:01 +00:00
|
|
|
echo 'Consultation du suivi';
|
|
|
|
echo '</section>';
|
|
|
|
|
2016-02-06 10:41:50 +00:00
|
|
|
// }
|
2016-02-03 11:40:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* DEMARRER UN SUIVI
|
|
|
|
*
|
|
|
|
*/
|
2016-02-06 10:41:50 +00:00
|
|
|
// if( $sublink == 'start' ){
|
2016-02-03 11:40:01 +00:00
|
|
|
|
2016-02-06 10:41:50 +00:00
|
|
|
echo "<section data-sublink='start'>";
|
2016-02-03 11:40:01 +00:00
|
|
|
echo 'Demarrer un suivi';
|
|
|
|
echo '</section>';
|
|
|
|
|
2016-02-06 10:41:50 +00:00
|
|
|
// }
|
2016-02-03 11:40:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* RECHERCHE
|
|
|
|
*
|
|
|
|
*/
|
2016-02-06 10:41:50 +00:00
|
|
|
// if( $sublink == 'search' ){
|
2016-02-03 11:40:01 +00:00
|
|
|
|
2016-02-06 10:41:50 +00:00
|
|
|
echo "<section data-sublink='search'>";
|
2016-02-03 11:40:01 +00:00
|
|
|
echo 'Recherche';
|
|
|
|
echo '</section>';
|
|
|
|
|
2016-02-06 10:41:50 +00:00
|
|
|
// }
|
2016-02-03 11:40:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-08 15:04:41 +00:00
|
|
|
?>
|