From 994972606a1fda2dfbef5a982eadf1c625f13f0a Mon Sep 17 00:00:00 2001 From: root Date: Wed, 24 Jun 2020 15:22:39 +0200 Subject: [PATCH] svg ninestat --- .../CoreBundle/Command/InitDataCommand.php | 22 +- .../CoreBundle/Command/SynchroEtabCommand.php | 169 ++++ .../CoreBundle/Controller/ApiController.php | 31 +- .../CoreBundle/Controller/CoreController.php | 67 +- .../src/Cadoles/CoreBundle/Entity/Etab.php | 933 ++++++++++++++++++ .../src/Cadoles/CoreBundle/Entity/Server.php | 63 +- .../CoreBundle/Entity/ServerApplication.php | 4 +- .../CoreBundle/Resources/config/routing.yml | 3 + .../Resources/public/css/leaflet.css | 640 ++++++++++++ .../Resources/public/images/map/layers-2x.png | Bin 0 -> 1259 bytes .../Resources/public/images/map/layers.png | Bin 0 -> 696 bytes .../public/images/map/marker-icon-2x.png | Bin 0 -> 2464 bytes .../public/images/map/marker-icon.png | Bin 0 -> 1466 bytes .../public/images/map/marker-shadow.png | Bin 0 -> 618 bytes .../CoreBundle/Resources/public/js/leaflet.js | 5 + .../Resources/views/Core/home.html.twig | 192 +++- .../Resources/views/Core/server.html.twig | 69 ++ .../Resources/views/Include/footer.html.twig | 1 + .../Resources/views/Include/head.html.twig | 1 + .../CoreBundle/Resources/views/base.html.twig | 3 +- .../CronBundle/Command/InitDataCommand.php | 4 +- 21 files changed, 2162 insertions(+), 45 deletions(-) create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Command/SynchroEtabCommand.php create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/Etab.php create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/css/leaflet.css create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/layers-2x.png create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/layers.png create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/marker-icon-2x.png create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/marker-icon.png create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/marker-shadow.png create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/js/leaflet.js create mode 100644 src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Core/server.html.twig diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/InitDataCommand.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/InitDataCommand.php index b915eba..746b02c 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/InitDataCommand.php +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/InitDataCommand.php @@ -10,9 +10,10 @@ use Doctrine\DBAL\Connection as DBALConnection; use Doctrine\ORM\EntityManager; use Ramsey\Uuid\Uuid; use Ramsey\Uuid\Exception\UnsatisfiedDependencyException; +use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Id\AssignedGenerator; -use Cadoles\CoreBundle\Entity\Group; -use Cadoles\CoreBundle\Entity\UserGroup; +use Cadoles\CoreBundle\Entity\Etab; class InitDataCommand extends ContainerAwareCommand { @@ -50,6 +51,23 @@ class InitDataCommand extends ContainerAwareCommand $stmt->execute(); } $stmt->closeCursor(); + + // afin de forcer les ID sur certaines entités + $metadata = $em->getClassMetaData('CadolesCoreBundle:Etab'); + $metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE); + $metadata->setIdGenerator(new AssignedGenerator()); + + // Etab inconnu + $entity = $em->getRepository('CadolesCoreBundle:Etab')->find(-100); + if(!$entity) { + $entity = new Etab; + $entity->setId(-100); + } + + $entity->setLatitude(50); + $entity->setLongitude(-30); + $em->persist($entity); + $em->flush(); } protected static function determineKernelRootDir(Event $event) { diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/SynchroEtabCommand.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/SynchroEtabCommand.php new file mode 100644 index 0000000..6a0ab76 --- /dev/null +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Command/SynchroEtabCommand.php @@ -0,0 +1,169 @@ +setName('Core:SynchroEtab') + ->setDescription('Synchronisation Etablissement Scolaire') + ->setHelp('This command Synchro Etab for Core') + ->addArgument('simulate', InputArgument::OPTIONAL, 'true to simulate / false to run') + ->addArgument('cronid', InputArgument::OPTIONAL, 'ID Cron Job') + ->addArgument('lastchance', InputArgument::OPTIONAL, 'Lastchance to run the cron') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $this->container = $this->getApplication()->getKernel()->getContainer(); + $this->em = $this->container->get('doctrine')->getEntityManager(); + $this->output = $output; + $this->filesystem = new Filesystem(); + $this->rootlog = $this->container->get('kernel')->getRootDir()."/../var/logs/"; + + $this->writelnred(''); + $this->writelnred('== Core:SynchroEtab'); + $this->writelnred('=========================================================================================================='); + + $simulate = $input->getArgument('simulate'); + if($simulate=="") $simulate="true"; + + if($simulate!="true"&&$simulate!="false") { + $this->writeln('Paramétre incorrect'); + return; + } + $simulate=($simulate=="true"); + + $this->writeln(''); + if($simulate) $this->writeln('** SIMULATION'); + else $this->writeln('** REEL'); + + $this->writeln(''); + $this->writeln('====================================================='); + $this->writeln('== SYNCHONISATION ETAB =============================='); + $this->writeln('====================================================='); + + $headers = ['Accept' => 'application/json']; + $query = []; + $url="https://data.education.gouv.fr/api/records/1.0/search/?dataset=fr-en-adresse-et-geolocalisation-etablissements-premier-et-second-degre&q=numero_uai%3D##RNE##&facet=numero_uai&facet=appellation_officielle&facet=secteur_public_prive_libe&facet=code_postal_uai&facet=localite_acheminement_uai&facet=libelle_commune&facet=appariement&facet=localisation&facet=nature_uai&facet=nature_uai_libe&facet=etat_etablissement&facet=etat_etablissement_libe&facet=code_departement&facet=code_region&facet=code_academie&facet=code_commune&facet=libelle_departement&facet=libelle_region&facet=libelle_academie&facet=secteur_prive_code_type_contrat&facet=secteur_prive_libelle_type_contrat"; + if($this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYactivate")->getValue()) { + $PROXYserver = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYserver")->getValue(); + $PROXYport = $this->em->getRepository("CadolesCoreBundle:Config")->find("PROXYport")->getValue(); + \Unirest\Request::proxy($PROXYserver, $PROXYport, CURLPROXY_HTTP, true); + } + + // Etablissement non localisé + $noloc=$this->em->getRepository("CadolesCoreBundle:Etab")->find(-100); + + // Pour l'ensemble des serveurs + $servers=$this->em->getRepository("CadolesCoreBundle:Server")->findAll(); + foreach($servers as $server) { + + $urlrne=str_replace("##RNE##",$server->getIdLocal(),$url); + $response = \Unirest\Request::get($urlrne,$headers,$query); + if($response->body->records) { + $this->writeln($server->getIdlocal()." Localisé"); + $fields = $response->body->records[0]->fields; + $etab=$this->em->getRepository("CadolesCoreBundle:Etab")->findOneBy(["numero_uai"=>$fields->numero_uai]); + if(!$etab) { + $etab=new Etab(); + } + if(isset($fields->localite_acheminement_uai)) $etab->setLocaliteAcheminementUai($fields->localite_acheminement_uai); + if(isset($fields->numero_uai)) $etab->setNumeroUai($fields->numero_uai); + if(isset($fields->secteur_public_prive_libe)) $etab->setSecteurPublicPriveLibe($fields->secteur_public_prive_libe); + if(isset($fields->etat_etablissement)) $etab->setEtatEtablissement($fields->etat_etablissement); + if(isset($fields->libelle_region)) $etab->setLibelleRegion($fields->libelle_region); + if(isset($fields->secteur_prive_code_type_contrat)) $etab->setSecteurPriveCodeTypeContrat($fields->secteur_prive_code_type_contrat); + if(isset($fields->code_postal_uai)) $etab->setCodePostalUai($fields->code_postal_uai); + if(isset($fields->code_region)) $etab->setCodeRegion($fields->code_region); + if(isset($fields->epsg)) $etab->setEpsg($fields->epsg); + if(isset($fields->nature_uai_libe)) $etab->setNatureUaiLibe($fields->nature_uai_libe); + if(isset($fields->appellation_officielle)) $etab->setAppellationOfficielle($fields->appellation_officielle); + if(isset($fields->latitude)) $etab->setLatitude($fields->latitude); + if(isset($fields->secteur_prive_libelle_type_contrat)) $etab->setSecteurPriveLibelleTypeContrat($fields->secteur_prive_libelle_type_contrat); + if(isset($fields->coordonnee_y)) $etab->setCoordonneeY($fields->coordonnee_y); + if(isset($fields->coordonnee_x)) $etab->setCoordonneeX($fields->coordonnee_x); + if(isset($fields->adresse_uai)) $etab->setAdresseUai($fields->adresse_uai); + if(isset($fields->code_commune)) $etab->setCodeCommune($fields->code_commune); + if(isset($fields->localisation)) $etab->setLocalisation($fields->localisation); + if(isset($fields->libelle_commune)) $etab->setLibelleCommune($fields->libelle_commune); + if(isset($fields->code_departement)) $etab->setCodeDepartement($fields->code_departement); + if(isset($fields->etat_etablissement_libe)) $etab->setEtatEtablissementLibe($fields->etat_etablissement_libe); + if(isset($fields->nature_uai)) $etab->setNatureUai($fields->nature_uai); + if(isset($fields->libelle_departement)) $etab->setLibelleDepartement($fields->libelle_departement); + if(isset($fields->code_academie)) $etab->setCodeAcademie($fields->code_academie); + if(isset($fields->appariement)) $etab->setAppariement($fields->appariement); + if(isset($fields->longitude)) $etab->setLongitude($fields->longitude); + if(isset($fields->denomination_principale)) $etab->setDenominationPrincipale($fields->denomination_principale); + if(isset($fields->libelle_academie)) $etab->setLibelleAcademie($fields->libelle_academie); + //$etab->setPosition($fields->position); + + if(!$etab->getLongitude()&&$etab->getLibelleCommune()) { + $localisation = \Unirest\Request::get("https://nominatim.openstreetmap.org/search?q=".urlencode($fields->libelle_commune)."&format=json",$headers); + if($localisation->body[0]) { + $etab->setLongitude($localisation->body[0]->lon); + $etab->setLatitude($localisation->body[0]->lat); + } + } + + // Sauvegarde + $this->em->persist($etab); + $this->em->flush(); + + $etab=$this->em->getRepository("CadolesCoreBundle:Etab")->findOneBy(["numero_uai"=>$fields->numero_uai]); + $server->setEtab($etab); + $this->em->flush(); + } + else { + $this->writeln($server->getIdlocal()." Non Localisé"); + + // Ratacher le serveur à l'etab inconnu + $server->setEtab($noloc); + $this->em->flush(); + } + + } + $this->writeln(''); + return 1; + } + + private function writelnred($string) { + $this->output->writeln(''.$string.''); + $this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n"); + } + private function writeln($string) { + $this->output->writeln($string); + $this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n"); + } + + +} 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 785eaaa..5d27f71 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/ApiController.php +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/ApiController.php @@ -23,7 +23,8 @@ class ApiController extends Controller echo "NAME = ".$request->request->get("name")."
"; echo "MODULE = ".$request->request->get("module")."
"; echo "VERSION = ".$request->request->get("version")."
"; - echo "APPS = ".$request->request->get("apps")."

