diff --git a/CHANGELOG.md b/CHANGELOG.md index 745effba..dede598c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Stop flagging a network port injection as partial when no connection to a network equipment port is requested - Made several generic warnings more explicit. They explain why the mapping failed. - Stop requesting a network port connection when its connection columns are empty +- Fix the model list, the injection page and the mapping tabs being very slow with many models or mappings ### Fixed diff --git a/ajax/dropdownChooseField.php b/ajax/dropdownChooseField.php index 4ccde6e0..2cd618dd 100644 --- a/ajax/dropdownChooseField.php +++ b/ajax/dropdownChooseField.php @@ -35,4 +35,6 @@ } Session::checkCentralAccess(); +// Reads the session only: release it so that the calls of a tab run in parallel +Session::writeClose(); PluginDatainjectionInjectionType::dropdownFields($_POST); diff --git a/ajax/dropdownMandatory.php b/ajax/dropdownMandatory.php index 1dc0e8f4..f2f575b3 100644 --- a/ajax/dropdownMandatory.php +++ b/ajax/dropdownMandatory.php @@ -35,4 +35,6 @@ } Session::checkCentralAccess(); +// Reads the session only: release it so that the calls of a tab run in parallel +Session::writeClose(); PluginDatainjectionInjectionType::showMandatoryCheckbox($_POST); diff --git a/hook.php b/hook.php index 8bebc93e..8375712e 100644 --- a/hook.php +++ b/hook.php @@ -54,6 +54,7 @@ function plugin_datainjection_install() plugin_datainjection_migration_2121_2122($migration); plugin_datainjection_migration_2141_2150($migration); plugin_datainjection_migration_2158_2159($migration); + plugin_datainjection_migration_21512_21513($migration); break; case 0: @@ -89,7 +90,8 @@ function plugin_datainjection_install() `itemtype` varchar(255) NOT NULL default '', `delimiter` varchar(1) NOT NULL default ';', `is_header_present` tinyint NOT NULL default '1', - PRIMARY KEY (`ID`) + PRIMARY KEY (`ID`), + KEY `models_id` (`models_id`) ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; $DB->doQuery($query); @@ -100,7 +102,8 @@ function plugin_datainjection_install() `rank` INT NOT NULL , `name` VARCHAR( 255 ) NOT NULL , `value` VARCHAR( 255 ) NOT NULL , - `is_mandatory` TINYINT NOT NULL DEFAULT '0' + `is_mandatory` TINYINT NOT NULL DEFAULT '0', + KEY `models_id` (`models_id`) ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; $DB->doQuery($query); @@ -109,7 +112,8 @@ function plugin_datainjection_install() `models_id` INT {$default_key_sign} NOT NULL , `itemtype` varchar(255) NOT NULL default '', `value` VARCHAR( 255 ) NOT NULL , - `is_mandatory` TINYINT NOT NULL DEFAULT '0' + `is_mandatory` TINYINT NOT NULL DEFAULT '0', + KEY `models_id` (`models_id`) ) ENGINE=InnoDB DEFAULT CHARSET={$default_charset} COLLATE={$default_collation} ROW_FORMAT=DYNAMIC;"; $DB->doQuery($query); @@ -175,6 +179,7 @@ function plugin_datainjection_install() plugin_datainjection_migration_2121_2122($migration); plugin_datainjection_migration_2141_2150($migration); plugin_datainjection_migration_2158_2159($migration); + plugin_datainjection_migration_21512_21513($migration); break; default: @@ -218,6 +223,22 @@ function plugin_datainjection_uninstall() return true; } +function plugin_datainjection_migration_21512_21513(Migration $migration) +{ + // Models are always read by `models_id`: without index, every read scans the whole table + foreach ( + [ + 'glpi_plugin_datainjection_modelcsvs', + 'glpi_plugin_datainjection_mappings', + 'glpi_plugin_datainjection_infos', + ] as $table + ) { + $migration->addKey($table, 'models_id'); + } + + $migration->executeMigration(); +} + function plugin_datainjection_migration_2141_2150(Migration $migration) { $migration->addField( diff --git a/inc/engine.class.php b/inc/engine.class.php index 002025cd..48af6c7b 100644 --- a/inc/engine.class.php +++ b/inc/engine.class.php @@ -65,7 +65,8 @@ public function injectLine($line, $index) //Get the injectionclass associated to the itemtype $itemtype = $this->getModel()->getItemtype(); $injectionClass = PluginDatainjectionCommonInjectionLib::getInjectionClassInstance($itemtype); - $several = PluginDatainjectionMapping::getSeveralMappedField($this->getModel()->fields['id']); + //Computed once when the engine is built, mappings do not change during the injection + $several = $this->getModel()->severaltimes_mapped; //First of all : transform $line which is an array of values to inject into another array //which looks like this : diff --git a/inc/info.class.php b/inc/info.class.php index b989165d..7d174f94 100644 --- a/inc/info.class.php +++ b/inc/info.class.php @@ -186,10 +186,15 @@ public static function showFormInfos(PluginDatainjectionModel $model) ['primary_type' => $model->fields['itemtype'], ], + false, ); echo ""; - echo sprintf("", $infos_id); - echo sprintf("", $infos_id); + $fields_html = PluginDatainjectionInjectionType::getFieldsHtml( + $info, + ['primary_type' => $model->fields['itemtype']], + ); + echo sprintf("%s", $infos_id, $fields_html['field']); + echo sprintf("%s", $infos_id, $fields_html['mandatory']); } if ($canedit) { diff --git a/inc/injectiontype.class.php b/inc/injectiontype.class.php index dc0397d0..900c0705 100644 --- a/inc/injectiontype.class.php +++ b/inc/injectiontype.class.php @@ -32,6 +32,8 @@ use function Safe\json_decode; use function Safe\json_encode; +use function Safe\ob_get_clean; +use function Safe\ob_start; use function Safe\preg_replace; class PluginDatainjectionInjectionType @@ -120,12 +122,89 @@ public static function dropdown($value = '', $only_primary = false) * * @param mixed $mapping_or_info * @param array $options array + * @param bool $load_fields load the fields dropdown through AJAX on page load **/ - public static function dropdownLinkedTypes($mapping_or_info, $options = []) + public static function dropdownLinkedTypes($mapping_or_info, $options = [], bool $load_fields = true) + { + [$p, $values] = self::getLinkedTypesParams($mapping_or_info, $options); + + $mappings_id = $mapping_or_info->fields['id']; + + $rand = Dropdown::showFromArray( + "data[" . $mappings_id . "][itemtype]", + $values, + ['value' => $p['itemtype']], + ); + + $p['itemtype'] = '__VALUE__'; + $di_base_url = plugin_datainjection_geturl(); + $url_field = $di_base_url . "ajax/dropdownChooseField.php"; + $toobserve = "dropdown_data[" . $mapping_or_info->getID() . ('][itemtype]' . $rand); + $toupdate = "span_field_" . $mappings_id; + if ($load_fields) { + Ajax::updateItem($toupdate, $url_field, $p, $toobserve); + } + + Ajax::updateItemOnSelectEvent($toobserve, $toupdate, $url_field, $p); + return $rand; + } + + + /** + * Get the HTML of the fields dropdown and of the mandatory checkbox of a mapping or an info, + * as the AJAX calls of dropdownLinkedTypes() and dropdownFields() load them + * + * @param mixed $mapping_or_info + * @param array $options array + * + * @return array{field: string, mandatory: string} + **/ + public static function getFieldsHtml($mapping_or_info, $options = []): array + { + [$p, $values] = self::getLinkedTypesParams($mapping_or_info, $options); + + //Value the browser selects in the itemtype dropdown + $p['itemtype'] = self::getSelectedValue($values, $p['itemtype']); + + ob_start(); + $p['value'] = self::dropdownFields($p, false); + $field_html = ob_get_clean(); + + ob_start(); + self::showMandatoryCheckbox($p + ['need_decode' => true]); + $mandatory_html = ob_get_clean(); + + return [ + 'field' => $field_html, + 'mandatory' => $mandatory_html, + ]; + } + + + /** + * Value selected by the browser in a dropdown: the given value, or the first one if it is not in the list + * + * @param int|string $value + * @return int|string + **/ + private static function getSelectedValue(array $values, $value) + { + return isset($values[$value]) ? $value : array_key_first($values); + } + + + /** + * Get the parameters and the values of the linked types dropdown + * + * @param mixed $mapping_or_info + * @param array $options array + * + * @return array{0: array, 1: array} + **/ + private static function getLinkedTypesParams($mapping_or_info, $options = []): array { /** @var array[mixed] $INJECTABLE_TYPES */ - /** @var array $CFG_GLPI */ - global $INJECTABLE_TYPES, $CFG_GLPI; + global $INJECTABLE_TYPES; getTypesToInject(); // populate $INJECTABLE_TYPES @@ -142,7 +221,6 @@ public static function dropdownLinkedTypes($mapping_or_info, $options = []) $p[$key] = $value; } - $mappings_id = $mapping_or_info->fields['id']; $values = []; if ( @@ -160,6 +238,12 @@ public static function dropdownLinkedTypes($mapping_or_info, $options = []) throw new HttpException(500, 'Class ' . $p['primary_type'] . ' is not a valid class'); } + //The linked types are the same for all the rows of a model: computed once per request + static $values_by_primary_type = []; + if (isset($values_by_primary_type[$p['primary_type']])) { + return [$p, $values_by_primary_type[$p['primary_type']]]; + } + $type = new $p['primary_type'](); $values[$p['primary_type']] = $type->getTypeName(); @@ -177,33 +261,24 @@ public static function dropdownLinkedTypes($mapping_or_info, $options = []) } asort($values); + $values_by_primary_type[$p['primary_type']] = $values; - $rand = Dropdown::showFromArray( - "data[" . $mappings_id . "][itemtype]", - $values, - ['value' => $p['itemtype']], - ); - - $p['itemtype'] = '__VALUE__'; - $di_base_url = plugin_datainjection_geturl(); - $url_field = $di_base_url . "ajax/dropdownChooseField.php"; - $toobserve = "dropdown_data[" . $mapping_or_info->getID() . ('][itemtype]' . $rand); - $toupdate = "span_field_" . $mappings_id; - Ajax::updateItem($toupdate, $url_field, $p, $toobserve); - Ajax::updateItemOnSelectEvent($toobserve, $toupdate, $url_field, $p); - return $rand; + return [$p, $values]; } /** - * @param array $options array + * @param array $options array + * @param bool $load_mandatory load the mandatory checkbox through AJAX on page load + * + * @return int|string the value selected in the fields dropdown **/ - public static function dropdownFields($options = []) + public static function dropdownFields($options = [], bool $load_mandatory = true) { /** @var array $CFG_GLPI */ global $CFG_GLPI; - $used = []; + $used = []; $p['itemtype'] = self::NO_VALUE; $p['primary_type'] = ''; $p['mapping_or_info'] = []; @@ -236,9 +311,16 @@ public static function dropdownFields($options = []) $mapping_value = $mapping_or_info['value']; } - $injectionClass = PluginDatainjectionCommonInjectionLib::getInjectionClassInstance($p['itemtype']); + //Search options are the same for all the rows of a model: computed once per request + static $search_options_cache = []; + $cache_key = $p['itemtype'] . '|' . $p['primary_type']; + if (!isset($search_options_cache[$cache_key])) { + $injectionClass = PluginDatainjectionCommonInjectionLib::getInjectionClassInstance($p['itemtype']); + $search_options_cache[$cache_key] = $injectionClass->getOptions($p['primary_type']); + } - foreach ($injectionClass->getOptions($p['primary_type']) as $option) { + $search_options = $search_options_cache[$cache_key]; + foreach ($search_options as $option) { //If it's a real option (not a group label) and if field is not blacklisted //and if a linkfield is defined (meaning that the field can be updated) if ( @@ -258,7 +340,7 @@ public static function dropdownFields($options = []) } } - $used = self::getUsedMappingsOrInfos($p); + $used = self::getUsedMappingsOrInfos($p, $search_options); } asort($fields); @@ -273,18 +355,23 @@ public static function dropdownFields($options = []) $p['value'] = '__VALUE__'; $url = plugin_datainjection_geturl() . "ajax/dropdownMandatory.php"; - Ajax::updateItem( - "span_mandatory_" . $mapping_or_info['id'], - $url, - $p, - "dropdown_data[" . $mapping_or_info['id'] . ('][value]' . $rand), - ); + if ($load_mandatory) { + Ajax::updateItem( + "span_mandatory_" . $mapping_or_info['id'], + $url, + $p, + "dropdown_data[" . $mapping_or_info['id'] . ('][value]' . $rand), + ); + } + Ajax::updateItemOnSelectEvent( "dropdown_data[" . $mapping_or_info['id'] . ('][value]' . $rand), "span_mandatory_" . $mapping_or_info['id'], $url, $p, ); + + return self::getSelectedValue($fields, $mapping_value); } @@ -364,9 +451,10 @@ public static function showMandatoryCheckbox($options = []) /** - * @param array $options array + * @param array $options array + * @param array|null $search_options search options of the injection class, computed if not given **/ - public static function getUsedMappingsOrInfos($options = []) + public static function getUsedMappingsOrInfos($options = [], ?array $search_options = null) { /** @var DBmysql $DB */ global $DB; @@ -390,32 +478,45 @@ public static function getUsedMappingsOrInfos($options = []) $mapping_or_info = $options['mapping_or_info']; } - $used = []; + //The fields used by the model are the same for all its rows: computed once per request + static $used_by_model = []; + $table = (($p['called_by'] == 'PluginDatainjectionMapping') ? "glpi_plugin_datainjection_mappings" : "glpi_plugin_datainjection_infos"); + $cache_key = implode('|', [$table, $mapping_or_info['models_id'], $p['itemtype'], $p['primary_type'], $search_options === null]); - $datas = getAllDataFromTable($table, ['models_id' => $mapping_or_info['models_id']]); + if (!isset($used_by_model[$cache_key])) { + $datas = getAllDataFromTable($table, ['models_id' => $mapping_or_info['models_id']]); - $injectionClass = PluginDatainjectionCommonInjectionLib::getInjectionClassInstance($p['itemtype']); - $options = $injectionClass->getOptions(); + if ($search_options === null) { + $injectionClass = PluginDatainjectionCommonInjectionLib::getInjectionClassInstance($p['itemtype']); + $search_options = $injectionClass->getOptions(); + } - foreach ($datas as $data) { - if ($data['value'] != self::NO_VALUE) { - foreach ($options as $option) { - if ( - isset($option['table']) - && ($option['table'] == getItemTypeForTable($data['itemtype'])) - && ($option['linkfield'] == $data['value']) - && ($option['displaytype'] != 'multiline_text') - && ($mapping_or_info['value'] != $data['value']) - ) { - $used[$option['linkfield']] = $option['linkfield']; - break; + $options = $search_options; + + $used_by_model[$cache_key] = []; + foreach ($datas as $data) { + if ($data['value'] != self::NO_VALUE) { + foreach ($options as $option) { + if ( + isset($option['table']) + && ($option['table'] == getTableForItemType($data['itemtype'])) + && ($option['linkfield'] == $data['value']) + && ($option['displaytype'] != 'multiline_text') + ) { + $used_by_model[$cache_key][$option['linkfield']] = $option['linkfield']; + break; + } } } } } - return $used; + //The field of the current row stays available + return array_filter( + $used_by_model[$cache_key], + fn($linkfield): bool => $mapping_or_info['value'] != $linkfield, + ); } } diff --git a/inc/mapping.class.php b/inc/mapping.class.php index 20dfa36e..aa62f025 100644 --- a/inc/mapping.class.php +++ b/inc/mapping.class.php @@ -114,13 +114,16 @@ public static function showFormMappings(PluginDatainjectionModel $model) foreach ($model->getMappings() as $mapping) { ob_start(); $options = ['primary_type' => $model->fields['itemtype']]; - PluginDatainjectionInjectionType::dropdownLinkedTypes($mapping, $options); + PluginDatainjectionInjectionType::dropdownLinkedTypes($mapping, $options, false); $dropdown_html = ob_get_clean(); + $fields_html = PluginDatainjectionInjectionType::getFieldsHtml($mapping, $options); $mappings[] = [ - 'id' => $mapping->getID(), - 'name' => $mapping->fields['name'], - 'dropdown_html' => $dropdown_html, + 'id' => $mapping->getID(), + 'name' => $mapping->fields['name'], + 'dropdown_html' => $dropdown_html, + 'field_html' => $fields_html['field'], + 'mandatory_html' => $fields_html['mandatory'], ]; } diff --git a/inc/model.class.php b/inc/model.class.php index d719329e..910afdcf 100644 --- a/inc/model.class.php +++ b/inc/model.class.php @@ -424,6 +424,8 @@ public static function getModels($user_id, $order = "name", $entity = -1, $all = 'itemtype', 'step', 'comment', + 'behavior_add', + 'behavior_update', ], 'FROM' => 'glpi_plugin_datainjection_models', 'WHERE' => $where, @@ -434,11 +436,45 @@ public static function getModels($user_id, $order = "name", $entity = -1, $all = ], ]; + $candidates = []; foreach ($DB->request($query) as $data) { + if (class_exists($data['itemtype'])) { + $candidates[$data['id']] = $data; + } + } + + if ($candidates === []) { + return $models; + } + + //Itemtypes of all candidate models, read once instead of once per model + $itemtypes = []; + foreach ($candidates as $models_id => $data) { + $itemtypes[$models_id] = [$data['itemtype']]; + } + + foreach (['glpi_plugin_datainjection_mappings', 'glpi_plugin_datainjection_infos'] as $table) { + $iterator = $DB->request([ + 'SELECT' => ['models_id', 'itemtype'], + 'DISTINCT' => true, + 'FROM' => $table, + 'WHERE' => ['models_id' => array_keys($candidates)], + ]); + + foreach ($iterator as $row) { + $itemtypes[$row['models_id']][] = $row['itemtype']; + } + } + + foreach ($candidates as $models_id => $data) { if ( - self::checkRightOnModel((int) $data['id']) - && class_exists($data['itemtype']) + self::checkRightOnItemtypes( + $itemtypes[$models_id], + (bool) $data['behavior_add'], + (bool) $data['behavior_update'], + ) ) { + unset($data['behavior_add'], $data['behavior_update']); $models[] = $data; } } @@ -1277,9 +1313,23 @@ public static function checkRightOnModel(int $models_id): bool } } - $check_add = (bool) ($model->fields['behavior_add'] ?? 0); - $check_update = (bool) ($model->fields['behavior_update'] ?? 0); + return self::checkRightOnItemtypes( + $itemtypes, + (bool) ($model->fields['behavior_add'] ?? 0), + (bool) ($model->fields['behavior_update'] ?? 0), + ); + } + + /** + * Check that the current user can write the itemtypes injected by a model + * + * @param array $itemtypes itemtypes of the model, its mappings and its infos + * @param bool $check_add the model adds items + * @param bool $check_update the model updates items + */ + private static function checkRightOnItemtypes(array $itemtypes, bool $check_add, bool $check_update): bool + { //A model doing nothing still requires the creation right to be listed if (!$check_add && !$check_update) { $check_add = true; diff --git a/setup.php b/setup.php index 6f323a25..f3ef3b87 100644 --- a/setup.php +++ b/setup.php @@ -52,14 +52,13 @@ function plugin_init_datainjection() $PLUGIN_HOOKS['csrf_compliant']['datainjection'] = true; $PLUGIN_HOOKS['migratetypes']['datainjection'] = 'plugin_datainjection_migratetypes_datainjection'; - $plugin = new Plugin(); - if ($plugin->isActivated("datainjection")) { - Plugin::registerClass( - 'PluginDatainjectionProfile', - ['addtabon' => ['Profile'], - ], - ); + Plugin::registerClass( + 'PluginDatainjectionProfile', + ['addtabon' => ['Profile'], + ], + ); +<<<<<<< HEAD //If directory doesn't exists, create it if (!plugin_datainjection_checkDirectories()) { @ mkdir(PLUGIN_DATAINJECTION_UPLOAD_DIR); @@ -85,7 +84,31 @@ function plugin_init_datainjection() $PLUGIN_HOOKS['add_javascript']['datainjection'] = 'js/datainjection.js'; $INJECTABLE_TYPES = []; +======= + //If directory doesn't exists, create it + if (!plugin_datainjection_checkDirectories()) { + @ mkdir(PLUGIN_DATAINJECTION_UPLOAD_DIR); +>>>>>>> 98486d9 (Fix(Perf): index models_id, check model rights in one pass and render mapping rows server-side (#716)) + } + + $PLUGIN_HOOKS["config_page"]['datainjection'] = "front/clientinjection.form.php"; + + + + if (Session::haveRight('plugin_datainjection_use', READ)) { + $PLUGIN_HOOKS["menu_toadd"]['datainjection'] = ['tools' => 'PluginDatainjectionMenu']; + } + + $PLUGIN_HOOKS['pre_item_purge']['datainjection'] + = ['Profile' => ['PluginDatainjectionProfile', 'purgeProfiles']]; + + // Css and Javascript files, only needed on the plugin pages + if (str_contains($_SERVER['REQUEST_URI'] ?? '', Plugin::getPhpDir('datainjection', false))) { + $PLUGIN_HOOKS['add_css']['datainjection'] = 'css/datainjection.css'; + $PLUGIN_HOOKS['add_javascript']['datainjection'] = 'js/datainjection.js'; } + + $INJECTABLE_TYPES = []; } diff --git a/templates/mappings_form.html.twig b/templates/mappings_form.html.twig index 13a4cf93..ffe3fac7 100644 --- a/templates/mappings_form.html.twig +++ b/templates/mappings_form.html.twig @@ -36,8 +36,29 @@ {% endif %} +<<<<<<< HEAD +======= +
+ + + + + + + + {% for mapping in mappings %} + + + + + + + {% endfor %} + + {% if canedit %} +>>>>>>> 98486d9 (Fix(Perf): index models_id, check model rights in one pass and render mapping rows server-side (#716)) diff --git a/tests/unit/InjectionTypeFieldsHtmlTest.php b/tests/unit/InjectionTypeFieldsHtmlTest.php new file mode 100644 index 00000000..2cb817b7 --- /dev/null +++ b/tests/unit/InjectionTypeFieldsHtmlTest.php @@ -0,0 +1,82 @@ +. + * ------------------------------------------------------------------------- + * @copyright Copyright (C) 2007-2023 by DataInjection plugin team. + * @license GPLv2 https://www.gnu.org/licenses/gpl-2.0.html + * @link https://github.com/pluginsGLPI/datainjection + * ------------------------------------------------------------------------- + */ + +namespace GlpiPlugin\Datainjection\Tests\Unit; + +use Computer; +use PluginDatainjectionInjectionType; +use PluginDatainjectionMapping; +use PluginDatainjectionModel; +use Session; +use Glpi\Tests\DbTestCase; + +final class InjectionTypeFieldsHtmlTest extends DbTestCase +{ + public function testEachRowKeepsItsFieldAndHidesTheOtherRowsOne(): void + { + $this->login(); + + $model = $this->createItem(PluginDatainjectionModel::class, [ + 'name' => 'Test_Model_FieldsHtml_' . random_int(1, PHP_INT_MAX), + 'itemtype' => Computer::class, + 'filetype' => 'csv', + 'behavior_add' => 1, + 'entities_id' => 0, + 'is_recursive' => 1, + 'is_private' => 0, + 'users_id' => Session::getLoginUserID(), + ]); + + $fields = ['name', 'serial']; + $mappings = []; + foreach ($fields as $rank => $field) { + $mappings[$field] = $this->createItem(PluginDatainjectionMapping::class, [ + 'models_id' => $model->getID(), + 'itemtype' => Computer::class, + 'rank' => $rank, + 'name' => $field, + 'value' => $field, + 'is_mandatory' => 0, + ]); + } + + //Rendered in the same request, as the Mappings tab does: the static caches are shared by the rows + $options = ['primary_type' => Computer::class]; + $html = []; + foreach ($mappings as $field => $mapping) { + $html[$field] = PluginDatainjectionInjectionType::getFieldsHtml($mapping, $options)['field']; + } + + foreach (['name' => 'serial', 'serial' => 'name'] as $field => $other) { + $this->assertStringContainsString(sprintf("
{{ __('Header of the file', 'datainjection') }}{{ __('Tables', 'datainjection') }}{{ _n('Field', 'Fields', 2) }}{{ __('Link field', 'datainjection') }}
{{ mapping.name }}{{ mapping.dropdown_html|raw }}{{ mapping.field_html|raw }}{{ mapping.mandatory_html|raw }}
{{ __('Header of the file', 'datainjection') }} {{ __('Tables', 'datainjection') }}