16 Commits
v4.1.3 ... v5.x

Author SHA1 Message Date
loic
6ece645267 Added Dashboard tab 2025-07-04 08:41:40 +02:00
loic
5180108598 Added Dashboard tab 2025-07-04 08:19:00 +02:00
jb cr
08cd3eccd6 prepare publishing 2025-04-02 11:18:21 +02:00
jbcr
9dc90bb001 add make by mention (#6) 2025-04-02 11:15:36 +02:00
AUDUL
4b8554c64a Add oneshot v5 (#3)
* Added possibility to create one shot job from scheduled job
2025-02-18 14:30:40 +01:00
Jérémy J
4b8403b2b0 Updated CHANGELOG 2025-02-04 11:06:20 +01:00
Jérémy J
198b5922a4 Fix controller 2025-02-04 10:32:19 +01:00
Jérémy J
eacd4c5e2c Updated code with Rector 2025-02-04 10:01:38 +01:00
Jérémy J
51132a8a30 Merge branch 'v4.x' into v5.x 2025-02-03 11:01:55 +01:00
Jérémy J
137f9a46b5 Updated dependencies 2025-02-03 10:42:55 +01:00
jeremycr
2f68d49f4b Merge pull request #1 from code-rhapsodie/date-picker
Replaced date field with date picker
2025-01-31 17:17:59 +01:00
Jérémy J
6be0993c98 Replaced date field with date picker 2025-01-31 17:17:11 +01:00
Jérémy J
c5ea78f37c Fixed replacement phar 2025-01-31 11:02:51 +01:00
Jérémy J
28f76b279b Fixed scheduled job run history pagination 2024-12-18 11:12:45 +01:00
Jérémy J
d9b1a66f92 Added error count columns to job tables 2024-12-17 15:33:02 +01:00
Jérémy J
8bf5805589 Renamed bundle to IbexaDataflowBundle 2024-12-13 15:50:47 +01:00
115 changed files with 1292 additions and 1222 deletions

1
.gitignore vendored
View File

@@ -4,4 +4,5 @@ composer.lock
.php_cs.cache
.php_cs
.php-cs-fixer.cache
.php-version
.idea

View File

@@ -1,3 +1,30 @@
# Version 5.2.1
* Fixed datepicker in oneshot modal
# Version 5.2.0
* Added Dashboard tab
# Version 5.1.1
* Add branding label
# Version 5.1.0
* Added possibility to create one shot job from scheduled job
# Version 5.0.0
* Renamed bundle to IbexaDataflowBundle
* Replaced every trace of ezdataflow with ibexa_dataflow or ibexa-dataflow
* Added automatic replacement script
# Version 4.3.0
* Replaced date field with date picker
# Version 4.2.0
* Added error count columns to job tables
* Fixed scheduled job run history pagination
# Version 4.1.2
* Fix main menu label
@@ -14,56 +41,3 @@
# Version 4.0.0
* Add compatibility with Ibexa 4.0+ and drop compatibility for eZPlatform 2 and Ibexa 3
# Version 3.2.0
* Fixed History page pagination is hidden by footer on Ibexa 3.3 #38
* Added filter on history page to filter out jobs with 0 items
* Date and times will now be displayed using the user defined timezone, and stored using php timezone
# Version 3.1.0
* Allow `LocationCreateStruct` objects inside the `$locations` argument of `ContentCreateStructure` to have more control over the created locations.
# Version 3.0.1
* Bump minimum PHP version to PHP 7.3 like code-rhapsodie/dataflow-bundle dependency.
* Allow PHP 8.x.
* Add GitHub Action to run tests.
# Version 3.0.0
* Add compatibility with Ibexa Content 3.3
* Add compatibility with Symfony 5.x
# Version 2.3.0
* Added a button to display exceptions / log in a modal
* Add log in `CodeRhapsodie\EzDataflowBundle\Filter\NotModifiedContentFilter` and `CodeRhapsodie\EzDataflowBundle\Writer\ContentWriter`
# Version 2.2.0
* Added `NotModifiedContentFilter` and a bunch of `FieldComparator` classes
# version 2.1.0
* ContentWriter return created content
# version 2.0.1
* Enclosure js code into anonymous function
# version 2.0.0
* Update to use Dataflow v2.0+
* Add compiler pass to change the Dataflow DBAL connection factory
* Use the DBAL connection from siteaccess
* Add `mode` argument on `ContentStructureFactory::transform()` function
* Add `CodeRhapsodie\EzDataflowBundle\Factory\ContentStructureFactoryInterface`
# version 1.0.0
* Initial version to use Dataflow v1.0+ into eZ Platform
* Add Admin UI
* Add content writer
* Add content structure

View File

@@ -1,4 +1,4 @@
Copyright (c) 2019 Code Rhapsodie
Copyright (c) 2024 Code Rhapsodie
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

122
README.md
View File

@@ -8,15 +8,12 @@ Ibexa Dataflow bundle is intended to manage content imports from external data s
> Note: before using this bundle, please read
> the [Code Rhapsodie Dataflow bundle documentation](https://github.com/code-rhapsodie/dataflow-bundle/blob/master/README.md).
> Command line notice: When you use Dataflow commands, **use `--siteaccess` instead of `--connection`** expect
> Command line notice: When you use Dataflow commands, **use `--siteaccess` instead of `--connection`** except
> for `code-rhapsodie:dataflow:dump-schema` command.
| Ibexa Dataflow Version | Ibexa Content Version | Status |
|---------------------|-----------------------|------------------------------|
| 4.x | 4.x | :white_check_mark: Maintened |
| 3.x | 3.x | :white_check_mark: Maintened |
| 2.x | eZ Platform 2.5 | :x: Not maintened |
| 1.x | eZ Platform 2.5 | :x: Not maintained |
| Ibexa Dataflow Version | Ibexa Content Version | Status |
|------------------------|-----------------------|-------------------------------|
| 5.x | 4.x | :white_check_mark: Maintained |
## User Interface (UI)
@@ -32,12 +29,12 @@ Processes can be set to run either:
### Step 1: Install the bundle via composer
```shell script
$ composer require code-rhapsodie/ezdataflow-bundle
$ composer require code-rhapsodie/ibexa-dataflow-bundle
```
### Step 2: Enable the bundle
> Note: The loading order between the Dataflow bundle and Ez Dataflow bundle is important. Dataflow must be loaded
> Note: The loading order between the Dataflow bundle and Ibexa Dataflow bundle is important. Dataflow must be loaded
> first.
Add those two lines in the `config/bundles.php` file:
@@ -48,7 +45,7 @@ Add those two lines in the `config/bundles.php` file:
return [
// ...
CodeRhapsodie\DataflowBundle\CodeRhapsodieDataflowBundle::class => ['all' => true],
CodeRhapsodie\EzDataflowBundle\CodeRhapsodieEzDataflowBundle::class => ['all' => true],
CodeRhapsodie\IbexaDataflowBundle\CodeRhapsodieIbexaDataflowBundle::class => ['all' => true],
// ...
];
```
@@ -56,10 +53,10 @@ return [
### Step 3: Import bundle routing file
```yaml
# config/routing/ezdataflow.yaml
# config/routing/ibexa_dataflow.yaml
_cr.dataflow:
resource: '@CodeRhapsodieEzDataflowBundle/Resources/config/routing.yaml'
_cr.ibexa_dataflow:
resource: '@CodeRhapsodieIbexaDataflowBundle/Resources/config/routing.yaml'
```
### Step 4: Update the database schema
@@ -78,9 +75,9 @@ By default, the `ContentWriter` will publish contents using the `admin` user. If
sufficient permissions), you can configure it like this:
```yaml
# config/packages/code_rhapsodie_ez_dataflow.yaml
# config/packages/code_rhapsodie_ibexa_dataflow.yaml
code_rhapsodie_ez_dataflow:
code_rhapsodie_ibexa_dataflow:
# Integer values are assumed to be user ids, non-integer values are assumed to be user logins
admin_login_or_id: webmaster
```
@@ -92,7 +89,7 @@ to [Code-Rhapsodie Dataflow type documentation](https://github.com/code-rhapsodi
## Use the ContentWriter
To add or update Ibexa contents, you can use the `CodeRhapsodie\EzDataflowBundle\Writer\ContentWriter` writer.
To add or update Ibexa contents, you can use the `CodeRhapsodie\IbexaDataflowBundle\Writer\ContentWriter` writer.
### Step 1: Inject the dependencies and add the writer
@@ -102,21 +99,15 @@ list like this:
```php
// In your DataflowType
use CodeRhapsodie\EzDataflowBundle\Writer\ContentWriter;
use CodeRhapsodie\IbexaDataflowBundle\Writer\ContentWriter;
use CodeRhapsodie\DataflowBundle\DataflowType\AbstractDataflowType;
[...]
class MyDataflowType extends AbstractDataflowType
{
//[...]
/**
* @var ContentWriter
*/
private $contentWriter;
public function __construct(ContentWriter $contentWriter)
public function __construct(private readonly ContentWriter $contentWriter)
{
$this->contentWriter = $contentWriter;
}
//[...]
protected function buildDataflow(DataflowBuilder $builder, array $options): void
@@ -156,36 +147,26 @@ In this example, I have added a new folder to store all articles.
To get the location id of the parent Ibexa content, go to the admin UI and select the future parent content, click on
the details tabs, and read the "Location id" like this:
![parent folder](src/Resources/doc/dest_folder.jpg)
![parent folder](src/Resources/doc/dest_folder.png)
> Note: the best practice is to define this parent id in your `parameters.yml` file or your `.env.local` file for each
> Note: the best practice is to define this parent id in your `parameters.yaml` file or your `.env.local` file for each
> execution environment.
```php
// In your DataflowType
use CodeRhapsodie\EzDataflowBundle\Factory\ContentStructureFactory;
use CodeRhapsodie\EzDataflowBundle\Writer\ContentWriter;
use CodeRhapsodie\IbexaDataflowBundle\Factory\ContentStructureFactory;
use CodeRhapsodie\IbexaDataflowBundle\Writer\ContentWriter;
use CodeRhapsodie\DataflowBundle\DataflowType\AbstractDataflowType;
[...]
class MyDataflowType extends AbstractDataflowType
{
//[...]
/**
* @var ContentWriter
*/
private $contentWriter;
/**
* @var ContentStructureFactory
*/
private $contentStructureFactory;
public function __construct(ContentWriter $contentWriter, ContentStructureFactory $contentStructureFactory)
{
$this->contentWriter = $contentWriter;
$this->contentStructureFactory = $contentStructureFactory;
public function __construct(
private readonly ContentWriter $contentWriter,
private readonly ContentStructureFactory $contentStructureFactory
) {
}
//[...]
protected function buildDataflow(DataflowBuilder $builder, array $options): void
@@ -200,13 +181,13 @@ class MyDataflowType extends AbstractDataflowType
unset($data['id']);
return $this->contentStructureFactory->transform(
$data,
$remoteId,
'eng-GB',
'article2',
54, //Parent location id
ContentStructureFactoryInterface::MODE_INSERT_OR_UPDATE //Optional value. Other choice : ContentStructureFactoryInterface::MODE_INSERT_ONLY or ContentStructureFactoryInterface::MODE_UPDATE_ONLY
);
$data,
$remoteId,
'eng-GB',
'article2',
54, //Parent location id
ContentStructureFactoryInterface::MODE_INSERT_OR_UPDATE //Optional value. Other choice : ContentStructureFactoryInterface::MODE_INSERT_ONLY or ContentStructureFactoryInterface::MODE_UPDATE_ONLY
);
});
// If you want the writer log
$this->contentWriter->setLogger($this->logger);
@@ -280,7 +261,7 @@ If you want to add support for a field type, simply create your own comparator.
```php
<?php
use CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator;
use CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\AbstractFieldComparator;
use Ibexa\Core\FieldType\Value;
//[...]
@@ -298,9 +279,9 @@ class MyFieldComparator extends AbstractFieldComparator
```yaml
# Service declaration
App\FieldComparator\MyFieldComparator:
parent: 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
parent: 'CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
tags:
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'my_field_type_identifier' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'my_field_type_identifier' }
```
# Admin UI
@@ -309,16 +290,16 @@ App\FieldComparator\MyFieldComparator:
You can access the Ibexa Dataflow administration UI from your Ibexa admin back-office.
![Admin menu](src/Resources/doc/ez_dataflow_admin_menu.jpg)
![Admin menu](src/Resources/doc/admin_menu.png)
1. Click to "Admin"
1. Click to "Ibexa Dataflow"
## Scheduled dataflow list
When you access to the Ibexa Dataflow administration UI, you going here:
When you access to the Ibexa Dataflow administration UI, you arrive on the scheduled dataflow list page:
![Scheduled dataflow list](src/Resources/doc/scheduled_list.jpg)
![Scheduled dataflow list](src/Resources/doc/scheduled_list.png)
1. Scheduled dataflow list
1. Button to add a new scheduled dataflow
@@ -336,7 +317,7 @@ Go to the Ibexa Dataflow admin, and click on the "+" orange button.
In the new popin, fill in the fields:
![Add a new schedule](src/Resources/doc/add_new_schedule.jpg)
![Add a new schedule](src/Resources/doc/add_new_schedule.png)
1. Type the Dataflow schedule name
1. Select the Dataflow type. The list is automatically generated from the list of Symfony services with the
@@ -356,15 +337,17 @@ Finally, click on the "Create" button.
When you click on the "History" tab in the Ibexa Dataflow admin UI, the job history for all Dataflow configured and
executed is displayed.
![History list](src/Resources/doc/history_list.jpg)
![History list](src/Resources/doc/history_list.png)
1. The history list
1. This column shows the number of objects that have been processed.
1. Click on the question mark to display the job details.
1. A summary of each job dates and number of items processed.
1. Click on the question mark icon to display the job details.
1. Click on the text icon to display the job exception log.
1. Switch between displaying all jobs, or only non-empty jobs (at least 1 item was processed)
Details of one scheduled job:
![Job execution details](src/Resources/doc/job_successful.jpg)
![Job execution details](src/Resources/doc/job_successful.png)
## One-shot job
@@ -372,23 +355,24 @@ If you don't want to run a Dataflow periodically, you can add a single execution
Go to the Ibexa Dataflow admin UI and click on the "Oneshot" tab.
![Oneshot list](src/Resources/doc/oneshot_list.jpg)
![Oneshot list](src/Resources/doc/oneshot_list.png)
1. This button allows you to define the one-shot job (see below).
1. This column shows the number of objects that have been processed.
1. Click on the question mark to display the job details.
1. This button allows you to create a new one-shot job (see below).
1. A summary of each job dates and number of items processed.
1. Click on the question mark icon to display the job details.
1. Click on the text icon to display the job exception log.
Details of one-shot job:
![onshot details](src/Resources/doc/job_fail.jpg)
![onshot details](src/Resources/doc/job_failed.png)
Here the job has fail.
## Add a one-shot job
Go to the Ibexa Dataflow admin UI and click on the "Oneshot" tab. Click on the "+" orange button to open the adding popin.
Go to the Ibexa Dataflow admin UI and click on the "Oneshot" tab. Click on the "+ Create" button to open the add popin.
![The add one-shot popin](src/Resources/doc/one_shot_job.jpg)
![The add one-shot popin](src/Resources/doc/one_shot_job.png)
1. Type the Dataflow job name
1. Select the Dataflow type. The list is automatically generated from the list of Symfony services with the
@@ -407,13 +391,13 @@ and `Ibexa Dataflow / View` policies in one of their roles.
# Issues and feature requests
Please report issues and request features at https://github.com/code-rhapsodie/ezdataflow-bundle/issues.
Please report issues and request features at https://github.com/code-rhapsodie/ibexa-dataflow-bundle/issues.
# Contributing
Contributions are very welcome. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for
details. Thanks
to [everyone who has contributed](https://github.com/code-rhapsodie/ezdataflow-bundle/graphs/contributors)
to [everyone who has contributed](https://github.com/code-rhapsodie/ibexa-dataflow-bundle/graphs/contributors)
already.
# License

View File

@@ -1,15 +1,28 @@
# From v1.0 to v2.0
In version 5, all references to ezdataflow were replaced by ibexa-dataflow, in namespaces, class names, tags and config keys.
This requires some changes in your application files.
When you use Dataflow commands, use `--siteaccess` instead of `--connection` except for `code-rhapsodie:dataflow:dump-schema`.
## Updating source files
[BC] The return of `CodeRhapsodie\EzDataflowBundle\Gateway\JobGateway::findForScheduled`
and `CodeRhapsodie\EzDataflowBundle\Gateway\ScheduledDataflowGateway::findAllOrderedByLabel` has been changed.
The iterable contains an associative array instead of an object.
A script is provided to do all the replacements in your project files for you. Pass as arguments all directories where
replacing is needed.
[BC] In classes `CodeRhapsodie\EzDataflowBundle\Gateway\JobGateway` and
`CodeRhapsodie\EzDataflowBundle\Gateway\ScheduledDataflowGateway`, all methods return `Doctrine\ORM\Query` object has
changed to return now a `Doctrine\DBAL\Query\QueryBuilder`
```shell
php vendor/bin/ibexa-dataflow-namespace-changer.phar src/ config/ templates/ translations/
```
[BC] The return type of `CodeRhapsodie\EzDataflowBundle\Factory\ContentStructureFactory::transform` has been changed
from `CodeRhapsodie\EzDataflowBundle\Model\ContentStructure` to `mixed`. In fact only `false` or
`CodeRhapsodie\EzDataflowBundle\Model\ContentStructure` object will be returned.
You should check all changes performed afterward. Here is the list of all the replacement that should be performed:
- all namespaces starting by `CodeRhapsodie\EzDataflowBundle` should now start by `CodeRhapsodie\IbexaDataflowBundle`, anywhere in PHP sources and services definitions
- the class `CodeRhapsodieEzDataflowBundle` should be renamed `CodeRhapsodieIbexaDataflowBundle` in `bundles.php`
- the config key `code_rhapsodie_ezdataflow` should be renamed `code_rhapsodie_ibexa_dataflow` in config files
- all translation keys starting by `ezdataflow` should now start by `ibexa_dataflow` in translation files
- the security policy module `ezdataflow` should be renamed `ibexa_dataflow`
- all template paths containing `ezdataflow` should now contain `ibexa_dataflow`
## Updating database
Run the following command on your database:
```sql
UPDATE ezpolicy SET module_name = 'ibexa_dataflow' WHERE module_name = 'ezdataflow'
```

Binary file not shown.

View File

@@ -3,7 +3,7 @@
"replace": {
"code-rhapsodie/ezdataflow-bundle": "*"
},
"description": "Import/export bundle for Ibexa based on Code-Rhapsodie Dataflow",
"description": "Import / export bundle for Ibexa Content based on Code Rhapsodie Dataflow framework",
"type": "symfony-bundle",
"keywords": ["dataflow", "import", "export", "data processing", "ibexa"],
"license": "MIT",
@@ -29,30 +29,32 @@
},
{
"name": "Other contributors",
"homepage": "https://github.com/code-rhapsodie/ezdataflow-bundle/graphs/contributors"
"homepage": "https://github.com/code-rhapsodie/ibexa-dataflow-bundle/graphs/contributors"
}
],
"autoload": {
"psr-4": {
"CodeRhapsodie\\EzDataflowBundle\\": "src/"
"CodeRhapsodie\\IbexaDataflowBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"CodeRhapsodie\\EzDataflowBundle\\Tests\\": "tests/"
"CodeRhapsodie\\IbexaDataflowBundle\\Tests\\": "tests/"
}
},
"require": {
"php": "^7.4||^8.0",
"php": "^8.1",
"ext-json": "*",
"code-rhapsodie/dataflow-bundle": "^3.0||^4.0",
"http-interop/http-factory-guzzle": "^1.2",
"ibexa/admin-ui": "^4.0",
"ibexa/core": "^4.0"
"ibexa/admin-ui": "^4.6",
"ibexa/core": "^4.6"
},
"require-dev": {
"doctrine/dbal": "^2.0|^3.0",
"phpunit/phpunit": "^7||^8||^9"
"phpunit/phpunit": "^7||^8||^9",
"rector/rector": "^2.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
@@ -62,9 +64,11 @@
"php-http/discovery": true
}
},
"bin": ["bin/ibexa-dataflow-namespace-changer.phar"],
"extra": {
"branch-alias": {
"dev-v4.x": "4.x-dev"
"dev-v4.x": "4.x-dev",
"dev-v5.x": "5.x-dev"
}
}
}

View File

@@ -14,7 +14,7 @@
<ini name="error_reporting" value="-1"/>
</php>
<testsuites>
<testsuite name="EzDataflow tests suite">
<testsuite name="Ibexa Dataflow tests suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>

19
rector.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\ValueObject\PhpVersion;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withPhpVersion(PhpVersion::PHP_81)
// uncomment to reach your current PHP version
->withPhpSets(php81: true)
->withTypeCoverageLevel(0)
->withDeadCodeLevel(0)
->withCodeQualityLevel(0)
->withAttributesSets(symfony: true, doctrine: true);

View File

@@ -1,33 +0,0 @@
<?php
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle;
use CodeRhapsodie\EzDataflowBundle\DependencyInjection\CodeRhapsodieEzDataflowExtension;
use CodeRhapsodie\EzDataflowBundle\DependencyInjection\Compiler\FieldComparatorCompilerPass;
use CodeRhapsodie\EzDataflowBundle\Security\PolicyProvider;
use Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class CodeRhapsodieEzDataflowBundle extends Bundle
{
protected $name = 'CodeRhapsodieEzDataflowBundle';
public function getContainerExtension()
{
return new CodeRhapsodieEzDataflowExtension();
}
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new FieldComparatorCompilerPass());
/** @var IbexaCoreExtension $ibexaExtension */
$ibexaExtension = $container->getExtension('ibexa');
$ibexaExtension->addPolicyProvider(new PolicyProvider());
}
}

