From b214ebe9810c0dd8634c9de55fb9e8ad11d7c169 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 29 Nov 2019 16:27:34 +0100 Subject: [PATCH] svg --- src/ninestat-1.0/app/config/security.yml | 1 - .../scripts/ninestat-postservice-00.sh | 2 - src/ninestat-1.0/scripts/ninestat-sonde.sh | 7 +- .../CoreBundle/Command/data/core-init-01.sql | 12 +- .../CoreBundle/Controller/ApiController.php | 7 +- .../Controller/ApplicationController.php | 140 ++++++++++++++++++ .../CoreBundle/Controller/CoreController.php | 37 ++++- .../CoreBundle/Controller/GroupController.php | 3 - .../CoreBundle/Form/ApplicationType.php | 61 ++++++++ .../src/Cadoles/CoreBundle/Form/ScrumType.php | 79 ---------- .../CoreBundle/Resources/config/routing.yml | 15 ++ .../views/Application/edit.html.twig | 61 ++++++++ .../views/Application/list.html.twig | 51 +++++++ .../Resources/views/Core/home.html.twig | 106 +++++++++++-- .../Resources/views/Include/sidebar.html.twig | 8 +- 15 files changed, 477 insertions(+), 113 deletions(-) create mode 100755 src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/ApplicationController.php create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Form/ApplicationType.php delete mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Form/ScrumType.php create mode 100755 src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Application/edit.html.twig create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Application/list.html.twig diff --git a/src/ninestat-1.0/app/config/security.yml b/src/ninestat-1.0/app/config/security.yml index 0a29dcf..a45845c 100644 --- a/src/ninestat-1.0/app/config/security.yml +++ b/src/ninestat-1.0/app/config/security.yml @@ -41,7 +41,6 @@ security: check_path: /saml/acs access_control: - - { path: ^/websocket, roles: [ROLE_ADMIN, ROLE_MODO, ROLE_ANIM, ROLE_USER] } - { path: ^/user, roles: [ROLE_ADMIN, ROLE_MODO, ROLE_ANIM, ROLE_USER] } - { path: ^/config, roles: [ROLE_ADMIN, ROLE_MODO] } diff --git a/src/ninestat-1.0/scripts/ninestat-postservice-00.sh b/src/ninestat-1.0/scripts/ninestat-postservice-00.sh index 6218f6b..e29415c 100755 --- a/src/ninestat-1.0/scripts/ninestat-postservice-00.sh +++ b/src/ninestat-1.0/scripts/ninestat-postservice-00.sh @@ -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 diff --git a/src/ninestat-1.0/scripts/ninestat-sonde.sh b/src/ninestat-1.0/scripts/ninestat-sonde.sh index 3c51233..b908b39 100755 --- a/src/ninestat-1.0/scripts/ninestat-sonde.sh +++ b/src/ninestat-1.0/scripts/ninestat-sonde.sh @@ -58,9 +58,12 @@ apps=`cat /tmp/lstpaquetfinal.txt` # Construction de la chaine de parametre mac=`echo $(rawurlencode "${mac}")` +etab=`echo $(rawurlencode "${etab}")` +eole_module=`echo $(rawurlencode "${eole_module}")` +eole_release=`echo $(rawurlencode "${eole_release}")` apps=`echo $(rawurlencode "${apps}")` -data="idserver=$mac&idlocal=$rne&name=$etab&module=$eole_module&version=$eole_release" +data="idserver=$mac&idlocal=$rne&name=$etab&module=$eole_module&version=$eole_release&apps=$apps" curl --request POST \ --url ${serveurstat} \ @@ -69,6 +72,6 @@ curl --request POST \ --header 'cache-control: no-cache' \ --header 'content-type: application/x-www-form-urlencoded' \ --header 'postman-token: e8cbba3a-9e51-204b-b742-a5b7a083738d' \ - --data ${data} + --data ${data} & diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql b/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql index a4de9b7..20623ac 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/data/core-init-01.sql @@ -4,15 +4,15 @@ 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', 'SCRUM', '{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'); DELETE FROM `config` WHERE `changeable` = 0; INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type`, `id`, `value`, `grouped`, `help`) VALUES -('001', 1, 1, 1, 'string', 'appname', 'Ninestat', '', 'Le titre de votre site'), +('001', 1, 1, 1, 'string', 'appname', 'Ninestat', '', 'Le titre de votre site'), ('002', 1, 0, 1, 'string', 'version', '1.0.0', '', 'Version de l\'application'), -('003', 1, 1, 0, 'string', 'subappname', 'Statistiques Envole', '', 'Le sous titre de votre site'), +('003', 1, 1, 0, 'string', 'subappname', 'Statistique Envole', '', 'Le sous titre de votre site'), ('004', 1, 1, 1, 'logo', 'logo', 'uploads/logo/logo.png', '', 'Le logo de votre site'), ('005', 0, 1, 0, 'theme', 'theme', '', '', 'Le theme de votre site'), ('006', 0, 1, 0, 'datauser', 'datauser', '', '', 'Parametrage des champs utilisateurs : obligatoire / facultatif / caché'), @@ -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'); diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/ApiController.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/ApiController.php index 001c1f1..785eaaa 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/ApiController.php +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/ApiController.php @@ -58,19 +58,18 @@ class ApiController extends Controller foreach($apps as $app) { $tmp=explode("-",$app); $tmpname=""; - for($i=1;$ifgdebug) echo $tmpname."
"; $tbapps["$tmpname"]=$app; } // Pour chaque apps - foreach($tbapps as $name => $version) { - $application=$em->getRepository('CadolesCoreBundle:Application')->findOneBy(["name"=>$name]); + foreach($tbapps as $package => $version) { + $application=$em->getRepository('CadolesCoreBundle:Application')->findOneBy(["package"=>$package]); if($application) { $serveurapplication=$em->getRepository('CadolesCoreBundle:ServerApplication')->findOneBy(["server"=>$server,"application"=>$application]); if(!$serveurapplication) { diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/ApplicationController.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/ApplicationController.php new file mode 100755 index 0000000..4abd554 --- /dev/null +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/ApplicationController.php @@ -0,0 +1,140 @@ +getDoctrine()->getManager(); + $applications = $em->getRepository($this->labelentity)->findAll(); + + return $this->render('CadolesCoreBundle:Application:list.html.twig',[ + "applications"=>$applications, + "useheader"=>true, + "usesidebar"=>true, + "usemenu"=>false + ]); + } + + public function submitAction(Request $request) + { + // Initialisation de l'enregistrement + $em = $this->getDoctrine()->getManager(); + $data = new Application(); + + // Création du formulaire + $form = $this->createForm(ApplicationType::class,$data,array("mode"=>"submit")); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur erreur + $this->getErrorForm(null,$form,$request,$data,"submit"); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + $em->persist($data); + $em->flush(); + + // Retour à la liste + return $this->redirectToRoute("cadoles_core_config_application"); + } + + // Affichage du formulaire + return $this->render($this->labelentity.':edit.html.twig', [ + 'useheader' => true, + 'usesidebar' => true, + 'usemenu' => false, + 'application' => $data, + 'mode' => 'submit', + 'form' => $form->createView() + ]); + } + + public function updateAction($id,Request $request) + { + // Initialisation de l'enregistrement + $em = $this->getDoctrine()->getManager(); + $data=$em->getRepository($this->labelentity)->find($id); + + // Création du formulaire + $form = $this->createForm(ApplicationType::class,$data,array("mode"=>"update")); + + // Récupération des data du formulaire + $form->handleRequest($request); + + // Sur erreur + $this->getErrorForm(null,$form,$request,$data,"update"); + + // Sur validation + if ($form->get('submit')->isClicked() && $form->isValid()) { + $data = $form->getData(); + $em->persist($data); + $em->flush(); + + // Retour à la liste + return $this->redirectToRoute("cadoles_core_config_application"); + } + + // Affichage du formulaire + return $this->render($this->labelentity.':edit.html.twig', [ + 'useheader' => true, + 'usesidebar' => true, + 'usemenu' => false, + 'application' => $data, + 'mode' => 'update', + 'form' => $form->createView() + ]); + } + + public function deleteAction($id,Request $request) + { + // Initialisation de l'enregistrement + $em = $this->getDoctrine()->getManager(); + $data=$em->getRepository($this->labelentity)->find($id); + $error=false; + + if($error) + return $this->redirectToRoute("cadoles_core_config_application_update",["id"=>$id]); + else { + $em->remove($data); + $em->flush(); + + // Retour à la liste + return $this->redirectToRoute("cadoles_core_config_application"); + } + } + + protected function getErrorForm($id,$form,$request,$data,$mode) { + if ($form->get('submit')->isClicked()&&$mode=="delete") { + } + + if ($form->get('submit')->isClicked() && $mode=="submit") { + } + + if ($form->get('submit')->isClicked() && !$form->isValid()) { + $this->get('session')->getFlashBag()->clear(); + $validator = $this->get('validator'); + $errors = $validator->validate($data); + foreach( $errors as $error ) { + $request->getSession()->getFlashBag()->add("error", $error->getMessage()); + } + + $errors = $form->getErrors(); + foreach( $errors as $error ) { + $request->getSession()->getFlashBag()->add("error", $error->getMessage()); + } + } + } +} diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/CoreController.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/CoreController.php index 5e5a723..1595528 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/CoreController.php +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/CoreController.php @@ -69,13 +69,42 @@ class CoreController extends Controller } + // Total servers $servers = $em->getRepository("CadolesCoreBundle:Server")->findAll(); + // Total by module + $totalmodules = $em->createQueryBuilder() + ->select('COUNT(s.module) total','s.module label') + ->from('CadolesCoreBundle:Server','s') + ->groupBy('s.module'); + + // Total by version + $totalversions = $em->createQueryBuilder() + ->select('COUNT(s.version) total','s.version label') + ->from('CadolesCoreBundle:Server','s') + ->groupBy('s.version'); + + // Total applications + $applications = $em->getRepository("CadolesCoreBundle:ServerApplication")->findAll(); + + // Total by apps + $totalapplications = $em->createQueryBuilder() + ->select('COUNT(a.package) total','a.name label') + ->from('CadolesCoreBundle:ServerApplication','sa') + ->from('CadolesCoreBundle:Application','a') + ->where('sa.application=a.id') + ->groupBy('a.package') + ->orderBy('total','DESC'); + return $this->render('CadolesCoreBundle:Core:home.html.twig',[ - 'useheader' => true, - 'usemenu' => false, - 'usesidebar' => false, - 'servers' => $servers, + 'useheader' => true, + 'usemenu' => false, + 'usesidebar' => false, + 'totalserveurs' => count($servers), + 'totalbymodules' => $totalmodules->getQuery()->getResult(), + 'totalbyversions' => $totalversions->getQuery()->getResult(), + 'totalapplications' => count($applications), + 'totalbyapplications' => $totalapplications->getQuery()->getResult() ]); } } diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php index d4e9b88..ffe0875 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/GroupController.php @@ -8,9 +8,6 @@ use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Filesystem\Filesystem; -use Cadoles\CoreBundle\Entity\Scrum; -use Cadoles\CoreBundle\Form\ScrumType; - class GroupController extends Controller { private $labelentity="CadolesCoreBundle:Group"; diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Form/ApplicationType.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Form/ApplicationType.php new file mode 100644 index 0000000..7ad2c24 --- /dev/null +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Form/ApplicationType.php @@ -0,0 +1,61 @@ +add('submit', + SubmitType::class, [ + "label" => "Valider", + "attr" => ["class" => "btn btn-success"] + ] + ); + + $builder->add('name', + TextType::class, [ + "label" =>"Nom" + ] + ); + + $builder->add('package', + TextType::class, [ + "label" =>"Paquet" + ] + ); + + $builder->add('description', + TextareaType::class, [ + "label" =>"Paquet", + "required" => false, + "attr" => array("rows" => '4') + ] + ); + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults(array( + 'data_class' => 'Cadoles\CoreBundle\Entity\Application', + 'mode' => 'string' + )); + } +} diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Form/ScrumType.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Form/ScrumType.php deleted file mode 100644 index 87c8950..0000000 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Form/ScrumType.php +++ /dev/null @@ -1,79 +0,0 @@ -add('submit', SubmitType::class, [ - 'label' => 'Valider', - 'attr' => ['class' => 'btn btn-success'] - ]); - - $builder - ->add('title', TextType::class, [ - 'label' => 'Titre', - 'attr' => ['class' => 'form-control', 'style' => 'margin-bottom:15px'] - ]); - - - $builder - ->add('groups', Select2EntityType::class, [ - 'label' => 'Visible pour les Groupes', - 'class' => 'CadolesCoreBundle:Group', - 'text_property' => 'label', - 'multiple' => true, - 'remote_route' => 'cadoles_core_user_group_ajax_list', - 'primary_key' => 'id', - 'text_property' => 'label', - 'minimum_input_length' => 0, - 'page_limit' => 100, - 'allow_clear' => true, - 'delay' => 250, - 'cache' => false, - 'cache_timeout' => 60000, - 'language' => 'fr', - 'placeholder' => 'Selectionner un groupe', - ]); - } - else { - $builder - ->add('description',CKEditorType::class,[ - 'config_name' => 'full_config', - 'label' => 'Description', - 'mapped' => false, - 'required' => false, - 'config' => ['height' => '300px','filebrowserUploadRoute' => 'cadoles_core_user_scrum_upload'], - ]); - } - } - - public function configureOptions(OptionsResolver $resolver) - { - $resolver->setDefaults(array( - 'data_class' => 'Cadoles\CoreBundle\Entity\Scrum', - 'mode' => "string" - )); - } -} diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml index c2e2251..59c6dfd 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/config/routing.yml @@ -144,5 +144,20 @@ cadoles_core_api: defaults: { _controller: CadolesCoreBundle:Api:api} methods: ["post"] +#== Application ============================================================================================================ +cadoles_core_config_application: + path: /config/application + defaults: { _controller: CadolesCoreBundle:Application:list } +cadoles_core_config_application_submit: + path: /config/application/submit + defaults: { _controller: CadolesCoreBundle:Application:submit } + +cadoles_core_config_application_update: + path: /config/application/update/{id} + defaults: { _controller: CadolesCoreBundle:Application:update } + +cadoles_core_config_application_delete: + path: /config/application/delete/{id} + defaults: { _controller: CadolesCoreBundle:Application:delete } diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Application/edit.html.twig b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Application/edit.html.twig new file mode 100755 index 0000000..dd51e74 --- /dev/null +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Application/edit.html.twig @@ -0,0 +1,61 @@ +{% extends 'CadolesCoreBundle::base.html.twig' %} + +{% block pagewrapper %} +{{ form_start(form) }} +

