svg
This commit is contained in:
parent
b19b9a50c4
commit
e04e359feb
|
@ -11,6 +11,14 @@ imports:
|
|||
parameters:
|
||||
locale: fr
|
||||
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: rotating_file
|
||||
path: '%kernel.logs_dir%/%kernel.environment%.log'
|
||||
level: debug
|
||||
max_files: 10
|
||||
|
||||
framework:
|
||||
#esi: ~
|
||||
#translator: { fallbacks: ['%locale%'] }
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
export HTTP_PROXY="192.168.57.160:8080"
|
||||
export HTTPS_PROXY="192.168.57.160:8080"
|
||||
|
||||
cd /var/www/html/ninestat
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Suppression des logs trop ancien
|
||||
find var/logs -mindepth 1 -mtime +7 -delete
|
||||
|
||||
# Installation des dépendances composer
|
||||
composer install
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class SecurityController extends Controller
|
|||
\phpCAS::setDebug(false);
|
||||
\phpCAS::client(CAS_VERSION_2_0, $this->getParameter('cas_host'), $this->getParameter('cas_port'), is_null($this->getParameter('cas_path')) ? '' : $this->getParameter('cas_path'), false);
|
||||
\phpCAS::setNoCasServerValidation();
|
||||
|
||||
|
||||
|
||||
// Authentification
|
||||
\phpCAS::forceAuthentication();
|
||||
|
@ -46,19 +46,19 @@ class SecurityController extends Controller
|
|||
$em = $this->getDoctrine()->getManager();
|
||||
if(isset($attributes[$this->getParameter('user_attr_cas_username')]))
|
||||
$username = $attributes[$this->getParameter('user_attr_cas_username')];
|
||||
|
||||
|
||||
if(isset($attributes[$this->getParameter('user_attr_cas_mail')]))
|
||||
$email = $attributes[$this->getParameter('user_attr_cas_mail')];
|
||||
|
||||
|
||||
if(isset($attributes[$this->getParameter('user_attr_cas_lastname')]))
|
||||
$lastname = $attributes[$this->getParameter('user_attr_cas_lastname')];
|
||||
|
||||
|
||||
if(isset($attributes[$this->getParameter('user_attr_cas_firstname')]))
|
||||
$firstname = $attributes[$this->getParameter('user_attr_cas_firstname')];
|
||||
|
||||
$user = $em->getRepository('CadolesCoreBundle:User')->findOneBy(array("username"=>$username));
|
||||
$exists = $user ? true : false;
|
||||
|
||||
|
||||
if (!$exists) {
|
||||
// Là c'est normal que potentiellement il n'existe pas il faut donc l'autogénérer
|
||||
$user = new User();
|
||||
|
@ -73,23 +73,23 @@ class SecurityController extends Controller
|
|||
$user->setRole("ROLE_USER");
|
||||
|
||||
$em->persist($user);
|
||||
$em->flush();
|
||||
$em->flush();
|
||||
}
|
||||
else {
|
||||
$user->setLastname($lastname);
|
||||
$user->setFirstname((isset($firstname)?$firstname:null));
|
||||
$user->setEmail($email);
|
||||
|
||||
|
||||
$em->persist($user);
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
// Calcul Service
|
||||
/*
|
||||
$user = $em->getRepository('CadolesCoreBundle:User')->calculateServices($user, $attributes);
|
||||
$user = $em->getRepository('CadolesCoreBundle:User')->calculateServices($user, $attributes);
|
||||
|
||||
// Attributs calculés
|
||||
$attributes = $em->getRepository('CadolesCoreBundle:User')->calculateAttributes($user, $attributes);
|
||||
$attributes = $em->getRepository('CadolesCoreBundle:User')->calculateAttributes($user, $attributes);
|
||||
*/
|
||||
|
||||
// Sauvegarde des attributes en session
|
||||
|
|
|
@ -29,8 +29,8 @@ class PurgeServerCommand extends Command
|
|||
->setName('Core:PurgeServer')
|
||||
->setDescription('Purge Server not updated')
|
||||
->setHelp('This command Purge the obsolete Server')
|
||||
->addArgument('cronid', InputArgument::OPTIONAL, 'ID Cron Job')
|
||||
->addArgument('lastchance', InputArgument::OPTIONAL, 'Lastchance to run the cron')
|
||||
->addArgument('cronid', InputArgument::OPTIONAL, 'ID Cron Job')
|
||||
->addArgument('lastchance', InputArgument::OPTIONAL, 'Lastchance to run the cron')
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -44,11 +44,11 @@ class PurgeServerCommand extends Command
|
|||
$alias = $this->container->getParameter('alias');
|
||||
|
||||
$this->writelnred('');
|
||||
$this->writelnred('== Core:PurgeServer');
|
||||
$this->writelnred('== Core:PurgeServer');
|
||||
$this->writelnred('==========================================================================================================');
|
||||
|
||||
|
||||
$now=new \DateTime('now');
|
||||
$now->sub(new \DateInterval('P3M'));
|
||||
$now->sub(new \DateInterval('P6M'));
|
||||
|
||||
$servers=$this->em->getRepository("CadolesCoreBundle:Server")->findAll();
|
||||
foreach($servers as $server) {
|
||||
|
@ -62,12 +62,12 @@ class PurgeServerCommand extends Command
|
|||
return 1;
|
||||
}
|
||||
|
||||
private function writelnred($string) {
|
||||
private function writelnred($string) {
|
||||
$this->output->writeln('<fg=red>'.$string.'</>');
|
||||
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
|
||||
}
|
||||
private function writeln($string) {
|
||||
private function writeln($string) {
|
||||
$this->output->writeln($string);
|
||||
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ SET foreign_key_checks = 0;
|
|||
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
|
||||
|
||||
INSERT IGNORE INTO `user` (`id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`) VALUES
|
||||
(-100, 'admin', 'Administrateur', 'STAT', '{SSHA}euZCgZjWhBu0xUZI9lPK2ncV9oaB+Jqo', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN');
|
||||
(-100, 'admin', 'Administrateur', 'STAT', '{SSHA}euZCgZjWhBu0xUZI9lPK2ncV9oaB+Jqo', 'tina-boot@ac-dijon.fr', 'admin.jpg', 'ROLE_ADMIN');
|
||||
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type
|
|||
('060', 1, 1, 1, 'font', 'fontfacetitle', 'Anton-Regular', '', 'Police des titres de votre site'),
|
||||
('061', 1, 1, 1, 'font', 'fontfacebody', 'Helvetica', '', 'Police des titres de votre site'),
|
||||
|
||||
('200', 1, 0, 1, 'boolean', 'PROXYactivate', '1', '', 'Définit un Proxy'),
|
||||
('201', 1, 0, 1, 'string', 'PROXYserver', '192.168.57.160', 'PROXYactivate','Adresse du Proxy'),
|
||||
('202', 1, 0, 1, 'string', 'PROXYport', '8080', 'PROXYactivate','Port du Proxy');
|
||||
('200', 1, 0, 1, 'boolean', 'PROXYactivate', '0', '', 'Définit un Proxy'),
|
||||
('201', 1, 0, 1, 'string', 'PROXYserver', '', 'PROXYactivate','Adresse du Proxy'),
|
||||
('202', 1, 0, 1, 'string', 'PROXYport', '', 'PROXYactivate','Port du Proxy');
|
||||
|
||||
|
|
|
@ -44,29 +44,31 @@ class CoreController extends Controller
|
|||
$response = \Unirest\Request::get($url.'/rest/user/'.$masterapikey.'/'.$user->getUsername(),$headers,$query);
|
||||
|
||||
// Mise à jour du user
|
||||
$user->setAvatar($response->body->user->avatar);
|
||||
$user->setRole($response->body->user->role);
|
||||
$em->persist($user);
|
||||
$em->flush();
|
||||
if($response->code!=500) {
|
||||
$user->setAvatar($response->body->user->avatar);
|
||||
$user->setRole($response->body->user->role);
|
||||
$em->persist($user);
|
||||
|
||||
// Mise à jour des groupes
|
||||
$groups=$response->body->groups;
|
||||
$mygroup=[];
|
||||
// Mise à jour des groupes
|
||||
$groups=$response->body->groups;
|
||||
$mygroup=[];
|
||||
|
||||
foreach($groups as $groupexternal) {
|
||||
// Le groupe existe-t-il
|
||||
$group=$em->getRepository("CadolesCoreBundle:Group")->findOneBy(["idexternal"=>$groupexternal->id]);
|
||||
if(!$group)
|
||||
$group = new Group();
|
||||
$group->setIdexternal($groupexternal->id);
|
||||
$group->setLabel($groupexternal->title);
|
||||
$em->persist($group);
|
||||
$em->flush();
|
||||
foreach($groups as $groupexternal) {
|
||||
// Le groupe existe-t-il
|
||||
$group=$em->getRepository("CadolesCoreBundle:Group")->findOneBy(["idexternal"=>$groupexternal->id]);
|
||||
if(!$group)
|
||||
$group = new Group();
|
||||
$group->setIdexternal($groupexternal->id);
|
||||
$group->setLabel($groupexternal->title);
|
||||
$em->persist($group);
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
// Sauvegarde en session des groupes de l'utilisateur
|
||||
$this->get('session')->set("groups",$groups);
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
// Sauvegarde en session des groupes de l'utilisateur
|
||||
$this->get('session')->set("groups",$groups);
|
||||
|
||||
}
|
||||
|
||||
// Total servers
|
||||
|
@ -150,7 +152,7 @@ class CoreController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
public function acadAction($acad, Request $request)
|
||||
public function acadAction($acad, $application="all", Request $request)
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$user=$this->getUser();
|
||||
|
@ -164,6 +166,15 @@ class CoreController extends Controller
|
|||
->where('s.etab=e')
|
||||
->andWhere('e.libelle_academie=:acad')
|
||||
->setParameter('acad',$acad);
|
||||
if($application!="all") {
|
||||
$servers->from('CadolesCoreBundle:ServerApplication','sa')
|
||||
->from('CadolesCoreBundle:Application','a')
|
||||
->andWhere('sa.server=s')
|
||||
->andWhere('sa.application=a')
|
||||
->andWhere('a.name=:application')
|
||||
->setParameter('application',$application);
|
||||
}
|
||||
|
||||
|
||||
// Total by module
|
||||
$totalmodules = $em->createQueryBuilder()
|
||||
|
@ -176,6 +187,14 @@ class CoreController extends Controller
|
|||
->groupBy('s.module')
|
||||
->orderBy('total','DESC')
|
||||
->addOrderBy('label','ASC');
|
||||
if($application!="all") {
|
||||
$totalmodules->from('CadolesCoreBundle:ServerApplication','sa')
|
||||
->from('CadolesCoreBundle:Application','a')
|
||||
->andWhere('sa.server=s')
|
||||
->andWhere('sa.application=a')
|
||||
->andWhere('a.name=:application')
|
||||
->setParameter('application',$application);
|
||||
}
|
||||
|
||||
// Total by version
|
||||
$totalversions = $em->createQueryBuilder()
|
||||
|
@ -188,7 +207,15 @@ class CoreController extends Controller
|
|||
->groupBy('s.version')
|
||||
->orderBy('total','DESC')
|
||||
->addOrderBy('label','ASC');
|
||||
|
||||
if($application!="all") {
|
||||
$totalversions->from('CadolesCoreBundle:ServerApplication','sa')
|
||||
->from('CadolesCoreBundle:Application','a')
|
||||
->andWhere('sa.server=s')
|
||||
->andWhere('sa.application=a')
|
||||
->andWhere('a.name=:application')
|
||||
->setParameter('application',$application);
|
||||
}
|
||||
|
||||
// Total by Secteur
|
||||
$totalbysecteurs = $em->createQueryBuilder()
|
||||
->select('COUNT(e.secteur_public_prive_libe) total','e.secteur_public_prive_libe label')
|
||||
|
@ -200,6 +227,14 @@ class CoreController extends Controller
|
|||
->groupBy('e.secteur_public_prive_libe')
|
||||
->orderBy('total','DESC')
|
||||
->addOrderBy('label','ASC');
|
||||
if($application!="all") {
|
||||
$totalbysecteurs->from('CadolesCoreBundle:ServerApplication','sa')
|
||||
->from('CadolesCoreBundle:Application','a')
|
||||
->andWhere('sa.server=s')
|
||||
->andWhere('sa.application=a')
|
||||
->andWhere('a.name=:application')
|
||||
->setParameter('application',$application);
|
||||
}
|
||||
|
||||
// Total by Nature
|
||||
$totalbynatures = $em->createQueryBuilder()
|
||||
|
@ -212,6 +247,14 @@ class CoreController extends Controller
|
|||
->groupBy('e.nature_uai_libe')
|
||||
->orderBy('total','DESC')
|
||||
->addOrderBy('label','ASC');
|
||||
if($application!="all") {
|
||||
$totalbynatures->from('CadolesCoreBundle:ServerApplication','sa')
|
||||
->from('CadolesCoreBundle:Application','a')
|
||||
->andWhere('sa.server=s')
|
||||
->andWhere('sa.application=a')
|
||||
->andWhere('a.name=:application')
|
||||
->setParameter('application',$application);
|
||||
}
|
||||
|
||||
// Total applications
|
||||
$applications = $em->createQueryBuilder()
|
||||
|
@ -225,6 +268,10 @@ class CoreController extends Controller
|
|||
->andWhere('sa.server=s')
|
||||
->andWhere(('sa.application=a'))
|
||||
->setParameter('acad',$acad);
|
||||
if($application!="all") {
|
||||
$applications->andWhere('a.name=:application')
|
||||
->setParameter('application',$application);
|
||||
}
|
||||
|
||||
// Total by apps
|
||||
$totalapplications = $em->createQueryBuilder()
|
||||
|
@ -241,6 +288,10 @@ class CoreController extends Controller
|
|||
->groupBy('a.package')
|
||||
->orderBy('total','DESC')
|
||||
->addOrderBy('label','ASC');
|
||||
if($application!="all") {
|
||||
$totalapplications->andWhere('a.name=:application')
|
||||
->setParameter('application',$application);
|
||||
}
|
||||
|
||||
// Servers
|
||||
$etabs = $em->createQueryBuilder()
|
||||
|
@ -264,6 +315,7 @@ class CoreController extends Controller
|
|||
'totalbysecteurs' => $totalbysecteurs->getQuery()->getResult(),
|
||||
'totalbynatures' => $totalbynatures->getQuery()->getResult(),
|
||||
'by' => "acad",
|
||||
'ssby' => $application,
|
||||
'servers' => $servers->getQuery()->getResult(),
|
||||
'byname' => $acad,
|
||||
]);
|
||||
|
|
|
@ -62,7 +62,7 @@ class Etab
|
|||
/**
|
||||
* @ORM\Column(type="string", length=100, nullable=true)
|
||||
*/
|
||||
private $code_region;
|
||||
private $code_region;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=100, nullable=true)
|
||||
|
@ -77,7 +77,7 @@ class Etab
|
|||
/**
|
||||
* @ORM\Column(type="string", length=100, nullable=true)
|
||||
*/
|
||||
private $appellation_officielle;
|
||||
private $appellation_officielle;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=100, nullable=true)
|
||||
|
|
|
@ -8,48 +8,48 @@ cadoles_core_server:
|
|||
defaults: { _controller: CadolesCoreBundle:Core:server }
|
||||
|
||||
cadoles_core_acad:
|
||||
path: /acad/{acad}
|
||||
defaults: { _controller: CadolesCoreBundle:Core:acad }
|
||||
path: /acad/{acad}/{application}
|
||||
defaults: { _controller: CadolesCoreBundle:Core:acad, application:"all" }
|
||||
|
||||
cadoles_core_application:
|
||||
path: /application/{application}
|
||||
defaults: { _controller: CadolesCoreBundle:Core:application }
|
||||
defaults: { _controller: CadolesCoreBundle:Core:application }
|
||||
|
||||
#== Theme ================================================================================================================
|
||||
|
||||
cadoles_core_theme_setconfig:
|
||||
path: /theme/setconfig
|
||||
defaults: { _controller: CadolesCoreBundle:Theme:setconfig }
|
||||
defaults: { _controller: CadolesCoreBundle:Theme:setconfig }
|
||||
|
||||
cadoles_core_config_theme:
|
||||
path: /config/theme
|
||||
defaults: { _controller: CadolesCoreBundle:Theme:list }
|
||||
defaults: { _controller: CadolesCoreBundle:Theme:list }
|
||||
|
||||
cadoles_core_config_theme_selec:
|
||||
path: /config/theme/select/{name}
|
||||
defaults: { _controller: CadolesCoreBundle:Theme:select, name:"" }
|
||||
defaults: { _controller: CadolesCoreBundle:Theme:select, name:"" }
|
||||
|
||||
|
||||
|
||||
#== Security Auth ========================================================================================================
|
||||
cadoles_core_login:
|
||||
path: /login
|
||||
defaults: { _controller: CadolesCoreBundle:Security:login }
|
||||
defaults: { _controller: CadolesCoreBundle:Security:login }
|
||||
|
||||
cadoles_core_logout:
|
||||
path: /logout
|
||||
defaults: { _controller: CadolesCoreBundle:Security:logout }
|
||||
defaults: { _controller: CadolesCoreBundle:Security:logout }
|
||||
|
||||
cadoles_core_checkuser:
|
||||
path: /checkuser
|
||||
defaults: { _controller: CadolesCoreBundle:Security:checkuser }
|
||||
defaults: { _controller: CadolesCoreBundle:Security:checkuser }
|
||||
|
||||
cadoles_core_kill:
|
||||
path: /kill
|
||||
defaults: { _controller: CadolesCoreBundle:Security:kill }
|
||||
defaults: { _controller: CadolesCoreBundle:Security:kill }
|
||||
|
||||
cadoles_core_ldap_login:
|
||||
path: /ldaplogin
|
||||
defaults: { _controller: CadolesCoreBundle:Security:login }
|
||||
defaults: { _controller: CadolesCoreBundle:Security:login }
|
||||
|
||||
|
||||
#== Crop Image ===========================================================================================================
|
||||
|
@ -66,50 +66,50 @@ cadoles_core_crop02:
|
|||
#-- Access config
|
||||
cadoles_core_config_file_upload:
|
||||
path: /config/file/upload/{id}/{type}
|
||||
defaults: { _controller: CadolesCoreBundle:File:upload, access: config }
|
||||
defaults: { _controller: CadolesCoreBundle:File:upload, access: config }
|
||||
|
||||
cadoles_core_config_file_delete:
|
||||
path: /config/file/delete/
|
||||
defaults: { _controller: CadolesCoreBundle:File:delete, access: config }
|
||||
defaults: { _controller: CadolesCoreBundle:File:delete, access: config }
|
||||
|
||||
cadoles_core_config_file_view:
|
||||
path: /config/file/view/{directory}/{filename}
|
||||
defaults: { _controller: CadolesCoreBundle:File:view, access: config }
|
||||
defaults: { _controller: CadolesCoreBundle:File:view, access: config }
|
||||
|
||||
cadoles_core_config_file_show:
|
||||
path: /config/file/show/{directory}/{filename}
|
||||
defaults: { _controller: CadolesCoreBundle:File:show, access: config }
|
||||
defaults: { _controller: CadolesCoreBundle:File:show, access: config }
|
||||
|
||||
cadoles_core_config_file_download:
|
||||
path: /config/file/download/{directory}/{filename}
|
||||
defaults: { _controller: CadolesCoreBundle:File:download, access: config }
|
||||
defaults: { _controller: CadolesCoreBundle:File:download, access: config }
|
||||
|
||||
#-- Access user
|
||||
#-- Access user
|
||||
cadoles_core_user_file_upload:
|
||||
path: /user/config/file/upload/{id}/{type}
|
||||
defaults: { _controller: CadolesCoreBundle:File:upload, access: user }
|
||||
defaults: { _controller: CadolesCoreBundle:File:upload, access: user }
|
||||
|
||||
cadoles_core_user_file_delete:
|
||||
path: /user/file/delete
|
||||
defaults: { _controller: CadolesCoreBundle:File:delete, access: user }
|
||||
defaults: { _controller: CadolesCoreBundle:File:delete, access: user }
|
||||
|
||||
cadoles_core_user_file_view:
|
||||
path: file/view/{directory}/{filename}
|
||||
defaults: { _controller: CadolesCoreBundle:File:view, access: user }
|
||||
defaults: { _controller: CadolesCoreBundle:File:view, access: user }
|
||||
|
||||
cadoles_core_user_file_download:
|
||||
path: file/download/{directory}/{filename}
|
||||
defaults: { _controller: CadolesCoreBundle:File:download, access: user }
|
||||
defaults: { _controller: CadolesCoreBundle:File:download, access: user }
|
||||
|
||||
cadoles_core_user_file_show:
|
||||
path: file/show/{directory}/{filename}
|
||||
defaults: { _controller: CadolesCoreBundle:File:show, access: user }
|
||||
|
||||
defaults: { _controller: CadolesCoreBundle:File:show, access: user }
|
||||
|
||||
|
||||
#== Home Config ==========================================================================================================
|
||||
cadoles_core_config:
|
||||
path: /config/home
|
||||
defaults: { _controller: CadolesCoreBundle:Config:home }
|
||||
defaults: { _controller: CadolesCoreBundle:Config:home }
|
||||
|
||||
|
||||
#== Commun Config Commun =================================================================================================
|
||||
|
@ -151,8 +151,8 @@ cadoles_core_user_group_ajax_list:
|
|||
#== API ===================================================================================================================
|
||||
cadoles_core_api:
|
||||
path: /api
|
||||
defaults: { _controller: CadolesCoreBundle:Api:api}
|
||||
methods: ["post"]
|
||||
defaults: { _controller: CadolesCoreBundle:Api:api}
|
||||
#methods: ["post"]
|
||||
|
||||
#== Application ============================================================================================================
|
||||
cadoles_core_config_application:
|
||||
|
|
|
@ -6,7 +6,18 @@
|
|||
|
||||
{% block pagewrapper %}
|
||||
{%if by is defined %}
|
||||
<h1 style="text-align:center">{{byname}}</h1>
|
||||
<h1 style="text-align:center">
|
||||
{% if by=="acad" %}
|
||||
<a href="{{ path("cadoles_core_acad",{"acad":byname}) }}">
|
||||
{% else %}
|
||||
<a href "{{ path("cadoles_core_application",{"application":byname}) }}">
|
||||
{% endif %}
|
||||
{{byname}}</a>
|
||||
|
||||
{%if ssby is defined and ssby!="all" %}
|
||||
<br>{{ssby}}
|
||||
{% endif %}
|
||||
</h1>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
@ -17,7 +28,7 @@
|
|||
{%if totalapplications is defined %}
|
||||
<h1 style="text-align:center; margin-top:0px""><i class="fa fa-cubes fa-fw"></i>Applications = {{ totalapplications }} </h1>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="row" style="margin-top:20px">
|
||||
{% if totalbyapplications is defined %}
|
||||
{% if totalbyacademies is defined %}
|
||||
|
@ -25,13 +36,13 @@
|
|||
{%else%}
|
||||
<div class="col-md-8" style="text-align:center;">
|
||||
{%endif%}
|
||||
<h1>Applications Installées</h1>
|
||||
<h1>Applications Installées</h1>
|
||||
|
||||
<div class="col-md-7" >
|
||||
<div id='byapplication-chart'></div>
|
||||
</div>
|
||||
<div id="byapplication-legend" class="col-md-5"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if totalbyacademies is defined %}
|
||||
|
@ -65,7 +76,7 @@
|
|||
<div id='bynature-chart' style="height:250px"></div>
|
||||
<div id="bynature-legend"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if by is defined and app.user %}
|
||||
|
@ -85,10 +96,10 @@
|
|||
</thead>
|
||||
{% for server in servers %}
|
||||
{% for serverapplication in server.serverapplications %}
|
||||
{% if by=="acad" or (by=="application" and serverapplication.application.name==byname) %}
|
||||
{% if server.etab and ((by=="acad" and (ssby=="all" or ssby==serverapplication.application.name)) or (by=="application" and serverapplication.application.name==byname)) %}
|
||||
<tr>
|
||||
<td>{{server.etab.numerouai}}</td>
|
||||
<td>{{server.etab.denominationprincipale}}</td>
|
||||
<td>{{server.etab.appellationofficielle}}</td>
|
||||
<td>{{server.etab.adresseuai}}</td>
|
||||
<td>{{server.etab.libellecommune}}</td>
|
||||
<td>{{server.etab.secteurpublicprivelibe}}</td>
|
||||
|
@ -127,9 +138,9 @@
|
|||
maxZoom: 20
|
||||
}).addTo(macarte);
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
initMap();
|
||||
initMap();
|
||||
marker=[];
|
||||
|
||||
{% for etab in etabs %}
|
||||
|
@ -138,7 +149,7 @@
|
|||
html ="<h3>Etablissement</h3>";
|
||||
{% if(etab.id!=-100) %}
|
||||
html+="<b>UAI</b> = {{etab.numerouai}}<br>";
|
||||
html+="<b>Nom</b> = {{etab.denominationprincipale}}<br>";
|
||||
html+="<b>Nom</b> = {{etab.appellationofficielle}}<br>";
|
||||
html+="<b>Adresse</b> = {{etab.adresseuai}} {{etab.codecommune}} {{etab.libellecommune}}<br>";
|
||||
html+="<b>Académie</b> = {{etab.libelleacademie}}<br>";
|
||||
html+="<b>Secteur</b> = {{etab.secteurpublicprivelibe}}<br>";
|
||||
|
@ -159,7 +170,7 @@
|
|||
{% if totalbyacademies is defined %}
|
||||
var byacademie = Morris.Donut({
|
||||
element: 'byacademie-chart',
|
||||
data: [
|
||||
data: [
|
||||
{% for total in totalbyacademies %}
|
||||
{'label':'{{ total.label }}','value':{{ total.total }}},
|
||||
{% endfor %}
|
||||
|
@ -168,7 +179,11 @@
|
|||
});
|
||||
|
||||
byacademie.options.data.forEach(function(label, i) {
|
||||
var url = "{{ path("cadoles_core_acad",{"acad":"xx"}) }}";
|
||||
{% if byname is defined %}
|
||||
var url = "{{ path("cadoles_core_acad",{"acad":"xx","application":byname}) }}";
|
||||
{% else %}
|
||||
var url = "{{ path("cadoles_core_acad",{"acad":"xx"}) }}";
|
||||
{% endif %}
|
||||
var url = url.replace("xx",label['label']);
|
||||
|
||||
var legendItem = $('<span style="margin:auto; display: block;text-align: left;"></span>').html( "<a href='"+url+"'>"+label['label'] + "</a> ( " +label['value'] + " )" ).prepend('<span> </span>');
|
||||
|
@ -184,7 +199,7 @@
|
|||
//== byNature
|
||||
var bynature = Morris.Donut({
|
||||
element: 'bynature-chart',
|
||||
data: [
|
||||
data: [
|
||||
{% for total in totalbynatures %}
|
||||
{'label':'{{ total.label }}','value':{{ total.total }}},
|
||||
{% endfor %}
|
||||
|
@ -205,7 +220,7 @@
|
|||
//== bySecteur
|
||||
var bysecteur = Morris.Donut({
|
||||
element: 'bysecteur-chart',
|
||||
data: [
|
||||
data: [
|
||||
{% for total in totalbysecteurs %}
|
||||
{'label':'{{ total.label }}','value':{{ total.total }}},
|
||||
{% endfor %}
|
||||
|
@ -226,7 +241,7 @@
|
|||
//== byModule
|
||||
var bymodule = Morris.Donut({
|
||||
element: 'bymodule-chart',
|
||||
data: [
|
||||
data: [
|
||||
{% for total in totalbymodules %}
|
||||
{'label':'{{ total.label }}','value':{{ total.total }}},
|
||||
{% endfor %}
|
||||
|
@ -247,7 +262,7 @@
|
|||
//== byVersion
|
||||
var byversion = Morris.Donut({
|
||||
element: 'byversion-chart',
|
||||
data: [
|
||||
data: [
|
||||
{% for total in totalbyversions %}
|
||||
{'label':'{{ total.label }}','value':{{ total.total }}},
|
||||
{% endfor %}
|
||||
|
@ -262,14 +277,14 @@
|
|||
.css('width', '20px')
|
||||
.css('display', 'inline-block')
|
||||
.css('margin', '5px');
|
||||
$('#byversion-legend').append(legendItem)
|
||||
$('#byversion-legend').append(legendItem)
|
||||
});
|
||||
|
||||
|
||||
//== byApplication
|
||||
{% if totalbyapplications is defined %}
|
||||
var byapplication = Morris.Donut({
|
||||
element: 'byapplication-chart',
|
||||
data: [
|
||||
data: [
|
||||
{% for total in totalbyapplications %}
|
||||
{
|
||||
'label':'{{ total.label }}',
|
||||
|
@ -281,7 +296,11 @@
|
|||
});
|
||||
|
||||
byapplication.options.data.forEach(function(label, i) {
|
||||
var url = "{{ path("cadoles_core_application",{"application":"xx"}) }}";
|
||||
{% if byname is defined %}
|
||||
var url = "{{ path("cadoles_core_acad",{"acad":byname,"application":"xx"}) }}";
|
||||
{% else %}
|
||||
var url = "{{ path("cadoles_core_application",{"application":"xx"}) }}";
|
||||
{% endif %}
|
||||
var url = url.replace("xx",label['label']);
|
||||
|
||||
var legendItem = $('<span style="margin:auto; display: block;text-align: left;"></span>').html( "<a href='"+url+"'>"+label['label'] + "</a> ( " +label['value'] + " )" ).prepend('<span> </span>');
|
||||
|
@ -290,8 +309,8 @@
|
|||
.css('width', '20px')
|
||||
.css('display', 'inline-block')
|
||||
.css('margin', '0px 5px 5px 0px');
|
||||
$('#byapplication-legend').append(legendItem)
|
||||
|
||||
$('#byapplication-legend').append(legendItem)
|
||||
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
|
@ -308,7 +327,7 @@
|
|||
|
||||
function showModal(id) {
|
||||
var url="{{ path('cadoles_core_server',{id:'xx'})}}";
|
||||
|
||||
|
||||
url=url.replace('xx',id);
|
||||
|
||||
console.log("pouet");
|
||||
|
@ -317,4 +336,4 @@
|
|||
|
||||
$("#mymodal").modal('show');
|
||||
}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<b>Etablissement</b><br>
|
||||
{% if(server.etab.id!=-100) %}
|
||||
<b>UAI</b> = {{server.etab.numerouai}}<br>
|
||||
<b>Nom</b> = {{server.etab.denominationprincipale}}<br>
|
||||
<b>Nom</b> = {{server.etab.appellationofficielle}}<br>
|
||||
<b>Adresse</b> = {{server.etab.adresseuai}} {{server.etab.codecommune}} {{server.etab.libellecommune}}<br>
|
||||
<b>Académie</b> = {{server.etab.libelleacademie}}<br>
|
||||
<b>Secteur</b> = {{server.etab.secteurpublicprivelibe}}<br>
|
||||
|
|
Loading…
Reference in New Issue