View File

@@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace CodeRhapsodie\IbexaDataflowBundle;
use CodeRhapsodie\IbexaDataflowBundle\DependencyInjection\CodeRhapsodieIbexaDataflowExtension;
use CodeRhapsodie\IbexaDataflowBundle\DependencyInjection\Compiler\FieldComparatorCompilerPass;
use CodeRhapsodie\IbexaDataflowBundle\Security\PolicyProvider;
use Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class CodeRhapsodieIbexaDataflowBundle extends Bundle
{
public const VERSION = '5.2.0';
public const PRODUCT_NAME = 'ibexadataflow';
protected $name = 'CodeRhapsodieIbexaDataflowBundle';
public function getContainerExtension()
{
return new CodeRhapsodieIbexaDataflowExtension();
}
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new FieldComparatorCompilerPass());
/** @var IbexaCoreExtension $ibexaExtension */
$ibexaExtension = $container->getExtension('ibexa');
$ibexaExtension->addPolicyProvider(new PolicyProvider());
}
}
class_alias(CodeRhapsodieIbexaDataflowBundle::class, 'CodeRhapsodie\EzDataflowBundle\CodeRhapsodieIbexaDataflowBundle');

View File

@@ -2,16 +2,20 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Controller;
namespace CodeRhapsodie\IbexaDataflowBundle\Controller;
use CodeRhapsodie\DataflowBundle\Entity\Job;
use CodeRhapsodie\DataflowBundle\Entity\ScheduledDataflow;
use CodeRhapsodie\EzDataflowBundle\Form\CreateOneshotType;
use CodeRhapsodie\EzDataflowBundle\Form\CreateScheduledType;
use CodeRhapsodie\EzDataflowBundle\Gateway\JobGateway;
use CodeRhapsodie\EzDataflowBundle\Gateway\ScheduledDataflowGateway;
use CodeRhapsodie\IbexaDataflowBundle\CodeRhapsodieIbexaDataflowBundle;
use CodeRhapsodie\IbexaDataflowBundle\Form\CreateOneshotType;
use CodeRhapsodie\IbexaDataflowBundle\Form\CreateScheduledType;
use CodeRhapsodie\IbexaDataflowBundle\Form\UpdateScheduledType;
use CodeRhapsodie\IbexaDataflowBundle\Gateway\ExceptionJSONDecoderAdapter;
use CodeRhapsodie\IbexaDataflowBundle\Gateway\JobGateway;
use CodeRhapsodie\IbexaDataflowBundle\Gateway\ScheduledDataflowGateway;
use Doctrine\DBAL\Query\QueryBuilder;
use Ibexa\Contracts\AdminUi\Controller\Controller;
use Ibexa\Contracts\Core\Ibexa;
use Ibexa\Core\MVC\Symfony\Security\Authorization\Attribute;
use Pagerfanta\Doctrine\DBAL\QueryAdapter;
use Pagerfanta\Pagerfanta;
@@ -19,121 +23,104 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* @Route("/ezdataflow")
*/
#[Route(path: '/ibexa_dataflow')]
class DashboardController extends Controller
{
/** @var \CodeRhapsodie\EzDataflowBundle\Gateway\JobGateway */
private $jobGateway;
/** @var \CodeRhapsodie\EzDataflowBundle\Gateway\ScheduledDataflowGateway */
private $scheduledDataflowGateway;
public function __construct(JobGateway $jobGateway, ScheduledDataflowGateway $scheduledDataflowGateway)
public function __construct(private readonly JobGateway $jobGateway, private readonly ScheduledDataflowGateway $scheduledDataflowGateway)
{
$this->jobGateway = $jobGateway;
$this->scheduledDataflowGateway = $scheduledDataflowGateway;
}
/**
* @Route("/", name="coderhapsodie.ezdataflow.main")
*/
#[Route(path: '/', name: 'coderhapsodie.ibexa_dataflow.main')]
public function main(): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'view'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
return $this->render('@ibexadesign/ezdataflow/Dashboard/main.html.twig');
$data = [
'product' => CodeRhapsodieIbexaDataflowBundle::PRODUCT_NAME,
'version' => CodeRhapsodieIbexaDataflowBundle::VERSION,
'php' => PHP_VERSION,
'ibexa' => Ibexa::VERSION,
];
return $this->render('@ibexadesign/ibexa_dataflow/Dashboard/main.html.twig', [
'link' => 'https://www.code-rhapsodie.fr/product/redirect/'.str_replace('=', '',
base64_encode(json_encode($data))
),
]);
}
public function repeating(Request $request): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'view'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
$newWorkflow = new ScheduledDataflow();
$newWorkflow->setNext((new \DateTimeImmutable())->add(new \DateInterval('PT1H')));
$form = $this->createForm(CreateScheduledType::class, $newWorkflow, [
'action' => $this->generateUrl('coderhapsodie.ezdataflow.workflow.create'),
'action' => $this->generateUrl('coderhapsodie.ibexa_dataflow.workflow.create'),
]);
$updateForm = $this->createForm(UpdateScheduledType::class);
return $this->render('@ibexadesign/ezdataflow/Dashboard/repeating.html.twig', [
return $this->render('@ibexadesign/ibexa_dataflow/Dashboard/repeating.html.twig', [
'pager' => $this->getPager($this->scheduledDataflowGateway->getListQueryForAdmin(), $request),
'form' => $form->createView(),
'update_form' => $updateForm->createView(),
]);
}
/**
* @Route("/repeating", name="coderhapsodie.ezdataflow.repeating")
*/
#[Route(path: '/repeating', name: 'coderhapsodie.ibexa_dataflow.repeating')]
public function getRepeatingPage(Request $request): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'view'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
return $this->render('@ibexadesign/ezdataflow/Dashboard/repeating.html.twig', [
return $this->render('@ibexadesign/ibexa_dataflow/Dashboard/repeating.html.twig', [
'pager' => $this->getPager($this->scheduledDataflowGateway->getListQueryForAdmin(), $request),
]);
}
public function oneshot(Request $request): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'view'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
$newOneshotJob = new Job();
$newOneshotJob->setRequestedDate((new \DateTime())->add(new \DateInterval('PT1H')));
$form = $this->createForm(CreateOneshotType::class, $newOneshotJob, [
'action' => $this->generateUrl('coderhapsodie.ezdataflow.job.create'),
'action' => $this->generateUrl('coderhapsodie.ibexa_dataflow.job.create'),
]);
return $this->render('@ibexadesign/ezdataflow/Dashboard/oneshot.html.twig', [
return $this->render('@ibexadesign/ibexa_dataflow/Dashboard/oneshot.html.twig', [
'pager' => $this->getPager($this->jobGateway->getOneshotListQueryForAdmin(), $request),
'form' => $form->createView(),
]);
}
/**
* @Route("/oneshot", name="coderhapsodie.ezdataflow.oneshot")
*/
#[Route(path: '/oneshot', name: 'coderhapsodie.ibexa_dataflow.oneshot')]
public function getOneshotPage(Request $request): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'view'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
return $this->render('@ibexadesign/ezdataflow/Dashboard/oneshot.html.twig', [
return $this->render('@ibexadesign/ibexa_dataflow/Dashboard/oneshot.html.twig', [
'pager' => $this->getPager($this->jobGateway->getOneshotListQueryForAdmin(), $request),
]);
}
public function history(Request $request): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'view'));
$filter = (int) $request->query->get('filter', JobGateway::FILTER_NONE);
return $this->render('@ibexadesign/ezdataflow/Dashboard/history.html.twig', [
'pager' => $this->getPager($this->jobGateway->getListQueryForAdmin($filter), $request),
'filter' => $filter,
]);
}
/**
* @Route("/history", name="coderhapsodie.ezdataflow.history")
*/
#[Route(path: '/history', name: 'coderhapsodie.ibexa_dataflow.history')]
public function getHistoryPage(Request $request): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'view'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
$filter = (int) $request->query->get('filter', JobGateway::FILTER_NONE);
return $this->render('@ibexadesign/ezdataflow/Dashboard/history.html.twig', [
return $this->render('@ibexadesign/ibexa_dataflow/Dashboard/history.html.twig', [
'pager' => $this->getPager($this->jobGateway->getListQueryForAdmin($filter), $request),
'filter' => $filter,
]);
}
/**
* @Route("/history/schedule/{id}", name="coderhapsodie.ezdataflow.history.workflow")
*/
#[Route(path: '/history/schedule/{id}', name: 'coderhapsodie.ibexa_dataflow.history.workflow')]
public function getHistoryForScheduled(Request $request, int $id): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'view'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
return $this->render('@ibexadesign/ezdataflow/Dashboard/schedule_history.html.twig', [
return $this->render('@ibexadesign/ibexa_dataflow/Dashboard/schedule_history.html.twig', [
'id' => $id,
'pager' => $this->getPager($this->jobGateway->getListQueryForScheduleAdmin($id), $request),
]);
@@ -141,14 +128,25 @@ class DashboardController extends Controller
private function getPager(QueryBuilder $query, Request $request): Pagerfanta
{
$pager = new Pagerfanta(new QueryAdapter($query, function ($queryBuilder) {
return $queryBuilder->select('COUNT(DISTINCT id) AS total_results')
->resetQueryPart('orderBy')
->setMaxResults(1);
}));
$pager = new Pagerfanta(
new ExceptionJSONDecoderAdapter(
new QueryAdapter($query, fn ($queryBuilder) => $queryBuilder->select('COUNT(DISTINCT id) AS total_results')
->resetQueryPart('orderBy')
->setMaxResults(1))
)
);
$pager->setMaxPerPage(20);
$pager->setCurrentPage($request->query->get('page', 1));
return $pager;
}
public function dashboard(): Response
{
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
return $this->render('@ibexadesign/ibexa_dataflow/Dashboard/dashboard.html.twig', [
'jobs' => $this->jobGateway->getListPendindOrRunning(),
]);
}
}

View File

@@ -2,77 +2,56 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Controller;
namespace CodeRhapsodie\IbexaDataflowBundle\Controller;
use CodeRhapsodie\DataflowBundle\Entity\Job;
use CodeRhapsodie\EzDataflowBundle\Form\CreateOneshotType;
use CodeRhapsodie\EzDataflowBundle\Gateway\JobGateway;
use CodeRhapsodie\IbexaDataflowBundle\Form\CreateOneshotType;
use CodeRhapsodie\IbexaDataflowBundle\Gateway\JobGateway;
use CodeRhapsodie\IbexaDataflowBundle\Gateway\ScheduledDataflowGateway;
use Ibexa\Contracts\AdminUi\Controller\Controller;
use Ibexa\Contracts\AdminUi\Notification\NotificationHandlerInterface;
use Ibexa\Core\MVC\Symfony\Security\Authorization\Attribute;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* @Route("/ezdataflow/job")
*/
#[Route(path: '/ibexa_dataflow/job')]
class JobController extends Controller
{
/** @var \CodeRhapsodie\EzDataflowBundle\Gateway\JobGateway */
private $jobGateway;
/** @var \Ibexa\Contracts\AdminUi\Notification\NotificationHandlerInterface */
private $notificationHandler;
/** @var \Symfony\Contracts\Translation\TranslatorInterface */
private $translator;
public function __construct(
JobGateway $jobGateway,
NotificationHandlerInterface $notificationHandler,
TranslatorInterface $translator
) {
$this->jobGateway = $jobGateway;
$this->notificationHandler = $notificationHandler;
$this->translator = $translator;
public function __construct(private readonly JobGateway $jobGateway, private readonly NotificationHandlerInterface $notificationHandler, private readonly TranslatorInterface $translator, private readonly ScheduledDataflowGateway $scheduledDataflowGateway)
{
}
/**
* @Route("/details/{id}", name="coderhapsodie.ezdataflow.job.details")
*/
#[Route(path: '/details/{id}', name: 'coderhapsodie.ibexa_dataflow.job.details')]
public function displayDetails(int $id): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'view'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
return $this->render('@ibexadesign/ezdataflow/Item/details.html.twig', [
return $this->render('@ibexadesign/ibexa_dataflow/Item/details.html.twig', [
'item' => $this->jobGateway->find($id),
]);
}
/**
* @Route("/details/log/{id}", name="coderhapsodie.ezdataflow.job.log")
*/
#[Route(path: '/details/log/{id}', name: 'coderhapsodie.ibexa_dataflow.job.log')]
public function displayLog(int $id): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'view'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
$item = $this->jobGateway->find($id);
$log = array_map(function ($line) {
return preg_replace('~#\d+~', "\n$0", $line);
}, $item->getExceptions());
$log = array_map(fn($line) => preg_replace('~#\d+~', "\n$0", (string) $line), $item->getExceptions());
return $this->render('@ibexadesign/ezdataflow/Item/log.html.twig', [
return $this->render('@ibexadesign/ibexa_dataflow/Item/log.html.twig', [
'log' => $log,
]);
}
/**
* @Route("/create", name="coderhapsodie.ezdataflow.job.create", methods={"POST"})
*/
#[Route(path: '/create', name: 'coderhapsodie.ibexa_dataflow.job.create', methods: ['POST'])]
public function create(Request $request): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'edit'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'edit'));
$newOneshot = new Job();
$form = $this->createForm(CreateOneshotType::class, $newOneshot);
@@ -84,24 +63,55 @@ class JobController extends Controller
try {
$this->jobGateway->save($newOneshot);
$this->notificationHandler->success($this->translator->trans('coderhapsodie.ezdataflow.job.create.success'));
$this->notificationHandler->success($this->translator->trans('coderhapsodie.ibexa_dataflow.job.create.success'));
} catch (\Exception $e) {
$this->notificationHandler->error($this->translator->trans('coderhapsodie.ezdataflow.job.create.error',
$this->notificationHandler->error($this->translator->trans('coderhapsodie.ibexa_dataflow.job.create.error',
['message' => $e->getMessage()]));
}
return new JsonResponse([
'redirect' => $this->generateUrl('coderhapsodie.ezdataflow.main', ['_fragment' => 'ibexa-tab-coderhapsodie-ezdataflow-code-rhapsodie-ezdataflow-oneshot'],
'redirect' => $this->generateUrl('coderhapsodie.ibexa_dataflow.main', ['_fragment' => 'ibexa-tab-coderhapsodie-ibexa_dataflow-code-rhapsodie-ibexa_dataflow-oneshot'],
UrlGeneratorInterface::ABSOLUTE_URL),
]);
}
return new JsonResponse([
'form' => $this->renderView('@ibexadesign/ezdataflow/parts/form_modal.html.twig', [
'form' => $this->renderView('@ibexadesign/ibexa_dataflow/parts/form_modal.html.twig', [
'form' => $form->createView(),
'type_action' => 'new',
'mode' => 'oneshot',
]),
]);
}
#[Route(path: '/run-oneshot/{id}', name: 'coderhapsodie.ibexa_dataflow.job.run-oneshot', methods: ['GET'])]
public function runOneShot(int $id): Response
{
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'view'));
$scheduledDataflow = $this->scheduledDataflowGateway->find($id);
if ($scheduledDataflow === null) {
throw new NotFoundHttpException();
}
$newOneshotJob = new Job();
$newOneshotJob->setOptions($scheduledDataflow->getOptions());
$newOneshotJob->setLabel("Manual " . $scheduledDataflow->getLabel());
$newOneshotJob->setScheduledDataflowId($scheduledDataflow->getId());
$newOneshotJob->setRequestedDate((new \DateTime())->add(new \DateInterval('PT1H')));
$newOneshotJob->setDataflowType($scheduledDataflow->getDataflowType());
$form = $this->createForm(CreateOneshotType::class, $newOneshotJob, [
'action' => $this->generateUrl('coderhapsodie.ibexa_dataflow.job.create'),
]);
return new JsonResponse([
'form' => $this->renderView('@ibexadesign/ibexa_dataflow/parts/form_modal.html.twig', [
'form' => $form->createView(),
'id' => 'modal-new-oneshot',
'mode' => 'oneshot',
]),
]);
}
}

View File

@@ -2,12 +2,12 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Controller;
namespace CodeRhapsodie\IbexaDataflowBundle\Controller;
use CodeRhapsodie\DataflowBundle\Entity\ScheduledDataflow;
use CodeRhapsodie\EzDataflowBundle\Form\CreateScheduledType;
use CodeRhapsodie\EzDataflowBundle\Form\UpdateScheduledType;
use CodeRhapsodie\EzDataflowBundle\Gateway\ScheduledDataflowGateway;
use CodeRhapsodie\IbexaDataflowBundle\Form\CreateScheduledType;
use CodeRhapsodie\IbexaDataflowBundle\Form\UpdateScheduledType;
use CodeRhapsodie\IbexaDataflowBundle\Gateway\ScheduledDataflowGateway;
use Ibexa\Contracts\AdminUi\Controller\Controller;
use Ibexa\Contracts\AdminUi\Notification\NotificationHandlerInterface;
use Ibexa\Core\MVC\Symfony\Security\Authorization\Attribute;
@@ -17,34 +17,17 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* @Route("/ezdataflow/scheduled_workflow")
*/
#[Route(path: '/ibexa_dataflow/scheduled_workflow')]
class ScheduledDataflowController extends Controller
{
/** @var \Ibexa\Contracts\AdminUi\Notification\NotificationHandlerInterface */
private $notificationHandler;
/** @var \CodeRhapsodie\EzDataflowBundle\Gateway\ScheduledDataflowGateway */
private $scheduledDataflowGateway;
/** @var \Symfony\Contracts\Translation\TranslatorInterface */
private $translator;
public function __construct(
NotificationHandlerInterface $notificationHandler,
ScheduledDataflowGateway $scheduledDataflowGateway,
TranslatorInterface $translator
) {
$this->notificationHandler = $notificationHandler;
$this->scheduledDataflowGateway = $scheduledDataflowGateway;
$this->translator = $translator;
public function __construct(private readonly NotificationHandlerInterface $notificationHandler, private readonly ScheduledDataflowGateway $scheduledDataflowGateway, private readonly TranslatorInterface $translator)
{
}
/**
* @Route("/create", name="coderhapsodie.ezdataflow.workflow.create", methods={"POST"})
*/
#[Route(path: '/create', name: 'coderhapsodie.ibexa_dataflow.workflow.create', methods: ['POST'])]
public function create(Request $request): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'edit'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'edit'));
$newWorkflow = new ScheduledDataflow();
$form = $this->createForm(CreateScheduledType::class, $newWorkflow);
@@ -55,48 +38,44 @@ class ScheduledDataflowController extends Controller
$newWorkflow = $form->getData();
try {
$this->scheduledDataflowGateway->save($newWorkflow);
$this->notificationHandler->success($this->translator->trans('coderhapsodie.ezdataflow.workflow.create.success'));
$this->notificationHandler->success($this->translator->trans('coderhapsodie.ibexa_dataflow.workflow.create.success'));
} catch (\Exception $e) {
$this->notificationHandler->error($this->translator->trans('coderhapsodie.ezdataflow.workflow.create.error',
$this->notificationHandler->error($this->translator->trans('coderhapsodie.ibexa_dataflow.workflow.create.error',
['message' => $e->getMessage()]));
}
return new JsonResponse(['redirect' => $this->generateUrl('coderhapsodie.ezdataflow.main')]);
return new JsonResponse(['redirect' => $this->generateUrl('coderhapsodie.ibexa_dataflow.main')]);
}
return new JsonResponse([
'form' => $this->renderView('@ibexadesign/ezdataflow/parts/form_modal.html.twig', [
'form' => $this->renderView('@ibexadesign/ibexa_dataflow/parts/form_modal.html.twig', [
'form' => $form->createView(),
'type_action' => 'new',
]),
]);
}
/**
* @Route("/{id}/delete", name="coderhapsodie.ezdataflow.workflow.delete", methods={"post"})
*/
#[Route(path: '/{id}/delete', name: 'coderhapsodie.ibexa_dataflow.workflow.delete', methods: ['post'])]
public function delete(int $id): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'edit'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'edit'));
try {
$this->scheduledDataflowGateway->delete($id);
$this->notificationHandler->success($this->translator->trans('coderhapsodie.ezdataflow.workflow.delete.success'));
$this->notificationHandler->success($this->translator->trans('coderhapsodie.ibexa_dataflow.workflow.delete.success'));
} catch (\Exception $e) {
$this->notificationHandler->error($this->translator->trans('coderhapsodie.ezdataflow.workflow.delete.error',
$this->notificationHandler->error($this->translator->trans('coderhapsodie.ibexa_dataflow.workflow.delete.error',
['message' => $e->getMessage()]));
}
return $this->redirectToRoute('coderhapsodie.ezdataflow.main');
return $this->redirectToRoute('coderhapsodie.ibexa_dataflow.main');
}
/**
* @Route("/{id}/edit", name="coderhapsodie.ezdataflow.workflow.edit")
*/
#[Route(path: '/{id}/edit', name: 'coderhapsodie.ibexa_dataflow.workflow.edit')]
public function edit(Request $request, int $id): Response
{
$form = $this->createForm(UpdateScheduledType::class, $this->scheduledDataflowGateway->find($id), [
'action' => $this->generateUrl('coderhapsodie.ezdataflow.workflow.edit', ['id' => $id]),
'action' => $this->generateUrl('coderhapsodie.ibexa_dataflow.workflow.edit', ['id' => $id]),
]);
$form->handleRequest($request);
@@ -106,33 +85,31 @@ class ScheduledDataflowController extends Controller
try {
$this->scheduledDataflowGateway->save($editDataflow);
$this->notificationHandler->success($this->translator->trans('coderhapsodie.ezdataflow.workflow.edit.success'));
$this->notificationHandler->success($this->translator->trans('coderhapsodie.ibexa_dataflow.workflow.edit.success'));
} catch (\Exception $e) {
$this->notificationHandler->error($this->translator->trans('coderhapsodie.ezdataflow.workflow.edit.error',
$this->notificationHandler->error($this->translator->trans('coderhapsodie.ibexa_dataflow.workflow.edit.error',
['message' => $e->getMessage()]));
}
return new JsonResponse(['redirect' => $this->generateUrl('coderhapsodie.ezdataflow.main')]);
return new JsonResponse(['redirect' => $this->generateUrl('coderhapsodie.ibexa_dataflow.main')]);
}
return new JsonResponse([
'form' => $this->renderView('@ibexadesign/ezdataflow/parts/form_modal.html.twig', [
'form' => $this->renderView('@ibexadesign/ibexa_dataflow/parts/form_modal.html.twig', [
'form' => $form->createView(),
'type_action' => 'edit',
]),
]);
}
/**
* @Route("/{id}/enable", name="coderhapsodie.ezdataflow.workflow.enable")
*/
#[Route(path: '/{id}/enable', name: 'coderhapsodie.ibexa_dataflow.workflow.enable')]
public function enableDataflow(int $id): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'edit'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'edit'));
$this->changeDataflowStatus($id, true);
return $this->redirectToRoute('coderhapsodie.ezdataflow.main');
return $this->redirectToRoute('coderhapsodie.ibexa_dataflow.main');
}
private function changeDataflowStatus(int $id, bool $status)
@@ -149,15 +126,13 @@ class ScheduledDataflowController extends Controller
}
}
/**
* @Route("/{id}/disable", name="coderhapsodie.ezdataflow.workflow.disable")
*/
#[Route(path: '/{id}/disable', name: 'coderhapsodie.ibexa_dataflow.workflow.disable')]
public function disableDataflow(int $id): Response
{
$this->denyAccessUnlessGranted(new Attribute('ezdataflow', 'edit'));
$this->denyAccessUnlessGranted(new Attribute('ibexa_dataflow', 'edit'));
$this->changeDataflowStatus($id, false);
return $this->redirectToRoute('coderhapsodie.ezdataflow.main');
return $this->redirectToRoute('coderhapsodie.ibexa_dataflow.main');
}
}

View File

@@ -2,11 +2,11 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\Content;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\Content;
use CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFillerInterface;
use CodeRhapsodie\EzDataflowBundle\Matcher\LocationMatcherInterface;
use CodeRhapsodie\EzDataflowBundle\Model\ContentCreateStructure;
use CodeRhapsodie\IbexaDataflowBundle\Core\Field\ContentStructFieldFillerInterface;
use CodeRhapsodie\IbexaDataflowBundle\Matcher\LocationMatcherInterface;
use CodeRhapsodie\IbexaDataflowBundle\Model\ContentCreateStructure;
use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\ContentTypeService;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
@@ -14,24 +14,8 @@ use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct;
class ContentCreator implements ContentCreatorInterface
{
/** @var \Ibexa\Contracts\Core\Repository\ContentService */
private $contentService;
/** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */
private $contentTypeService;
/** @var \CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFillerInterface */
private $filler;
/** @var \CodeRhapsodie\EzDataflowBundle\Matcher\LocationMatcherInterface */
private $matcher;
public function __construct(ContentService $contentService, ContentTypeService $contentTypeService, ContentStructFieldFillerInterface $filler, LocationMatcherInterface $matcher)
public function __construct(private readonly ContentService $contentService, private readonly ContentTypeService $contentTypeService, private readonly ContentStructFieldFillerInterface $filler, private readonly LocationMatcherInterface $matcher)
{
$this->contentService = $contentService;
$this->contentTypeService = $contentTypeService;
$this->filler = $filler;
$this->matcher = $matcher;
}
/**
@@ -75,3 +59,4 @@ class ContentCreator implements ContentCreatorInterface
return $locationCreateStructs;
}
}
class_alias(ContentCreator::class, 'CodeRhapsodie\EzDataflowBundle\Core\Content\ContentCreator');

View File

@@ -2,12 +2,13 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\Content;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\Content;
use CodeRhapsodie\EzDataflowBundle\Model\ContentCreateStructure;
use CodeRhapsodie\IbexaDataflowBundle\Model\ContentCreateStructure;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
interface ContentCreatorInterface
{
public function createFromStructure(ContentCreateStructure $structure): Content;
}
class_alias(ContentCreatorInterface::class, 'CodeRhapsodie\EzDataflowBundle\Core\Content\ContentCreatorInterface');

View File

@@ -2,35 +2,23 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\Content;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\Content;
use CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFillerInterface;
use CodeRhapsodie\EzDataflowBundle\Exception\NoMatchFoundException;
use CodeRhapsodie\EzDataflowBundle\Model\ContentUpdateStructure;
use CodeRhapsodie\IbexaDataflowBundle\Core\Field\ContentStructFieldFillerInterface;
use CodeRhapsodie\IbexaDataflowBundle\Exception\NoMatchFoundException;
use CodeRhapsodie\IbexaDataflowBundle\Model\ContentUpdateStructure;
use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\ContentTypeService;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
class ContentUpdater implements ContentUpdaterInterface
{
/** @var \Ibexa\Contracts\Core\Repository\ContentService */
private $contentService;
/** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */
private $contentTypeService;
/** @var \CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFillerInterface */
private $filler;
public function __construct(ContentService $contentService, ContentTypeService $contentTypeService, ContentStructFieldFillerInterface $filler)
public function __construct(private readonly ContentService $contentService, private readonly ContentTypeService $contentTypeService, private readonly ContentStructFieldFillerInterface $filler)
{
$this->contentService = $contentService;
$this->contentTypeService = $contentTypeService;
$this->filler = $filler;
}
/**
* @throws \CodeRhapsodie\EzDataflowBundle\Exception\NoMatchFoundException
* @throws \CodeRhapsodie\IbexaDataflowBundle\Exception\NoMatchFoundException
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\ContentValidationException
@@ -62,3 +50,4 @@ class ContentUpdater implements ContentUpdaterInterface
return $this->contentService->publishVersion($draft->versionInfo);
}
}
class_alias(ContentUpdater::class, 'CodeRhapsodie\EzDataflowBundle\Core\Content\ContentUpdater');

View File

@@ -2,12 +2,13 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\Content;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\Content;
use CodeRhapsodie\EzDataflowBundle\Model\ContentUpdateStructure;
use CodeRhapsodie\IbexaDataflowBundle\Model\ContentUpdateStructure;
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
interface ContentUpdaterInterface
{
public function updateFromStructure(ContentUpdateStructure $structure): Content;
}
class_alias(ContentUpdaterInterface::class, 'CodeRhapsodie\EzDataflowBundle\Core\Content\ContentUpdaterInterface');

View File

@@ -2,32 +2,31 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\Field;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\Field;
use CodeRhapsodie\EzDataflowBundle\Exception\UnknownFieldException;
use CodeRhapsodie\EzDataflowBundle\Exception\UnsupportedFieldTypeException;
use CodeRhapsodie\IbexaDataflowBundle\Exception\UnknownFieldException;
use CodeRhapsodie\IbexaDataflowBundle\Exception\UnsupportedFieldTypeException;
use Ibexa\Contracts\Core\FieldType\Value;
use Ibexa\Contracts\Core\Repository\Values\Content\ContentStruct;
use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType;
class ContentStructFieldFiller implements ContentStructFieldFillerInterface
{
/** @var FieldValueCreatorInterface[] */
private $fieldValueCreators;
/**
* ContentStructFieldFiller constructor.
*/
public function __construct(iterable $fieldValueCreators)
public function __construct(
/** @var FieldValueCreatorInterface[] */
private readonly iterable $fieldValueCreators
)
{
$this->fieldValueCreators = $fieldValueCreators;
}
/**
* {@inheritdoc}
*
* @throws \CodeRhapsodie\EzDataflowBundle\Exception\UnknownFieldException
* @throws \CodeRhapsodie\EzDataflowBundle\Exception\UnsupportedFieldTypeException
* @throws \CodeRhapsodie\IbexaDataflowBundle\Exception\UnknownFieldException
* @throws \CodeRhapsodie\IbexaDataflowBundle\Exception\UnsupportedFieldTypeException
*/
public function fillFields(ContentType $contentType, ContentStruct $contentStruct, array $fieldHashes): void
{
@@ -47,7 +46,7 @@ class ContentStructFieldFiller implements ContentStructFieldFillerInterface
/**
* @param mixed $hash
*
* @throws \CodeRhapsodie\EzDataflowBundle\Exception\UnsupportedFieldTypeException
* @throws \CodeRhapsodie\IbexaDataflowBundle\Exception\UnsupportedFieldTypeException
*/
private function createFieldValue(string $fieldTypeIdentifier, $hash): Value
{
@@ -60,3 +59,4 @@ class ContentStructFieldFiller implements ContentStructFieldFillerInterface
throw UnsupportedFieldTypeException::create($fieldTypeIdentifier);
}
}
class_alias(ContentStructFieldFiller::class, 'CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFiller');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\Field;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\Field;
use Ibexa\Contracts\Core\Repository\Values\Content\ContentStruct;
use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType;
@@ -11,3 +11,4 @@ interface ContentStructFieldFillerInterface
{
public function fillFields(ContentType $contentType, ContentStruct $contentStruct, array $fieldHashes): void;
}
class_alias(ContentStructFieldFillerInterface::class, 'CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFillerInterface');

View File

@@ -2,19 +2,15 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\Field;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\Field;
use Ibexa\Contracts\Core\FieldType\Value;
use Ibexa\Contracts\Core\Repository\FieldTypeService;
class DefaultFieldValueCreator implements FieldValueCreatorInterface
{
/** @var \Ibexa\Contracts\Core\Repository\FieldTypeService */
private $fieldTypeService;
public function __construct(FieldTypeService $fieldTypeService)
public function __construct(private readonly FieldTypeService $fieldTypeService)
{
$this->fieldTypeService = $fieldTypeService;
}
public function supports(string $fieldTypeIdentifier): bool
@@ -27,3 +23,4 @@ class DefaultFieldValueCreator implements FieldValueCreatorInterface
return $this->fieldTypeService->getFieldType($fieldTypeIdentifier)->fromHash($hash);
}
}
class_alias(DefaultFieldValueCreator::class, 'CodeRhapsodie\EzDataflowBundle\Core\Field\DefaultFieldValueCreator');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\Field;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\Field;
use Ibexa\Contracts\Core\FieldType\Value;
@@ -15,3 +15,4 @@ interface FieldValueCreatorInterface
*/
public function createValue(string $fieldTypeIdentifier, $hash): Value;
}
class_alias(FieldValueCreatorInterface::class, 'CodeRhapsodie\EzDataflowBundle\Core\Field\FieldValueCreatorInterface');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\FieldComparator;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator;
use Ibexa\Contracts\Core\FieldType\Value;
use Ibexa\Contracts\Core\Repository\FieldTypeService;
@@ -10,12 +10,8 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Field;
abstract class AbstractFieldComparator implements FieldComparatorInterface
{
/** @var \Ibexa\Contracts\Core\Repository\FieldTypeService */
private $fieldTypeService;
public function __construct(FieldTypeService $fieldTypeService)
public function __construct(private readonly FieldTypeService $fieldTypeService)
{
$this->fieldTypeService = $fieldTypeService;
}
public function compare(Field $field, $hash): bool
@@ -30,3 +26,4 @@ abstract class AbstractFieldComparator implements FieldComparatorInterface
*/
abstract protected function compareValues(Value $currentValue, Value $newValue): bool;
}
class_alias(AbstractFieldComparator::class, 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\FieldComparator;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator;
use Ibexa\Contracts\Core\Repository\Values\Content\Field;
@@ -34,3 +34,4 @@ class DelegatorFieldComparator implements FieldComparatorInterface
$this->delegates[$fieldTypeIdentifier] = $typedFieldComparator;
}
}
class_alias(DelegatorFieldComparator::class, 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\DelegatorFieldComparator');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\FieldComparator;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator;
use Ibexa\Contracts\Core\Repository\Values\Content\Field;
@@ -13,3 +13,4 @@ interface FieldComparatorInterface
*/
public function compare(Field $field, $hash): bool;
}
class_alias(FieldComparatorInterface::class, 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\FieldComparatorInterface');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\FieldComparator;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator;
use Ibexa\Contracts\Core\FieldType\Value;
@@ -16,3 +16,4 @@ class MapLocationFieldComparator extends AbstractFieldComparator
;
}
}
class_alias(MapLocationFieldComparator::class, 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\MapLocationFieldComparator');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\FieldComparator;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator;
use Ibexa\Contracts\Core\FieldType\Value;
@@ -27,3 +27,4 @@ class MatrixFieldComparator extends AbstractFieldComparator
return true;
}
}
class_alias(MatrixFieldComparator::class, 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\MatrixFieldComparator');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\FieldComparator;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator;
use Ibexa\Contracts\Core\FieldType\Value;
@@ -24,3 +24,4 @@ class NovaSEOMetasFieldComparator extends AbstractFieldComparator
return count($currentValue->metas) === count($newValue->metas);
}
}
class_alias(NovaSEOMetasFieldComparator::class, 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\NovaSEOMetasFieldComparator');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\FieldComparator;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator;
use Ibexa\Contracts\Core\FieldType\Value;
@@ -13,3 +13,4 @@ class SimpleFieldComparator extends AbstractFieldComparator
return (string) $currentValue === (string) $newValue;
}
}
class_alias(SimpleFieldComparator::class, 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\SimpleFieldComparator');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Core\FieldComparator;
namespace CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator;
use Ibexa\Contracts\Core\FieldType\Value;
@@ -13,3 +13,4 @@ class UrlFieldComparator extends AbstractFieldComparator
return $currentValue->link === $newValue->link && $currentValue->text === $newValue->text;
}
}
class_alias(UrlFieldComparator::class, 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\UrlFieldComparator');

View File

@@ -2,29 +2,29 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\DependencyInjection;
namespace CodeRhapsodie\IbexaDataflowBundle\DependencyInjection;
use CodeRhapsodie\EzDataflowBundle\Core\Field\FieldValueCreatorInterface;
use CodeRhapsodie\IbexaDataflowBundle\Core\Field\FieldValueCreatorInterface;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
class CodeRhapsodieEzDataflowExtension extends Extension
class CodeRhapsodieIbexaDataflowExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter('coderhapsodie.ezdataflow.admin_login_or_id', $config['admin_login_or_id']);
$container->setParameter('coderhapsodie.ibexa_dataflow.admin_login_or_id', $config['admin_login_or_id']);
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yaml');
$container
->registerForAutoconfiguration(FieldValueCreatorInterface::class)
->addTag('coderhapsodie.ezdataflow.field_value_creator')
->addTag('coderhapsodie.ibexa_dataflow.field_value_creator')
;
}
}