+ {% if mode=="update" %} + Modification APPLICATION + {% elseif mode=="submit" %} + Création APPLICATION + {% endif %} +

+ + {{ form_widget(form.submit) }} + + Annuler + + {% if mode=="update" %} + + + Supprimer + + {% endif %} + +

+ + {% if app.session.flashbag.has('error') %} +
+ Erreur
+ {% for flashMessage in app.session.flashbag.get('error') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} + + {% if app.session.flashbag.has('notice') %} +
+ Information
+ {% for flashMessage in app.session.flashbag.get('notice') %} + {{ flashMessage }}
+ {% endfor %} +
+ {% endif %} +
+
+ Information +
+ +
+ {{ form_row(form.name) }} + {{ form_row(form.package) }} + {{ form_row(form.description) }} +
+
+{{ form_end(form) }} +{% endblock %} + +{% block localjavascript %} +{% endblock %} diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Application/list.html.twig b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Application/list.html.twig new file mode 100644 index 0000000..a847be7 --- /dev/null +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Application/list.html.twig @@ -0,0 +1,51 @@ +{% extends "CadolesCoreBundle::base.html.twig" %} + +{% block pagewrapper %} +

+APPLICATIONS +

+ +

Ajouter

+ +
+
+ Liste des Applications +
+ +
+
+ + + + + + + + + + {% for application in applications %} + + + + + + {% endfor %} + +
ActionApplicationPaquet
+ + {{application.name}}{{application.package}}
+
+
+
+{% endblock %} + +{% block localjavascript %} + $(document).ready(function() { + $('#dataTables').DataTable({ + columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ], + responsive: true, + iDisplayLength: 100, + order: [[ 1, "asc" ]] + }); + }); +{% endblock %} \ No newline at end of file diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Core/home.html.twig b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Core/home.html.twig index 52ac27d..b3f7c39 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Core/home.html.twig +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Core/home.html.twig @@ -1,24 +1,108 @@ {% extends '@CadolesCore/base.html.twig' %} {% block pagewrapper %} -
-
- - - -

