Vous êtes sur la page 1sur 2

PresentatIon pIugIn data_InjectIon

This extension works from version 0.70 of GLPI. Its purpose is to allow the import data from CSV files.
It may be used, for example, to:
import machinery delivery (good electronic delivery CSV)
import additional data
import equipment not managed by OCS
migrate from another tool fleet management
InstaIIatIon
Copy the files in the plugins folder of GLPI.
Log in GLPI
In the Configuration >> Plugins menu click File Injection
Click Install the plugin
PIghts hanagement
Access: Administration / Profiles / injection files / Assignment of Rights
For each user profile, you can grant rights 2:
Create a model: it is the author mode, which defines the behavior of the extension during the injection of a data file.
Use a model: the user mode which allows to inject a data file.
Use
Access: Plugins / Injection file
The extension is in the form wizard, each operation is divided into step and it is possible to return to the previous step to correct a choice.
Step 1: hanagement or use of a modeI
The first step allows you to choose the operation to perform, depending on your rights.
Create a new template
Modify an existing template
Delete an existing model
Use an existing template
h2.Cration models
Step 2: InformatIon on fIIe types
This step allows you to define the main options for extension:
Scope of the model: * Private: accessible only by the creator, whatever the entity * public: the model can be seen in the entity created
only (non-entity under) or the entity and all sub- entities (entities in yes)
Type of data to be inserted : this is the type of data in the file to import. A file consists only of similar information.
File type : currently only the CSV format is supported
Creating lines : Indicates the extension to create objects if the line does not match an existing item in the database
Updated lines : Indicates the extension to modify existing objects from data file
Presence of a header indicates whether the first line of the CSV file is a header line to know the contents of columns
Delimiter File : field separator (default is a semicolon)
Add headings : Indicates the extension if the headings in the file (location, type of material, patterns, ...) must be created. Creation will
also be limited by the rights of the user model.
Updating existing fields : Indicates the extension if the file data can replace fields already filled.
Try to make network connections : Specifies whether the extension should connect devices to the network when the presence of the
necessary information (location, making network) equipment
* Date format * Indicates what date format is contained in the CSV file. If the format is incorrect, the date may not be imported
* Number Format *: indicates the format used for numbers in the CSV file. If the format is incorrect, they can not be imported
* Criteria unicity of a port * Indicates what (s) attribute (s) present (s) in the CSV file used to identify a network port to update
h3.Etape 3: Select the file to upload
Selecting File : Select a file on your computer with exactly the same structure as data imported (eg place in which different levels are
separated by the> sign).
File encoding : ISO8859-1 for files Windows world, UTF-8 files created under Linux. Automatic detection to determine the encoding but
slowed the processing of the file.
Step 4: 0efIne the correIatIon between the fIeIds In the fIIe and those of the base
This step is essential. It defines, for each column in the file, what is the corresponding database field.
Columns are identified by the contents of the row header (presence defined in step 2) or by position (from 0). An error separator (defined in step
2) cause a misplacement.
Button View file allows a preview of the first lines of the file and verify their content and interpretation of the extension.
For each column, you can choose
Do not retrieve data from this column
Choose a table : the data type defined in step 2 or financial information
Choose a field : that will be powered by import
Check Field Liaison : to indicate that this column will be used to verify the existence of data in the database and choose between creating
a new object or update. Candidates fields are, for example, the serial number, the name or inventory number. It is mandatory to define at
least one link field. If a field is selected, it must necessarily be set in your csv file for import.
Note: it is possible to define "Comments" or "Notes" as a destination for several columns in the file. Each column will be added in the field on a
separate line.
This step is particularly important and a bad choice can damage the inventory data. It is therefore advisable to test the import on a test basis, or
to realize a pre-backup and book this function well trained users.
Step 5: AddItIonaI InformatIon
This step allows you to define fields that can / must be supplied by the user during the injection of a file.
For each field, the same value is used for each line of the file and will take precedence over the contents of the file.
Table : the data type defined in step 2 or financial information
Field : to be supplied by imports
Required if the user input model is mandatory or optional.
Example of use:
Date of purchase in the importation of a good delivery
Comments to define a criterion that can be used in the search engine (eg IMPORT 31/10)
Lieu : de stockage
etc.
Step 6: Check the modeI
Confirmation of registration. It is still possible to return to previous steps to verify and correct some options.
Enter the name of the model : that will be displayed in the menu in step 1.
Add a comment : that will be displayed when selecting the template in step 1.
After recording, the extension offers: Do you use the model now?
This choice allows you to save time by jumping straight to step 3 use since the file is already uploaded to the server.
CAUTION : If you work in sub-entity, select the desired entity before importing.
NOTE : Some of the fields in your CSV file must be filled Boolean. This is the case for double choice fields, including: "Ports" (series / palallle /
USB) for printers.
So instead educate Yes | No in your CSV, put 1 | 0 as appropriate. Otherwise, you will see an error in the report showing the wrong type of data
returned.
UsIng a tempIate
Step 1: ChoIce of modeI
4 choices are available:
Create a new template
Modification of an existing model
Delete an existing model
Use an existing template
Step 2: UsIng an exIstIng modeI
Select the template from the list of ready to use templates. Then click'' 'Next'''.
Then fill in the path to CSV file to inject. Specify, if known, the file encoding. Otherwise, leave it on Auto Detect.
Step 3: ConfIrmatIon before Import
Here, confirm whether you want to import data previously selected file in GLPI.
Step 4: Import the fIIe
Once the progress bar completed, click Next.
Step 5: PesuIt of the Import
Since this last step you can:
See a report including import and locate errors.
Export the report to PDF format.
Generate the imported file (please specify)

Vous aimerez peut-être aussi