View File

@@ -2,9 +2,9 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\DependencyInjection\Compiler;
namespace CodeRhapsodie\IbexaDataflowBundle\DependencyInjection\Compiler;
use CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\DelegatorFieldComparator;
use CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\DelegatorFieldComparator;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
@@ -19,10 +19,10 @@ class FieldComparatorCompilerPass implements CompilerPassInterface
$delegatorDef = $container->findDefinition(DelegatorFieldComparator::class);
foreach ($container->findTaggedServiceIds('coderhapsodie.ezdataflow.field_comparator') as $id => $tags) {
foreach ($container->findTaggedServiceIds('coderhapsodie.ibexa_dataflow.field_comparator') as $id => $tags) {
foreach ($tags as $attributes) {
if (!isset($attributes['fieldType'])) {
throw new \InvalidArgumentException(sprintf('Service "%s" must define the "fieldType" attribute on "coderhapsodie.ezdataflow.field_comparator" tags.', $id));
throw new \InvalidArgumentException(sprintf('Service "%s" must define the "fieldType" attribute on "coderhapsodie.ibexa_dataflow.field_comparator" tags.', $id));
}
$delegatorDef->addMethodCall(

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\DependencyInjection;
namespace CodeRhapsodie\IbexaDataflowBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
@@ -14,7 +14,7 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('code_rhapsodie_ez_dataflow');
$treeBuilder = new TreeBuilder('code_rhapsodie_ibexa_dataflow');
$rootNode = $treeBuilder->getRootNode();
$rootNode

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\EventSubscriber;
namespace CodeRhapsodie\IbexaDataflowBundle\EventSubscriber;
use Ibexa\AdminUi\Menu\Event\ConfigureMenuEvent;
use Ibexa\AdminUi\Menu\MainMenuBuilder;
@@ -27,10 +27,10 @@ class MenuSubscriber implements EventSubscriberInterface
}
$menu[MainMenuBuilder::ITEM_ADMIN]->addChild(
'ezdataflow_dashboard',
'ibexa_dataflow_dashboard',
[
'label' => 'coderhapsodie.ezdataflow',
'route' => 'coderhapsodie.ezdataflow.main',
'label' => 'coderhapsodie.ibexa_dataflow',
'route' => 'coderhapsodie.ibexa_dataflow.main',
]
);
}

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Exception;
namespace CodeRhapsodie\IbexaDataflowBundle\Exception;
class InvalidArgumentTypeException extends \Exception
{
@@ -26,7 +26,8 @@ class InvalidArgumentTypeException extends \Exception
return new self(sprintf(
'Expected argument of type %s, %s received instead',
$expectedString,
is_object($received) ? get_class($received) : gettype($received)
get_debug_type($received)
));
}
}
class_alias(InvalidArgumentTypeException::class, 'CodeRhapsodie\EzDataflowBundle\Exception\InvalidArgumentTypeException');

View File

@@ -2,8 +2,9 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Exception;
namespace CodeRhapsodie\IbexaDataflowBundle\Exception;
class NoMatchFoundException extends \Exception
{
}
class_alias(NoMatchFoundException::class, 'CodeRhapsodie\EzDataflowBundle\Exception\NoMatchFoundException');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Exception;
namespace CodeRhapsodie\IbexaDataflowBundle\Exception;
class UnknownFieldException extends \Exception
{
@@ -15,3 +15,4 @@ class UnknownFieldException extends \Exception
));
}
}
class_alias(UnknownFieldException::class, 'CodeRhapsodie\EzDataflowBundle\Exception\UnknownFieldException');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Exception;
namespace CodeRhapsodie\IbexaDataflowBundle\Exception;
class UnsupportedFieldTypeException extends \Exception
{
@@ -14,3 +14,4 @@ class UnsupportedFieldTypeException extends \Exception
));
}
}
class_alias(UnsupportedFieldTypeException::class, 'CodeRhapsodie\EzDataflowBundle\Exception\UnsupportedFieldTypeException');

