Loading CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ Changelog - [FIX] Vue du différentiel d'une synchro : prise en compte du paramètre de config 'source_code_column'. - [FIX] Correction du SQL générant V_DIFF_* pour le cas d'une synchro depuis une source non-importable - [FIX] Import : correction du SQL généré en cas de valeur booléenne dans les données sources. - Nouvelles commandes pour lister les imports ('list imports') et synchros ('list synchros'). - Synchro : spécification dans la table SOURCE (colonnes 'synchro_*_enabled') des opérations autorisées ou non lors de la synchro (màj bdd requise). Exemple : ne pas autoriser le 'delete' est utile lorsque les données sources sont obtenues de façon incrémentale au fil du temps, et non pas de façon exhaustive en une seule fois. Loading config/module.config.php +26 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,7 @@ return [ [ 'controller' => ConsoleController::class, 'action' => [ 'listImports', 'runImport', ], 'role' => [], Loading Loading @@ -470,6 +471,7 @@ return [ [ 'controller' => ConsoleController::class, 'action' => [ 'listSynchros', 'runSynchro', ], 'role' => [], Loading Loading @@ -513,21 +515,45 @@ return [ 'console' => [ 'router' => [ 'routes' => [ 'list_imports' => [ 'type' => 'simple', 'options' => [ 'route' => 'list imports', 'defaults' => [ /** @see ConsoleController::listImportsAction() */ 'controller' => ConsoleController::class, 'action' => 'listImports', ], ], ], 'execute_imports' => [ 'type' => 'simple', 'options' => [ 'route' => 'run import [--name=]', 'defaults' => [ /** @see ConsoleController::runImportAction() */ 'controller' => ConsoleController::class, 'action' => 'runImport', ], ], ], 'list_synchros' => [ 'type' => 'simple', 'options' => [ 'route' => 'list synchros', 'defaults' => [ /** @see ConsoleController::listSynchrosAction() */ 'controller' => ConsoleController::class, 'action' => 'listSynchros', ], ], ], 'execute_synchro' => [ 'type' => 'simple', 'options' => [ 'route' => 'run synchro [--name=]', 'defaults' => [ /** @see ConsoleController::runSynchroAction() */ 'controller' => ConsoleController::class, 'action' => 'runSynchro', ], Loading src/UnicaenDbImport/Controller/ConsoleController.php +38 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,25 @@ class ConsoleController extends AbstractConsoleController } } public function listImportsAction(): void { $this->getConsole()->writeLine(); $this->getConsole()->writeLine("######################## LISTE DES IMPORTS ########################", ColorInterface::BLUE); $this->getConsole()->writeLine(); if ($imports = $this->importService->getImports()) { $this->getConsole()->writeLine(sprintf('(%s) %s', "Order", "Name")); $this->getConsole()->writeLine('-----------------------------------------'); foreach ($imports as $import) { $this->getConsole()->writeLine(sprintf('(%s) %s', $import->getOrder(), $import->getName())); } } else { $this->getConsole()->writeLine("Aucun import trouvé."); } $this->getConsole()->writeLine(); } /** * @throws Exception */ Loading Loading @@ -165,6 +184,25 @@ class ConsoleController extends AbstractConsoleController $this->getConsole()->writeLine(); } public function listSynchrosAction(): void { $this->getConsole()->writeLine(); $this->getConsole()->writeLine("######################## LISTE DES SYNCHROS ########################", ColorInterface::BLUE); $this->getConsole()->writeLine(); if ($synchros = $this->synchroService->getSynchros()) { $this->getConsole()->writeLine(sprintf('(%s) %s', "Order", "Name")); $this->getConsole()->writeLine('-----------------------------------'); foreach ($synchros as $synchro) { $this->getConsole()->writeLine(sprintf('(%s) %s', $synchro->getOrder(), $synchro->getName())); } } else { $this->getConsole()->writeLine("Aucune synchro trouvée."); } $this->getConsole()->writeLine(); } /** * @throws Exception */ Loading Loading
CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ Changelog - [FIX] Vue du différentiel d'une synchro : prise en compte du paramètre de config 'source_code_column'. - [FIX] Correction du SQL générant V_DIFF_* pour le cas d'une synchro depuis une source non-importable - [FIX] Import : correction du SQL généré en cas de valeur booléenne dans les données sources. - Nouvelles commandes pour lister les imports ('list imports') et synchros ('list synchros'). - Synchro : spécification dans la table SOURCE (colonnes 'synchro_*_enabled') des opérations autorisées ou non lors de la synchro (màj bdd requise). Exemple : ne pas autoriser le 'delete' est utile lorsque les données sources sont obtenues de façon incrémentale au fil du temps, et non pas de façon exhaustive en une seule fois. Loading
config/module.config.php +26 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,7 @@ return [ [ 'controller' => ConsoleController::class, 'action' => [ 'listImports', 'runImport', ], 'role' => [], Loading Loading @@ -470,6 +471,7 @@ return [ [ 'controller' => ConsoleController::class, 'action' => [ 'listSynchros', 'runSynchro', ], 'role' => [], Loading Loading @@ -513,21 +515,45 @@ return [ 'console' => [ 'router' => [ 'routes' => [ 'list_imports' => [ 'type' => 'simple', 'options' => [ 'route' => 'list imports', 'defaults' => [ /** @see ConsoleController::listImportsAction() */ 'controller' => ConsoleController::class, 'action' => 'listImports', ], ], ], 'execute_imports' => [ 'type' => 'simple', 'options' => [ 'route' => 'run import [--name=]', 'defaults' => [ /** @see ConsoleController::runImportAction() */ 'controller' => ConsoleController::class, 'action' => 'runImport', ], ], ], 'list_synchros' => [ 'type' => 'simple', 'options' => [ 'route' => 'list synchros', 'defaults' => [ /** @see ConsoleController::listSynchrosAction() */ 'controller' => ConsoleController::class, 'action' => 'listSynchros', ], ], ], 'execute_synchro' => [ 'type' => 'simple', 'options' => [ 'route' => 'run synchro [--name=]', 'defaults' => [ /** @see ConsoleController::runSynchroAction() */ 'controller' => ConsoleController::class, 'action' => 'runSynchro', ], Loading
src/UnicaenDbImport/Controller/ConsoleController.php +38 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,25 @@ class ConsoleController extends AbstractConsoleController } } public function listImportsAction(): void { $this->getConsole()->writeLine(); $this->getConsole()->writeLine("######################## LISTE DES IMPORTS ########################", ColorInterface::BLUE); $this->getConsole()->writeLine(); if ($imports = $this->importService->getImports()) { $this->getConsole()->writeLine(sprintf('(%s) %s', "Order", "Name")); $this->getConsole()->writeLine('-----------------------------------------'); foreach ($imports as $import) { $this->getConsole()->writeLine(sprintf('(%s) %s', $import->getOrder(), $import->getName())); } } else { $this->getConsole()->writeLine("Aucun import trouvé."); } $this->getConsole()->writeLine(); } /** * @throws Exception */ Loading Loading @@ -165,6 +184,25 @@ class ConsoleController extends AbstractConsoleController $this->getConsole()->writeLine(); } public function listSynchrosAction(): void { $this->getConsole()->writeLine(); $this->getConsole()->writeLine("######################## LISTE DES SYNCHROS ########################", ColorInterface::BLUE); $this->getConsole()->writeLine(); if ($synchros = $this->synchroService->getSynchros()) { $this->getConsole()->writeLine(sprintf('(%s) %s', "Order", "Name")); $this->getConsole()->writeLine('-----------------------------------'); foreach ($synchros as $synchro) { $this->getConsole()->writeLine(sprintf('(%s) %s', $synchro->getOrder(), $synchro->getName())); } } else { $this->getConsole()->writeLine("Aucune synchro trouvée."); } $this->getConsole()->writeLine(); } /** * @throws Exception */ Loading