Loading README.md +15 −14 Original line number Diff line number Diff line Loading @@ -399,13 +399,14 @@ return [ [ 'name' => "IMPORT_SIMPLE", 'source' => [ 'code' => 'UTILISATEUR_OCTOPUS', 'name' => 'UTILISATEUR_OCTOPUS', 'table' => 'UTILISATEUR', 'connection' => 'orm_B', 'source_code_column' => 'CODE', 'code' => 'CODE_SOURCE', ], 'destination' => [ 'code' => 'TABLE UTILISATEUR LOCALE', 'name' => 'TABLE UTILISATEUR LOCALE', 'table' => 'UTILISATEUR', 'connection' => 'orm_A', 'source_code_column' => 'CODE', Loading Loading @@ -433,13 +434,13 @@ return [ [ 'name' => "IMPORT_REGIONS_API", 'source' => [ 'code' => 'geo_api', // DOIT correspondre à un `CODE` de la table `SOURCE` 'name' => 'geo_api', // DOIT correspondre à un `CODE` de la table `SOURCE` 'select' => '/regions?fields=nom,code', 'connection' => 'geo', 'source_code_column' => 'code', ], 'destination' => [ 'code' => 'Table REGION', 'name' => 'Table REGION', 'table' => 'REGION', 'connection' => 'orm_A', 'source_code_column' => 'CODE', Loading Loading @@ -471,13 +472,13 @@ return [ [ 'name' => "SYNCHRO_LOCALE_ROLE", 'source' => [ 'code' => 'app', 'name' => 'app', 'select' => 'SELECT CODE, LIBELLE, DESCRIPTION FROM SRC_ROLE', 'connection' => 'orm_A', 'source_code_column' => 'CODE', ], 'destination' => [ 'code' => 'Table ROLE', 'name' => 'Table ROLE', 'table' => 'ROLE', 'connection' => 'orm_A', 'source_code_column' => 'CODE', Loading Loading @@ -515,13 +516,13 @@ return [ [ 'name' => "SYNCHRO_BDD_EXTERNE", 'source' => [ 'code' => 'UTILISATEUR_OCTOPUS', 'name' => 'UTILISATEUR_OCTOPUS', 'select' => 'SELECT CODE, NOM, PRENOM, NAISSANCE FROM UTILISATEUR', 'connection' => 'orm_B', 'source_code_column' => 'CODE', ], 'destination' => [ 'code' => 'Table UTILISATEUR', 'name' => 'Table UTILISATEUR', 'table' => 'UTILISATEUR', 'connection' => 'orm_A', 'source_code_column' => 'CODE', Loading Loading @@ -558,13 +559,13 @@ return [ [ 'name' => "SYNCHRO_COMMUNES", 'source' => [ 'code' => 'geo_api', // DOIT correspondre à un `CODE` de la table `SOURCE` 'name' => 'geo_api', // DOIT correspondre à un `CODE` de la table `SOURCE` 'select' => '/departements/63/communes?fields=nom,code', 'connection' => 'geo', 'source_code_column' => 'code', ], 'destination' => [ 'code' => 'Table locale', 'name' => 'Table locale', 'table' => 'REGION', 'connection' => 'orm_A', 'source_code_column' => 'CODE', Loading Loading @@ -619,13 +620,13 @@ return [ [ 'name' => "IMPORT_PRÉALABLE", // Importation des données externes dans une table intermédiaire 'source' => [ 'code' => 'FORMATION_FCA', 'name' => 'FORMATION_FCA', 'select' => 'SELECT ID, CODE, NOM, COMPOSANTE_CODE FROM FORMATION', 'connection' => 'orm_B', 'source_code_column' => 'ID', ], 'destination' => [ 'code' => 'Table TMP_FORMATION locale', 'name' => 'Table TMP_FORMATION locale', 'table' => 'TMP_FORMATION', 'connection' => 'orm_A', 'source_code_column' => 'ID', Loading @@ -636,13 +637,13 @@ return [ [ 'name' => "SYNCHRO_FINALE", // Synchro des données mise en forme vers la table finale 'source' => [ 'code' => 'TABLE SRC_FORMATION DE MA BASE A UTILISANT TMP_FORMATION', 'name' => 'TABLE SRC_FORMATION DE MA BASE A UTILISANT TMP_FORMATION', 'select' => 'SELECT * FROM SRC_FORMATION', 'connection' => 'orm_A', 'source_code_column' => 'ID', ], 'destination' => [ 'code' => 'TABLE FORMATION DE MA BASE A', 'name' => 'TABLE FORMATION DE MA BASE A', 'table' => 'FORMATION', 'connection' => 'orm_A', 'source_code_column' => 'ID', Loading config/module.config.php +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ use Doctrine\ORM\Mapping\Driver\XmlDriver; use Doctrine\Persistence\Mapping\Driver\MappingDriverChain; use Laminas\Router\Http\Literal; use Laminas\Router\Http\Segment; use UnicaenAuth\Guard\PrivilegeController; use UnicaenPrivilege\Guard\PrivilegeController; use UnicaenDbImport\CodeGenerator\HelperAbstractFactory; use UnicaenDbImport\Config\Config; use UnicaenDbImport\Config\ConfigFactory; Loading public/unicaen/db-import/js/unicaen-db-import.js +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ function installLancementMultiple() } else { btn.addClass('disabled'); } if(urlPattern === undefined){return;} btn.prop("href", urlPattern.replace('__names__', generateNames($checkboxes))); } } No newline at end of file src/UnicaenDbImport/Controller/SynchroController.php +11 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace UnicaenDbImport\Controller; use Exception; use Laminas\Http\PhpEnvironment\Response; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\JsonModel; Loading Loading @@ -37,13 +38,17 @@ class SynchroController extends AbstractActionController } else { $synchros = $this->synchroService->getSynchros(); } $importLogs = $diffCounts = []; foreach ($synchros as $synchro) { $importLog = $this->importLogService->findLastLogForSynchro($synchro); $importLogs[$synchro->getName()] = $importLog; try{ $diffCounts[$synchro->getName()] = $this->synchroService->fetchSynchroDiffCount($synchro); } catch (Exception $e){ $this->flashMessenger()->addErrorMessage(sprintf("Erreur rencontrée lors du calcul des différences pour la syncho %s", $synchro)); } } return [ 'synchros' => $synchros, Loading @@ -62,7 +67,12 @@ class SynchroController extends AbstractActionController { $name = $this->params('name'); $synchro = $this->synchroService->getSynchroByName($name); try{ $diffCount = $this->synchroService->fetchSynchroDiffCount($synchro); } catch (Exception $e){ $this->flashMessenger()->addErrorMessage(sprintf("Erreur rencontrée lors du calcul des différences pour la syncho %s", $synchro)); } $importLog = $this->importLogService->findLastLogForSynchro($synchro); return [ Loading src/UnicaenDbImport/Privilege/ImportPrivilege.php +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ namespace UnicaenDbImport\Privilege; use UnicaenAuth\Provider\Privilege\Privileges; use UnicaenPrivilege\Provider\Privilege\Privileges; class ImportPrivilege extends Privileges { Loading Loading
README.md +15 −14 Original line number Diff line number Diff line Loading @@ -399,13 +399,14 @@ return [ [ 'name' => "IMPORT_SIMPLE", 'source' => [ 'code' => 'UTILISATEUR_OCTOPUS', 'name' => 'UTILISATEUR_OCTOPUS', 'table' => 'UTILISATEUR', 'connection' => 'orm_B', 'source_code_column' => 'CODE', 'code' => 'CODE_SOURCE', ], 'destination' => [ 'code' => 'TABLE UTILISATEUR LOCALE', 'name' => 'TABLE UTILISATEUR LOCALE', 'table' => 'UTILISATEUR', 'connection' => 'orm_A', 'source_code_column' => 'CODE', Loading Loading @@ -433,13 +434,13 @@ return [ [ 'name' => "IMPORT_REGIONS_API", 'source' => [ 'code' => 'geo_api', // DOIT correspondre à un `CODE` de la table `SOURCE` 'name' => 'geo_api', // DOIT correspondre à un `CODE` de la table `SOURCE` 'select' => '/regions?fields=nom,code', 'connection' => 'geo', 'source_code_column' => 'code', ], 'destination' => [ 'code' => 'Table REGION', 'name' => 'Table REGION', 'table' => 'REGION', 'connection' => 'orm_A', 'source_code_column' => 'CODE', Loading Loading @@ -471,13 +472,13 @@ return [ [ 'name' => "SYNCHRO_LOCALE_ROLE", 'source' => [ 'code' => 'app', 'name' => 'app', 'select' => 'SELECT CODE, LIBELLE, DESCRIPTION FROM SRC_ROLE', 'connection' => 'orm_A', 'source_code_column' => 'CODE', ], 'destination' => [ 'code' => 'Table ROLE', 'name' => 'Table ROLE', 'table' => 'ROLE', 'connection' => 'orm_A', 'source_code_column' => 'CODE', Loading Loading @@ -515,13 +516,13 @@ return [ [ 'name' => "SYNCHRO_BDD_EXTERNE", 'source' => [ 'code' => 'UTILISATEUR_OCTOPUS', 'name' => 'UTILISATEUR_OCTOPUS', 'select' => 'SELECT CODE, NOM, PRENOM, NAISSANCE FROM UTILISATEUR', 'connection' => 'orm_B', 'source_code_column' => 'CODE', ], 'destination' => [ 'code' => 'Table UTILISATEUR', 'name' => 'Table UTILISATEUR', 'table' => 'UTILISATEUR', 'connection' => 'orm_A', 'source_code_column' => 'CODE', Loading Loading @@ -558,13 +559,13 @@ return [ [ 'name' => "SYNCHRO_COMMUNES", 'source' => [ 'code' => 'geo_api', // DOIT correspondre à un `CODE` de la table `SOURCE` 'name' => 'geo_api', // DOIT correspondre à un `CODE` de la table `SOURCE` 'select' => '/departements/63/communes?fields=nom,code', 'connection' => 'geo', 'source_code_column' => 'code', ], 'destination' => [ 'code' => 'Table locale', 'name' => 'Table locale', 'table' => 'REGION', 'connection' => 'orm_A', 'source_code_column' => 'CODE', Loading Loading @@ -619,13 +620,13 @@ return [ [ 'name' => "IMPORT_PRÉALABLE", // Importation des données externes dans une table intermédiaire 'source' => [ 'code' => 'FORMATION_FCA', 'name' => 'FORMATION_FCA', 'select' => 'SELECT ID, CODE, NOM, COMPOSANTE_CODE FROM FORMATION', 'connection' => 'orm_B', 'source_code_column' => 'ID', ], 'destination' => [ 'code' => 'Table TMP_FORMATION locale', 'name' => 'Table TMP_FORMATION locale', 'table' => 'TMP_FORMATION', 'connection' => 'orm_A', 'source_code_column' => 'ID', Loading @@ -636,13 +637,13 @@ return [ [ 'name' => "SYNCHRO_FINALE", // Synchro des données mise en forme vers la table finale 'source' => [ 'code' => 'TABLE SRC_FORMATION DE MA BASE A UTILISANT TMP_FORMATION', 'name' => 'TABLE SRC_FORMATION DE MA BASE A UTILISANT TMP_FORMATION', 'select' => 'SELECT * FROM SRC_FORMATION', 'connection' => 'orm_A', 'source_code_column' => 'ID', ], 'destination' => [ 'code' => 'TABLE FORMATION DE MA BASE A', 'name' => 'TABLE FORMATION DE MA BASE A', 'table' => 'FORMATION', 'connection' => 'orm_A', 'source_code_column' => 'ID', Loading
config/module.config.php +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ use Doctrine\ORM\Mapping\Driver\XmlDriver; use Doctrine\Persistence\Mapping\Driver\MappingDriverChain; use Laminas\Router\Http\Literal; use Laminas\Router\Http\Segment; use UnicaenAuth\Guard\PrivilegeController; use UnicaenPrivilege\Guard\PrivilegeController; use UnicaenDbImport\CodeGenerator\HelperAbstractFactory; use UnicaenDbImport\Config\Config; use UnicaenDbImport\Config\ConfigFactory; Loading
public/unicaen/db-import/js/unicaen-db-import.js +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ function installLancementMultiple() } else { btn.addClass('disabled'); } if(urlPattern === undefined){return;} btn.prop("href", urlPattern.replace('__names__', generateNames($checkboxes))); } } No newline at end of file
src/UnicaenDbImport/Controller/SynchroController.php +11 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace UnicaenDbImport\Controller; use Exception; use Laminas\Http\PhpEnvironment\Response; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\JsonModel; Loading Loading @@ -37,13 +38,17 @@ class SynchroController extends AbstractActionController } else { $synchros = $this->synchroService->getSynchros(); } $importLogs = $diffCounts = []; foreach ($synchros as $synchro) { $importLog = $this->importLogService->findLastLogForSynchro($synchro); $importLogs[$synchro->getName()] = $importLog; try{ $diffCounts[$synchro->getName()] = $this->synchroService->fetchSynchroDiffCount($synchro); } catch (Exception $e){ $this->flashMessenger()->addErrorMessage(sprintf("Erreur rencontrée lors du calcul des différences pour la syncho %s", $synchro)); } } return [ 'synchros' => $synchros, Loading @@ -62,7 +67,12 @@ class SynchroController extends AbstractActionController { $name = $this->params('name'); $synchro = $this->synchroService->getSynchroByName($name); try{ $diffCount = $this->synchroService->fetchSynchroDiffCount($synchro); } catch (Exception $e){ $this->flashMessenger()->addErrorMessage(sprintf("Erreur rencontrée lors du calcul des différences pour la syncho %s", $synchro)); } $importLog = $this->importLogService->findLastLogForSynchro($synchro); return [ Loading
src/UnicaenDbImport/Privilege/ImportPrivilege.php +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ namespace UnicaenDbImport\Privilege; use UnicaenAuth\Provider\Privilege\Privileges; use UnicaenPrivilege\Provider\Privilege\Privileges; class ImportPrivilege extends Privileges { Loading