View File

@@ -2,35 +2,29 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Factory;
namespace CodeRhapsodie\IbexaDataflowBundle\Factory;
use CodeRhapsodie\EzDataflowBundle\Model\ContentCreateStructure;
use CodeRhapsodie\EzDataflowBundle\Model\ContentUpdateStructure;
use CodeRhapsodie\IbexaDataflowBundle\Model\ContentCreateStructure;
use CodeRhapsodie\IbexaDataflowBundle\Model\ContentUpdateStructure;
use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException;
final class ContentStructureFactory implements ContentStructureFactoryInterface
{
/**
* @var \Ibexa\Contracts\Core\Repository\ContentService
*/
private $contentService;
/**
* ContentStructureFactory constructor.
*/
public function __construct(ContentService $contentService)
public function __construct(private readonly ContentService $contentService)
{
$this->contentService = $contentService;
}
/**
* @param mixed $parentLocations
* @param int $mode One of the constant ContentStructureFactoryInterface::MODE_*
*
* @return false|\CodeRhapsodie\EzDataflowBundle\Model\ContentStructure
* @return false|\CodeRhapsodie\IbexaDataflowBundle\Model\ContentStructure
*
* @throws \CodeRhapsodie\EzDataflowBundle\Exception\InvalidArgumentTypeException
* @throws \CodeRhapsodie\IbexaDataflowBundle\Exception\InvalidArgumentTypeException
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException
*/
public function transform(array $data, string $remoteId, string $language, string $contentType, $parentLocations, int $mode = ContentStructureFactoryInterface::MODE_INSERT_OR_UPDATE)
@@ -42,7 +36,7 @@ final class ContentStructureFactory implements ContentStructureFactoryInterface
}
return ContentUpdateStructure::createForContentId($content->id, $language, $data);
} catch (NotFoundException $e) {
} catch (NotFoundException) {
// The content doesn't exist yet, so it will be created.
}
@@ -59,3 +53,4 @@ final class ContentStructureFactory implements ContentStructureFactoryInterface
);
}
}
class_alias(ContentStructureFactory::class, 'CodeRhapsodie\EzDataflowBundle\Factory\ContentStructureFactory');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Factory;
namespace CodeRhapsodie\IbexaDataflowBundle\Factory;
interface ContentStructureFactoryInterface
{
@@ -14,7 +14,8 @@ interface ContentStructureFactoryInterface
* @param int|string $parentLocations Int for location id or string for remote location id
* @param int $mode ContentStructureFactoryInterface
*
* @return false|\CodeRhapsodie\EzDataflowBundle\Model\ContentStructure
* @return false|\CodeRhapsodie\IbexaDataflowBundle\Model\ContentStructure
*/
public function transform(array $data, string $remoteId, string $language, string $contentType, $parentLocations, int $mode = ContentStructureFactoryInterface::MODE_INSERT_OR_UPDATE);
}
class_alias(ContentStructureFactoryInterface::class, 'CodeRhapsodie\EzDataflowBundle\Factory\ContentStructureFactoryInterface');

View File

@@ -2,10 +2,10 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Filter;
namespace CodeRhapsodie\IbexaDataflowBundle\Filter;
use CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\FieldComparatorInterface;
use CodeRhapsodie\EzDataflowBundle\Model\ContentUpdateStructure;
use CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\FieldComparatorInterface;
use CodeRhapsodie\IbexaDataflowBundle\Model\ContentUpdateStructure;
use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException;
use Psr\Log\LoggerAwareTrait;
@@ -17,16 +17,8 @@ class NotModifiedContentFilter
{
use LoggerAwareTrait;
/** @var \Ibexa\Contracts\Core\Repository\ContentService */
private $contentService;
/** @var \CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\FieldComparatorInterface */
private $comparator;
public function __construct(ContentService $contentService, FieldComparatorInterface $comparator)
public function __construct(private ContentService $contentService, private FieldComparatorInterface $comparator)
{
$this->contentService = $contentService;
$this->comparator = $comparator;
}
public function __invoke($data)
@@ -40,7 +32,7 @@ class NotModifiedContentFilter
} else {
try {
$content = $this->contentService->loadContentByRemoteId($data->getRemoteId(), [$data->getLanguageCode()]);
} catch (NotFoundException $e) {
} catch (NotFoundException) {
// New translation
return $data;
}
@@ -68,3 +60,4 @@ class NotModifiedContentFilter
$this->logger->log($level, $message, $context);
}
}
class_alias(NotModifiedContentFilter::class, 'CodeRhapsodie\EzDataflowBundle\Filter\NotModifiedContentFilter');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Form;
namespace CodeRhapsodie\IbexaDataflowBundle\Form;
use CodeRhapsodie\DataflowBundle\Entity\Job;
use Symfony\Component\Form\AbstractType;
@@ -31,7 +31,6 @@ class CreateOneshotType extends AbstractType
])
->add('requestedDate', UserTimezoneAwareDateTimeType::class, [
'label' => 'coderhapsodie.dataflow.requestedDate',
'years' => range(date('Y'), date('Y') + 5),
])
;
}
@@ -43,3 +42,4 @@ class CreateOneshotType extends AbstractType
]);
}
}
class_alias(CreateOneshotType::class, 'CodeRhapsodie\EzDataflowBundle\Form\CreateOneshotType');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Form;
namespace CodeRhapsodie\IbexaDataflowBundle\Form;
use CodeRhapsodie\DataflowBundle\Entity\ScheduledDataflow;
use Symfony\Component\Form\AbstractType;
@@ -38,7 +38,6 @@ class CreateScheduledType extends AbstractType
'label' => 'coderhapsodie.dataflow.frequency',
])
->add('next', UserTimezoneAwareDateTimeType::class, [
'years' => range(date('Y'), date('Y') + 5),
'label' => 'coderhapsodie.dataflow.create.next',
])
->add('enabled', CheckboxType::class, [
@@ -55,3 +54,4 @@ class CreateScheduledType extends AbstractType
]);
}
}
class_alias(CreateScheduledType::class, 'CodeRhapsodie\EzDataflowBundle\Form\CreateScheduledType');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Form;
namespace CodeRhapsodie\IbexaDataflowBundle\Form;
use CodeRhapsodie\DataflowBundle\Registry\DataflowTypeRegistryInterface;
use Symfony\Component\Form\AbstractType;
@@ -11,12 +11,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class DataflowTypeChoiceType extends AbstractType
{
/** @var \CodeRhapsodie\DataflowBundle\Registry\DataflowTypeRegistryInterface */
private $registry;
public function __construct(DataflowTypeRegistryInterface $registry)
public function __construct(private readonly DataflowTypeRegistryInterface $registry)
{
$this->registry = $registry;
}
public function getParent()
@@ -36,3 +32,4 @@ class DataflowTypeChoiceType extends AbstractType
]);
}
}
class_alias(DataflowTypeChoiceType::class, 'CodeRhapsodie\EzDataflowBundle\Form\DataflowTypeChoiceType');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Form;
namespace CodeRhapsodie\IbexaDataflowBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
@@ -22,3 +22,4 @@ class FrequencyType extends AbstractType
return 'coderhapsodie_port_frequency';
}
}
class_alias(FrequencyType::class, 'CodeRhapsodie\EzDataflowBundle\Form\FrequencyType');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Form;
namespace CodeRhapsodie\IbexaDataflowBundle\Form;
use CodeRhapsodie\DataflowBundle\Entity\ScheduledDataflow;
use Symfony\Component\Form\AbstractType;
@@ -32,7 +32,6 @@ class UpdateScheduledType extends AbstractType
'label' => 'coderhapsodie.dataflow.frequency',
])
->add('next', UserTimezoneAwareDateTimeType::class, [
'years' => range(date('Y'), date('Y') + 5),
'label' => 'coderhapsodie.dataflow.update.next',
])
;
@@ -45,3 +44,4 @@ class UpdateScheduledType extends AbstractType
]);
}
}
class_alias(UpdateScheduledType::class, 'CodeRhapsodie\EzDataflowBundle\Form\UpdateScheduledType');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Form;
namespace CodeRhapsodie\IbexaDataflowBundle\Form;
use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException;
use Ibexa\Contracts\Core\Repository\UserPreferenceService;
@@ -10,12 +10,8 @@ use Symfony\Component\Form\DataTransformerInterface;
class UserTimezoneAwareDateTimeTransformer implements DataTransformerInterface
{
/** @var \Ibexa\Contracts\Core\Repository\UserPreferenceService */
private $userPreferenceService;
public function __construct(UserPreferenceService $userPreferenceService)
public function __construct(private readonly UserPreferenceService $userPreferenceService)
{
$this->userPreferenceService = $userPreferenceService;
}
public function transform($value)
@@ -42,10 +38,11 @@ class UserTimezoneAwareDateTimeTransformer implements DataTransformerInterface
{
try {
$tz = $this->userPreferenceService->getUserPreference('timezone')->value ?? 'UTC';
} catch (NotFoundException $e) {
} catch (NotFoundException) {
$tz = 'UTC';
}
return new \DateTimeZone($tz);
}
}
class_alias(UserTimezoneAwareDateTimeTransformer::class, 'CodeRhapsodie\EzDataflowBundle\Form\UserTimezoneAwareDateTimeTransformer');

View File

@@ -2,26 +2,22 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Form;
namespace CodeRhapsodie\IbexaDataflowBundle\Form;
use Ibexa\AdminUi\Form\Type\DateTimePickerType;
use Ibexa\Contracts\Core\Repository\UserPreferenceService;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\FormBuilderInterface;
class UserTimezoneAwareDateTimeType extends AbstractType
{
/** @var \Ibexa\Contracts\Core\Repository\UserPreferenceService */
private $userPreferenceService;
public function __construct(UserPreferenceService $userPreferenceService)
public function __construct(private readonly UserPreferenceService $userPreferenceService)
{
$this->userPreferenceService = $userPreferenceService;
}
public function getParent()
{
return DateTimeType::class;
return DateTimePickerType::class;
}
public function buildForm(FormBuilderInterface $builder, array $options)
@@ -29,3 +25,4 @@ class UserTimezoneAwareDateTimeType extends AbstractType
$builder->addModelTransformer(new UserTimezoneAwareDateTimeTransformer($this->userPreferenceService));
}
}
class_alias(UserTimezoneAwareDateTimeType::class, 'CodeRhapsodie\EzDataflowBundle\Form\UserTimezoneAwareDateTimeType');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Form;
namespace CodeRhapsodie\IbexaDataflowBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\CallbackTransformer;
@@ -56,3 +56,4 @@ class YamlType extends AbstractType
return 'coderhapsodie_port_yaml';
}
}
class_alias(YamlType::class, 'CodeRhapsodie\EzDataflowBundle\Form\YamlType');

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace CodeRhapsodie\IbexaDataflowBundle\Gateway;
use Pagerfanta\Adapter\AdapterInterface;
class ExceptionJSONDecoderAdapter implements AdapterInterface
{
public function __construct(private readonly AdapterInterface $adapter)
{
}
public function getNbResults()
{
return $this->adapter->getNbResults();
}
public function getSlice($offset, $length)
{
$slice = $this->adapter->getSlice($offset, $length);
array_walk($slice, static function (&$value): void {
if (isset($value['exceptions'])) {
$value['exceptions'] = json_decode((string) $value['exceptions'], true, 512, JSON_THROW_ON_ERROR);
}
});
return $slice;
}
}

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Gateway;
namespace CodeRhapsodie\IbexaDataflowBundle\Gateway;
use CodeRhapsodie\DataflowBundle\Entity\Job;
use CodeRhapsodie\DataflowBundle\Repository\JobRepository;
@@ -13,12 +13,8 @@ final class JobGateway
public const FILTER_NONE = 0;
public const FILTER_NON_EMPTY = 1;
/** @var \CodeRhapsodie\DataflowBundle\Repository\JobRepository */
private $jobRepository;
public function __construct(JobRepository $jobRepository)
public function __construct(private readonly JobRepository $jobRepository)
{
$this->jobRepository = $jobRepository;
}
public function find(int $id): ?Job
@@ -58,4 +54,15 @@ final class JobGateway
{
$this->jobRepository->save($job);
}
public function getListPendindOrRunning(): array
{
$qb = $this->jobRepository->createQueryBuilder('w');
return $qb->andWhere($qb->expr()->in('w.status', ':status'))
->setParameter('status', implode(',',[Job::STATUS_RUNNING, Job::STATUS_PENDING, Job::STATUS_QUEUED]))
->orderBy('w.requested_date', 'ASC')
->execute()
->fetchAllAssociative();
}
}
class_alias(JobGateway::class, 'CodeRhapsodie\EzDataflowBundle\Gateway\JobGateway');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Gateway;
namespace CodeRhapsodie\IbexaDataflowBundle\Gateway;
use CodeRhapsodie\DataflowBundle\Entity\ScheduledDataflow;
use CodeRhapsodie\DataflowBundle\Repository\ScheduledDataflowRepository;
@@ -10,12 +10,8 @@ use Doctrine\DBAL\Query\QueryBuilder;
final class ScheduledDataflowGateway
{
/** @var \CodeRhapsodie\DataflowBundle\Repository\ScheduledDataflowRepository */
private $scheduledDataflowRepository;
public function __construct(ScheduledDataflowRepository $scheduledDataflowRepository)
public function __construct(private readonly ScheduledDataflowRepository $scheduledDataflowRepository)
{
$this->scheduledDataflowRepository = $scheduledDataflowRepository;
}
public function find(int $id): ?ScheduledDataflow
@@ -42,3 +38,4 @@ final class ScheduledDataflowGateway
$this->scheduledDataflowRepository->delete($id);
}
}
class_alias(ScheduledDataflowGateway::class, 'CodeRhapsodie\EzDataflowBundle\Gateway\ScheduledDataflowGateway');