"; + echo "URL = ".$request->request->get("url")."

"; + echo "APPS = ".$request->request->get("apps")."

"; } $idserver = $request->request->get("idserver"); @@ -31,6 +32,7 @@ class ApiController extends Controller $name = $request->request->get("name"); $module = $request->request->get("module"); $version = $request->request->get("version"); + $url = "https://".$request->request->get("url"); $apps = explode(";",$request->request->get("apps")); $now = new \DateTime(); @@ -46,27 +48,40 @@ class ApiController extends Controller $server->setName($name); $server->setModule($module); $server->setVersion($version); + $server->setUrl($url); $server->setUpdatedate($now); // Sauvegarde $em->persist($server); $em->flush(); + // On supprime tt les apps du serveur pour remettre à jour les apps associées au serveur + $entityapps=$em->getRepository('CadolesCoreBundle:ServerApplication')->findBy(["server"=>$server]); + foreach($entityapps as $entity) { + $em->remove($entity); + $em->flush(); + } + // Décryptage des paquets envole entrant $tbapps=[]; if($this->fgdebug) echo "APPLICATIONS
"; foreach($apps as $app) { $tmp=explode("-",$app); - $tmpname=""; - for($i=0;$ifgdebug) echo $tmpname."
"; - $tbapps["$tmpname"]=$app; + if($this->fgdebug) echo $tmpname."
"; + $tbapps["$tmpname"]=$app; + } } + // Pour chaque apps foreach($tbapps as $package => $version) { $application=$em->getRepository('CadolesCoreBundle:Application')->findOneBy(["package"=>$package]); 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 1595528..feb9922 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/CoreController.php +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Controller/CoreController.php @@ -76,17 +76,51 @@ class CoreController extends Controller $totalmodules = $em->createQueryBuilder() ->select('COUNT(s.module) total','s.module label') ->from('CadolesCoreBundle:Server','s') - ->groupBy('s.module'); + ->groupBy('s.module') + ->orderBy('total','DESC') + ->addOrderBy('label','ASC'); // Total by version $totalversions = $em->createQueryBuilder() ->select('COUNT(s.version) total','s.version label') ->from('CadolesCoreBundle:Server','s') - ->groupBy('s.version'); + ->groupBy('s.version') + ->orderBy('total','DESC') + ->addOrderBy('label','ASC'); + // Total by Académie + $totalbyacademies = $em->createQueryBuilder() + ->select('COUNT(e.libelle_academie) total','e.libelle_academie label') + ->from('CadolesCoreBundle:Etab','e') + ->from('CadolesCoreBundle:Server','s') + ->where('s.etab=e') + ->groupBy('e.libelle_academie') + ->orderBy('total','DESC') + ->addOrderBy('label','ASC'); + + // Total by Secteur + $totalbysecteurs = $em->createQueryBuilder() + ->select('COUNT(e.secteur_public_prive_libe) total','e.secteur_public_prive_libe label') + ->from('CadolesCoreBundle:Etab','e') + ->from('CadolesCoreBundle:Server','s') + ->where('s.etab=e') + ->groupBy('e.secteur_public_prive_libe') + ->orderBy('total','DESC') + ->addOrderBy('label','ASC'); + + // Total by Nature + $totalbynatures = $em->createQueryBuilder() + ->select('COUNT(e.nature_uai_libe) total','e.nature_uai_libe label') + ->from('CadolesCoreBundle:Etab','e') + ->from('CadolesCoreBundle:Server','s') + ->where('s.etab=e') + ->groupBy('e.nature_uai_libe') + ->orderBy('total','DESC') + ->addOrderBy('label','ASC'); + // Total applications $applications = $em->getRepository("CadolesCoreBundle:ServerApplication")->findAll(); - + // Total by apps $totalapplications = $em->createQueryBuilder() ->select('COUNT(a.package) total','a.name label') @@ -94,17 +128,38 @@ class CoreController extends Controller ->from('CadolesCoreBundle:Application','a') ->where('sa.application=a.id') ->groupBy('a.package') - ->orderBy('total','DESC'); + ->orderBy('total','DESC') + ->addOrderBy('label','ASC'); + + // Servers + $etabs = $em->getRepository("CadolesCoreBundle:Etab")->findAll(); return $this->render('CadolesCoreBundle:Core:home.html.twig',[ 'useheader' => true, 'usemenu' => false, 'usesidebar' => false, - 'totalserveurs' => count($servers), + 'etabs' => $etabs, + 'totalservers' => count($servers), 'totalbymodules' => $totalmodules->getQuery()->getResult(), 'totalbyversions' => $totalversions->getQuery()->getResult(), 'totalapplications' => count($applications), - 'totalbyapplications' => $totalapplications->getQuery()->getResult() + 'totalbyapplications' => $totalapplications->getQuery()->getResult(), + 'totalbyacademies' => $totalbyacademies->getQuery()->getResult(), + 'totalbysecteurs' => $totalbysecteurs->getQuery()->getResult(), + 'totalbynatures' => $totalbynatures->getQuery()->getResult(), + ]); } + + public function serverAction($id,Request $request) + { + $em = $this->getDoctrine()->getManager(); + $server=$em->getRepository("CadolesCoreBundle:Server")->find($id); + return $this->render('CadolesCoreBundle:Core:server.html.twig',[ + 'useheader' => false, + 'usemenu' => false, + 'usesidebar' => false, + 'server' => $server + ]); + } } diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/Etab.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/Etab.php new file mode 100644 index 0000000..794aa9d --- /dev/null +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/Etab.php @@ -0,0 +1,933 @@ +id = $id; + return $this; + } + + + /** + * Constructor + */ + public function __construct() + { + $this->servers = new \Doctrine\Common\Collections\ArrayCollection(); + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set localiteAcheminementUai + * + * @param string $localiteAcheminementUai + * + * @return Etab + */ + public function setLocaliteAcheminementUai($localiteAcheminementUai) + { + $this->localite_acheminement_uai = $localiteAcheminementUai; + + return $this; + } + + /** + * Get localiteAcheminementUai + * + * @return string + */ + public function getLocaliteAcheminementUai() + { + return $this->localite_acheminement_uai; + } + + /** + * Set numeroUai + * + * @param string $numeroUai + * + * @return Etab + */ + public function setNumeroUai($numeroUai) + { + $this->numero_uai = $numeroUai; + + return $this; + } + + /** + * Get numeroUai + * + * @return string + */ + public function getNumeroUai() + { + return $this->numero_uai; + } + + /** + * Set secteurPublicPriveLibe + * + * @param string $secteurPublicPriveLibe + * + * @return Etab + */ + public function setSecteurPublicPriveLibe($secteurPublicPriveLibe) + { + $this->secteur_public_prive_libe = $secteurPublicPriveLibe; + + return $this; + } + + /** + * Get secteurPublicPriveLibe + * + * @return string + */ + public function getSecteurPublicPriveLibe() + { + return $this->secteur_public_prive_libe; + } + + /** + * Set etatEtablissement + * + * @param string $etatEtablissement + * + * @return Etab + */ + public function setEtatEtablissement($etatEtablissement) + { + $this->etat_etablissement = $etatEtablissement; + + return $this; + } + + /** + * Get etatEtablissement + * + * @return string + */ + public function getEtatEtablissement() + { + return $this->etat_etablissement; + } + + /** + * Set libelleRegion + * + * @param string $libelleRegion + * + * @return Etab + */ + public function setLibelleRegion($libelleRegion) + { + $this->libelle_region = $libelleRegion; + + return $this; + } + + /** + * Get libelleRegion + * + * @return string + */ + public function getLibelleRegion() + { + return $this->libelle_region; + } + + /** + * Set secteurPriveCodeTypeContrat + * + * @param string $secteurPriveCodeTypeContrat + * + * @return Etab + */ + public function setSecteurPriveCodeTypeContrat($secteurPriveCodeTypeContrat) + { + $this->secteur_prive_code_type_contrat = $secteurPriveCodeTypeContrat; + + return $this; + } + + /** + * Get secteurPriveCodeTypeContrat + * + * @return string + */ + public function getSecteurPriveCodeTypeContrat() + { + return $this->secteur_prive_code_type_contrat; + } + + /** + * Set codePostalUai + * + * @param string $codePostalUai + * + * @return Etab + */ + public function setCodePostalUai($codePostalUai) + { + $this->code_postal_uai = $codePostalUai; + + return $this; + } + + /** + * Get codePostalUai + * + * @return string + */ + public function getCodePostalUai() + { + return $this->code_postal_uai; + } + + /** + * Set codeRegion + * + * @param string $codeRegion + * + * @return Etab + */ + public function setCodeRegion($codeRegion) + { + $this->code_region = $codeRegion; + + return $this; + } + + /** + * Get codeRegion + * + * @return string + */ + public function getCodeRegion() + { + return $this->code_region; + } + + /** + * Set epsg + * + * @param string $epsg + * + * @return Etab + */ + public function setEpsg($epsg) + { + $this->epsg = $epsg; + + return $this; + } + + /** + * Get epsg + * + * @return string + */ + public function getEpsg() + { + return $this->epsg; + } + + /** + * Set natureUaiLibe + * + * @param string $natureUaiLibe + * + * @return Etab + */ + public function setNatureUaiLibe($natureUaiLibe) + { + $this->nature_uai_libe = $natureUaiLibe; + + return $this; + } + + /** + * Get natureUaiLibe + * + * @return string + */ + public function getNatureUaiLibe() + { + return $this->nature_uai_libe; + } + + /** + * Set appellationOfficielle + * + * @param string $appellationOfficielle + * + * @return Etab + */ + public function setAppellationOfficielle($appellationOfficielle) + { + $this->appellation_officielle = $appellationOfficielle; + + return $this; + } + + /** + * Get appellationOfficielle + * + * @return string + */ + public function getAppellationOfficielle() + { + return $this->appellation_officielle; + } + + /** + * Set latitude + * + * @param string $latitude + * + * @return Etab + */ + public function setLatitude($latitude) + { + $this->latitude = $latitude; + + return $this; + } + + /** + * Get latitude + * + * @return string + */ + public function getLatitude() + { + return $this->latitude; + } + + /** + * Set secteurPriveLibelleTypeContrat + * + * @param string $secteurPriveLibelleTypeContrat + * + * @return Etab + */ + public function setSecteurPriveLibelleTypeContrat($secteurPriveLibelleTypeContrat) + { + $this->secteur_prive_libelle_type_contrat = $secteurPriveLibelleTypeContrat; + + return $this; + } + + /** + * Get secteurPriveLibelleTypeContrat + * + * @return string + */ + public function getSecteurPriveLibelleTypeContrat() + { + return $this->secteur_prive_libelle_type_contrat; + } + + /** + * Set coordonneeY + * + * @param string $coordonneeY + * + * @return Etab + */ + public function setCoordonneeY($coordonneeY) + { + $this->coordonnee_y = $coordonneeY; + + return $this; + } + + /** + * Get coordonneeY + * + * @return string + */ + public function getCoordonneeY() + { + return $this->coordonnee_y; + } + + /** + * Set coordonneeX + * + * @param string $coordonneeX + * + * @return Etab + */ + public function setCoordonneeX($coordonneeX) + { + $this->coordonnee_x = $coordonneeX; + + return $this; + } + + /** + * Get coordonneeX + * + * @return string + */ + public function getCoordonneeX() + { + return $this->coordonnee_x; + } + + /** + * Set adresseUai + * + * @param string $adresseUai + * + * @return Etab + */ + public function setAdresseUai($adresseUai) + { + $this->adresse_uai = $adresseUai; + + return $this; + } + + /** + * Get adresseUai + * + * @return string + */ + public function getAdresseUai() + { + return $this->adresse_uai; + } + + /** + * Set codeCommune + * + * @param string $codeCommune + * + * @return Etab + */ + public function setCodeCommune($codeCommune) + { + $this->code_commune = $codeCommune; + + return $this; + } + + /** + * Get codeCommune + * + * @return string + */ + public function getCodeCommune() + { + return $this->code_commune; + } + + /** + * Set localisation + * + * @param string $localisation + * + * @return Etab + */ + public function setLocalisation($localisation) + { + $this->localisation = $localisation; + + return $this; + } + + /** + * Get localisation + * + * @return string + */ + public function getLocalisation() + { + return $this->localisation; + } + + /** + * Set libelleCommune + * + * @param string $libelleCommune + * + * @return Etab + */ + public function setLibelleCommune($libelleCommune) + { + $this->libelle_commune = $libelleCommune; + + return $this; + } + + /** + * Get libelleCommune + * + * @return string + */ + public function getLibelleCommune() + { + return $this->libelle_commune; + } + + /** + * Set codeDepartement + * + * @param string $codeDepartement + * + * @return Etab + */ + public function setCodeDepartement($codeDepartement) + { + $this->code_departement = $codeDepartement; + + return $this; + } + + /** + * Get codeDepartement + * + * @return string + */ + public function getCodeDepartement() + { + return $this->code_departement; + } + + /** + * Set etatEtablissementLibe + * + * @param string $etatEtablissementLibe + * + * @return Etab + */ + public function setEtatEtablissementLibe($etatEtablissementLibe) + { + $this->etat_etablissement_libe = $etatEtablissementLibe; + + return $this; + } + + /** + * Get etatEtablissementLibe + * + * @return string + */ + public function getEtatEtablissementLibe() + { + return $this->etat_etablissement_libe; + } + + /** + * Set natureUai + * + * @param string $natureUai + * + * @return Etab + */ + public function setNatureUai($natureUai) + { + $this->nature_uai = $natureUai; + + return $this; + } + + /** + * Get natureUai + * + * @return string + */ + public function getNatureUai() + { + return $this->nature_uai; + } + + /** + * Set libelleDepartement + * + * @param string $libelleDepartement + * + * @return Etab + */ + public function setLibelleDepartement($libelleDepartement) + { + $this->libelle_departement = $libelleDepartement; + + return $this; + } + + /** + * Get libelleDepartement + * + * @return string + */ + public function getLibelleDepartement() + { + return $this->libelle_departement; + } + + /** + * Set codeAcademie + * + * @param string $codeAcademie + * + * @return Etab + */ + public function setCodeAcademie($codeAcademie) + { + $this->code_academie = $codeAcademie; + + return $this; + } + + /** + * Get codeAcademie + * + * @return string + */ + public function getCodeAcademie() + { + return $this->code_academie; + } + + /** + * Set appariement + * + * @param string $appariement + * + * @return Etab + */ + public function setAppariement($appariement) + { + $this->appariement = $appariement; + + return $this; + } + + /** + * Get appariement + * + * @return string + */ + public function getAppariement() + { + return $this->appariement; + } + + /** + * Set longitude + * + * @param string $longitude + * + * @return Etab + */ + public function setLongitude($longitude) + { + $this->longitude = $longitude; + + return $this; + } + + /** + * Get longitude + * + * @return string + */ + public function getLongitude() + { + return $this->longitude; + } + + /** + * Set denominationPrincipale + * + * @param string $denominationPrincipale + * + * @return Etab + */ + public function setDenominationPrincipale($denominationPrincipale) + { + $this->denomination_principale = $denominationPrincipale; + + return $this; + } + + /** + * Get denominationPrincipale + * + * @return string + */ + public function getDenominationPrincipale() + { + return $this->denomination_principale; + } + + /** + * Set libelleAcademie + * + * @param string $libelleAcademie + * + * @return Etab + */ + public function setLibelleAcademie($libelleAcademie) + { + $this->libelle_academie = $libelleAcademie; + + return $this; + } + + /** + * Get libelleAcademie + * + * @return string + */ + public function getLibelleAcademie() + { + return $this->libelle_academie; + } + + /** + * Set position + * + * @param string $position + * + * @return Etab + */ + public function setPosition($position) + { + $this->position = $position; + + return $this; + } + + /** + * Get position + * + * @return string + */ + public function getPosition() + { + return $this->position; + } + + /** + * Add server + * + * @param \Cadoles\CoreBundle\Entity\Server $server + * + * @return Etab + */ + public function addServer(\Cadoles\CoreBundle\Entity\Server $server) + { + $this->servers[] = $server; + + return $this; + } + + /** + * Remove server + * + * @param \Cadoles\CoreBundle\Entity\Server $server + */ + public function removeServer(\Cadoles\CoreBundle\Entity\Server $server) + { + $this->servers->removeElement($server); + } + + /** + * Get servers + * + * @return \Doctrine\Common\Collections\Collection + */ + public function getServers() + { + return $this->servers; + } +} diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/Server.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/Server.php index 81a39c8..d3c2ba8 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/Server.php +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/Server.php @@ -7,8 +7,6 @@ use Doctrine\Common\Collections\ArrayCollection; use Symfony\Component\Validator\Constraints as Assert; /** - * Scrum - * * @ORM\Entity * @ORM\Table(name="server") * @ORM\HasLifecycleCallbacks @@ -49,6 +47,11 @@ class Server */ private $version; + /** + * @ORM\Column(type="string", length=250, nullable=true) + */ + private $url; + /** * @ORM\Column(name="updatedate", type="datetime") */ @@ -59,6 +62,14 @@ class Server */ private $serverapplications; + /** + * @ORM\ManyToOne(targetEntity="Cadoles\CoreBundle\Entity\Etab", inversedBy="servers") + */ + private $etab; + + + + /** * Constructor */ @@ -197,6 +208,30 @@ class Server return $this->version; } + /** + * Set url + * + * @param string $url + * + * @return Server + */ + public function setUrl($url) + { + $this->url = $url; + + return $this; + } + + /** + * Get url + * + * @return string + */ + public function getUrl() + { + return $this->url; + } + /** * Set updatedate * @@ -254,4 +289,28 @@ class Server { return $this->serverapplications; } + + /** + * Set etab + * + * @param \Cadoles\CoreBundle\Entity\Etab $etab + * + * @return Server + */ + public function setEtab(\Cadoles\CoreBundle\Entity\Etab $etab = null) + { + $this->etab = $etab; + + return $this; + } + + /** + * Get etab + * + * @return \Cadoles\CoreBundle\Entity\Etab + */ + public function getEtab() + { + return $this->etab; + } } diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/ServerApplication.php b/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/ServerApplication.php index 2211562..e0ce047 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/ServerApplication.php +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Entity/ServerApplication.php @@ -7,9 +7,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Symfony\Component\Validator\Constraints as Assert; /** - * Scrum - * - * @ORM\Entity + * @ORM\Entity * @ORM\Table(name="serverapplication") * @ORM\HasLifecycleCallbacks */ 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 59c6dfd..7aa2ee8 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 @@ -3,6 +3,9 @@ cadoles_core_home: path: / defaults: { _controller: CadolesCoreBundle:Core:home } +cadoles_core_server: + path: /server/{id} + defaults: { _controller: CadolesCoreBundle:Core:server } #== Theme ================================================================================================================ diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/css/leaflet.css b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/css/leaflet.css new file mode 100644 index 0000000..cbb7107 --- /dev/null +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/css/leaflet.css @@ -0,0 +1,640 @@ +/* required styles */ + +.leaflet-pane, +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-tile-container, +.leaflet-pane > svg, +.leaflet-pane > canvas, +.leaflet-zoom-box, +.leaflet-image-layer, +.leaflet-layer { + position: absolute; + left: 0; + top: 0; + } +.leaflet-container { + overflow: hidden; + } +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; + } +/* Prevents IE11 from highlighting tiles in blue */ +.leaflet-tile::selection { + background: transparent; +} +/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ +.leaflet-safari .leaflet-tile { + image-rendering: -webkit-optimize-contrast; + } +/* hack that prevents hw layers "stretching" when loading new tiles */ +.leaflet-safari .leaflet-tile-container { + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; + } +.leaflet-marker-icon, +.leaflet-marker-shadow { + display: block; + } +/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ +.leaflet-container .leaflet-overlay-pane svg, +.leaflet-container .leaflet-marker-pane img, +.leaflet-container .leaflet-shadow-pane img, +.leaflet-container .leaflet-tile-pane img, +.leaflet-container img.leaflet-image-layer, +.leaflet-container .leaflet-tile { + max-width: none !important; + max-height: none !important; + } + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; + } +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; + /* Fallback for FF which doesn't support pinch-zoom */ + touch-action: none; + touch-action: pinch-zoom; +} +.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { + -ms-touch-action: none; + touch-action: none; +} +.leaflet-container { + -webkit-tap-highlight-color: transparent; +} +.leaflet-container a { + -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); +} +.leaflet-tile { + filter: inherit; + visibility: hidden; + } +.leaflet-tile-loaded { + visibility: inherit; + } +.leaflet-zoom-box { + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; + } +/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ +.leaflet-overlay-pane svg { + -moz-user-select: none; + } + +.leaflet-pane { z-index: 400; } + +.leaflet-tile-pane { z-index: 200; } +.leaflet-overlay-pane { z-index: 400; } +.leaflet-shadow-pane { z-index: 500; } +.leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } +.leaflet-popup-pane { z-index: 700; } + +.leaflet-map-pane canvas { z-index: 100; } +.leaflet-map-pane svg { z-index: 200; } + +.leaflet-vml-shape { + width: 1px; + height: 1px; + } +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; + } + + +/* control positioning */ + +.leaflet-control { + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } +.leaflet-top, +.leaflet-bottom { + position: absolute; + z-index: 1000; + pointer-events: none; + } +.leaflet-top { + top: 0; + } +.leaflet-right { + right: 0; + } +.leaflet-bottom { + bottom: 0; + } +.leaflet-left { + left: 0; + } +.leaflet-control { + float: left; + clear: both; + } +.leaflet-right .leaflet-control { + float: right; + } +.leaflet-top .leaflet-control { + margin-top: 10px; + } +.leaflet-bottom .leaflet-control { + margin-bottom: 10px; + } +.leaflet-left .leaflet-control { + margin-left: 10px; + } +.leaflet-right .leaflet-control { + margin-right: 10px; + } + + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-tile { + will-change: opacity; + } +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + } +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; + } +.leaflet-zoom-animated { + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + } +.leaflet-zoom-anim .leaflet-zoom-animated { + will-change: transform; + } +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); + } +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile { + -webkit-transition: none; + -moz-transition: none; + transition: none; + } + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; + } + + +/* cursors */ + +.leaflet-interactive { + cursor: pointer; + } +.leaflet-grab { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: grab; + } +.leaflet-crosshair, +.leaflet-crosshair .leaflet-interactive { + cursor: crosshair; + } +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; + } +.leaflet-dragging .leaflet-grab, +.leaflet-dragging .leaflet-grab .leaflet-interactive, +.leaflet-dragging .leaflet-marker-draggable { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: grabbing; + } + +/* marker & overlays interactivity */ +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-image-layer, +.leaflet-pane > svg path, +.leaflet-tile-container { + pointer-events: none; + } + +.leaflet-marker-icon.leaflet-interactive, +.leaflet-image-layer.leaflet-interactive, +.leaflet-pane > svg path.leaflet-interactive, +svg.leaflet-image-layer.leaflet-interactive path { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline: 0; + } +.leaflet-container a { + color: #0078A8; + } +.leaflet-container a.leaflet-active { + outline: 2px solid orange; + } +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255,255,255,0.5); + } + + +/* general typography */ +.leaflet-container { + font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; + } + + +/* general toolbar styles */ + +.leaflet-bar { + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; + } +.leaflet-bar a, +.leaflet-bar a:hover { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; + } +.leaflet-bar a, +.leaflet-control-layers-toggle { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; + } +.leaflet-bar a:hover { + background-color: #f4f4f4; + } +.leaflet-bar a:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } +.leaflet-bar a:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; + } +.leaflet-bar a.leaflet-disabled { + cursor: default; + background-color: #f4f4f4; + color: #bbb; + } + +.leaflet-touch .leaflet-bar a { + width: 30px; + height: 30px; + line-height: 30px; + } +.leaflet-touch .leaflet-bar a:first-child { + border-top-left-radius: 2px; + border-top-right-radius: 2px; + } +.leaflet-touch .leaflet-bar a:last-child { + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + } + +/* zoom control */ + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; + } + +.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { + font-size: 22px; + } + + +/* layers control */ + +.leaflet-control-layers { + box-shadow: 0 1px 5px rgba(0,0,0,0.4); + background: #fff; + border-radius: 5px; + } +.leaflet-control-layers-toggle { + background-image: url(../bundles/cadolescore/images/map/layers.png); + width: 36px; + height: 36px; + } +.leaflet-retina .leaflet-control-layers-toggle { + background-image: url(../bundles/cadolescore/images/map/layers-2x.png); + background-size: 26px 26px; + } +.leaflet-touch .leaflet-control-layers-toggle { + width: 44px; + height: 44px; + } +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; + } +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; + } +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; + } +.leaflet-control-layers-scrollbar { + overflow-y: scroll; + overflow-x: hidden; + padding-right: 5px; + } +.leaflet-control-layers-selector { + margin-top: 2px; + position: relative; + top: 1px; + } +.leaflet-control-layers label { + display: block; + } +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; + } + +/* Default icon URLs */ +.leaflet-default-icon-path { + background-image: url(../bundles/cadolescore/images/map/marker-icon.png); + } + + +/* attribution and scale controls */ + +.leaflet-container .leaflet-control-attribution { + background: #fff; + background: rgba(255, 255, 255, 0.7); + margin: 0; + } +.leaflet-control-attribution, +.leaflet-control-scale-line { + padding: 0 5px; + color: #333; + } +.leaflet-control-attribution a { + text-decoration: none; + } +.leaflet-control-attribution a:hover { + text-decoration: underline; + } +.leaflet-container .leaflet-control-attribution, +.leaflet-container .leaflet-control-scale { + font-size: 11px; + } +.leaflet-left .leaflet-control-scale { + margin-left: 5px; + } +.leaflet-bottom .leaflet-control-scale { + margin-bottom: 5px; + } +.leaflet-control-scale-line { + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + font-size: 11px; + white-space: nowrap; + overflow: hidden; + -moz-box-sizing: border-box; + box-sizing: border-box; + + background: #fff; + background: rgba(255, 255, 255, 0.5); + } +.leaflet-control-scale-line:not(:first-child) { + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; + } +.leaflet-control-scale-line:not(:first-child):not(:last-child) { + border-bottom: 2px solid #777; + } + +.leaflet-touch .leaflet-control-attribution, +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + box-shadow: none; + } +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; + } + + +/* popup */ + +.leaflet-popup { + position: absolute; + text-align: center; + margin-bottom: 20px; + } +.leaflet-popup-content-wrapper { + padding: 1px; + text-align: left; + border-radius: 12px; + } +.leaflet-popup-content { + margin: 13px 19px; + line-height: 1.4; + } +.leaflet-popup-content p { + margin: 18px 0; + } +.leaflet-popup-tip-container { + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-left: -20px; + overflow: hidden; + pointer-events: none; + } +.leaflet-popup-tip { + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + } +.leaflet-popup-content-wrapper, +.leaflet-popup-tip { + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0,0,0,0.4); + } +.leaflet-container a.leaflet-popup-close-button { + position: absolute; + top: 0; + right: 0; + padding: 4px 4px 0 0; + border: none; + text-align: center; + width: 18px; + height: 14px; + font: 16px/14px Tahoma, Verdana, sans-serif; + color: #c3c3c3; + text-decoration: none; + font-weight: bold; + background: transparent; + } +.leaflet-container a.leaflet-popup-close-button:hover { + color: #999; + } +.leaflet-popup-scrolled { + overflow: auto; + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; + } + +.leaflet-oldie .leaflet-popup-content-wrapper { + zoom: 1; + } +.leaflet-oldie .leaflet-popup-tip { + width: 24px; + margin: 0 auto; + + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); + } +.leaflet-oldie .leaflet-popup-tip-container { + margin-top: -1px; + } + +.leaflet-oldie .leaflet-control-zoom, +.leaflet-oldie .leaflet-control-layers, +.leaflet-oldie .leaflet-popup-content-wrapper, +.leaflet-oldie .leaflet-popup-tip { + border: 1px solid #999; + } + + +/* div icon */ + +.leaflet-div-icon { + background: #fff; + border: 1px solid #666; + } + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); + } +.leaflet-tooltip.leaflet-clickable { + cursor: pointer; + pointer-events: auto; + } +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; + } + +/* Directions */ + +.leaflet-tooltip-bottom { + margin-top: 6px; +} +.leaflet-tooltip-top { + margin-top: -6px; +} +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; + } +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; + } +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; + } +.leaflet-tooltip-left { + margin-left: -6px; +} +.leaflet-tooltip-right { + margin-left: 6px; +} +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; + } +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; + } +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; + } diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/layers-2x.png b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/layers-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..200c333dca9652ac4cba004d609e5af4eee168c1 GIT binary patch literal 1259 zcmVFhCYNy;#0irRPomHqW|G1C*;4?@4#E?jH>?v@U%cy?3dQAc-DchXVErpOh~ z-jbon+tNbnl6hoEb;)TVk+%hTDDi_G%i3*RZ&15!$Fjr^f;Ke&A@|?=`2&+{zr+3a z{D*=t(`AXyS%X7N z%a#RZw6vD^t_rnM`L4E>m=U&R!A-&}nZIi$BOPvkhrCuUe@BN~-lRD)f44;J%TwgE zcze8u!PQ_NR7?o(NylLXVTfDO zxs5=@|GsYEsNo4M#nT%N!UE(?dnS)t2+{ELYAFp*3=iF=|EQnTp`#vlSXuGVraYo? z+RCzXo6h3qA8{KG?S4nE(lM+;Eb4nT3XV;7gcAxUi5m)`k5tv}cPy()8ZR3TLW3I- zAS^}cq-IJvL7a4RgR!yk@~RT%$lA7{L5ES*hyx)M4(yxI$Ub(4f)K|^v1>zvwQY!_ zIrWw8q9GS^!Dp~}+?mbnB6jDF8mVlbQ!jFKDY;w=7;XO{9bq7>LXGK24WA`;rL)_Z z)&j}pbV(;6gY;VMhbxgvn`X;6x}VUEE-7 z%)7j-%t8S=ZL3yc)HbXDAqJZvBTPoiW_A-+a8m3_Z?v{DN7Tnr#O_VUMT0UBt$;p` zDh6JbGHN8JJ*JN%y2%msb97@_S>9!%Egwk;?PEkU9ntz&3uR}%Fj5d$JHQbQb3}a{ zSzFT^#n=VInPpcAS}CNxj?_ zVscANk5Cfz(51EI1pz};AWWb|kgbYNb4wCEGUn3+eMUMV?1-{=I4TlmLJMot@rd07 zZuo2hk1ccu{YmGkcYdWAVdk{Z4Nm?^cTD&}jGm+Q1SYIXMwmG*oO*83&#>l%nbR`G zhh=lZ%xIb7kU3#;TBbfECrnC9P=-XpL|TG2BoZdj61*XiFbW8?1Z_wp%#;>${SUIy V$8qr;L*)Pf002ovPDHLkV1hYLS~36t literal 0 HcmV?d00001 diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/layers.png b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/layers.png new file mode 100644 index 0000000000000000000000000000000000000000..1a72e5784b2b456eac5d7670738db80697af3377 GIT binary patch literal 696 zcmV;p0!RIcP)*@&l2<6p=!C&s@#ZL+%BQvF&b?w6S%wp=I>1QHj7AP5C)IWy#b znXXB;g;j=$a-tW89K%FbDceHVq&unY*Wx3L#=EGWH=rjqnp|4c_Ulec!ql3#G-5ZF zVlbBA@XP=)C8U&+Lrc)S4O5%1$&{(;7R^K(CSnvSr$v;+B$8q&7Bf|h$#PARo1^%M zf1H^nG-EiXVXr07OH(*8R)xa|FD;lXUlg_-%)~ZGsL2cX0NXaAzN2q%jqLRR6ruVk8`Jb7n#{`T;o@`F= z#3YcynIR^s83UNF3D!f5m#Mg)NJ24&Qfrqb&_z=yF;=B)#9Iq7u-@^O!(mW{D;qvr zPc)gVb%aowtS8m@ElL4A9G>w#ffQ~q{i&_i)*6f^)Sz|C?C>zb4Uo?H<-&Hz@a?J; z$ml@zGygWofb9$ZBj6aLjpLhsT2AzjOu=-*u_gSCUYnU^5s62$4H-fe}gSR(=wKRaTHh!@*b)YV6mo|a4Fn6Rgc&Rpk zvn_X|3VY?v=>nJ{slE^V1GaGWk}m@aIWGIpghbfPh8m@aIWEo_%AZI>==moIFVE^L=C zZJ91?mo03UEp3-BY?wBGur6$uD{Yr9Y?m%SHF8Fk1pc(Nva%QJ+{FLkalfypz3&M|||Fn`7|g3c~4(nXHKFmRnwn$J#_$xE8i z|Ns9!kC;(oC1qQk>LMp3_a2(odYyMT@>voX=UI)k>1cJdn;gjmJ-|6v4nb1Oryh)eQMwHP(i@!36%vGJyFK(JTj?Vb{{C=jx&)@1l zlFmnw%0`&bqruifkkHKC=vbiAM3&E`#Mv>2%tw;VK8?_|&E89cs{a1}$J*!f_xd-C z&F%B|oxRgPlh0F!txkxrQjNA`m9~?&&|jw4W0<`_iNHsX$VQXVK!B}Xkh4>av|f_8 zLY2?t?ejE=%(TnfV5iqOjm?d;&qI~ZGl|SzU77a)002XDQchC<95+*MjE@82?VLm= z3xf6%Vd@99z|q|-ua5l3kJxvZwan-8K1cPiwQAtlcNX~ZqLeoMB+a;7)WA|O#HOB% zg6SX;754xD1{Fy}K~#8Ntklac&zTpadXZ& zC*_=T&g7hfbI$R?v%9?sknIb97gJOJ=`-8YyS3ndqN+Jm+x33!p&Hc@@L$w))s2@N ztv~i}Emc?DykgwFWwma($8+~b>l?tqj$dh13R^nMZnva9 zn0Vflzv2Dvp`oVQw{Guby~i`JGbyBGTEC{y>yzCkg>K&CIeQ$u;lyQ+M{O~gEJ^)Z zrF3p)^>|uT;57}WY&IRwyOQ=dq%Az}_t=_hKowP!Z79q0;@Zu(SWEJJcHY+5T6I({ zw)wj*SNi4wrd+POUfZe4gF77vW?j zoFS}|r2n&$U9Y!S4VEOyN}OpZZi|?cr1VcE_tHsDQgp-ga(SwkBrkCm{|*-yb=}ZW zvcYvLvfA90TPn|!-TuYJV<6`}+RJeRgP3EA=qQcF9k0*#*{f&I_pjam%I6Dd#YE|G zqB!R}tW-K!wV1w+4JcFA_s6~=@9F&j8`u$-ifLN3vK;`lvaA-`jRn_}(8|)!3?-}I zvFi{H;@A$gEZYh?%|Qr_y#*UkOPjwiRCsJQ>mb6h5yGIk6C5_XA=8T?IBfm_?+P0; zhhUs)-(0R*H<&Kku(1>#cGtOpk&Z&kQcw&SJv-4VY<+;=8hYnoX zfNJMCa9)^5Z0;2dCUk;x-%#yS!I~Jr3pNuI!g_tHz!$hKwt1GL~sFvx)3u4TA zv>CLGdQtoZ7Du7ctJRfTqY;FPxs1G{ZJ?73D5J@OO{6BHcPbk{_mjg&p2QFeke%QI zlAJ-kvjuwy1<5D-6>su68A+i998aSZNnQX)+Q}6(GK-C%8G-!1bOJBONU{gT%IOOE z;Yk24YC@^lFW77>r6x7eS1Omc;8=GUp#&zLQ&L{ zv8$hGC`wp~$9pR>f%-_Ps3>YhzP(+vC(E*zr1CVO8ChN^MI-VGMX7+|(r!SGZ9gd5 zzO9sQd>sm|f1|X&oh=8lOzd6+ITvo zCXInR?>RZ#>Hb*PO=7dI!dZ(wY4O}ZGv zdfQFio7+0~PN*RFCZGM6@9-o~y*@?;k00NvOsw54t1^tt{*ATMs^2j}4Wp=4t3RH* z_+8b`F-{E=0sOgM<;VHTo!Ij3u zmmI`2?K7g(GOcGA)@h?$SW&pwHdtj1n57PLI8&6RHhx4R%Q7b z^JEqR)@06V!pbS*@D_ZyRMo_LlT}r{#sXOx4kM-V<_V{!5SSuM^SIVCA37|nY7LWQ zZA#B1h4l`6asz=Lvax_#GMRX|NF>=$=p{Qn0i@ExX1jGhy@B8a*_uR+ODEbVi8ObL zezG?azy>E~S~dl43&8<$(2H}P&*tuBdESUP83KQ?8B z?K(!uS>H1wlWQz;qOfB`T#TZ=EoSp~vZ5XtCvwm1h*Ex6mzTsn_y@_=xREIslV-%- zpdWkEzMjeNOGWrSM32gpBt27*O29NdhGzuDgYxcf`Jjjqw@B;Vmdb@fxdhCRi`Kg> zmUTr$=&@#i!%F4Q6mb&4QKfR^95KJ!<6~fqx-f^66AV!|ywG{6D^Vay-3b99>XOe# e-I|>x8~*?ZhF3snGbtJX0000cOl4 literal 0 HcmV?d00001 diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/marker-icon.png b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/images/map/marker-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..950edf24677ded147df13b26f91baa2b0fa70513 GIT binary patch literal 1466 zcmV;r1x5OaP)P001cn1^@s6z>|W`000GnNklGNuHDcIX17Zdjl&3`L?0sTjIws<{((Dh&g-s0<@jYQyl?D*X^?%13;ml^gy> ziMrY_^1WI=(g@LMizu=zCoA>C`6|QEq1eV92k*7m>G65*&@&6)aC&e}G zI)pf-Za|N`DT&Cn1J|o`19mumxW~hiKiKyc-P`S@q)rdTo84@QI@;0yXrG%9uhI>A zG5QHb6s4=<6xy{1 z@NMxEkryp{LS44%z$3lP^cX!9+2-;CTt3wM4(k*#C{aiIiLuB>jJj;KPhPzIC00bL zU3a#;aJld94lCW=`4&aAy8M7PY=HQ>O%$YEP4c4UY#CRxfgbE~(|uiI=YS8q;O9y6 zmIkXzR`}p7ti|PrM3a}WMnR=3NVnWdAAR>b9X@)DKL6=YsvmH%?I24wdq?Gh54_;# z$?_LvgjEdspdQlft#4CQ z`2Zyvy?*)N1Ftw|{_hakhG9WjS?Az@I@+IZ8JbWewR!XUK4&6346+d#~gsE0SY(LX8&JfY>Aj)RxGy96nwhs2rv zzW6pTnMpFkDSkT*a*6Dx|u@ds6ISVn0@^RmIsKZ5Y;bazbc;tTSq(kg(=481ODrPyNB6n z-$+U}(w$m6U6H$w17Bw+wDaFIe~GvNMYvnw31MpY0eQKT9l>SU``8k7w4)z!GZKMI z#_cEKq7k~i%nlK@6c-K?+R;B#5$?T#YpKD`t_4bAs^#E+@5QW$@OX3*`;(#{U^d-vY)&xEE>n5lYl&T?Amke9$Lam@{1K@O ze*LXqlKQHiv=gx+V^Cbb2?z@ISBQ*3amF;9UJ3SBg(N|710TLamQmYZ&Qjn2LuO<* zCZlB4n%@pc&7NNnY1}x+NWpHlq`OJEo|`aYN9<`RBUB+79g;>dgb6YlfN#kGL?lO_ z!6~M^7sOnbsUkKk<@Ysie&`G>ruxH&Mgy&8;i=A zB9OO!xR{AyODw>DS-q5YM{0ExFEAzt zm>RdS+ssW(-8|?xr0(?$vBVB*%(xDLtq3Hf0I5yFm<_g=W2`QWAax{1rWVH=I!VrP zs(rTFX@W#t$hXNvbgX`gK&^w_YD;CQ!B@e0QbLIWaKAXQe2-kkloo;{iF#6}z!4=W zi$giRj1{ zt;2w`VSCF#WE&*ev7jpsC=6175@(~nTE2;7M-L((0bH@yG}-TB$R~WXd?tA$s3|%y zA`9$sA(>F%J3ioz<-LJl*^o1|w84l>HBR`>3l9c8$5Xr@xCiIQ7{x$fMCzOk_-M=% z+{a_Q#;42`#KfUte@$NT77uaTz?b-fBe)1s5XE$yA79fm?KqM^VgLXD07*qoM6N<$ Ef<_J(9smFU literal 0 HcmV?d00001 diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/js/leaflet.js b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/js/leaflet.js new file mode 100644 index 0000000..bc9ef0f --- /dev/null +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/public/js/leaflet.js @@ -0,0 +1,5 @@ +/* @preserve + * Leaflet 1.6.0+Detached: 0c81bdf904d864fd12a286e3d1979f47aba17991.0c81bdf, a JS library for interactive maps. http://leafletjs.com + * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */ +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i(t.L={})}(this,function(t){"use strict";var i=Object.freeze;function h(t){var i,e,n,o;for(e=1,n=arguments.length;e=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=R(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=R(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.xi.y&&n.y=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=D(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=D(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lati.lng&&n.lng';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function Bt(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var At=(Object.freeze||Object)({ie:it,ielt9:et,edge:nt,webkit:ot,android:st,android23:rt,androidStock:ht,opera:ut,chrome:lt,gecko:ct,safari:_t,phantom:dt,opera12:pt,win:mt,ie3d:ft,webkit3d:gt,gecko3d:vt,any3d:yt,mobile:xt,mobileWebkit:wt,mobileWebkit3d:Pt,msPointer:Lt,pointer:bt,touch:Tt,mobileOpera:zt,mobileGecko:Mt,retina:Ct,passiveEvents:Et,canvas:St,svg:Zt,vml:kt}),It=Lt?"MSPointerDown":"pointerdown",Ot=Lt?"MSPointerMove":"pointermove",Rt=Lt?"MSPointerUp":"pointerup",Nt=Lt?"MSPointerCancel":"pointercancel",Dt=["INPUT","SELECT","OPTION"],jt={},Wt=!1,Ht=0;function Ft(t,i,e,n){return"touchstart"===i?function(t,i,e){var n=a(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(Dt.indexOf(t.target.tagName)<0))return;ji(t)}Gt(t,i)});t["_leaflet_touchstart"+e]=n,t.addEventListener(It,n,!1),Wt||(document.documentElement.addEventListener(It,Ut,!0),document.documentElement.addEventListener(Ot,Vt,!0),document.documentElement.addEventListener(Rt,qt,!0),document.documentElement.addEventListener(Nt,qt,!0),Wt=!0)}(t,e,n):"touchmove"===i?function(t,i,e){function n(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&Gt(t,i)}t["_leaflet_touchmove"+e]=n,t.addEventListener(Ot,n,!1)}(t,e,n):"touchend"===i&&function(t,i,e){function n(t){Gt(t,i)}t["_leaflet_touchend"+e]=n,t.addEventListener(Rt,n,!1),t.addEventListener(Nt,n,!1)}(t,e,n),this}function Ut(t){jt[t.pointerId]=t,Ht++}function Vt(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function qt(t){delete jt[t.pointerId],Ht--}function Gt(t,i){for(var e in t.touches=[],jt)t.touches.push(jt[e]);t.changedTouches=[t],i(t)}var Kt=Lt?"MSPointerDown":bt?"pointerdown":"touchstart",Yt=Lt?"MSPointerUp":bt?"pointerup":"touchend",Xt="_leaflet_";function Jt(t,o,i){var s,r,a=!1;function e(t){var i;if(bt){if(!nt||"mouse"===t.pointerType)return;i=Ht}else i=t.touches.length;if(!(1this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,D(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e=I((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=I(i.paddingBottomRight||i.padding||[0,0]),o=this.getCenter(),s=this.project(o),r=this.project(t),a=this.getPixelBounds(),h=a.getSize().divideBy(2),u=R([a.min.add(e),a.max.subtract(n)]);if(!u.contains(r)){this._enforcingBounds=!0;var l=s.subtract(r),c=I(r.x+l.x,r.y+l.y);(r.xu.max.x)&&(c.x=s.x-l.x,0u.max.y)&&(c.y=s.y-l.y,0=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if((e=this._targets[u(s)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)){if(o&&!Yi(s,t))break;if(n.push(e),o)break}if(s===this._container)break;s=s.parentNode}return n.length||r||o||!Yi(s,t)||(n=[this]),n},_handleDOMEvent:function(t){if(this._loaded&&!Ki(t)){var i=t.type;"mousedown"!==i&&"keypress"!==i&&"keyup"!==i&&"keydown"!==i||Mi(t.target||t.srcElement),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,e){if("click"===t.type){var n=h({},t);n.type="preclick",this._fireDOMEvent(n,n.type,e)}if(!t._stopped&&(e=(e||[]).concat(this._findEventTargets(t,i))).length){var o=e[0];"contextmenu"===i&&o.listens(i,!0)&&ji(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var r=o.getLatLng&&(!o._radius||o._radius<=10);s.containerPoint=r?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=r?o.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var a=0;athis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o))&&(M(function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,e,n){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,mi(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&fi(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),M(function(){this._moveEnd(!0)},this))}});function Qi(t){return new te(t)}var te=S.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return mi(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(li(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+u(this),n),this._layerControlInputs.push(i),i.layerId=u(t.layer),ki(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");return e.appendChild(s),s.appendChild(i),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;0<=s;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;si.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),ee=te.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=ui("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=ui("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),Di(s),ki(s,"click",Wi),ki(s,"click",o,this),ki(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";fi(this._zoomInButton,i),fi(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMinZoom()||mi(this._zoomOutButton,i),!this._disabled&&t._zoom!==t.getMaxZoom()||mi(this._zoomInButton,i)}});$i.mergeOptions({zoomControl:!0}),$i.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new ee,this.addControl(this.zoomControl))});var ne=te.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=ui("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=ui("div",i,e)),t.imperial&&(this._iScale=ui("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;5280Leaflet'},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var i in(t.attributionControl=this)._container=ui("div","leaflet-control-attribution"),Di(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});$i.mergeOptions({attributionControl:!0}),$i.addInitHook(function(){this.options.attributionControl&&(new oe).addTo(this)});te.Layers=ie,te.Zoom=ee,te.Scale=ne,te.Attribution=oe,Qi.layers=function(t,i,e){return new ie(t,i,e)},Qi.zoom=function(t){return new ee(t)},Qi.scale=function(t){return new ne(t)},Qi.attribution=function(t){return new oe(t)};var se=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});se.addTo=function(t,i){return t.addHandler(i,this),this};var re,ae={Events:Z},he=Tt?"touchstart mousedown":"mousedown",ue={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},le={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ce=k.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){p(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(ki(this._dragStartTarget,he,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ce._dragging===this&&this.finishDrag(),Ai(this._dragStartTarget,he,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!pi(this._element,"leaflet-zoom-anim")&&!(ce._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((ce._dragging=this)._preventOutline&&Mi(this._element),Ti(),Qt(),this._moving)))){this.fire("down");var i=t.touches?t.touches[0]:t,e=Ei(this._element);this._startPoint=new B(i.clientX,i.clientY),this._parentScale=Si(e),ki(document,le[t.type],this._onMove,this),ki(document,ue[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&1i.max.x&&(e|=2),t.yi.max.y&&(e|=8),e}function ge(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||je.prototype._containsPoint.call(this,t,!0)}});var He=ke.extend({initialize:function(t,i){p(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=v(t)?t:t.features;if(o){for(i=0,e=o.length;iu.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c])}},_onCloseButtonClick:function(t){this._close(),Wi(t)},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});$i.mergeOptions({closePopupOnClick:!0}),$i.include({openPopup:function(t,i,e){return t instanceof sn||(t=new sn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),Se.include({bindPopup:function(t,i){return t instanceof sn?(p(t,i),(this._popup=t)._source=this):(this._popup&&!i||(this._popup=new sn(i,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,i){return this._popup&&this._map&&(i=this._popup._prepareOpen(this,t,i),this._map.openPopup(this._popup,i)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i=t.layer||t.target;this._popup&&this._map&&(Wi(t),i instanceof Re?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var rn=on.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){on.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){on.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=on.prototype.getEvents.call(this);return Tt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ui("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i=this._map,e=this._container,n=i.latLngToContainerPoint(i.getCenter()),o=i.layerPointToContainerPoint(t),s=this.options.direction,r=e.offsetWidth,a=e.offsetHeight,h=I(this.options.offset),u=this._getAnchor();t="top"===s?t.add(I(-r/2+h.x,-a+h.y+u.y,!0)):"bottom"===s?t.subtract(I(r/2-h.x,-h.y,!0)):"center"===s?t.subtract(I(r/2+h.x,a/2-u.y+h.y,!0)):"right"===s||"auto"===s&&o.xthis.options.maxZoom||ethis.options.maxZoom||void 0!==this.options.minZoom&&oe.max.x)||!i.wrapLat&&(t.ye.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return D(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new N(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new B(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(li(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){mi(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=l,t.onmousemove=l,et&&this.options.opacity<1&&yi(t,this.options.opacity),st&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var e=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(a(this._tileReady,this,t,null,o)),Pi(o,e),this._tiles[n]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var n=this._tileCoordsToKey(t);(e=this._tiles[n])&&(e.loaded=+new Date,this._map._fadeAnimated?(yi(e.el,0),C(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(mi(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new B(this._wrapX?r(t.x,this._wrapX):t.x,this._wrapY?r(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new O(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var un=hn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=p(this,i)).detectRetina&&Ct&&0')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),fn={_initContainer:function(){this._container=ui("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(_n.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=mn("shape");mi(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=mn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[u(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;li(i),t.removeInteractiveTarget(i),delete this._layers[u(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i||(i=t._stroke=mn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=v(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=mn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){_i(t._container)},_bringToBack:function(t){di(t._container)}},gn=kt?mn:$,vn=_n.extend({getEvents:function(){var t=_n.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=gn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=gn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){li(this._container),Ai(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){_n.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),Pi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=gn("path");t.options.className&&mi(i,t.options.className),t.options.interactive&&mi(i,"leaflet-interactive"),this._updateStyle(t),this._layers[u(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){li(t._path),t.removeInteractiveTarget(t._path),delete this._layers[u(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,Q(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){_i(t._path)},_bringToBack:function(t){di(t._path)}});function yn(t){return Zt||kt?new vn(t):null}kt&&vn.include(fn),$i.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&pn(t)||yn(t)}});var xn=We.extend({initialize:function(t,i){We.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=D(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});vn.create=gn,vn.pointsToPath=Q,He.geometryToLayer=Fe,He.coordsToLatLng=Ve,He.coordsToLatLngs=qe,He.latLngToCoords=Ge,He.latLngsToCoords=Ke,He.getFeature=Ye,He.asFeature=Xe,$i.mergeOptions({boxZoom:!0});var wn=se.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ki(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ai(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){li(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Qt(),Ti(),this._startPoint=this._map.mouseEventToContainerPoint(t),ki(document,{contextmenu:Wi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ui("div","leaflet-zoom-box",this._container),mi(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new O(this._point,this._startPoint),e=i.getSize();Pi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(li(this._box),fi(this._container,"leaflet-crosshair")),ti(),zi(),Ai(document,{contextmenu:Wi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var i=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});$i.addInitHook("addHandler","boxZoom",wn),$i.mergeOptions({doubleClickZoom:!0});var Pn=se.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});$i.addInitHook("addHandler","doubleClickZoom",Pn),$i.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Ln=se.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ce(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}mi(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){fi(this._map._container,"leaflet-grab"),fi(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=D(this._map.options.maxBounds);this._offsetLimit=R(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)i.getMaxZoom()&&1 +{% endblock %} + {% block pagewrapper %}
-
-
-

Serveurs = {{ totalserveurs }}

-
- -
-

Serveurs par Module

-
-
-
-
-

Serveurs par Version

-
-
-
-
- -
+

Applications = {{ totalapplications }}

@@ -31,13 +19,163 @@
-
+
+ +
+
+

Serveurs = {{ totalservers }}

+
+ +
+
+

Serveurs par Académies

+
+
+
+ +
+

Serveurs par Secteurs

+
+
+
+
+ +
+
+

Serveurs par Natures

+
+
+
+ +
+

Serveurs par Module

+
+
+
+
+ +
+
+

Serveurs par Version

+
+
+
+
+
{% endblock %} {% block localjavascript %} + + // On initialise la latitude et la longitude de Paris (centre de la carte) + var lat = 48.852969; + var lon = 2.349903; + var macarte = null; + // Fonction d'initialisation de la carte + function initMap() { + // Créer l'objet "macarte" et l'insèrer dans l'élément HTML qui a l'ID "map" + macarte = L.map('mapid').setView([lat, lon], 3); + + // Leaflet ne récupère pas les cartes (tiles) sur un serveur par défaut. Nous devons lui préciser où nous souhaitons les récupérer. Ici, openstreetmap.fr + L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', { + // Il est toujours bien de laisser le lien vers la source des données + attribution: 'données © OpenStreetMap/ODbL - rendu OSM France', + minZoom: 1, + maxZoom: 20 + }).addTo(macarte); + } + $(document).ready(function() { + initMap(); + marker=[]; + + {% for etab in etabs %} + {% if not etab.servers is empty and not etab.latitude is null%} + var marker = L.marker([{{ etab.latitude }}, {{ etab.longitude }}]).addTo(macarte); + html ="

Etablissement

"; + {% if(etab.id!=-100) %} + html+="UAI = {{etab.numerouai}}
"; + html+="Nom = {{etab.denominationprincipale}}
"; + html+="Adresse = {{etab.adresseuai}} {{etab.codecommune}} {{etab.libellecommune}}
"; + html+="Académie = {{etab.libelleacademie}}
"; + html+="Secteur = {{etab.secteurpublicprivelibe}}
"; + html+="Nature = {{etab.natureuailibe}}
"; + {% else %} + html+="Non Localisé
"; + {% endif %} + + html+="
"; + {% for server in etab.servers %} + html+="Serveur id = {{ server.id}}
"; + {% endfor %} + marker.bindPopup(html); + {% endif %} + {% endfor %} + + //== byAcademie + var byacademie = Morris.Donut({ + element: 'byacademie-chart', + data: [ + {% for total in totalbyacademies %} + {'label':'{{ total.label }}','value':{{ total.total }}}, + {% endfor %} + ], + resize: true + }); + + byacademie.options.data.forEach(function(label, i) { + var legendItem = $('').text( label['label'] + " ( " +label['value'] + " )" ).prepend(' '); + legendItem.find('span') + .css('backgroundColor', byacademie.options.colors[i]) + .css('width', '20px') + .css('display', 'inline-block') + .css('margin', '5px'); + $('#byacademie-legend').append(legendItem) + }); + + //== byNature + var bynature = Morris.Donut({ + element: 'bynature-chart', + data: [ + {% for total in totalbynatures %} + {'label':'{{ total.label }}','value':{{ total.total }}}, + {% endfor %} + ], + resize: true + }); + + bynature.options.data.forEach(function(label, i) { + var legendItem = $('').text( label['label'] + " ( " +label['value'] + " )" ).prepend(' '); + legendItem.find('span') + .css('backgroundColor', bynature.options.colors[i]) + .css('width', '20px') + .css('display', 'inline-block') + .css('margin', '5px'); + $('#bynature-legend').append(legendItem) + }); + + //== bySecteur + var bysecteur = Morris.Donut({ + element: 'bysecteur-chart', + data: [ + {% for total in totalbysecteurs %} + {'label':'{{ total.label }}','value':{{ total.total }}}, + {% endfor %} + ], + resize: true + }); + + bysecteur.options.data.forEach(function(label, i) { + var legendItem = $('').text( label['label'] + " ( " +label['value'] + " )" ).prepend(' '); + legendItem.find('span') + .css('backgroundColor', bysecteur.options.colors[i]) + .css('width', '20px') + .css('display', 'inline-block') + .css('margin', '5px'); + $('#bysecteur-legend').append(legendItem) + }); + //== byModule var bymodule = Morris.Donut({ element: 'bymodule-chart', @@ -50,7 +188,7 @@ }); bymodule.options.data.forEach(function(label, i) { - var legendItem = $('').text( label['label'] + " ( " +label['value'] + " )" ).prepend(' '); + var legendItem = $('').text( label['label'] + " ( " +label['value'] + " )" ).prepend(' '); legendItem.find('span') .css('backgroundColor', bymodule.options.colors[i]) .css('width', '20px') @@ -71,7 +209,7 @@ }); byversion.options.data.forEach(function(label, i) { - var legendItem = $('').text( label['label'] + " ( " +label['value'] + " )" ).prepend(' '); + var legendItem = $('').text( label['label'] + " ( " +label['value'] + " )" ).prepend(' '); legendItem.find('span') .css('backgroundColor', byversion.options.colors[i]) .css('width', '20px') @@ -105,4 +243,16 @@ }); }); + + function showModal(id) { + var url="{{ path('cadoles_core_server',{id:'xx'})}}"; + + url=url.replace('xx',id); + + console.log("pouet"); + $("#mymodal .modal-title").html("Informations Serveur"); + $("#mymodal #framemodal").attr("src",url); + + $("#mymodal").modal('show'); + } {% endblock %} \ No newline at end of file diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Core/server.html.twig b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Core/server.html.twig new file mode 100644 index 0000000..0f6bafe --- /dev/null +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Core/server.html.twig @@ -0,0 +1,69 @@ +{% extends '@CadolesCore/base.html.twig' %} + +{% block localstyle %} + b { + color: #{{color["main"]}}; + } +{% endblock %} + +{% block pagewrapper %} +
+
+ ID = {{ server.id }}
+ URL = {{server.url}}
+ Local ID = {{server.idlocal}}
+ Module = {{ server.module }}
+ Version = {{ server.version }}

+ + Applications
+ {% for application in server.serverapplications %} + {{ application.version }}
+ {% endfor %} +
+ + +
+ Etablissement
+ {% if(server.etab.id!=-100) %} + UAI = {{server.etab.numerouai}}
+ Nom = {{server.etab.denominationprincipale}}
+ Adresse = {{server.etab.adresseuai}} {{server.etab.codecommune}} {{server.etab.libellecommune}}
+ Académie = {{server.etab.libelleacademie}}
+ Secteur = {{server.etab.secteurpublicprivelibe}}
+ Nature = {{server.etab.natureuailibe}}

+
+ {% else %} + Non Localisé
+ {% endif %} + + +
+
+{% endblock %} + +{% block localjavascript %} + {% if(server.etab.id!=-100) %} + // On initialise la latitude et la longitude de Paris (centre de la carte) + var lat = {{ server.etab.latitude }}; + var lon = {{ server.etab.longitude }}; + var macarte = null; + // Fonction d'initialisation de la carte + function initMap() { + // Créer l'objet "macarte" et l'insèrer dans l'élément HTML qui a l'ID "map" + macarte = L.map('mapid').setView([lat, lon], 10); + + // Leaflet ne récupère pas les cartes (tiles) sur un serveur par défaut. Nous devons lui préciser où nous souhaitons les récupérer. Ici, openstreetmap.fr + L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', { + // Il est toujours bien de laisser le lien vers la source des données + attribution: 'données © OpenStreetMap/ODbL - rendu OSM France', + minZoom: 1, + maxZoom: 20 + }).addTo(macarte); + } + + $(document).ready(function() { + initMap(); + var marker = L.marker([{{ server.etab.latitude }}, {{ server.etab.longitude }}]).addTo(macarte); + }); + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig index 3702e98..376141c 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/footer.html.twig @@ -71,6 +71,7 @@ '@CadolesCoreBundle/Resources/public/js/fullcalendar.min.js' '@CadolesCoreBundle/Resources/public/js/fullcalendar.lang.js' '@CadolesCoreBundle/Resources/public/js/bootstrap-tour.min.js' + '@CadolesCoreBundle/Resources/public/js/leaflet.js' '@CadolesCoreBundle/Resources/public/js/sb-admin-2.js' '@Tetranz\Select2EntityBundle//Resources/public/js/select2entity.js' diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/head.html.twig b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/head.html.twig index f326dec..57502a2 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/head.html.twig +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/Include/head.html.twig @@ -34,6 +34,7 @@ '@CadolesCoreBundle/Resources/public/css/jsRapClock.css' '@CadolesCoreBundle/Resources/public/css/fullcalendar.css' '@CadolesCoreBundle/Resources/public/css/bootstrap-tour.min.css' + '@CadolesCoreBundle/Resources/public/css/leaflet.css' '@CadolesCoreBundle/Resources/public/css/font.css' '@CadolesCoreBundle/Resources/public/css/style.css' diff --git a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/base.html.twig b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/base.html.twig index f972384..c3c2ab1 100644 --- a/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/base.html.twig +++ b/src/ninestat-1.0/src/Cadoles/CoreBundle/Resources/views/base.html.twig @@ -128,7 +128,8 @@ {% endif %} - + {% block beforepage %} + {% endblock %}
diff --git a/src/ninestat-1.0/src/Cadoles/CronBundle/Command/InitDataCommand.php b/src/ninestat-1.0/src/Cadoles/CronBundle/Command/InitDataCommand.php index d96d268..7afcbbf 100644 --- a/src/ninestat-1.0/src/Cadoles/CronBundle/Command/InitDataCommand.php +++ b/src/ninestat-1.0/src/Cadoles/CronBundle/Command/InitDataCommand.php @@ -72,8 +72,8 @@ class InitDataCommand extends ContainerAwareCommand $entity = new Cron; $nextdate=$entity->getSubmitdate(); $nextdate->setTime(3,0); - $entity->setCommand("Core:Synchro"); - $entity->setDescription("Synchronisation des Comptes Utilisateurs"); + $entity->setCommand("Core:SynchroEtab"); + $entity->setDescription("Synchronisation des Etablissements Scolaire"); $entity->setId(100); $entity->setStatut(2); $entity->setRepeatcall(0);