{{ app.session.get('appname') }}

-
+
+
+
+

Serveurs = {{ totalserveurs }}

+
+ + +
+

Serveurs par Module

+
+
+
+ +
+

Serveurs par Version

+
+
+
+ +
+
+

Applications = {{ totalapplications }}

+
+ +

Applications Installées

+ +
+
+
+
+
-
{% endblock %} {% block localjavascript %} $(document).ready(function() { - Morris.Donut({ - element: 'morris-donut-chart', - data: [ {'label':'01','value':100},{'label':'02','value':200} ], + //== byModule + var bymodule = Morris.Donut({ + element: 'bymodule-chart', + data: [ + {% for total in totalbymodules %} + {'label':'{{ total.label }}','value':{{ total.total }}}, + {% endfor %} + ], resize: true }); + + bymodule.options.data.forEach(function(label, i) { + var legendItem = $('').text( label['label'] + " ( " +label['value'] + " )" ).prepend(' '); + legendItem.find('span') + .css('backgroundColor', bymodule.options.colors[i]) + .css('width', '20px') + .css('display', 'inline-block') + .css('margin', '5px'); + $('#bymodule-legend').append(legendItem) + }); + + //== byVersion + var byversion = Morris.Donut({ + element: 'byversion-chart', + data: [ + {% for total in totalbyversions %} + {'label':'{{ total.label }}','value':{{ total.total }}}, + {% endfor %} + ], + resize: true + }); + + byversion.options.data.forEach(function(label, i) { + var legendItem = $('').text( label['label'] + " ( " +label['value'] + " )" ).prepend(' '); + legendItem.find('span') + .css('backgroundColor', byversion.options.colors[i]) + .css('width', '20px') + .css('display', 'inline-block') + .css('margin', '5px'); + $('#byversion-legend').append(legendItem) + }); + + //== byApplication + var byapplication = Morris.Donut({ + element: 'byapplication-chart', + data: [ + {% for total in totalbyapplications %} + { + 'label':'{{ total.label }}', + 'value':{{ total.total }}, + }, + {% endfor %} + ], + resize: true + }); + + byapplication.options.data.forEach(function(label, i) { + var legendItem = $('').text( label['label'] + " ( " +label['value'] + " )" ).prepend(' '); + legendItem.find('span') + .css('backgroundColor', byapplication.options.colors[i]) + .css('width', '20px') + .css('display', 'inline-block') + .css('margin', '0px 5px 5px 0px'); + $('#byapplication-legend').append(legendItem) + + }); }); {% endblock %} \ No newline at end of file diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/sidebar.html.twig b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/sidebar.html.twig index 01f9410..cbce202 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/sidebar.html.twig +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/sidebar.html.twig @@ -20,7 +20,13 @@ Utilisateurs - + + +
  • + + Applications + +