View File

@@ -2,27 +2,23 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Matcher;
namespace CodeRhapsodie\IbexaDataflowBundle\Matcher;
use CodeRhapsodie\EzDataflowBundle\Exception\NoMatchFoundException;
use CodeRhapsodie\IbexaDataflowBundle\Exception\NoMatchFoundException;
use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException;
use Ibexa\Contracts\Core\Repository\LocationService;
use Ibexa\Contracts\Core\Repository\Values\Content\Location;
class LocationMatcher implements LocationMatcherInterface
{
/** @var \Ibexa\Contracts\Core\Repository\LocationService */
private $locationService;
public function __construct(LocationService $locationService)
public function __construct(private readonly LocationService $locationService)
{
$this->locationService = $locationService;
}
/**
* @param mixed $valueToMatch
*
* @throws \CodeRhapsodie\EzDataflowBundle\Exception\NoMatchFoundException
* @throws \CodeRhapsodie\IbexaDataflowBundle\Exception\NoMatchFoundException
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException
*/
public function matchLocation($valueToMatch): Location
@@ -46,3 +42,4 @@ class LocationMatcher implements LocationMatcherInterface
throw new NoMatchFoundException('No location matched provided value');
}
}
class_alias(LocationMatcher::class, 'CodeRhapsodie\EzDataflowBundle\Matcher\LocationMatcher');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Matcher;
namespace CodeRhapsodie\IbexaDataflowBundle\Matcher;
use Ibexa\Contracts\Core\Repository\Values\Content\Location;
@@ -13,3 +13,4 @@ interface LocationMatcherInterface
*/
public function matchLocation($valueToMatch): Location;
}
class_alias(LocationMatcherInterface::class, 'CodeRhapsodie\EzDataflowBundle\Matcher\LocationMatcherInterface');

View File

@@ -2,9 +2,9 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Model;
namespace CodeRhapsodie\IbexaDataflowBundle\Model;
use CodeRhapsodie\EzDataflowBundle\Exception\InvalidArgumentTypeException;
use CodeRhapsodie\IbexaDataflowBundle\Exception\InvalidArgumentTypeException;
use Ibexa\Contracts\Core\Repository\Values\Content\Location;
use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct;
@@ -28,7 +28,7 @@ class ContentCreateStructure extends ContentStructure
* <li>a LocationCreateStruct object</li>
* </ul>
*
* @throws \CodeRhapsodie\EzDataflowBundle\Exception\InvalidArgumentTypeException
* @throws \CodeRhapsodie\IbexaDataflowBundle\Exception\InvalidArgumentTypeException
*/
public function __construct(string $contentTypeIdentifier, string $languageCode, array $locations, array $fields, ?string $remoteId = null)
{
@@ -50,7 +50,7 @@ class ContentCreateStructure extends ContentStructure
}
/**
* @throws \CodeRhapsodie\EzDataflowBundle\Exception\InvalidArgumentTypeException
* @throws \CodeRhapsodie\IbexaDataflowBundle\Exception\InvalidArgumentTypeException
*/
private function setLocations(array $locations)
{
@@ -67,3 +67,4 @@ class ContentCreateStructure extends ContentStructure
$this->locations = $locations;
}
}
class_alias(ContentCreateStructure::class, 'CodeRhapsodie\EzDataflowBundle\Model\ContentCreateStructure');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Model;
namespace CodeRhapsodie\IbexaDataflowBundle\Model;
abstract class ContentStructure
{
@@ -30,3 +30,4 @@ abstract class ContentStructure
return $this->fields;
}
}
class_alias(ContentStructure::class, 'CodeRhapsodie\EzDataflowBundle\Model\ContentStructure');

View File

@@ -2,7 +2,7 @@
declare(strict_types=1);
namespace CodeRhapsodie\EzDataflowBundle\Model;
namespace CodeRhapsodie\IbexaDataflowBundle\Model;
class ContentUpdateStructure extends ContentStructure
{
@@ -36,3 +36,4 @@ class ContentUpdateStructure extends ContentStructure
return $this->id;
}
}
class_alias(ContentUpdateStructure::class, 'CodeRhapsodie\EzDataflowBundle\Model\ContentUpdateStructure');

View File

@@ -1,3 +1,3 @@
ezdataflow:
ibexa_dataflow:
view: ~
edit: ~

View File

@@ -1,3 +1,3 @@
coderhapsodie.ezdataflow.controllers:
coderhapsodie.ibexa_dataflow.controllers:
resource: '../../Controller/'
type: annotation

View File

@@ -7,171 +7,180 @@ services:
coderhapsodie.dataflow.connection: "@ibexa.persistence.connection"
CodeRhapsodie\EzDataflowBundle\Controller\DashboardController:
CodeRhapsodie\IbexaDataflowBundle\Controller\DashboardController:
public: true
tags:
- { name: controller.service_arguments }
arguments:
$jobGateway: '@CodeRhapsodie\EzDataflowBundle\Gateway\JobGateway'
$scheduledDataflowGateway: '@CodeRhapsodie\EzDataflowBundle\Gateway\ScheduledDataflowGateway'
$jobGateway: '@CodeRhapsodie\IbexaDataflowBundle\Gateway\JobGateway'
$scheduledDataflowGateway: '@CodeRhapsodie\IbexaDataflowBundle\Gateway\ScheduledDataflowGateway'
calls:
- ['setContainer', ['@service_container']]
- ['performAccessCheck', []]
CodeRhapsodie\EzDataflowBundle\Controller\ScheduledDataflowController:
CodeRhapsodie\IbexaDataflowBundle\Controller\ScheduledDataflowController:
public: true
tags:
- { name: controller.service_arguments }
arguments:
$notificationHandler: '@Ibexa\Contracts\AdminUi\Notification\NotificationHandlerInterface'
$scheduledDataflowGateway: '@CodeRhapsodie\EzDataflowBundle\Gateway\ScheduledDataflowGateway'
$scheduledDataflowGateway: '@CodeRhapsodie\IbexaDataflowBundle\Gateway\ScheduledDataflowGateway'
$translator: '@translator'
calls:
- [ 'setContainer', [ '@service_container' ] ]
- [ 'performAccessCheck', [ ] ]
CodeRhapsodie\EzDataflowBundle\Controller\JobController:
CodeRhapsodie\IbexaDataflowBundle\Controller\JobController:
public: true
tags:
- { name: controller.service_arguments }
arguments:
$jobGateway: '@CodeRhapsodie\EzDataflowBundle\Gateway\JobGateway'
$jobGateway: '@CodeRhapsodie\IbexaDataflowBundle\Gateway\JobGateway'
$notificationHandler: '@Ibexa\Contracts\AdminUi\Notification\NotificationHandlerInterface'
$translator: '@translator'
$scheduledDataflowGateway: '@CodeRhapsodie\IbexaDataflowBundle\Gateway\ScheduledDataflowGateway'
calls:
- [ 'setContainer', [ '@service_container' ] ]
- [ 'performAccessCheck', [ ] ]
CodeRhapsodie\EzDataflowBundle\Writer\RepositoryWriter:
CodeRhapsodie\IbexaDataflowBundle\Writer\RepositoryWriter:
abstract: true
calls:
- ['setUserSwitcher', ['@CodeRhapsodie\EzDataflowBundle\UserSwitcher\UserSwitcherInterface']]
- ['setUserSwitcher', ['@CodeRhapsodie\IbexaDataflowBundle\UserSwitcher\UserSwitcherInterface']]
CodeRhapsodie\EzDataflowBundle\Writer\ContentWriter:
parent: 'CodeRhapsodie\EzDataflowBundle\Writer\RepositoryWriter'
CodeRhapsodie\IbexaDataflowBundle\Writer\ContentWriter:
parent: 'CodeRhapsodie\IbexaDataflowBundle\Writer\RepositoryWriter'
public: false
arguments:
$creator: '@CodeRhapsodie\EzDataflowBundle\Core\Content\ContentCreatorInterface'
$updater: '@CodeRhapsodie\EzDataflowBundle\Core\Content\ContentUpdaterInterface'
$creator: '@CodeRhapsodie\IbexaDataflowBundle\Core\Content\ContentCreatorInterface'
$updater: '@CodeRhapsodie\IbexaDataflowBundle\Core\Content\ContentUpdaterInterface'
CodeRhapsodie\EzDataflowBundle\UserSwitcher\UserSwitcherInterface: '@CodeRhapsodie\EzDataflowBundle\UserSwitcher\UserSwitcher'
CodeRhapsodie\EzDataflowBundle\UserSwitcher\UserSwitcher:
CodeRhapsodie\IbexaDataflowBundle\UserSwitcher\UserSwitcherInterface: '@CodeRhapsodie\IbexaDataflowBundle\UserSwitcher\UserSwitcher'
CodeRhapsodie\IbexaDataflowBundle\UserSwitcher\UserSwitcher:
arguments:
$permissionResolver: '@Ibexa\Contracts\Core\Repository\PermissionResolver'
$userService: '@Ibexa\Contracts\Core\Repository\UserService'
$adminLoginOrId: '%coderhapsodie.ezdataflow.admin_login_or_id%'
$adminLoginOrId: '%coderhapsodie.ibexa_dataflow.admin_login_or_id%'
CodeRhapsodie\EzDataflowBundle\Core\Content\ContentCreatorInterface: '@CodeRhapsodie\EzDataflowBundle\Core\Content\ContentCreator'
CodeRhapsodie\EzDataflowBundle\Core\Content\ContentCreator:
CodeRhapsodie\IbexaDataflowBundle\Core\Content\ContentCreatorInterface: '@CodeRhapsodie\IbexaDataflowBundle\Core\Content\ContentCreator'
CodeRhapsodie\IbexaDataflowBundle\Core\Content\ContentCreator:
arguments:
$contentService: '@Ibexa\Contracts\Core\Repository\ContentService'
$contentTypeService: '@Ibexa\Contracts\Core\Repository\ContentTypeService'
$filler: '@CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFillerInterface'
$matcher: '@CodeRhapsodie\EzDataflowBundle\Matcher\LocationMatcherInterface'
$filler: '@CodeRhapsodie\IbexaDataflowBundle\Core\Field\ContentStructFieldFillerInterface'
$matcher: '@CodeRhapsodie\IbexaDataflowBundle\Matcher\LocationMatcherInterface'
CodeRhapsodie\EzDataflowBundle\Core\Content\ContentUpdaterInterface: '@CodeRhapsodie\EzDataflowBundle\Core\Content\ContentUpdater'
CodeRhapsodie\EzDataflowBundle\Core\Content\ContentUpdater:
CodeRhapsodie\IbexaDataflowBundle\Core\Content\ContentUpdaterInterface: '@CodeRhapsodie\IbexaDataflowBundle\Core\Content\ContentUpdater'
CodeRhapsodie\IbexaDataflowBundle\Core\Content\ContentUpdater:
arguments:
$contentService: '@Ibexa\Contracts\Core\Repository\ContentService'
$contentTypeService: '@Ibexa\Contracts\Core\Repository\ContentTypeService'
$filler: '@CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFillerInterface'
$filler: '@CodeRhapsodie\IbexaDataflowBundle\Core\Field\ContentStructFieldFillerInterface'
CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFillerInterface: '@CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFiller'
CodeRhapsodie\EzDataflowBundle\Core\Field\ContentStructFieldFiller:
CodeRhapsodie\IbexaDataflowBundle\Core\Field\ContentStructFieldFillerInterface: '@CodeRhapsodie\IbexaDataflowBundle\Core\Field\ContentStructFieldFiller'
CodeRhapsodie\IbexaDataflowBundle\Core\Field\ContentStructFieldFiller:
arguments:
$fieldValueCreators: !tagged 'coderhapsodie.ezdataflow.field_value_creator'
$fieldValueCreators: !tagged 'coderhapsodie.ibexa_dataflow.field_value_creator'
CodeRhapsodie\EzDataflowBundle\Matcher\LocationMatcherInterface: '@CodeRhapsodie\EzDataflowBundle\Matcher\LocationMatcher'
CodeRhapsodie\EzDataflowBundle\Matcher\LocationMatcher:
CodeRhapsodie\IbexaDataflowBundle\Matcher\LocationMatcherInterface: '@CodeRhapsodie\IbexaDataflowBundle\Matcher\LocationMatcher'
CodeRhapsodie\IbexaDataflowBundle\Matcher\LocationMatcher:
arguments:
$locationService: '@Ibexa\Contracts\Core\Repository\LocationService'
CodeRhapsodie\EzDataflowBundle\Core\Field\DefaultFieldValueCreator:
CodeRhapsodie\IbexaDataflowBundle\Core\Field\DefaultFieldValueCreator:
arguments:
$fieldTypeService: '@Ibexa\Contracts\Core\Repository\FieldTypeService'
tags:
- { name: 'coderhapsodie.ezdataflow.field_value_creator', priority: -1000 }
- { name: 'coderhapsodie.ibexa_dataflow.field_value_creator', priority: -1000 }
CodeRhapsodie\EzDataflowBundle\EventSubscriber\MenuSubscriber:
CodeRhapsodie\IbexaDataflowBundle\EventSubscriber\MenuSubscriber:
tags: ['kernel.event_subscriber']
CodeRhapsodie\EzDataflowBundle\Factory\ContentStructureFactoryInterface: '@CodeRhapsodie\EzDataflowBundle\Factory\ContentStructureFactory'
CodeRhapsodie\IbexaDataflowBundle\Factory\ContentStructureFactoryInterface: '@CodeRhapsodie\IbexaDataflowBundle\Factory\ContentStructureFactory'
CodeRhapsodie\EzDataflowBundle\Factory\ContentStructureFactory:
CodeRhapsodie\IbexaDataflowBundle\Factory\ContentStructureFactory:
arguments:
$contentService: '@Ibexa\Contracts\Core\Repository\ContentService'
CodeRhapsodie\EzDataflowBundle\Form\DataflowTypeChoiceType:
CodeRhapsodie\IbexaDataflowBundle\Form\DataflowTypeChoiceType:
arguments:
$registry: '@CodeRhapsodie\DataflowBundle\Registry\DataflowTypeRegistryInterface'
tags: ['form.type']
CodeRhapsodie\EzDataflowBundle\Form\CreateScheduledType:
CodeRhapsodie\IbexaDataflowBundle\Form\CreateScheduledType:
tags: ['form.type']
CodeRhapsodie\EzDataflowBundle\Form\UpdateScheduledType:
CodeRhapsodie\IbexaDataflowBundle\Form\UpdateScheduledType:
tags: ['form.type']
CodeRhapsodie\EzDataflowBundle\Form\CreateOneshotType:
CodeRhapsodie\IbexaDataflowBundle\Form\CreateOneshotType:
tags: ['form.type']
CodeRhapsodie\EzDataflowBundle\Form\UserTimezoneAwareDateTimeType:
CodeRhapsodie\IbexaDataflowBundle\Form\UserTimezoneAwareDateTimeType:
arguments:
$userPreferenceService: '@Ibexa\Contracts\Core\Repository\UserPreferenceService'
tags: ['form.type']
CodeRhapsodie\EzDataflowBundle\Gateway\ScheduledDataflowGateway:
CodeRhapsodie\IbexaDataflowBundle\Gateway\ScheduledDataflowGateway:
arguments:
$scheduledDataflowRepository: '@CodeRhapsodie\DataflowBundle\Repository\ScheduledDataflowRepository'
CodeRhapsodie\EzDataflowBundle\Gateway\JobGateway:
CodeRhapsodie\IbexaDataflowBundle\Gateway\JobGateway:
arguments:
$jobRepository: '@CodeRhapsodie\DataflowBundle\Repository\JobRepository'
CodeRhapsodie\EzDataflowBundle\Tab\RepeatingTab:
CodeRhapsodie\IbexaDataflowBundle\Tab\DashboardTab:
parent: Ibexa\Contracts\AdminUi\Tab\AbstractTab
public: false
arguments:
$httpKernelRuntime: '@twig.runtime.httpkernel'
tags:
- {name: ibexa.admin_ui.tab, group: coderhapsodie-ezdataflow}
- { name: ibexa.admin_ui.tab, group: coderhapsodie-ibexa_dataflow }
CodeRhapsodie\EzDataflowBundle\Tab\OneshotTab:
CodeRhapsodie\IbexaDataflowBundle\Tab\RepeatingTab:
parent: Ibexa\Contracts\AdminUi\Tab\AbstractTab
public: false
arguments:
$httpKernelRuntime: '@twig.runtime.httpkernel'
tags:
- {name: ibexa.admin_ui.tab, group: coderhapsodie-ezdataflow}
- {name: ibexa.admin_ui.tab, group: coderhapsodie-ibexa_dataflow}
CodeRhapsodie\EzDataflowBundle\Tab\HistoryTab:
CodeRhapsodie\IbexaDataflowBundle\Tab\OneshotTab:
parent: Ibexa\Contracts\AdminUi\Tab\AbstractTab
public: false
arguments:
$httpKernelRuntime: '@twig.runtime.httpkernel'
tags:
- {name: ibexa.admin_ui.tab, group: coderhapsodie-ezdataflow}
- {name: ibexa.admin_ui.tab, group: coderhapsodie-ibexa_dataflow}
CodeRhapsodie\IbexaDataflowBundle\Tab\HistoryTab:
parent: Ibexa\Contracts\AdminUi\Tab\AbstractTab
public: false
arguments:
$httpKernelRuntime: '@twig.runtime.httpkernel'
tags:
- {name: ibexa.admin_ui.tab, group: coderhapsodie-ibexa_dataflow}
CodeRhapsodie\EzDataflowBundle\Filter\NotModifiedContentFilter:
CodeRhapsodie\IbexaDataflowBundle\Filter\NotModifiedContentFilter:
arguments:
$contentService: '@Ibexa\Contracts\Core\Repository\ContentService'
$comparator: '@CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\FieldComparatorInterface'
$comparator: '@CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\FieldComparatorInterface'
CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\FieldComparatorInterface: '@CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\DelegatorFieldComparator'
CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\DelegatorFieldComparator:
CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\FieldComparatorInterface: '@CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\DelegatorFieldComparator'
CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\DelegatorFieldComparator:
CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator:
CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\AbstractFieldComparator:
arguments:
$fieldTypeService: '@Ibexa\Contracts\Core\Repository\FieldTypeService'
abstract: true
_cr.admin_tabs.ezdataflow_group:
_cr.admin_tabs.ibexa_dataflow_group:
parent: Ibexa\AdminUi\Component\TabsComponent
autowire: true
autoconfigure: false
public: false
arguments:
$groupIdentifier: 'coderhapsodie-ezdataflow'
$groupIdentifier: 'coderhapsodie-ibexa_dataflow'
tags:
- { name: ibexa.admin_ui.component, group: 'coderhapsodie-ezdataflow' }
- { name: ibexa.admin_ui.component, group: 'coderhapsodie-ibexa_dataflow' }

