GLPI Plugins Documentation Versiune 0.1
Total Page:16
File Type:pdf, Size:1020Kb
GLPI plugins Documentation Versiune 0.1 Teclib’ aug. 04, 2021 Cuprins 1 Presentation 3 2 Empty 5 2.1 Create a new plugin...........................................5 2.2 Update existing plugin..........................................5 2.3 Features..................................................6 3 Examplu 11 4 Treeview 13 4.1 Requirements for latest version..................................... 13 4.2 Features.................................................. 13 4.3 Install the Plugin............................................. 13 4.4 Usage................................................... 14 5 Tag 15 5.1 Requirements for latest version..................................... 15 5.2 Features.................................................. 15 5.3 Install the Plugin............................................. 15 5.4 Usage................................................... 16 6 News 19 6.1 Requirements for latest version..................................... 19 6.2 Features.................................................. 19 6.3 Install the Plugin............................................. 19 6.4 Usage................................................... 20 6.5 Create alerts............................................... 20 6.6 Targets.................................................. 21 6.7 Display on login page.......................................... 21 6.8 Display on helpdesk page........................................ 22 7 SCCM 23 7.1 Requirements for latest version..................................... 23 7.2 Features.................................................. 23 7.3 Workflow................................................. 23 7.4 Schematic diagram............................................ 24 7.5 Collected data.............................................. 24 i 7.6 Automatic actions............................................ 25 8 Escalade 27 8.1 Requirements for latest version..................................... 27 8.2 Features.................................................. 27 8.3 Install the Plugin............................................. 27 8.4 Usage................................................... 28 8.5 Configuration............................................... 28 8.6 Ticket’s search engine.......................................... 31 8.7 Central page............................................... 31 9 Credit 33 9.1 Requirements for latest version..................................... 33 9.2 Features.................................................. 33 9.3 Configuration............................................... 34 9.4 Credit consumption........................................... 34 9.5 Credit report............................................... 35 10 Generic Object 37 10.1 Requirements............................................... 37 10.2 Features.................................................. 37 10.3 Example of usage............................................ 38 10.4 Install the Plugin............................................. 38 10.5 Usage................................................... 38 10.6 Add global fields............................................. 43 10.7 Setup Rights............................................... 43 10.8 Use the new field............................................. 44 10.9 Use case of Generic Object as a CMMS................................. 44 11 Order 49 11.1 Requirements............................................... 49 11.2 Features.................................................. 49 11.3 Install the Plugin............................................. 49 11.4 Configuration............................................... 50 11.5 Creation of a reference catalogue.................................... 52 11.6 Creating an order............................................. 52 11.7 Rights management........................................... 58 12 Fields 61 12.1 Requirements............................................... 61 12.2 Features.................................................. 61 12.3 Install the Plugin............................................. 62 12.4 Usage................................................... 62 12.5 Search.................................................. 65 12.6 Simplified Interface........................................... 66 12.7 Translations............................................... 66 12.8 Entities.................................................. 66 13 Uninstall 69 13.1 Requirements for latest version..................................... 69 13.2 Features.................................................. 69 13.3 Right managment............................................. 70 13.4 Uninstall feature............................................. 70 13.5 Uninstall hardware............................................ 71 13.6 Replace feature.............................................. 72 ii 13.7 Replace hardware............................................ 74 14 Form creator 77 14.1 Features.................................................. 77 14.2 Install the Plugin............................................. 78 14.3 Service catalog.............................................. 78 14.4 Forms configuration........................................... 79 14.5 Targets.................................................. 95 14.6 Exporting and importing forms..................................... 99 14.7 Contributing............................................... 102 14.8 Team................................................... 102 15 Datainjection 107 15.1 Requirements for latest version..................................... 107 15.2 Features.................................................. 107 15.3 Install the Plugin............................................. 108 15.4 Configuration............................................... 108 15.5 Create new model............................................ 108 15.6 Inject your CSV file........................................... 109 15.7 Mapping CSV column and object field................................. 109 15.8 Additional data.............................................. 110 15.9 Validate model.............................................. 111 15.10 Execute import.............................................. 111 15.11 Import result............................................... 112 16 Oauth IMAP 115 16.1 Features.................................................. 115 16.2 Install the Plugin............................................. 115 16.3 Configure your Oauth IMAP application................................ 115 16.4 Create an authorization.......................................... 116 16.5 Configure your mail receiver....................................... 117 iii iv GLPI plugins Documentation, Versiune 0.1 You’ll find here user documentation for various GLPI plugins. Cuprins 1 GLPI plugins Documentation, Versiune 0.1 2 Cuprins CAPITOLUL 1 Presentation Plugins are a way to extend GLPI possibilities without modifying core source code. In a perfect world, plugins should provided specific features; while core’s may provided features everyone (or almost!) mays find usefull. Some of the existing plugins are very complex, other are very simple. Some may require you to read their documenta- tion before using, some does not. Some may provide you configuration possibilities, acces rights management, and so on. Or not! There are so many plugins already! If you’re looking for a feature that does not exists yet in GLPI’s core, take a look at the plugins repository. You can search for a plugin name or a feature, see what core’s versions are compatible, and so on. The goal of the present documentation is to centralize documentations, but we cannot pretend all plugins documenta- tions are hosted here. Anyways, happy GLPI-ing! 3 GLPI plugins Documentation, Versiune 0.1 4 Capitolul 1. Presentation CAPITOLUL 2 Empty • Sources link: https://github.com/pluginsGLPI/empty • Download: not relevant This plugins does. nothing. Really! This is designed to be a start point for writing plugins, with very minimal defaults usefull scripts, and some advices. If you’re looking for plugins possibilities, take a look at the example plugin. 2.1 Create a new plugin An utility script to create a new plugin - plugin.sh is provided. You will call it with a plugin name, a version, an optionally the path where your want it to be created: $ ./plugin.sh MyGreatPlugin0.0.1 The script will sanityze and lowercase the name you provided, copy the templates files into the new directory, and then make some replacements. Using the script without destination parameter, it will create you directory plugin, mygreatplugin just beside its own directory. Otherwise, it would create the new directory in the specified path: $ ./plugin.sh MyGreatPlugin0.0.1 /path/to/glpi/plugins/ 2.2 Update existing plugin There is no automated way to update an existing plugin, because there would be too many cases to handle. But don’t worry, procedure is quite simple ;) Using empty features is as simple as creating a few files: • composer.json, 5 GLPI plugins Documentation, Versiune 0.1 • .travis.yml, • Robofile.php, • .gitignore. If you do not have yet any composer or travis configuration file, you can just copy the ones from empty plugin. Otherwise; in you composer.json, just add: { "minimum-stability": "dev", "prefer-stable": true } And then run composer require glpi-project/tools. In the travis configuration file, just add the CS call: script: - vendor/bin/robo --no-interaction code:cs In the .gitignore file, add the following: dist/ vendor/ .gh_token *.min.* As for