From b734e2b9ed105dfbd67a69c4c755e351cac55221 Mon Sep 17 00:00:00 2001 From: Olivier ALLAIN Date: Fri, 28 Feb 2025 09:48:05 +0100 Subject: [PATCH 1/6] better command interruption management --- src/EventSubscriber/ConsoleSubscriber.php | 68 +++++++++++++++++++ .../Column/scheduled_command_state.html.twig | 2 +- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 src/EventSubscriber/ConsoleSubscriber.php diff --git a/src/EventSubscriber/ConsoleSubscriber.php b/src/EventSubscriber/ConsoleSubscriber.php new file mode 100644 index 00000000..e3504abc --- /dev/null +++ b/src/EventSubscriber/ConsoleSubscriber.php @@ -0,0 +1,68 @@ + 'onConsoleTerminate', + ConsoleEvents::SIGNAL => 'onConsoleSignal', + ]; + } + + public function onConsoleTerminate(ConsoleTerminateEvent $event): void + { + $this->updateCommand($event); + } + + public function onConsoleSignal(ConsoleSignalEvent $event): void + { + $this->updateCommand($event); + } + + private function updateCommand(ConsoleSignalEvent|ConsoleTerminateEvent $event): void + { + try { + $commandCode = $event->getCommand()?->getName() ?? 'no_command'; + /** @var ScheduledCommand|null $schedulerCommand */ + $schedulerCommand = $this->scheduledCommandRepository->findOneBy(['command' => $commandCode], ['id' => 'DESC']); + } catch (\Throwable) { + return; + } + + if (null === $schedulerCommand) { + return; + } + + if ($schedulerCommand->getState() !== ScheduledCommandStateEnum::IN_PROGRESS) { + return; + } + + $exitCode = $event->getExitCode(); + if (false === $exitCode) { + $exitCode = -1; + } + + $schedulerCommand->setCommandEndTime(new \DateTime()); + $schedulerCommand->setState(ScheduledCommandStateEnum::TERMINATION); + $schedulerCommand->setLastReturnCode($exitCode); + $this->scheduledCommandRepository->add($schedulerCommand); + } +} diff --git a/src/Resources/views/Grid/Column/scheduled_command_state.html.twig b/src/Resources/views/Grid/Column/scheduled_command_state.html.twig index b2663f62..7a8bec4b 100644 --- a/src/Resources/views/Grid/Column/scheduled_command_state.html.twig +++ b/src/Resources/views/Grid/Column/scheduled_command_state.html.twig @@ -23,7 +23,7 @@ {% endif %} {% if schedulerCommand.state == 'termination' %} - + {{ ('synolia.ui.statuses.' ~ schedulerCommand.state)|trans }} From eb081054b891e208bc5d0d756b973f2182a533e2 Mon Sep 17 00:00:00 2001 From: Olivier ALLAIN Date: Thu, 6 Mar 2025 15:42:44 +0100 Subject: [PATCH 2/6] Better Exception throw --- src/EventSubscriber/ConsoleSubscriber.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EventSubscriber/ConsoleSubscriber.php b/src/EventSubscriber/ConsoleSubscriber.php index e3504abc..efa0ac10 100644 --- a/src/EventSubscriber/ConsoleSubscriber.php +++ b/src/EventSubscriber/ConsoleSubscriber.php @@ -4,6 +4,7 @@ namespace Synolia\SyliusSchedulerCommandPlugin\EventSubscriber; +use Doctrine\DBAL\Exception; use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\Console\Event\ConsoleSignalEvent; use Symfony\Component\Console\Event\ConsoleTerminateEvent; @@ -43,7 +44,7 @@ private function updateCommand(ConsoleSignalEvent|ConsoleTerminateEvent $event): $commandCode = $event->getCommand()?->getName() ?? 'no_command'; /** @var ScheduledCommand|null $schedulerCommand */ $schedulerCommand = $this->scheduledCommandRepository->findOneBy(['command' => $commandCode], ['id' => 'DESC']); - } catch (\Throwable) { + } catch (Exception) { return; } From 02edfa5cd83f71928e1b595a47bc7a991b1b6b02 Mon Sep 17 00:00:00 2001 From: Valentin Silvestre Date: Sat, 22 Mar 2025 19:20:58 +0100 Subject: [PATCH 3/6] Add possibility of time date format 12/24 (#97) * Add possibility of time date format 12/24 and drop Sylius 1.10 support * Try to fix makefile that were messing with CI * use php attribute --------- Co-authored-by: Olivier ALLAIN --- Makefile | 7 ++----- src/Humanizer/CronExpressionHumanizer.php | 10 +++++++--- src/Resources/config/services.yaml | 3 ++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 5b149283..e579331c 100644 --- a/Makefile +++ b/Makefile @@ -44,17 +44,14 @@ else endif ${COMPOSER} config allow-plugins true ifeq ($(shell [[ $(SYLIUS_VERSION) == *dev ]] && echo true ),true) - ${COMPOSER} require sylius/sylius:"${SYLIUS_VERSION}" + ${COMPOSER} require --no-update sylius/sylius:"${SYLIUS_VERSION}" else - ${COMPOSER} require sylius/sylius:"~${SYLIUS_VERSION}" + ${COMPOSER} require --no-update sylius/sylius:"~${SYLIUS_VERSION}" endif update-dependencies: ${COMPOSER} config extra.symfony.require "~${SYMFONY_VERSION}" ${COMPOSER} require symfony/asset:~${SYMFONY_VERSION} --no-scripts --no-update -ifeq ($(shell [[ $(SYLIUS_VERSION) == 1.10.0 ]] && echo true ),true) - ${COMPOSER} require php-http/message-factory --no-scripts --no-update -endif ${COMPOSER} update --no-progress -n install-plugin: diff --git a/src/Humanizer/CronExpressionHumanizer.php b/src/Humanizer/CronExpressionHumanizer.php index 9f1040c7..c8b589c9 100644 --- a/src/Humanizer/CronExpressionHumanizer.php +++ b/src/Humanizer/CronExpressionHumanizer.php @@ -7,11 +7,15 @@ use Lorisleiva\CronTranslator\CronTranslator; use Sylius\Component\Locale\Context\LocaleContextInterface; use Sylius\Component\Locale\Context\LocaleNotFoundException; +use Symfony\Component\DependencyInjection\Attribute\Autowire; class CronExpressionHumanizer implements HumanizerInterface { - public function __construct(private readonly LocaleContextInterface $localeContext) - { + public function __construct( + private readonly LocaleContextInterface $localeContext, + #[Autowire(param: 'env(bool:SYNOLIA_SCHEDULER_PLUGIN_TIMEFORMAT_24H)')] + private readonly bool $timeFormat24Hours = false, + ) { } public function humanize(string $expression): string @@ -23,7 +27,7 @@ public function humanize(string $expression): string $locale = $this->getLocale(); try { - return CronTranslator::translate($expression, $locale); + return CronTranslator::translate($expression, $locale, $this->timeFormat24Hours); } catch (\Throwable) { return $expression; } diff --git a/src/Resources/config/services.yaml b/src/Resources/config/services.yaml index 2678fd29..43181967 100644 --- a/src/Resources/config/services.yaml +++ b/src/Resources/config/services.yaml @@ -2,6 +2,7 @@ parameters: env(SYNOLIA_SCHEDULER_PLUGIN_PING_INTERVAL): 300 env(SYNOLIA_SCHEDULER_PLUGIN_KEEP_ALIVE): true env(SYNOLIA_SCHEDULER_PLUGIN_LOGS_DIR): '%kernel.logs_dir%' + env(SYNOLIA_SCHEDULER_PLUGIN_TIMEFORMAT_24H): false services: _defaults: @@ -10,4 +11,4 @@ services: Synolia\SyliusSchedulerCommandPlugin\: resource: '../../*' - exclude: '../../{Entity,Migrations,SynoliaSyliusSchedulerCommandPlugin.php}' \ No newline at end of file + exclude: '../../{Entity,Migrations,SynoliaSyliusSchedulerCommandPlugin.php}' From c8877a405694f15349b561ca72bf7c268aca14ec Mon Sep 17 00:00:00 2001 From: Maxime Leclercq Date: Wed, 12 Jun 2024 16:38:35 +0200 Subject: [PATCH 4/6] feat(timezone): enable different timezone from that of php config --- README.md | 6 +++ UPGRADE.md | 11 ++++++ src/Checker/EveryMinuteIsDueChecker.php | 19 +++++++++- .../SoftLimitThresholdIsDueChecker.php | 13 ++++++- src/Provider/CalendarWithTimezone.php | 37 +++++++++++++++++++ src/Resources/config/services.yaml | 1 + .../Checker/EveryMinuteIsDueCheckerTest.php | 11 +++++- 7 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 src/Provider/CalendarWithTimezone.php diff --git a/README.md b/README.md index 878c5e9b..a2d2c216 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,12 @@ Execute scheduled commands. **Run a specific scheduled command :** php bin/console synolia:scheduler-run --id=5 +Is it possible to choose the timezone of the command execution by setting the `SYNOLIA_SCHEDULER_PLUGIN_TIMEZONE` environment variable, example: + +``` +SYNOLIA_SCHEDULER_PLUGIN_TIMEZONE=Europe/Paris +``` + ### synolia:scheduler:purge-history Purge scheduled command history greater than {X} days old. diff --git a/UPGRADE.md b/UPGRADE.md index 3b16b9f2..be58ef3a 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -6,3 +6,14 @@ * `logFile` field must be renamed to `logFilePrefix` and must not end with the file extension Also, for old existing schedules in your database, please remove the log file extension in column `logFilePrefix`. + +## from 3.6 to 3.7 + +* The constructors of `Synolia\SyliusSchedulerCommandPlugin\Checker\EveryMinuteIsDueChecker` and `Synolia\SyliusSchedulerCommandPlugin\Checker\SoftLimitThresholdIsDueChecker` has been modified, a new argument has been added : + + ```php + public function __construct( + // ... + private ?DateTimeProviderInterface $dateTimeProvider = null, + ) + ``` diff --git a/src/Checker/EveryMinuteIsDueChecker.php b/src/Checker/EveryMinuteIsDueChecker.php index 057ee125..a3759db0 100644 --- a/src/Checker/EveryMinuteIsDueChecker.php +++ b/src/Checker/EveryMinuteIsDueChecker.php @@ -6,6 +6,7 @@ use Cron\CronExpression; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; +use Sylius\Calendar\Provider\DateTimeProviderInterface; use Synolia\SyliusSchedulerCommandPlugin\Components\Exceptions\Checker\IsNotDueException; use Synolia\SyliusSchedulerCommandPlugin\Entity\CommandInterface; @@ -17,6 +18,20 @@ class EveryMinuteIsDueChecker implements IsDueCheckerInterface { private const PRIORITY = 0; + public function __construct( + private ?DateTimeProviderInterface $dateTimeProvider = null, + ) { + if (null === $dateTimeProvider) { + trigger_deprecation( + 'synolia/sylius-scheduler-command-plugin', + '3.9', + 'Not passing a service that implements "%s" as a 1st argument of "%s" constructor is deprecated and will be prohibited in 4.0.', + DateTimeProviderInterface::class, + self::class, + ); + } + } + public static function getDefaultPriority(): int { return self::PRIORITY; @@ -27,8 +42,8 @@ public static function getDefaultPriority(): int */ public function isDue(CommandInterface $command, ?\DateTimeInterface $dateTime = null): bool { - if (!$dateTime instanceof \DateTimeInterface) { - $dateTime = new \DateTime(); + if (null === $dateTime) { + $dateTime = $this->dateTimeProvider?->now() ?? new \DateTime(); } $cron = new CronExpression($command->getCronExpression()); diff --git a/src/Checker/SoftLimitThresholdIsDueChecker.php b/src/Checker/SoftLimitThresholdIsDueChecker.php index ee9d7f75..7a88241f 100644 --- a/src/Checker/SoftLimitThresholdIsDueChecker.php +++ b/src/Checker/SoftLimitThresholdIsDueChecker.php @@ -6,6 +6,7 @@ use Cron\CronExpression; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; +use Sylius\Calendar\Provider\DateTimeProviderInterface; use Synolia\SyliusSchedulerCommandPlugin\Components\Exceptions\Checker\IsNotDueException; use Synolia\SyliusSchedulerCommandPlugin\Entity\CommandInterface; use Synolia\SyliusSchedulerCommandPlugin\Repository\ScheduledCommandRepositoryInterface; @@ -22,11 +23,21 @@ public static function getDefaultPriority(): int public function __construct( private readonly ScheduledCommandRepositoryInterface $scheduledCommandRepository, + private readonly ?DateTimeProviderInterface $dateTimeProvider = null, /** * Threshold in minutes */ private readonly int $threshold = 5, ) { + if (null === $dateTimeProvider) { + trigger_deprecation( + 'synolia/sylius-scheduler-command-plugin', + '3.9', + 'Not passing a service that implements "%s" as a 1st argument of "%s" constructor is deprecated and will be prohibited in 4.0.', + DateTimeProviderInterface::class, + self::class, + ); + } } /** @@ -35,7 +46,7 @@ public function __construct( public function isDue(CommandInterface $command, ?\DateTimeInterface $dateTime = null): bool { if (!$dateTime instanceof \DateTimeInterface) { - $dateTime = new \DateTime(); + $dateTime = $this->dateTimeProvider?->now() ?? new \DateTime(); } $cron = new CronExpression($command->getCronExpression()); diff --git a/src/Provider/CalendarWithTimezone.php b/src/Provider/CalendarWithTimezone.php new file mode 100644 index 00000000..8c3e87fc --- /dev/null +++ b/src/Provider/CalendarWithTimezone.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace Synolia\SyliusSchedulerCommandPlugin\Provider; + +use DateTimeImmutable; +use DateTimeZone; +use Exception; +use Sylius\Calendar\Provider\DateTimeProviderInterface; + +final class CalendarWithTimezone implements DateTimeProviderInterface +{ + public function __construct( + private ?string $timezone = null, + ) { + } + + /** + * @throws Exception + */ + public function now(): \DateTimeInterface + { + $timezone = $this->timezone ?? date_default_timezone_get(); + + return new DateTimeImmutable(timezone: new DateTimeZone($timezone)); + } +} diff --git a/src/Resources/config/services.yaml b/src/Resources/config/services.yaml index 43181967..954eac7d 100644 --- a/src/Resources/config/services.yaml +++ b/src/Resources/config/services.yaml @@ -3,6 +3,7 @@ parameters: env(SYNOLIA_SCHEDULER_PLUGIN_KEEP_ALIVE): true env(SYNOLIA_SCHEDULER_PLUGIN_LOGS_DIR): '%kernel.logs_dir%' env(SYNOLIA_SCHEDULER_PLUGIN_TIMEFORMAT_24H): false + env(SYNOLIA_SCHEDULER_PLUGIN_TIMEZONE): null services: _defaults: diff --git a/tests/PHPUnit/Checker/EveryMinuteIsDueCheckerTest.php b/tests/PHPUnit/Checker/EveryMinuteIsDueCheckerTest.php index 5b1dc8db..af12fba6 100644 --- a/tests/PHPUnit/Checker/EveryMinuteIsDueCheckerTest.php +++ b/tests/PHPUnit/Checker/EveryMinuteIsDueCheckerTest.php @@ -10,6 +10,14 @@ class EveryMinuteIsDueCheckerTest extends AbstractIsDueTestCase { + private EveryMinuteIsDueChecker $everyMinuteIsDueChecker; + + public function setUp(): void + { + parent::setUp(); + $this->everyMinuteIsDueChecker = static::getContainer()->get(EveryMinuteIsDueChecker::class); + } + /** * @dataProvider isDueUsingCronExpressionDataProvider */ @@ -18,13 +26,12 @@ public function testIsDue( \DateTimeInterface $currentDateTime, bool $expectedResult, ): void { - $checker = new EveryMinuteIsDueChecker(); $command = $this->setupCommand($cronExpression); if ($expectedResult === false) { $this->expectException(IsNotDueException::class); } - $this->assertEquals($expectedResult, $checker->isDue($command, $currentDateTime)); + $this->assertEquals($expectedResult, $this->everyMinuteIsDueChecker->isDue($command, $currentDateTime)); } } From 7024e75f109a008f01cd5e7518619a5fe78ca7d9 Mon Sep 17 00:00:00 2001 From: Olivier ALLAIN Date: Sat, 22 Mar 2025 20:16:31 +0100 Subject: [PATCH 5/6] use php attribute --- UPGRADE.md | 2 +- src/Checker/EveryMinuteIsDueChecker.php | 8 ++++---- src/Checker/SoftLimitThresholdIsDueChecker.php | 4 ++-- src/Provider/CalendarWithTimezone.php | 13 ++++--------- src/Resources/config/services.yaml | 2 +- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index be58ef3a..f75b8d78 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -7,7 +7,7 @@ Also, for old existing schedules in your database, please remove the log file extension in column `logFilePrefix`. -## from 3.6 to 3.7 +## from 3.8 to 3.9 * The constructors of `Synolia\SyliusSchedulerCommandPlugin\Checker\EveryMinuteIsDueChecker` and `Synolia\SyliusSchedulerCommandPlugin\Checker\SoftLimitThresholdIsDueChecker` has been modified, a new argument has been added : diff --git a/src/Checker/EveryMinuteIsDueChecker.php b/src/Checker/EveryMinuteIsDueChecker.php index a3759db0..7c329c8c 100644 --- a/src/Checker/EveryMinuteIsDueChecker.php +++ b/src/Checker/EveryMinuteIsDueChecker.php @@ -5,8 +5,8 @@ namespace Synolia\SyliusSchedulerCommandPlugin\Checker; use Cron\CronExpression; -use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; use Sylius\Calendar\Provider\DateTimeProviderInterface; +use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; use Synolia\SyliusSchedulerCommandPlugin\Components\Exceptions\Checker\IsNotDueException; use Synolia\SyliusSchedulerCommandPlugin\Entity\CommandInterface; @@ -19,9 +19,9 @@ class EveryMinuteIsDueChecker implements IsDueCheckerInterface private const PRIORITY = 0; public function __construct( - private ?DateTimeProviderInterface $dateTimeProvider = null, + private readonly ?DateTimeProviderInterface $dateTimeProvider = null, ) { - if (null === $dateTimeProvider) { + if (!$dateTimeProvider instanceof DateTimeProviderInterface) { trigger_deprecation( 'synolia/sylius-scheduler-command-plugin', '3.9', @@ -42,7 +42,7 @@ public static function getDefaultPriority(): int */ public function isDue(CommandInterface $command, ?\DateTimeInterface $dateTime = null): bool { - if (null === $dateTime) { + if (!$dateTime instanceof \DateTimeInterface) { $dateTime = $this->dateTimeProvider?->now() ?? new \DateTime(); } diff --git a/src/Checker/SoftLimitThresholdIsDueChecker.php b/src/Checker/SoftLimitThresholdIsDueChecker.php index 7a88241f..1c1067bd 100644 --- a/src/Checker/SoftLimitThresholdIsDueChecker.php +++ b/src/Checker/SoftLimitThresholdIsDueChecker.php @@ -5,8 +5,8 @@ namespace Synolia\SyliusSchedulerCommandPlugin\Checker; use Cron\CronExpression; -use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; use Sylius\Calendar\Provider\DateTimeProviderInterface; +use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; use Synolia\SyliusSchedulerCommandPlugin\Components\Exceptions\Checker\IsNotDueException; use Synolia\SyliusSchedulerCommandPlugin\Entity\CommandInterface; use Synolia\SyliusSchedulerCommandPlugin\Repository\ScheduledCommandRepositoryInterface; @@ -29,7 +29,7 @@ public function __construct( */ private readonly int $threshold = 5, ) { - if (null === $dateTimeProvider) { + if (!$dateTimeProvider instanceof DateTimeProviderInterface) { trigger_deprecation( 'synolia/sylius-scheduler-command-plugin', '3.9', diff --git a/src/Provider/CalendarWithTimezone.php b/src/Provider/CalendarWithTimezone.php index 8c3e87fc..30436154 100644 --- a/src/Provider/CalendarWithTimezone.php +++ b/src/Provider/CalendarWithTimezone.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - declare(strict_types=1); namespace Synolia\SyliusSchedulerCommandPlugin\Provider; @@ -17,10 +8,14 @@ use DateTimeZone; use Exception; use Sylius\Calendar\Provider\DateTimeProviderInterface; +use Symfony\Component\DependencyInjection\Attribute\AsAlias; +use Symfony\Component\DependencyInjection\Attribute\Autowire; +#[AsAlias(DateTimeProviderInterface::class)] final class CalendarWithTimezone implements DateTimeProviderInterface { public function __construct( + #[Autowire(param: 'env(SYNOLIA_SCHEDULER_PLUGIN_TIMEZONE)')] private ?string $timezone = null, ) { } diff --git a/src/Resources/config/services.yaml b/src/Resources/config/services.yaml index 954eac7d..19d67851 100644 --- a/src/Resources/config/services.yaml +++ b/src/Resources/config/services.yaml @@ -3,7 +3,7 @@ parameters: env(SYNOLIA_SCHEDULER_PLUGIN_KEEP_ALIVE): true env(SYNOLIA_SCHEDULER_PLUGIN_LOGS_DIR): '%kernel.logs_dir%' env(SYNOLIA_SCHEDULER_PLUGIN_TIMEFORMAT_24H): false - env(SYNOLIA_SCHEDULER_PLUGIN_TIMEZONE): null + env(SYNOLIA_SCHEDULER_PLUGIN_TIMEZONE): ~ services: _defaults: From 436b012f0e70932b9dbeea31161bcfe5ae02d412 Mon Sep 17 00:00:00 2001 From: Olivier ALLAIN Date: Sat, 20 Jan 2024 15:40:55 +0100 Subject: [PATCH 6/6] fix #92 live logs --- Makefile | 1 + README.md | 4 ++ src/Resources/public/column/index.js | 2 +- src/Resources/public/controller/index.css | 24 ++++++----- .../views/Controller/modal.html.twig | 3 +- src/Resources/views/Controller/show.html.twig | 40 ++++++++----------- 6 files changed, 38 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index e579331c..8ea88809 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,7 @@ install-sylius: ${CONSOLE} sylius:fixtures:load default -n ${YARN} install ${YARN} build + ${CONSOLE} assets:install -n ${CONSOLE} cache:clear phpunit-configure: diff --git a/README.md b/README.md index a2d2c216..b2c4d96b 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,10 @@ cp -R vendor/synolia/sylius-scheduler-command-plugin/install/Application/config/packages/* config/packages/ cp -R vendor/synolia/sylius-scheduler-command-plugin/install/Application/config/routes/* config/routes/ +6. Installing assets (JS and CSS) fot the plugin + + bin/console assets:install + ## Usage * Log into admin panel diff --git a/src/Resources/public/column/index.js b/src/Resources/public/column/index.js index cb4e4f4a..b452bdd0 100644 --- a/src/Resources/public/column/index.js +++ b/src/Resources/public/column/index.js @@ -2,7 +2,7 @@ function fireLog(e) { e.preventDefault(); var url = $(e.currentTarget).data('href'); $.get(url, function (data) { - $('#log-modal .description').html($(data).find('#content')); + $('#log-content').html($(data)); }).done(function () { $('#log-modal').modal('show'); }) diff --git a/src/Resources/public/controller/index.css b/src/Resources/public/controller/index.css index 5e8c539e..ae646216 100644 --- a/src/Resources/public/controller/index.css +++ b/src/Resources/public/controller/index.css @@ -8,20 +8,15 @@ pre { #results { border: solid 1px; - padding: 5px; + padding: 10px; overflow-y: scroll; - height: calc(100% - 150px); + height: calc(100% - 80px); } #log-modal { - width: calc(100% - 100px); - height: calc(100% - 100px); -} - -#log-modal .description, -#log-modal > .content, -#log-modal #content { - height: 100%; + width: calc(100% - 120px); + height: calc(100% - 120px); + overflow-y: hidden; } #results .loader:before { @@ -31,3 +26,12 @@ pre { #results .loader:after { border-color: #767676 transparent transparent; } + +#log-content { + padding: 10px; + height: calc(100% - 20px); +} + +#log-results { + height: calc(100% - 20px); +} diff --git a/src/Resources/views/Controller/modal.html.twig b/src/Resources/views/Controller/modal.html.twig index f8fd33a1..9bf01fad 100644 --- a/src/Resources/views/Controller/modal.html.twig +++ b/src/Resources/views/Controller/modal.html.twig @@ -4,7 +4,6 @@ -
-
+
diff --git a/src/Resources/views/Controller/show.html.twig b/src/Resources/views/Controller/show.html.twig index a095baa5..f6c7f001 100644 --- a/src/Resources/views/Controller/show.html.twig +++ b/src/Resources/views/Controller/show.html.twig @@ -1,30 +1,24 @@ -{% extends '@SyliusAdmin/layout.html.twig' %} - -{% import '@SyliusUi/Macro/headers.html.twig' as headers %} - -{% block title %}{{ 'synolia.ui.live_view_of_scheduled_command'|trans({'%scheduledCommandName%': scheduledCommand.name|e}) }} {{ parent() }}{% endblock %} - -{% block content %} - {{ headers.default('synolia.ui.live_view_of_scheduled_command'|trans({'%scheduledCommandName%': scheduledCommand.name|e}), 'cogs') }} - -
- -
+
+ + +
+
         
+
+ +{{ sylius_template_event('synolia.admin.command.logs.stylesheets') }} - {{ sylius_template_event('synolia.admin.command.logs.stylesheets') }} + - +{{ sylius_template_event('synolia.admin.command.logs.javascripts') }} - {{ sylius_template_event('synolia.admin.command.logs.javascripts') }} -{% endblock %}