View File

@@ -1,42 +1,42 @@
services:
CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\SimpleFieldComparator:
parent: 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\SimpleFieldComparator:
parent: 'CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
tags:
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezauthor' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezboolean' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezcountry' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezdate' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezdatetime' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezemail' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezfloat' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezinteger' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezisbn' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezkeyword' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezobjectrelation' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezobjectrelationlist' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezrichtext' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezselection' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'eztext' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezstring' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'eztime' }
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'eztags' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezauthor' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezboolean' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezcountry' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezdate' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezdatetime' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezemail' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezfloat' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezinteger' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezisbn' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezkeyword' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezobjectrelation' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezobjectrelationlist' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezrichtext' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezselection' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'eztext' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezstring' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'eztime' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'eztags' }
CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\UrlFieldComparator:
parent: 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\UrlFieldComparator:
parent: 'CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
tags:
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezurl' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezurl' }
CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\NovaSEOMetasFieldComparator:
parent: 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\NovaSEOMetasFieldComparator:
parent: 'CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
tags:
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'novaseometas' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'novaseometas' }
CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\MatrixFieldComparator:
parent: 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\MatrixFieldComparator:
parent: 'CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
tags:
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezmatrix' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezmatrix' }
CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\MapLocationFieldComparator:
parent: 'CodeRhapsodie\EzDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\MapLocationFieldComparator:
parent: 'CodeRhapsodie\IbexaDataflowBundle\Core\FieldComparator\AbstractFieldComparator'
tags:
- { name: 'coderhapsodie.ezdataflow.field_comparator', fieldType: 'ezgmaplocation' }
- { name: 'coderhapsodie.ibexa_dataflow.field_comparator', fieldType: 'ezgmaplocation' }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -1,4 +1,4 @@
role.policy.ezdataflow: Ibexa Dataflow
role.policy.ezdataflow.all_functions: Ibexa Dataflow / All functions
role.policy.ezdataflow.view: Ibexa Dataflow / View
role.policy.ezdataflow.edit: Ibexa Dataflow / Edit
role.policy.ibexa_dataflow: Ibexa Dataflow
role.policy.ibexa_dataflow.all_functions: Ibexa Dataflow / All functions
role.policy.ibexa_dataflow.view: Ibexa Dataflow / View
role.policy.ibexa_dataflow.edit: Ibexa Dataflow / Edit

View File

@@ -1,4 +1,4 @@
role.policy.ezdataflow: Ibexa Dataflow
role.policy.ezdataflow.all_functions: Ibexa Dataflow / Toutes les fonctions
role.policy.ezdataflow.view: Ibexa Dataflow / Consultation
role.policy.ezdataflow.edit: Ibexa Dataflow / Modification
role.policy.ibexa_dataflow: Ibexa Dataflow
role.policy.ibexa_dataflow.all_functions: Ibexa Dataflow / Toutes les fonctions
role.policy.ibexa_dataflow.view: Ibexa Dataflow / Consultation
role.policy.ibexa_dataflow.edit: Ibexa Dataflow / Modification

View File

@@ -1 +1 @@
coderhapsodie.ezdataflow: Ibexa Dataflow
coderhapsodie.ibexa_dataflow: Ibexa Dataflow

View File

@@ -1 +1 @@
coderhapsodie.ezdataflow: Ibexa Dataflow
coderhapsodie.ibexa_dataflow: Ibexa Dataflow

View File

@@ -1 +1 @@
coderhapsodie.ezdataflow: Ibexa Dataflow
coderhapsodie.ibexa_dataflow: Ibexa Dataflow

View File

@@ -1 +1 @@
coderhapsodie.ezdataflow: Ibexa Dataflow
coderhapsodie.ibexa_dataflow: Ibexa Dataflow

View File

@@ -1,67 +1,68 @@
coderhapsodie.ezdataflow: Ibexa Dataflow
coderhapsodie.ezdataflow.yes: Yes
coderhapsodie.ezdataflow.no: No
coderhapsodie.ezdataflow.repeating: Repeating
coderhapsodie.ezdataflow.repeating.title: Repeating
coderhapsodie.ezdataflow.oneshot: Oneshot
coderhapsodie.ezdataflow.oneshot.title: Oneshot
coderhapsodie.ezdataflow.oneshot.list.title: 'Oneshot dataflow list'
coderhapsodie.ezdataflow.workflow.list.title: 'Scheduled dataflow list'
coderhapsodie.ezdataflow.history: History
coderhapsodie.ezdataflow.workflow.list.name: Name
coderhapsodie.ezdataflow.workflow.list.frequency: Frequency
coderhapsodie.ezdataflow.workflow.list.next_execution: 'Next execution'
coderhapsodie.ezdataflow.workflow.list.enabled: 'Enabled?'
coderhapsodie.ezdataflow.workflow.list.history: History
coderhapsodie.ezdataflow.workflow.list.edit: Edit
coderhapsodie.ezdataflow.workflow.list.disable: Disable
coderhapsodie.ezdataflow.workflow.list.enable: Enable
coderhapsodie.ezdataflow.history.title: History
coderhapsodie.ezdataflow.history.list.title: 'Executions list'
coderhapsodie.ezdataflow.history.list.name: Name
coderhapsodie.ezdataflow.history.list.request: 'Requested on'
coderhapsodie.ezdataflow.history.list.count: 'Items count'
coderhapsodie.ezdataflow.history.list.error_count: 'Errors count'
coderhapsodie.ezdataflow.history.list.start: 'Started on'
coderhapsodie.ezdataflow.history.list.end: 'Finished on'
coderhapsodie.ezdataflow.history.list.view: 'View details'
coderhapsodie.ezdataflow.history.list.status: Status
coderhapsodie.ezdataflow.history.filter.label: Filter results
coderhapsodie.ezdataflow.history.filter.none: All results
coderhapsodie.ezdataflow.history.filter.non_empty_only: Only non empty
coderhapsodie.ezdataflow.history.filter.with_error_only: Only with errors
coderhapsodie.ezdataflow.job.status.pending: Pending
coderhapsodie.ezdataflow.job.status.running: Running
coderhapsodie.ezdataflow.job.status.complete: Completed
coderhapsodie.ezdataflow.job.status.unknown: Unknown
coderhapsodie.ezdataflow.history.job.title: 'Job'
coderhapsodie.ezdataflow.history.details.title: 'Job details'
coderhapsodie.ezdataflow.history.details.name: Name
coderhapsodie.ezdataflow.history.details.request: 'Requested on'
coderhapsodie.ezdataflow.history.details.status: Status
coderhapsodie.ezdataflow.history.details.start: 'Started on'
coderhapsodie.ezdataflow.history.details.end: 'Finished on'
coderhapsodie.ezdataflow.history.details.count: 'Items successfully processed'
coderhapsodie.ezdataflow.history.details.options: 'Run options'
coderhapsodie.ezdataflow.history.details.errors: Errors
coderhapsodie.ezdataflow.history.details.type: 'Name of the dataflow executed'
coderhapsodie.ezdataflow.history.details.log: 'View log'
coderhapsodie.ezdataflow.workflow.repeating.new.title: 'Add a new repeating dataflow'
coderhapsodie.ezdataflow.workflow.new.cancel: Cancel
coderhapsodie.ezdataflow.workflow.new.submit: Create
coderhapsodie.ezdataflow.history.list.empty: 'No execution yet.'
coderhapsodie.ezdataflow.workflow.list.empty: 'No repeating workflow configured yet'
coderhapsodie.ezdataflow.workflow.history.title: 'Execution history'
coderhapsodie.ezdataflow.workflow.log.title: 'Execution log'
coderhapsodie.ezdataflow.workflow.list.delete: Delete
coderhapsodie.ezdataflow.workflow.delete: 'Are you sure you want to delete this dataflow schedule?'
coderhapsodie.ezdataflow.workflow.create.success: 'Dataflow schedule successfully added.'
coderhapsodie.ezdataflow.workflow.create.error: 'An error occurred during the dataflow schedule creation: "%message%".'
coderhapsodie.ezdataflow.workflow.delete.success: 'Dataflow schedule successfully deleted.'
coderhapsodie.ezdataflow.workflow.delete.error: 'An error occurred during the dataflow schedule deletion: "%message%".'
coderhapsodie.ezdataflow.workflow.oneshot.new.title: 'New oneshot job'
coderhapsodie.ezdataflow.job.create.success: 'Job successfully added.'
coderhapsodie.ezdataflow.job.create.error: 'An error occured during the job creation: "%message%".'
coderhapsodie.ibexa_dataflow: Ibexa Dataflow
coderhapsodie.ibexa_dataflow.yes: Yes
coderhapsodie.ibexa_dataflow.no: No
coderhapsodie.ibexa_dataflow.repeating: Repeating
coderhapsodie.ibexa_dataflow.repeating.title: Repeating
coderhapsodie.ibexa_dataflow.oneshot: Oneshot
coderhapsodie.ibexa_dataflow.oneshot.title: Oneshot
coderhapsodie.ibexa_dataflow.oneshot.list.title: 'Oneshot dataflow list'
coderhapsodie.ibexa_dataflow.workflow.list.title: 'Scheduled dataflow list'
coderhapsodie.ibexa_dataflow.history: History
coderhapsodie.ibexa_dataflow.workflow.list.name: Name
coderhapsodie.ibexa_dataflow.workflow.list.frequency: Frequency
coderhapsodie.ibexa_dataflow.workflow.list.next_execution: 'Next execution'
coderhapsodie.ibexa_dataflow.workflow.list.enabled: 'Enabled?'
coderhapsodie.ibexa_dataflow.workflow.list.history: History
coderhapsodie.ibexa_dataflow.workflow.list.edit: Edit
coderhapsodie.ibexa_dataflow.workflow.list.disable: Disable
coderhapsodie.ibexa_dataflow.workflow.list.enable: Enable
coderhapsodie.ibexa_dataflow.workflow.list.runonce: Run now
coderhapsodie.ibexa_dataflow.history.title: History
coderhapsodie.ibexa_dataflow.history.list.title: 'Executions list'
coderhapsodie.ibexa_dataflow.history.list.name: Name
coderhapsodie.ibexa_dataflow.history.list.request: 'Requested on'
coderhapsodie.ibexa_dataflow.history.list.count: 'Number of successes'
coderhapsodie.ibexa_dataflow.history.list.errors: 'Number of errors'
coderhapsodie.ibexa_dataflow.history.list.start: 'Started on'
coderhapsodie.ibexa_dataflow.history.list.end: 'Finished on'
coderhapsodie.ibexa_dataflow.history.list.view: 'View details'
coderhapsodie.ibexa_dataflow.history.list.status: Status
coderhapsodie.ibexa_dataflow.history.filter.label: Filter results
coderhapsodie.ibexa_dataflow.history.filter.none: All results
coderhapsodie.ibexa_dataflow.history.filter.non_empty_only: Only non empty
coderhapsodie.ibexa_dataflow.history.filter.with_error_only: Only with errors
coderhapsodie.ibexa_dataflow.job.status.pending: Pending
coderhapsodie.ibexa_dataflow.job.status.running: Running
coderhapsodie.ibexa_dataflow.job.status.complete: Completed
coderhapsodie.ibexa_dataflow.job.status.unknown: Unknown
coderhapsodie.ibexa_dataflow.history.job.title: 'Job'
coderhapsodie.ibexa_dataflow.history.details.title: 'Job details'
coderhapsodie.ibexa_dataflow.history.details.name: Name
coderhapsodie.ibexa_dataflow.history.details.request: 'Requested on'
coderhapsodie.ibexa_dataflow.history.details.status: Status
coderhapsodie.ibexa_dataflow.history.details.start: 'Started on'
coderhapsodie.ibexa_dataflow.history.details.end: 'Finished on'
coderhapsodie.ibexa_dataflow.history.details.count: 'Items successfully processed'
coderhapsodie.ibexa_dataflow.history.details.options: 'Run options'
coderhapsodie.ibexa_dataflow.history.details.errors: Errors
coderhapsodie.ibexa_dataflow.history.details.type: 'Name of the dataflow executed'
coderhapsodie.ibexa_dataflow.history.details.log: 'View log'
coderhapsodie.ibexa_dataflow.workflow.repeating.new.title: 'Add a new repeating dataflow'
coderhapsodie.ibexa_dataflow.workflow.new.cancel: Cancel
coderhapsodie.ibexa_dataflow.workflow.new.submit: Create
coderhapsodie.ibexa_dataflow.history.list.empty: 'No execution yet.'
coderhapsodie.ibexa_dataflow.workflow.list.empty: 'No repeating workflow configured yet'
coderhapsodie.ibexa_dataflow.workflow.history.title: 'Execution history'
coderhapsodie.ibexa_dataflow.workflow.log.title: 'Execution log'
coderhapsodie.ibexa_dataflow.workflow.list.delete: Delete
coderhapsodie.ibexa_dataflow.workflow.delete: 'Are you sure you want to delete this dataflow schedule?'
coderhapsodie.ibexa_dataflow.workflow.create.success: 'Dataflow schedule successfully added.'
coderhapsodie.ibexa_dataflow.workflow.create.error: 'An error occurred during the dataflow schedule creation: "%message%".'
coderhapsodie.ibexa_dataflow.workflow.delete.success: 'Dataflow schedule successfully deleted.'
coderhapsodie.ibexa_dataflow.workflow.delete.error: 'An error occurred during the dataflow schedule deletion: "%message%".'
coderhapsodie.ibexa_dataflow.workflow.oneshot.new.title: 'New oneshot job'
coderhapsodie.ibexa_dataflow.job.create.success: 'Job successfully added.'
coderhapsodie.ibexa_dataflow.job.create.error: 'An error occured during the job creation: "%message%".'
coderhapsodie.dataflow.label: 'Scheduled dataflow name'
coderhapsodie.dataflow.oneshot.label: 'One-shot job name'
coderhapsodie.dataflow.dataflowType: 'Select the dataflow to run'
@@ -76,9 +77,13 @@ coderhapsodie.dataflow.frequency.title: 'Enter an interval in a format compatibl
coderhapsodie.dataflow.frequency.placeholder: 'Example: 1 year 2 months 3 weeks 4 days 5 hours 6 minutes'
coderhapsodie.dataflow.create.next: 'First run'
coderhapsodie.dataflow.create.enabled: Enabled?
coderhapsodie.ezdataflow.workflow.repeating.edit.title: "Dataflow schedule edit"
coderhapsodie.ezdataflow.workflow.edit.submit: Save
coderhapsodie.ibexa_dataflow.workflow.repeating.edit.title: "Dataflow schedule edit"
coderhapsodie.ibexa_dataflow.workflow.edit.submit: Save
coderhapsodie.dataflow.update.next: 'Next execution'
coderhapsodie.ezdataflow.workflow.edit.success: 'Dataflow schedule successfully updated.'
coderhapsodie.ezdataflow.workflow.edit.error: 'An error occurred during the dataflow schedule update: "%message%".'
coderhapsodie.ezdataflow.notfound: 'Requested data is not found'
coderhapsodie.ibexa_dataflow.workflow.edit.success: 'Dataflow schedule successfully updated.'
coderhapsodie.ibexa_dataflow.workflow.edit.error: 'An error occurred during the dataflow schedule update: "%message%".'
coderhapsodie.ibexa_dataflow.notfound: 'Requested data is not found'
coderhapsodie.ibexa_dataflow.powered_by: 'Powered by'
coderhapsodie.ibexa_dataflow.made_by: 'Made by'
coderhapsodie.ibexa_dataflow.dashboard: Dashboard
coderhapsodie.ibexa_dataflow.dashboard.title: Running or waiting tasks

View File

@@ -1,67 +1,68 @@
coderhapsodie.ezdataflow: Ibexa Dataflow
coderhapsodie.ezdataflow.yes: Oui
coderhapsodie.ezdataflow.no: Non
coderhapsodie.ezdataflow.repeating: Récurrent
coderhapsodie.ezdataflow.repeating.title: Récurrent
coderhapsodie.ezdataflow.oneshot: Ponctuel
coderhapsodie.ezdataflow.oneshot.title: Ponctuel
coderhapsodie.ezdataflow.oneshot.list.title: 'Liste des exécutions ponctuelles de dataflow'
coderhapsodie.ezdataflow.workflow.list.title: 'Liste des programmations des dataflow'
coderhapsodie.ezdataflow.history: Historique
coderhapsodie.ezdataflow.workflow.list.name: Nom
coderhapsodie.ezdataflow.workflow.list.frequency: Fréquence
coderhapsodie.ezdataflow.workflow.list.next_execution: 'Prochaine exécution'
coderhapsodie.ezdataflow.workflow.list.enabled: 'Activé ?'
coderhapsodie.ezdataflow.workflow.list.history: Historique
coderhapsodie.ezdataflow.workflow.list.edit: Éditer
coderhapsodie.ezdataflow.workflow.list.disable: Désactiver
coderhapsodie.ezdataflow.workflow.list.enable: Activer
coderhapsodie.ezdataflow.history.title: Historique
coderhapsodie.ezdataflow.history.list.title: 'Liste des exécutions'
coderhapsodie.ezdataflow.history.list.name: Nom
coderhapsodie.ezdataflow.history.list.request: 'Demandé le'
coderhapsodie.ezdataflow.history.list.count: 'Nombre d''objets'
coderhapsodie.ezdataflow.history.list.error_count: 'Nombre d''erreurs'
coderhapsodie.ezdataflow.history.list.start: 'Commencé le'
coderhapsodie.ezdataflow.history.list.end: 'Terminé le'
coderhapsodie.ezdataflow.history.list.view: 'Voir le détail'
coderhapsodie.ezdataflow.history.list.status: État
coderhapsodie.ezdataflow.history.filter.label: Filtrer les résultats
coderhapsodie.ezdataflow.history.filter.none: Tous les résultats
coderhapsodie.ezdataflow.history.filter.non_empty_only: Seulement non vides
coderhapsodie.ezdataflow.history.filter.with_error_only: Seulement avec erreurs
coderhapsodie.ezdataflow.job.status.pending: 'En attente'
coderhapsodie.ezdataflow.job.status.running: 'En cours'
coderhapsodie.ezdataflow.job.status.complete: Terminé
coderhapsodie.ezdataflow.job.status.unknown: Inconnu
coderhapsodie.ezdataflow.history.job.title: 'Exécution'
coderhapsodie.ezdataflow.history.details.title: 'Détails de l''exécution'
coderhapsodie.ezdataflow.history.details.name: Nom
coderhapsodie.ezdataflow.history.details.request: 'Demandé le'
coderhapsodie.ezdataflow.history.details.status: État
coderhapsodie.ezdataflow.history.details.start: 'Commencé le'
coderhapsodie.ezdataflow.history.details.end: 'Terminé le'
coderhapsodie.ezdataflow.history.details.count: 'Nombre d''objets mis à jour'
coderhapsodie.ezdataflow.history.details.options: 'Options de lancement'
coderhapsodie.ezdataflow.history.details.errors: Erreurs
coderhapsodie.ezdataflow.history.details.type: 'Nom du dataflow exécuté'
coderhapsodie.ezdataflow.history.details.log: 'Voir le log'
coderhapsodie.ezdataflow.workflow.repeating.new.title: 'Nouvel programmation d''un dataflow récurrent'
coderhapsodie.ezdataflow.workflow.new.cancel: Annuler
coderhapsodie.ezdataflow.workflow.new.submit: Créer
coderhapsodie.ezdataflow.history.list.empty: 'Aucune exécution pour le moment.'
coderhapsodie.ezdataflow.workflow.list.empty: 'Aucun dataflow n''a été programmé.'
coderhapsodie.ezdataflow.workflow.history.title: 'Historique des exécutions'
coderhapsodie.ezdataflow.workflow.log.title: 'Log de l''exécution'
coderhapsodie.ezdataflow.workflow.list.delete: Supprimer
coderhapsodie.ezdataflow.workflow.delete: 'Êtes-vous sûr de vouloir supprimer ce dataflow ?'
coderhapsodie.ezdataflow.workflow.create.success: 'La programmation du dataflow a bien été ajoutée.'
coderhapsodie.ezdataflow.workflow.create.error: 'Une erreur est survenue lors de l''ajout de la programmation du dataflow : "%message%".'
coderhapsodie.ezdataflow.workflow.delete.success: 'La programmation du dataflow a bien été supprimée.'
coderhapsodie.ezdataflow.workflow.delete.error: 'Une erreur est survenue lors de la suppression de la programmation du dataflow : "%message%".'
coderhapsodie.ezdataflow.workflow.oneshot.new.title: 'Nouvelle exécution ponctuelle'
coderhapsodie.ezdataflow.job.create.success: 'Votre exécution a bien été ajoutée.'
coderhapsodie.ezdataflow.job.create.error: 'Une erreur est survenue lors de l''ajout de l''exécution : "%message%".'
coderhapsodie.ibexa_dataflow: Ibexa Dataflow
coderhapsodie.ibexa_dataflow.yes: Oui
coderhapsodie.ibexa_dataflow.no: Non
coderhapsodie.ibexa_dataflow.repeating: Récurrent
coderhapsodie.ibexa_dataflow.repeating.title: Récurrent
coderhapsodie.ibexa_dataflow.oneshot: Ponctuel
coderhapsodie.ibexa_dataflow.oneshot.title: Ponctuel
coderhapsodie.ibexa_dataflow.oneshot.list.title: 'Liste des exécutions ponctuelles de dataflow'
coderhapsodie.ibexa_dataflow.workflow.list.title: 'Liste des programmations des dataflow'
coderhapsodie.ibexa_dataflow.history: Historique
coderhapsodie.ibexa_dataflow.workflow.list.name: Nom
coderhapsodie.ibexa_dataflow.workflow.list.frequency: Fréquence
coderhapsodie.ibexa_dataflow.workflow.list.next_execution: 'Prochaine exécution'
coderhapsodie.ibexa_dataflow.workflow.list.enabled: 'Activé ?'
coderhapsodie.ibexa_dataflow.workflow.list.history: Historique
coderhapsodie.ibexa_dataflow.workflow.list.edit: Éditer
coderhapsodie.ibexa_dataflow.workflow.list.disable: Désactiver
coderhapsodie.ibexa_dataflow.workflow.list.enable: Activer
coderhapsodie.ibexa_dataflow.workflow.list.runonce: Lancer maintenant
coderhapsodie.ibexa_dataflow.history.title: Historique
coderhapsodie.ibexa_dataflow.history.list.title: 'Liste des exécutions'
coderhapsodie.ibexa_dataflow.history.list.name: Nom
coderhapsodie.ibexa_dataflow.history.list.request: 'Demandé le'
coderhapsodie.ibexa_dataflow.history.list.count: 'Nombre de succès'
coderhapsodie.ibexa_dataflow.history.list.errors: 'Nombre d''erreurs'
coderhapsodie.ibexa_dataflow.history.list.start: 'Commencé le'
coderhapsodie.ibexa_dataflow.history.list.end: 'Terminé le'
coderhapsodie.ibexa_dataflow.history.list.view: 'Voir le détail'
coderhapsodie.ibexa_dataflow.history.list.status: État
coderhapsodie.ibexa_dataflow.history.filter.label: Filtrer les résultats
coderhapsodie.ibexa_dataflow.history.filter.none: Tous les résultats
coderhapsodie.ibexa_dataflow.history.filter.non_empty_only: Seulement non vides
coderhapsodie.ibexa_dataflow.history.filter.with_error_only: Seulement avec erreurs
coderhapsodie.ibexa_dataflow.job.status.pending: 'En attente'
coderhapsodie.ibexa_dataflow.job.status.running: 'En cours'
coderhapsodie.ibexa_dataflow.job.status.complete: Terminé
coderhapsodie.ibexa_dataflow.job.status.unknown: Inconnu
coderhapsodie.ibexa_dataflow.history.job.title: 'Exécution'
coderhapsodie.ibexa_dataflow.history.details.title: 'Détails de l''exécution'
coderhapsodie.ibexa_dataflow.history.details.name: Nom
coderhapsodie.ibexa_dataflow.history.details.request: 'Demandé le'
coderhapsodie.ibexa_dataflow.history.details.status: État
coderhapsodie.ibexa_dataflow.history.details.start: 'Commencé le'
coderhapsodie.ibexa_dataflow.history.details.end: 'Terminé le'
coderhapsodie.ibexa_dataflow.history.details.count: 'Nombre d''objets mis à jour'
coderhapsodie.ibexa_dataflow.history.details.options: 'Options de lancement'
coderhapsodie.ibexa_dataflow.history.details.errors: Erreurs
coderhapsodie.ibexa_dataflow.history.details.type: 'Nom du dataflow exécuté'
coderhapsodie.ibexa_dataflow.history.details.log: 'Voir le log'
coderhapsodie.ibexa_dataflow.workflow.repeating.new.title: 'Nouvel programmation d''un dataflow récurrent'
coderhapsodie.ibexa_dataflow.workflow.new.cancel: Annuler
coderhapsodie.ibexa_dataflow.workflow.new.submit: Créer
coderhapsodie.ibexa_dataflow.history.list.empty: 'Aucune exécution pour le moment.'
coderhapsodie.ibexa_dataflow.workflow.list.empty: 'Aucun dataflow n''a été programmé.'
coderhapsodie.ibexa_dataflow.workflow.history.title: 'Historique des exécutions'
coderhapsodie.ibexa_dataflow.workflow.log.title: 'Log de l''exécution'
coderhapsodie.ibexa_dataflow.workflow.list.delete: Supprimer
coderhapsodie.ibexa_dataflow.workflow.delete: 'Êtes-vous sûr de vouloir supprimer ce dataflow ?'
coderhapsodie.ibexa_dataflow.workflow.create.success: 'La programmation du dataflow a bien été ajoutée.'
coderhapsodie.ibexa_dataflow.workflow.create.error: 'Une erreur est survenue lors de l''ajout de la programmation du dataflow : "%message%".'
coderhapsodie.ibexa_dataflow.workflow.delete.success: 'La programmation du dataflow a bien été supprimée.'
coderhapsodie.ibexa_dataflow.workflow.delete.error: 'Une erreur est survenue lors de la suppression de la programmation du dataflow : "%message%".'
coderhapsodie.ibexa_dataflow.workflow.oneshot.new.title: 'Nouvelle exécution ponctuelle'
coderhapsodie.ibexa_dataflow.job.create.success: 'Votre exécution a bien été ajoutée.'
coderhapsodie.ibexa_dataflow.job.create.error: 'Une erreur est survenue lors de l''ajout de l''exécution : "%message%".'
coderhapsodie.dataflow.label: 'Nom de la programmation du dataflow'
coderhapsodie.dataflow.oneshot.label: 'Nom de l''exécution ponctuelle du dataflow'
coderhapsodie.dataflow.dataflowType: 'Dataflow à exécuter'
@@ -74,9 +75,13 @@ coderhapsodie.dataflow.frequency.title: 'Entrez un intervalle compatible avec st
coderhapsodie.dataflow.frequency.placeholder: 'Exemple: 1 year 2 months 3 weeks 4 days 5 hours 6 minutes'
coderhapsodie.dataflow.create.next: 'Première exécution'
coderhapsodie.dataflow.create.enabled: 'Activé ?'
coderhapsodie.ezdataflow.workflow.repeating.edit.title: "Édition de la programmation d'un dataflow"
coderhapsodie.ezdataflow.workflow.edit.submit: Sauvegarder
coderhapsodie.ibexa_dataflow.workflow.repeating.edit.title: "Édition de la programmation d'un dataflow"
coderhapsodie.ibexa_dataflow.workflow.edit.submit: Sauvegarder
coderhapsodie.dataflow.update.next: 'Prochaine exécution'
coderhapsodie.ezdataflow.workflow.edit.success: 'La programmation du dataflow a été mise à jour avec succès.'
coderhapsodie.ezdataflow.workflow.edit.error: 'Une erreur est survenue lors de la modification de la programmation du dataflow : "%message%".'
coderhapsodie.ezdataflow.notfound: 'Les données demandées sont introuvables'
coderhapsodie.ibexa_dataflow.workflow.edit.success: 'La programmation du dataflow a été mise à jour avec succès.'
coderhapsodie.ibexa_dataflow.workflow.edit.error: 'Une erreur est survenue lors de la modification de la programmation du dataflow : "%message%".'
coderhapsodie.ibexa_dataflow.notfound: 'Les données demandées sont introuvables'
coderhapsodie.ibexa_dataflow.powered_by: 'Propulsé par'
coderhapsodie.ibexa_dataflow.made_by: 'Fabriqué par'
coderhapsodie.ibexa_dataflow.dashboard: Dashboard
coderhapsodie.ibexa_dataflow.dashboard.title: Tâches en cours ou en attente

View File

@@ -1,85 +0,0 @@
{% extends "@ibexadesign/ui/layout.html.twig" %}
{% block body_class %}ibexa-ezdataflow{% endblock %}
{% block breadcrumbs %}
{% include '@ibexadesign/ui/breadcrumbs.html.twig' with { items: [
{ value: 'breadcrumb.admin'|trans(domain='messages')|desc('Admin') },
{ value: 'coderhapsodie.ezdataflow'|trans|desc('EzDataflow') }
]} %}
{% endblock %}
{% block header %}
{% include '@ibexadesign/ui/page_title.html.twig' with {
title: 'coderhapsodie.ezdataflow'|trans|desc('EzDataflow'),
} %}
{% endblock %}
{% block content %}
{{ ibexa_render_component_group('coderhapsodie-ezdataflow', {'filter': app.request.query.get('filter', 0)}) }}
{% embed '@ibexadesign/ui/component/modal/modal.html.twig' with {
id: 'modal-history-details',
attr_dialog: {'style': 'max-width: 75vw;'},
title: 'coderhapsodie.ezdataflow.history.job.title'|trans,
} %}
{% block body_content '' %}
{% endembed %}
{% embed '@ibexadesign/ui/component/modal/modal.html.twig' with {
id: 'modal-history-log',
attr_dialog: {'style': 'max-width: 75vw;'},
title: 'coderhapsodie.ezdataflow.workflow.log.title'|trans,
} %}
{% block body_content '' %}
{% endembed %}
{% embed '@ibexadesign/ui/component/modal/modal.html.twig' with {
id: 'modal-history',
attr_dialog: {'style': 'max-width: 75vw;'},
title: 'coderhapsodie.ezdataflow.workflow.history.title'|trans,
} %}
{% block body_content '' %}
{% endembed %}
<script>
document.addEventListener('DOMContentLoaded', () => {
const bindModalLinks = (modalId, linkSelector) => {
const modal = document.getElementById(modalId);
const modalBody = modal.querySelector('.modal-body');
document.addEventListener('click', (e) => {
const link = e.target.closest(linkSelector);
if (link) {
e.preventDefault();
modalBody.innerHTML = '';
fetch(link.href)
.then((r) => r.text())
.then((content) => {
modalBody.innerHTML = content;
})
;
return;
}
})
}
bindModalLinks('modal-history-details', '.modal-history-details');
bindModalLinks('modal-history-log', '.modal-history-log');
bindModalLinks('modal-history', '.modal-history');
const labels = document.getElementById('ibexa-tab-label-coderhapsodie-ezdataflow-code-rhapsodie-ezdataflow-repeating')
.closest('ul').querySelectorAll('li.ibexa-tabs__tab');
const tabs = document.getElementById('ibexa-tab-coderhapsodie-ezdataflow-code-rhapsodie-ezdataflow-repeating')
.closest('.tab-content').querySelectorAll('.tab-pane');
});
</script>
{% endblock %}
{% block stylesheets %}
{{ parent() }}
<style>
.ezdataflow-date .ibexa-dropdown {
min-width: 0;
}
</style>
{% endblock %}

View File

@@ -1,5 +0,0 @@
{% include '@ibexadesign/ezdataflow/parts/tab/job_list.html.twig' with {
identifier: 'ezdataflow_schedule_history_results',
paginate_route: 'coderhapsodie.ezdataflow.history.workflow',
paginate_params: {id: id}
} %}

View File

@@ -1,11 +0,0 @@
{% macro translateStatus(status) %}
{% if status == 0 %}
{{ 'coderhapsodie.ezdataflow.job.status.pending'|trans }}
{% elseif status == 1 %}
{{ 'coderhapsodie.ezdataflow.job.status.running'|trans }}
{% elseif status == 2 %}
{{ 'coderhapsodie.ezdataflow.job.status.complete'|trans }}
{% else %}
{{ 'coderhapsodie.ezdataflow.job.status.unknown'|trans }}
{% endif %}
{% endmacro %}

View File

@@ -1,152 +0,0 @@
{% set id = identifier|default('ezdataflow_schedule_results') %}
<div id="loading_{{ id }}" class="text-center" hidden>
<svg class="ez-icon ez-icon--extra-large">
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="{{ ibexa_icon_path('spinner') }}"></use>
</svg>
</div>
<div id="{{ id }}" class="history-details-aware">
{% set body_rows = [] %}
{% for item in pager.currentPageResults %}
{% set body_row_cols = [] %}
{% set body_row_cols = body_row_cols|merge([
{content: item.label},
{content: item.frequency},
{content: date(item.next)|ibexa_short_datetime},
{content: ('coderhapsodie.ezdataflow.' ~ (item.enabled ? 'yes' : 'no'))|trans},
]) %}
{% set col_raw %}
<a href="{{ path('coderhapsodie.ezdataflow.history.workflow', {id: item.id}) }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text modal-history"
title="{{ 'coderhapsodie.ezdataflow.workflow.list.history'|trans }}"
data-bs-toggle="modal"
data-bs-target="#modal-history"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--history">
<use xlink:href="{{ ibexa_icon_path('history') }}"></use>
</svg>
</a>
<a href="{{ path('coderhapsodie.ezdataflow.workflow.edit', {id: item.id}) }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text modal-edit"
title="{{ 'coderhapsodie.ezdataflow.workflow.list.edit'|trans }}"
data-bs-toggle="modal"
data-bs-target="#modal-edit-scheduled"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--edit">
<use xlink:href="{{ ibexa_icon_path('edit') }}"></use>
</svg>
</a>
{% if item.enabled %}
<a href="{{ path('coderhapsodie.ezdataflow.workflow.disable', {id: item.id}) }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
title="{{ 'coderhapsodie.ezdataflow.workflow.list.disable'|trans }}"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--logout" style="fill: #f7d000;">
<use xlink:href="{{ ibexa_icon_path('logout') }}"></use>
</svg>
</a>
{% else %}
<a href="{{ path('coderhapsodie.ezdataflow.workflow.enable', {id: item.id}) }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
title="{{ 'coderhapsodie.ezdataflow.workflow.list.enable'|trans }}"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--logout" style="fill: #00825c;">
<use xlink:href="{{ ibexa_icon_path('approved') }}"></use>
</svg>
</a>
{% endif %}
<a href="{{ path('coderhapsodie.ezdataflow.workflow.delete', {id: item.id}) }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text modal-delete"
title="{{ 'coderhapsodie.ezdataflow.workflow.list.delete'|trans }}"
data-name="{{ item.label }}"
data-bs-toggle="modal"
data-bs-target="#modal-delete-confirm"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--trash">
<use xlink:href="{{ ibexa_icon_path('trash') }}"></use>
</svg>
</a>
{% endset %}
{% set body_row_cols = body_row_cols|merge([{
has_action_btns: true,
content: col_raw,
raw: true,
}]) %}
{% set body_rows = body_rows|merge([{ cols: body_row_cols }]) %}
{% endfor %}
{% embed '@ibexadesign/ui/component/table/table.html.twig' with {
headline: 'coderhapsodie.ezdataflow.workflow.list.title'|trans,
head_cols: [
{ content: 'coderhapsodie.ezdataflow.workflow.list.name'|trans },
{ content: 'coderhapsodie.ezdataflow.workflow.list.frequency'|trans },
{ content: 'coderhapsodie.ezdataflow.workflow.list.next_execution'|trans },
{ content: 'coderhapsodie.ezdataflow.workflow.list.enabled'|trans },
{ },
],
body_rows,
empty_table_info_text: 'coderhapsodie.ezdataflow.workflow.list.empty'|trans,
} %}
{% block header %}
{% embed '@ibexadesign/ui/component/table/table_header.html.twig' %}
{% block actions %}
<button
type="button"
class="btn ibexa-btn ibexa-btn--tertiary ibexa-btn--small"
data-bs-toggle="modal"
data-bs-target="#modal-new-scheduled"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--create">
<use xlink:href="{{ ibexa_icon_path('create') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'coderhapsodie.ezdataflow.workflow.new.submit'|trans|desc('Create') }}
</span>
</button>
{% endblock %}
{% endembed %}
{% endblock %}
{% endembed %}
{% if pager.haveToPaginate %}
{% include '@ibexadesign/ui/pagination.html.twig' with {
'pager': pager,
'paginaton_params': {
'routeName': paginate_route,
'routeParams': paginate_params|default({})
}
} %}
{% endif %}
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
// Manage ajax pagination
const display = document.getElementById('{{ id }}');
display.addEventListener('click', (e) => {
const link = e.target.closest('.ibexa-pagination a');
if (!link) {
return;
}
const loader = document.getElementById('loading_{{ id }}');
e.preventDefault();
loader.hidden = false;
display.innerHTML = '';
fetch(link.href)
.then((r) => r.text())
.then((content) => {
const node = document.createElement('div');
node.innerHTML = content;
display.innerHTML = node.querySelector('#{{ id }}').innerHTML;
loader.hidden = true;
})
;
});
});
</script>

View File

@@ -0,0 +1,5 @@
{%- block content -%}
{% include '@ibexadesign/ibexa_dataflow/parts/tab/dashboard_list.html.twig' with {
identifier: 'ibexa_dataflow_schedule_dashboard_results',
} %}
{%- endblock -%}

View File

@@ -2,16 +2,16 @@
{% set choices = [
{
'value': 0,
'label': 'coderhapsodie.ezdataflow.history.filter.none'|trans,
'label': 'coderhapsodie.ibexa_dataflow.history.filter.none'|trans,
},
{
'value': 1,
'label': 'coderhapsodie.ezdataflow.history.filter.non_empty_only'|trans,
'label': 'coderhapsodie.ibexa_dataflow.history.filter.non_empty_only'|trans,
},
] %}
{% set source %}
<select id="ezdataflow_history_filter" class="form-control ibexa-input">
<select id="ibexa_dataflow_history_filter" class="form-control ibexa-input">
{% for choice in choices %}
<option value="{{ choice.value }}">
{{ choice.label }}
@@ -28,29 +28,32 @@
}) }}
{% endset %}
{{ include('@ibexadesign/ezdataflow/parts/tab/job_list.html.twig', {
identifier: 'ezdataflow_history_results',
paginate_route: 'coderhapsodie.ezdataflow.history',
{{ include('@ibexadesign/ibexa_dataflow/parts/tab/job_list.html.twig', {
identifier: 'ibexa_dataflow_history_results',
paginate_route: 'coderhapsodie.ibexa_dataflow.history',
paginate_params: {'filter': filter},
headline: 'coderhapsodie.ezdataflow.history.title'|trans,
headline: 'coderhapsodie.ibexa_dataflow.history.title'|trans,
actions: actions
}) }}
<script>
document.addEventListener('DOMContentLoaded', function () {
// Manage ajax pagination
document.getElementById('ezdataflow_history_filter').addEventListener('change', function (e) {
document.getElementById('ibexa_dataflow_history_filter').addEventListener('change', function (e) {
e.preventDefault();
const loading = document.getElementById('loading_ezdataflow_history_results');
const results = document.getElementById('ezdataflow_history_results').querySelector('.ibexa-table');
const loading = document.getElementById('loading_ibexa_dataflow_history_results');
const results = document.getElementById('ibexa_dataflow_history_results').querySelector('.ibexa-table');
const pagination = document.getElementById('ibexa_dataflow_history_results').querySelector('.pag');
loading.hidden = false;
results.innerHTML = '';
fetch('{{ path('coderhapsodie.ezdataflow.history') }}?filter=' + this.value)
pagination.innerHTML = '';
fetch('{{ path('coderhapsodie.ibexa_dataflow.history') }}?filter=' + this.value)
.then((r) => r.text())
.then((content) => {
const node = document.createElement('div');
node.innerHTML = content;
results.innerHTML = node.querySelector('#ezdataflow_history_results .ibexa-table').innerHTML;
results.innerHTML = node.querySelector('#ibexa_dataflow_history_results .ibexa-table').innerHTML;
pagination.innerHTML = node.querySelector('#ibexa_dataflow_history_results .pag').innerHTML;
loading.hidden = true;
})
;

File diff suppressed because one or more lines are too long

View File

@@ -1,29 +1,30 @@
{%- block content -%}
{% set actions %}
<button
type="button"
class="btn ibexa-btn ibexa-btn--tertiary ibexa-btn--small"
data-bs-toggle="modal"
data-bs-target="#modal-new-oneshot"
id="create-oneshot-button"
type="button"
class="btn ibexa-btn ibexa-btn--tertiary ibexa-btn--small"
data-bs-toggle="modal"
data-bs-target="#modal-new-oneshot"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--create">
<use xlink:href="{{ ibexa_icon_path('create') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'coderhapsodie.ezdataflow.workflow.new.submit'|trans|desc('Create') }}
{{ 'coderhapsodie.ibexa_dataflow.workflow.new.submit'|trans|desc('Create') }}
</span>
</button>
{% endset %}
{{ include('@ibexadesign/ezdataflow/parts/tab/job_list.html.twig', {
identifier: 'ezdataflow_oneshot_history',
paginate_route: 'coderhapsodie.ezdataflow.oneshot',
headline: 'coderhapsodie.ezdataflow.oneshot.title'|trans,
{{ include('@ibexadesign/ibexa_dataflow/parts/tab/job_list.html.twig', {
identifier: 'ibexa_dataflow_oneshot_history',
paginate_route: 'coderhapsodie.ibexa_dataflow.oneshot',
headline: 'coderhapsodie.ibexa_dataflow.oneshot.title'|trans,
actions: actions,
}) }}
{% if form is defined %}
{{ include('@ibexadesign/ezdataflow/parts/form_modal.html.twig', {
{{ include('@ibexadesign/ibexa_dataflow/parts/form_modal.html.twig', {
'id': 'modal-new-oneshot',
'form': form,
'mode': 'oneshot'
@@ -53,6 +54,16 @@
})
;
});
const createButton = document.getElementById('create-oneshot-button')
if (createButton) {
createButton.addEventListener('click', () => {
const oneShotModal = document.getElementById('modal-new-oneshot');
oneShotModal.querySelector('#create_oneshot_label').value = '';
oneShotModal.querySelector('#create_oneshot_options').value = '';
oneShotModal.querySelector('.flatpickr.flatpickr-input').parentNode.parentNode.parentNode.ibexaInstance.flatpickrInstance.setDate(new Date(), true);
});
}
});
</script>
{%- endblock -%}

View File

@@ -1,38 +1,41 @@
{%- block content -%}
{% form_theme update_form '@ibexadesign/ibexa_dataflow/form_theme.html.twig' %}
{{ include('@ibexadesign/ezdataflow/parts/tab/schedule_list.html.twig', {
identifier: 'ezdataflow_schedule_results',
paginate_route: 'coderhapsodie.ezdataflow.repeating'
{{ include('@ibexadesign/ibexa_dataflow/parts/tab/schedule_list.html.twig', {
identifier: 'ibexa_dataflow_schedule_results',
paginate_route: 'coderhapsodie.ibexa_dataflow.repeating'
}) }}
{{ include('@ibexadesign/ezdataflow/parts/form_modal.html.twig', {
{{ include('@ibexadesign/ibexa_dataflow/parts/form_modal.html.twig', {
'id': 'modal-new-scheduled',
'form': form
}) }}
{% embed '@ibexadesign/ui/component/modal/modal.html.twig' with {
id: 'modal-edit-scheduled',
title: 'coderhapsodie.ezdataflow.workflow.repeating.edit.title'|trans,
title: 'coderhapsodie.ibexa_dataflow.workflow.repeating.edit.title'|trans,
} %}
{% block body_content %}
<form action="" method="post">
<div class="form-fields"></div>
{{ form_start(update_form) }}
<div class="form-fields">
{{ form_widget(update_form) }}
</div>
<button id="modal-edit-submit" type="submit" hidden />
</form>
{{ form_end(update_form) }}
{% endblock %}
{% block footer_content %}
<button type="button" class="btn ibexa-btn ibexa-btn--primary ibexa-btn--trigger" data-click="#modal-edit-submit">
{{ 'coderhapsodie.ezdataflow.workflow.edit.submit'|trans }}
{{ 'coderhapsodie.ibexa_dataflow.workflow.edit.submit'|trans }}
</button>
<button class="btn ibexa-btn ibexa-btn--secondary" data-bs-dismiss="modal">
{{ 'coderhapsodie.ezdataflow.workflow.new.cancel'|trans }}
{{ 'coderhapsodie.ibexa_dataflow.workflow.new.cancel'|trans }}
</button>
{% endblock %}
{% endembed %}
{% embed '@ibexadesign/ui/component/modal/modal.html.twig' with {
id: 'modal-delete-confirm',
title: 'coderhapsodie.ezdataflow.workflow.delete'|trans,
title: 'coderhapsodie.ibexa_dataflow.workflow.delete'|trans,
} %}
{% block body_content %}
<form action="" method="post">
@@ -42,60 +45,16 @@
{% endblock %}
{% block footer_content %}
<button type="button" class="btn ibexa-btn ibexa-btn--primary ibexa-btn--trigger" data-click="#modal-delete-submit">
{{ 'coderhapsodie.ezdataflow.workflow.list.delete'|trans }}
{{ 'coderhapsodie.ibexa_dataflow.workflow.list.delete'|trans }}
</button>
<button class="btn ibexa-btn ibexa-btn--secondary" data-bs-dismiss="modal">
{{ 'coderhapsodie.ezdataflow.workflow.new.cancel'|trans }}
{{ 'coderhapsodie.ibexa_dataflow.workflow.new.cancel'|trans }}
</button>
{% endblock %}
{% endembed %}
<script>
document.addEventListener('DOMContentLoaded', () => {
// $('#ez-modal--edit-scheduled').modal({keyboard: true, show: false});
// $('.modal-edit').each(function (index, elem) {
// $(elem).click(function (e) {
// e.preventDefault();
// $('#schedule_edit').html('');
// $('#ez-modal--edit-scheduled').modal('show');
// $.ajax(elem.href, {
// success: function (result) {
// if (result.redirect) {
// if (window.location.href === result.redirect) {
// window.location.reload();
// }
// window.location = result.redirect;
// window.location.reload();
// return;
// }
//
// $('#schedule_edit').html(result.form);
// }
// });
// });
// });
//
// $('#ez-modal--edit-scheduled').on('submit', 'form', function (e) {
// e.preventDefault();
// url = $(this).attr('action');
// data = new FormData(this);
// $.ajax({
// 'type': 'POST',
// 'url': url,
// 'data': data,
// processData: false,
// contentType: false,
// success: function (result) {
// if (result.redirect) {
// window.location = result.redirect;
// return;
// }
//
// $('#schedule_edit').html(result.form);
// }
// });
// });
const bindFormSubmit = (modalId) => {
document.querySelector('#'+modalId+' form').addEventListener('submit', function (e) {
e.preventDefault();
@@ -134,7 +93,13 @@
const node = document.createElement('div');
node.innerHTML = result.form;
editModal.querySelector('form').action = link.href;
editModal.querySelector('.form-fields').innerHTML = node.querySelector('.form-fields').innerHTML;
editModal.querySelector('#update_scheduled_label').value = node.querySelector('#update_scheduled_label').value;
editModal.querySelector('#update_scheduled_options').value = node.querySelector('#update_scheduled_options').value;
editModal.querySelector('#update_scheduled_frequency').value = node.querySelector('#update_scheduled_frequency').value;
editModal.querySelector('#update_scheduled_next').parentNode.parentNode.ibexaInstance.flatpickrInstance.setDate(
new Date(node.querySelector('#update_scheduled_next').value * 1000),
true
);
})
;

View File

@@ -0,0 +1,5 @@
{% include '@ibexadesign/ibexa_dataflow/parts/tab/job_list.html.twig' with {
identifier: 'ibexa_dataflow_schedule_history_results',
paginate_route: 'coderhapsodie.ibexa_dataflow.history.workflow',
paginate_params: {id: id}
} %}

View File

@@ -1,59 +1,59 @@
{% import '@ibexadesign/ezdataflow/macros.twig' as macros %}
{% import '@ibexadesign/ibexa_dataflow/macros.twig' as macros %}
{% block content %}
<div class="container ez-main-container history-details-aware">
{% if item is not null %}
<h2>{{ 'coderhapsodie.ezdataflow.history.job.title'|trans }}{{ item.id }}</h2>
<h2>{{ 'coderhapsodie.ibexa_dataflow.history.job.title'|trans }}{{ item.id }}</h2>
<table class="table ez-table ez-table--list">
<thead>
<tr>
<th colspan="2">
{{ 'coderhapsodie.ezdataflow.history.details.title'|trans }}
{{ 'coderhapsodie.ibexa_dataflow.history.details.title'|trans }}
</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ 'coderhapsodie.ezdataflow.history.details.name'|trans }}</td>
<td>{{ 'coderhapsodie.ibexa_dataflow.history.details.name'|trans }}</td>
<td>{{ item.label }}</td>
</tr>
<tr>
<td>{{ 'coderhapsodie.ezdataflow.history.details.request'|trans }}</td>
<td>{{ 'coderhapsodie.ibexa_dataflow.history.details.request'|trans }}</td>
<td>{{ date(item.requestedDate)|ibexa_short_datetime }}</td>
</tr>
<tr>
<td>{{ 'coderhapsodie.ezdataflow.history.details.status'|trans }}</td>
<td>{{ 'coderhapsodie.ibexa_dataflow.history.details.status'|trans }}</td>
<td>{{ macros.translateStatus(item.status) }}</td>
</tr>
<tr>
<td>{{ 'coderhapsodie.ezdataflow.history.details.start'|trans }}</td>
<td>{{ 'coderhapsodie.ibexa_dataflow.history.details.start'|trans }}</td>
<td>{{ item.startTime ? date(item.startTime)|ibexa_short_datetime : '—' }}</td>
</tr>
<tr>
<td>{{ 'coderhapsodie.ezdataflow.history.details.end'|trans }}</td>
<td>{{ 'coderhapsodie.ibexa_dataflow.history.details.end'|trans }}</td>
<td>{{ item.endTime ? date(item.endTime)|ibexa_short_datetime : '—' }}</td>
</tr>
<tr>
<td>{{ 'coderhapsodie.ezdataflow.history.details.count'|trans }}</td>
<td>{{ 'coderhapsodie.ibexa_dataflow.history.details.count'|trans }}</td>
<td>{{ item.count }}</td>
</tr>
<tr>
<td>{{ 'coderhapsodie.ezdataflow.history.details.errors'|trans }}</td>
<td>{{ 'coderhapsodie.ibexa_dataflow.history.details.errors'|trans }}</td>
<td>{{ item.exceptions|length }}</td>
</tr>
<tr>
<td>{{ 'coderhapsodie.ezdataflow.history.details.type'|trans }}</td>
<td>{{ 'coderhapsodie.ibexa_dataflow.history.details.type'|trans }}</td>
<td>{{ item.dataflowType }}</td>
</tr>
<tr>
<td>{{ 'coderhapsodie.ezdataflow.history.details.options'|trans }}</td>
<td>{{ 'coderhapsodie.ibexa_dataflow.history.details.options'|trans }}</td>
<td>{{ item.options|json_encode }}</td>
</tr>
</tbody>
</table>
{% else %}
<p class="ez-table-no-content">{{ 'coderhapsodie.ezdataflow.notfound'|trans }}</p>
<p class="ez-table-no-content">{{ 'coderhapsodie.ibexa_dataflow.notfound'|trans }}</p>
{% endif %}
</div>
{% endblock %}

View File

@@ -5,6 +5,6 @@
{%- endblock -%}
{% block datetime_widget -%}
{% set attr = attr|merge({class: (attr.class|default('') ~ ' ezdataflow-date')|trim}) %}
{% set attr = attr|merge({class: (attr.class|default('') ~ ' ibexa_dataflow-date')|trim}) %}
{{ parent() }}
{%- endblock datetime_widget %}

View File

@@ -0,0 +1,11 @@
{% macro translateStatus(status) %}
{% if status == 0 %}
{{ 'coderhapsodie.ibexa_dataflow.job.status.pending'|trans }}
{% elseif status == 1 %}
{{ 'coderhapsodie.ibexa_dataflow.job.status.running'|trans }}
{% elseif status == 2 %}
{{ 'coderhapsodie.ibexa_dataflow.job.status.complete'|trans }}
{% else %}
{{ 'coderhapsodie.ibexa_dataflow.job.status.unknown'|trans }}
{% endif %}
{% endmacro %}

View File

@@ -1,8 +1,8 @@
{% form_theme form '@ibexadesign/ezdataflow/form_theme.html.twig' %}
{% form_theme form '@ibexadesign/ibexa_dataflow/form_theme.html.twig' %}
{% embed '@ibexadesign/ui/component/modal/modal.html.twig' with {
id: id ?? '',
title: ('coderhapsodie.ezdataflow.workflow.'~(mode|default('repeating'))~'.'~(type_action|default('new'))~'.title')|trans,
title: ('coderhapsodie.ibexa_dataflow.workflow.'~(mode|default('repeating'))~'.'~(type_action|default('new'))~'.title')|trans,
} %}
{% block body_content %}
{{ form_start(form) }}
@@ -14,10 +14,10 @@
{% endblock %}
{% block footer_content %}
<button class="btn ibexa-btn ibexa-btn--primary ibexa-btn--trigger" data-click="#{{ id ~ '-submit' }}">
{{ ('coderhapsodie.ezdataflow.workflow.'~(type_action|default('new'))~'.submit')|trans }}
{{ ('coderhapsodie.ibexa_dataflow.workflow.'~(type_action|default('new'))~'.submit')|trans }}
</button>
<button type="button" class="btn ibexa-btn ibexa-btn--secondary" data-bs-dismiss="modal">
{{ 'coderhapsodie.ezdataflow.workflow.new.cancel'|trans }}
{{ 'coderhapsodie.ibexa_dataflow.workflow.new.cancel'|trans }}
</button>
{% endblock %}
{% endembed %}

View File

@@ -0,0 +1,42 @@
{% set id = identifier|default('ibexa_dataflow_history_results') %}
{% import '@ibexadesign/ibexa_dataflow/macros.twig' as macros %}
<div id="loading_{{ id }}" class="text-center" hidden>
<svg class="ez-icon ez-icon--extra-large">
<use xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="{{ ibexa_icon_path('spinner') }}"></use>
</svg>
</div>
<div id="{{ id }}" data-loader="loading_{{ id }}" class="history-details-aware">
{% set body_rows = [] %}
{% for job in jobs %}
{% set body_row_cols = [] %}
{% set body_row_cols = body_row_cols|merge([
{content: job.label},
{content: date(job.requested_date)|ibexa_short_datetime},
{content: job.start_time ? date(job.start_time)|ibexa_short_datetime : '—'},
{content: macros.translateStatus(job.status)},
]) %}
{% set body_rows = body_rows|merge([{ cols: body_row_cols }]) %}
{% endfor %}
{% embed '@ibexadesign/ui/component/table/table.html.twig' with {
headline: 'coderhapsodie.ibexa_dataflow.dashboard.title'|trans,
head_cols: [
{ content: 'coderhapsodie.ibexa_dataflow.history.list.name'|trans },
{ content: 'coderhapsodie.ibexa_dataflow.history.list.request'|trans },
{ content: 'coderhapsodie.ibexa_dataflow.history.list.start'|trans },
{ content: 'coderhapsodie.ibexa_dataflow.history.list.status'|trans },
{ },
],
body_rows,
empty_table_info_text: 'coderhapsodie.ibexa_dataflow.history.list.empty'|trans,
} %}
{% endembed %}
</div>

Some files were not shown because too many files have changed in this diff Show More