├── .github
└── workflows
│ └── release.yml
├── ISSUE_TEMPLATE.md
├── LICENSE
├── README.md
├── TOKNOW.txt
├── ajax
├── dropdownitems.php
├── getDropdownFindItem.php
├── index.php
├── loadcomputerstoimport.php
├── loadcomputerstosynchronize.php
└── updatelock.php
├── css
└── ocsinventoryng.css
├── docs
├── CHANGELOG.txt
├── LISEZMOI.txt
├── README.txt
└── ROADMAP.txt
├── files
└── macManufacturers.txt
├── front
├── config.form.php
├── config.php
├── deleted_equiv.php
├── detail.php
├── index.php
├── ipdiscover.import.php
├── ipdiscover.modifynetwork.php
├── ipdiscover.php
├── logs.php
├── networkport.php
├── networkporttype.form.php
├── networkporttype.php
├── notimportedcomputer.form.php
├── notimportedcomputer.php
├── ocsalert.form.php
├── ocslink.form.php
├── ocsng.clean.php
├── ocsng.import.php
├── ocsng.link.php
├── ocsng.php
├── ocsng.sync.php
├── ocsngsnmp.import.php
├── ocsngsnmp.link.php
├── ocsngsnmp.sync.php
├── ocsserver.form.php
├── ocsserver.php
├── profile.form.php
├── snmpocslink.form.php
├── thread.form.php
└── thread.php
├── hook.php
├── inc
├── antivirus.class.php
├── bios.class.php
├── bitlockerstatus.class.php
├── config.class.php
├── customapp.class.php
├── dashboard.class.php
├── dbocs.class.php
├── detail.class.php
├── device.class.php
├── disk.class.php
├── hardware.class.php
├── index.php
├── ipdiscoverocslink.class.php
├── menu.class.php
├── ministat.class.php
├── monitor.class.php
├── networkport.class.php
├── networkporttype.class.php
├── networkshare.class.php
├── notificationstate.class.php
├── notificationtargetnotimportedcomputer.class.php
├── notificationtargetocsalert.class.php
├── notificationtargetruleimportentity.class.php
├── notimportedcomputer.class.php
├── ocsadmininfoslink.class.php
├── ocsalert.class.php
├── ocsclient.class.php
├── ocsdbclient.class.php
├── ocslink.class.php
├── ocsprocess.class.php
├── ocsserver.class.php
├── ocsserver_profile.class.php
├── ocssoapclient.class.php
├── ocssoaprequest.class.php
├── officepack.class.php
├── os.class.php
├── osinstall.class.php
├── peripheral.class.php
├── printer.class.php
├── profile.class.php
├── proxysetting.class.php
├── registrykey.class.php
├── ruleimportentity.class.php
├── runningprocess.class.php
├── server.class.php
├── service.class.php
├── snmpocslink.class.php
├── software.class.php
├── teamviewer.class.php
├── thread.class.php
├── uptime.class.php
├── virtualmachine.class.php
├── winupdate.class.php
└── winuser.class.php
├── index.php
├── install
├── index.php
└── mysql
│ ├── .htaccess
│ ├── 1.0.0-empty.sql
│ ├── 1.0.0-update.sql
│ ├── 1.0.3-empty.sql
│ ├── 1.0.4-empty.sql
│ ├── 1.1.0-empty.sql
│ ├── 1.2.2-empty.sql
│ ├── 1.2.3-empty.sql
│ ├── 1.3.0-empty.sql
│ ├── 1.3.0-update.sql
│ ├── 1.3.2-empty.sql
│ ├── 1.3.2-update.sql
│ ├── 1.3.3-empty.sql
│ ├── 1.3.3-update.sql
│ ├── 1.3.4-empty.sql
│ ├── 1.3.4-update.sql
│ ├── 1.4.0-empty.sql
│ ├── 1.4.3-empty.sql
│ ├── 1.4.3-update.sql
│ ├── 1.4.4-empty.sql
│ ├── 1.4.4-update.sql
│ ├── 1.5.0-empty.sql
│ ├── 1.5.1-empty.sql
│ ├── 1.5.2-empty.sql
│ ├── 1.5.5-empty.sql
│ ├── 1.6.0-empty.sql
│ ├── 1.6.0-update.sql
│ ├── 1.6.1-empty.sql
│ ├── 1.6.1-update.sql
│ ├── 1.7.0-empty.sql
│ ├── 1.7.1-empty.sql
│ ├── 1.7.1-update.sql
│ ├── 2.0.0-empty.sql
│ └── 2.0.0-update.sql
├── lib
├── DataTables
│ ├── Buttons-1.6.1
│ │ ├── css
│ │ │ ├── buttons.bootstrap.css
│ │ │ ├── buttons.bootstrap.min.css
│ │ │ ├── buttons.bootstrap4.css
│ │ │ ├── buttons.bootstrap4.min.css
│ │ │ ├── buttons.dataTables.css
│ │ │ ├── buttons.dataTables.min.css
│ │ │ ├── buttons.foundation.css
│ │ │ ├── buttons.foundation.min.css
│ │ │ ├── buttons.jqueryui.css
│ │ │ ├── buttons.jqueryui.min.css
│ │ │ ├── buttons.semanticui.css
│ │ │ ├── buttons.semanticui.min.css
│ │ │ ├── common.scss
│ │ │ └── mixins.scss
│ │ ├── js
│ │ │ ├── buttons.bootstrap.js
│ │ │ ├── buttons.bootstrap.min.js
│ │ │ ├── buttons.bootstrap4.js
│ │ │ ├── buttons.bootstrap4.min.js
│ │ │ ├── buttons.colVis.js
│ │ │ ├── buttons.colVis.min.js
│ │ │ ├── buttons.flash.js
│ │ │ ├── buttons.flash.min.js
│ │ │ ├── buttons.foundation.js
│ │ │ ├── buttons.foundation.min.js
│ │ │ ├── buttons.html5.js
│ │ │ ├── buttons.html5.min.js
│ │ │ ├── buttons.jqueryui.js
│ │ │ ├── buttons.jqueryui.min.js
│ │ │ ├── buttons.print.js
│ │ │ ├── buttons.print.min.js
│ │ │ ├── buttons.semanticui.js
│ │ │ ├── buttons.semanticui.min.js
│ │ │ ├── dataTables.buttons.js
│ │ │ └── dataTables.buttons.min.js
│ │ └── swf
│ │ │ └── flashExport.swf
│ ├── ColReorder-1.5.2
│ │ ├── css
│ │ │ ├── colReorder.bootstrap.css
│ │ │ ├── colReorder.bootstrap.min.css
│ │ │ ├── colReorder.bootstrap4.css
│ │ │ ├── colReorder.bootstrap4.min.css
│ │ │ ├── colReorder.dataTables.css
│ │ │ ├── colReorder.dataTables.min.css
│ │ │ ├── colReorder.foundation.css
│ │ │ ├── colReorder.foundation.min.css
│ │ │ ├── colReorder.jqueryui.css
│ │ │ ├── colReorder.jqueryui.min.css
│ │ │ ├── colReorder.semanticui.css
│ │ │ └── colReorder.semanticui.min.css
│ │ └── js
│ │ │ ├── colReorder.bootstrap.js
│ │ │ ├── colReorder.bootstrap.min.js
│ │ │ ├── colReorder.bootstrap4.js
│ │ │ ├── colReorder.bootstrap4.min.js
│ │ │ ├── colReorder.dataTables.js
│ │ │ ├── colReorder.foundation.js
│ │ │ ├── colReorder.foundation.min.js
│ │ │ ├── colReorder.jqueryui.js
│ │ │ ├── colReorder.jqueryui.min.js
│ │ │ ├── colReorder.semanicui.js
│ │ │ ├── colReorder.semanticui.js
│ │ │ ├── colReorder.semanticui.min.js
│ │ │ ├── dataTables.colReorder.js
│ │ │ └── dataTables.colReorder.min.js
│ ├── DataTables-1.10.24
│ │ ├── css
│ │ │ ├── dataTables.bootstrap.css
│ │ │ ├── dataTables.bootstrap.min.css
│ │ │ ├── dataTables.bootstrap4.css
│ │ │ ├── dataTables.bootstrap4.min.css
│ │ │ ├── dataTables.foundation.css
│ │ │ ├── dataTables.foundation.min.css
│ │ │ ├── dataTables.jqueryui.css
│ │ │ ├── dataTables.jqueryui.min.css
│ │ │ ├── dataTables.semanticui.css
│ │ │ ├── dataTables.semanticui.min.css
│ │ │ ├── jquery.dataTables.css
│ │ │ └── jquery.dataTables.min.css
│ │ ├── images
│ │ │ ├── sort_asc.png
│ │ │ ├── sort_asc_disabled.png
│ │ │ ├── sort_both.png
│ │ │ ├── sort_desc.png
│ │ │ └── sort_desc_disabled.png
│ │ └── js
│ │ │ ├── dataTables.bootstrap.js
│ │ │ ├── dataTables.bootstrap.min.js
│ │ │ ├── dataTables.bootstrap4.js
│ │ │ ├── dataTables.bootstrap4.min.js
│ │ │ ├── dataTables.foundation.js
│ │ │ ├── dataTables.foundation.min.js
│ │ │ ├── dataTables.jqueryui.js
│ │ │ ├── dataTables.jqueryui.min.js
│ │ │ ├── dataTables.semanticui.js
│ │ │ ├── dataTables.semanticui.min.js
│ │ │ ├── jquery.dataTables.js
│ │ │ └── jquery.dataTables.min.js
│ ├── JSZip-2.5.0
│ │ ├── jszip.js
│ │ └── jszip.min.js
│ ├── Responsive-2.2.3
│ │ ├── css
│ │ │ ├── responsive.bootstrap.css
│ │ │ ├── responsive.bootstrap.min.css
│ │ │ ├── responsive.bootstrap4.css
│ │ │ ├── responsive.bootstrap4.min.css
│ │ │ ├── responsive.dataTables.css
│ │ │ ├── responsive.dataTables.min.css
│ │ │ ├── responsive.foundation.css
│ │ │ ├── responsive.foundation.min.css
│ │ │ ├── responsive.jqueryui.css
│ │ │ ├── responsive.jqueryui.min.css
│ │ │ ├── responsive.semanticui.css
│ │ │ └── responsive.semanticui.min.css
│ │ └── js
│ │ │ ├── dataTables.responsive.js
│ │ │ ├── dataTables.responsive.min.js
│ │ │ ├── responsive.bootstrap.js
│ │ │ ├── responsive.bootstrap.min.js
│ │ │ ├── responsive.bootstrap4.js
│ │ │ ├── responsive.bootstrap4.min.js
│ │ │ ├── responsive.foundation.js
│ │ │ ├── responsive.foundation.min.js
│ │ │ ├── responsive.jqueryui.js
│ │ │ ├── responsive.jqueryui.min.js
│ │ │ ├── responsive.semanticui.js
│ │ │ └── responsive.semanticui.min.js
│ ├── Select-1.3.1
│ │ ├── css
│ │ │ ├── select.bootstrap.css
│ │ │ ├── select.bootstrap.min.css
│ │ │ ├── select.bootstrap4.css
│ │ │ ├── select.bootstrap4.min.css
│ │ │ ├── select.dataTables.css
│ │ │ ├── select.dataTables.min.css
│ │ │ ├── select.foundation.css
│ │ │ ├── select.foundation.min.css
│ │ │ ├── select.jqueryui.css
│ │ │ ├── select.jqueryui.min.css
│ │ │ ├── select.semanticui.css
│ │ │ └── select.semanticui.min.css
│ │ └── js
│ │ │ ├── dataTables.select.js
│ │ │ ├── dataTables.select.min.js
│ │ │ ├── select.bootstrap.js
│ │ │ ├── select.bootstrap.min.js
│ │ │ ├── select.bootstrap4.js
│ │ │ ├── select.bootstrap4.min.js
│ │ │ ├── select.dataTables.js
│ │ │ ├── select.foundation.js
│ │ │ ├── select.foundation.min.js
│ │ │ ├── select.jqueryui.js
│ │ │ ├── select.jqueryui.min.js
│ │ │ ├── select.semanticui.js
│ │ │ └── select.semanticui.min.js
│ ├── datatables.css
│ ├── datatables.js
│ ├── datatables.min.css
│ ├── datatables.min.js
│ └── pdfmake-0.1.36
│ │ ├── pdfmake.js
│ │ ├── pdfmake.min.js
│ │ └── vfs_fonts.js
└── jquery-ui
│ ├── images
│ ├── ui-icons_444444_256x240.png
│ ├── ui-icons_555555_256x240.png
│ ├── ui-icons_777620_256x240.png
│ ├── ui-icons_777777_256x240.png
│ ├── ui-icons_cc0000_256x240.png
│ └── ui-icons_ffffff_256x240.png
│ ├── jquery-ui.min.css
│ └── jquery-ui.min.js
├── locales
├── ar_SA.mo
├── ar_SA.po
├── bg_BG.mo
├── bg_BG.po
├── ca_ES.mo
├── ca_ES.po
├── cs_CZ.mo
├── cs_CZ.po
├── da_DK.mo
├── da_DK.po
├── de_DE.mo
├── de_DE.po
├── el_GR.mo
├── el_GR.po
├── en_GB.mo
├── en_GB.po
├── en_US.mo
├── en_US.po
├── es_ES.mo
├── es_ES.po
├── es_VE.mo
├── es_VE.po
├── et_EE.mo
├── et_EE.po
├── fa_IR.mo
├── fa_IR.po
├── fr_FR.mo
├── fr_FR.po
├── gl_ES.mo
├── gl_ES.po
├── glpi.pot
├── he_IL.mo
├── he_IL.po
├── hr_HR.mo
├── hr_HR.po
├── hu_HU.mo
├── hu_HU.po
├── it_IT.mo
├── it_IT.po
├── ja_JP.mo
├── ja_JP.po
├── lt_LT.mo
├── lt_LT.po
├── nl_NL.mo
├── nl_NL.po
├── nn_NO.mo
├── nn_NO.po
├── pl_PL.mo
├── pl_PL.po
├── pt_BR.mo
├── pt_BR.po
├── pt_PT.mo
├── pt_PT.po
├── ro_RO.mo
├── ro_RO.po
├── ru_RU.mo
├── ru_RU.po
├── sk_SK.mo
├── sk_SK.po
├── sr_RS.mo
├── sr_RS.po
├── tr_TR.mo
├── tr_TR.po
├── uk_UA.mo
├── uk_UA.po
├── zh_CN.mo
└── zh_CN.po
├── ocsinventoryng.png
├── ocsinventoryng.xml
├── pics
└── ocsinventoryng.png
├── scripts
├── .htaccess
├── checkocslinks.php
├── glpienv.php
├── ocsng_fullsync.php
├── ocsng_fullsync.sh
├── ocsng_snmpfullsync.php
├── ocsng_snmpfullsync.sh
├── ocsrollback.php
├── run.bat
├── run.php
├── runsnmp.bat
└── runsnmp.php
├── setup.php
├── test
├── ocsclientTest.php
├── ocsdbclientTest.php
├── ocssoapclientTest.php
├── test.php
└── testsync.php
├── tools
├── .htaccess
├── extract_template.sh
├── ocs_update.php
├── update_mo.pl
└── update_po.pl
└── wiki
├── infos.png
├── menu.png
├── newserver.png
├── options.png
├── profil.png
├── ruleentity.png
├── rulelink.png
└── rules.png
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 |
2 | on:
3 | push:
4 | # Sequence of patterns matched against refs/tags
5 | tags:
6 | - '*.*.*' # Push events to matching ex:20.15.10
7 | permissions:
8 | contents: write
9 | name: Create release with tag
10 | env:
11 | TAG_VALUE: ${GITHUB_REF/refs\/tags\//}
12 | jobs:
13 | build:
14 | name: Upload Release Asset
15 | runs-on: ubuntu-latest
16 | steps:
17 | - name: Checkout code
18 | uses: actions/checkout@v4
19 | - name: Setup PHP
20 | uses: shivammathur/setup-php@v2
21 | with:
22 | php-version: 7.4
23 | - name: Build project # This would actually build your project, using zip for an example artifact
24 | id: build_
25 | env:
26 | GITHUB_NAME: ${{ github.event.repository.name }}
27 |
28 |
29 | run: php -v ;sudo apt-get install libxml-xpath-perl; sudo apt-get install composer;echo $(xpath -e '/root/versions/version[num="'${GITHUB_REF/refs\/tags\//}'"]/compatibility/text()' $GITHUB_NAME.xml);echo ::set-output name=version_glpi::$(xpath -e '/root/versions/version[num="'${GITHUB_REF/refs\/tags\//}'"]/compatibility/text()' $GITHUB_NAME.xml); [[ -f composer.json ]] && composer install --no-dev; rm -rf $GITHUB_NAME.xml tools wiki screenshots test .git .github ISSUE_TEMPLATE.md TODO.txt $GITHUB_NAME.png;cd ..; tar -jcvf glpi-$GITHUB_NAME-${GITHUB_REF/refs\/tags\//}.tar.bz2 $GITHUB_NAME;ls -al;echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//};echo ${{ steps.getxml.outputs.info }};
30 | # run: rm -rf $GITHUB_NAME.xml tools wiki screenshots test ISSUE_TEMPLATE.md TODO.txt $GITHUB_NAME.png; tar -zcvf glpi-$GITHUB_NAME-$GITHUB_TAG.tar.bz2 $GITHUB_NAME
31 | - name: Create Release
32 | id: create_release
33 | uses: actions/create-release@v1
34 | env:
35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 | with:
37 | tag_name: ${{ github.ref }}
38 | release_name: |
39 | GLPI ${{ steps.build_.outputs.version_glpi }} : Version ${{ github.ref }} disponible / available
40 | body : Version ${{ steps.build_.outputs.tag }} released for GLPI ${{ steps.build_.outputs.version_glpi }}
41 | draft: false
42 | prerelease: true
43 | - name: Upload Release Asset
44 | id: upload-release-asset
45 | uses: actions/upload-release-asset@v1
46 | env:
47 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 | GITHUB_NAME: ${{ github.event.repository.name }}
49 | with:
50 | upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
51 | asset_path: /home/runner/work/${{ github.event.repository.name }}/glpi-${{ github.event.repository.name }}-${{ steps.build_.outputs.tag }}.tar.bz2
52 | asset_name: glpi-${{ github.event.repository.name }}-${{ steps.build_.outputs.tag }}.tar.bz2
53 | asset_content_type: application/zip
54 |
55 |
--------------------------------------------------------------------------------
/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | Dear GLPi user.
2 |
3 | For bug reports, you can open an issue here, provide us :
4 | - The version of the plugin.
5 | - The version of your GLPI.
6 | - The steps to reproduce your issue.
7 |
8 | Delete this text to submit your issue.
9 |
10 | The Plugin team.
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Plugin ocsinventoryng for GLPI
2 | 
3 |
4 | 
5 |
6 | * Français
7 |
8 | Ce plugin permet de synchroniser GLPI avec la solution d'inventaire OCS Inventory NG (http://www.ocsinventory-ng.org/fr/).
9 |
10 | Il remplace le mode OCS natif de GLPI (en version 0.84) et d'apporter les fonctionnalités du plugin massocsimport afin d'offrir une meilleure compatibilité et évolutivité avec OCS Inventory.
11 |
12 | Automatisation de l'import OCSInventory-NG
13 | Il est composée d'un script (PHP ou Shell) permettant d'automatiser l'import et la mise à jour des machines.
14 | Une interface affiche la liste des scripts en cours ou terminés, ainsi que l'ensemble des données qui s'y rattachent.
15 |
16 | WIKI : https://github.com/pluginsGLPI/ocsinventoryng/wiki
17 |
18 | Archives (releases) : https://forge.glpi-project.org/projects/ocsinventoryng/files
19 |
20 | Ce plugin est sur Transifex - Aidez-nous à le traduire : https://www.transifex.com/yllen/GLPI_ocsinventoryng/dashboard/
21 |
22 | * English
23 |
24 | This plugin allows you to synchronize with GLPI inventory solution OCS Inventory NG (http://www.ocsinventory-ng.org/fr/).
25 |
26 | It replace native mode OCS of GLPI (0.84 version) and use the plugin massocsimport functionalities to provide better compatibility and expandability with OCS.
27 |
28 | OCSInventory-NG import automation
29 | It's composed of a script (PHP or Shell) to automate import or synchronisation of computers.
30 | A graphical interface displays the list of scripts running or finished and all the datas related ot them.
31 |
32 | WIKI : https://github.com/pluginsGLPI/ocsinventoryng/wiki
33 |
34 | Archives (releases) : https://forge.glpi-project.org/projects/ocsinventoryng/files
35 |
36 | This plugin is on Transifex - Help us to translate : https://www.transifex.com/yllen/GLPI_ocsinventoryng/dashboard/
37 |
--------------------------------------------------------------------------------
/TOKNOW.txt:
--------------------------------------------------------------------------------
1 | La tache automatique ocsng ne se lance que si le serveur n'est pas en mode expert
2 | La tache automatique ocsng ne fait que synchroniser des pcs existants - Pas d'import de nouvelles machines
--------------------------------------------------------------------------------
/ajax/dropdownitems.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 | header("Content-Type: text/html; charset=UTF-8");
32 | Html::header_nocache();
33 |
34 | Session::checkLoginUser();
35 |
36 | global $CFG_GLPI;
37 |
38 | // Make a select box
39 | if (isset($_POST["itemtype"])
40 | ) {
41 | $dbu = new DbUtils();
42 | $table = $dbu->getTableForItemType($_POST["itemtype"]);
43 |
44 | $rand = mt_rand();
45 | if (isset($_POST["rand"])) {
46 | $rand = $_POST["rand"];
47 | }
48 | echo Html::hidden("tolink_itemtype[". $_POST["id"] ."]", ['value' => $_POST["itemtype"]]);
49 | echo "
";
50 | $field_id = Html::cleanId("dropdown_" . $_POST['myname'] . $rand);
51 | $p = ['itemtype' => $_POST["itemtype"],
52 | //'entity_restrict' => $_POST['entity_restrict'],
53 | 'table' => $table,
54 | //'multiple' => $_POST["multiple"],
55 | 'myname' => $_POST["myname"],
56 | 'rand' => $_POST["rand"]];
57 |
58 | if (isset($_POST["used"]) && !empty($_POST["used"])) {
59 | if (isset($_POST["used"][$_POST["itemtype"]])) {
60 | $p["used"] = $_POST["used"][$_POST["itemtype"]];
61 | }
62 | }
63 |
64 | echo Html::jsAjaxDropdown($_POST['myname'], $field_id,
65 | PLUGIN_OCS_WEBDIR . "/ajax/getDropdownFindItem.php",
66 | $p);
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/ajax/index.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
--------------------------------------------------------------------------------
/ajax/updatelock.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkLoginUser();
33 | if (isset($_POST['update_lock'])) {
34 |
35 | $plugin_ocsinventoryng_ocsservers_id = $_POST['plugin_ocsinventoryng_ocsservers_id'];
36 | $computers_id = $_POST['computers_id'];
37 | $ocsid = $_POST['ocsid'];
38 | $field = $_POST['field'];
39 |
40 | PluginOcsinventoryngOcslink::updateLock($plugin_ocsinventoryng_ocsservers_id, $computers_id, $ocsid, $field);
41 | }
42 |
--------------------------------------------------------------------------------
/docs/CHANGELOG.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
3 | -------------------------------------------------------------------------
4 | ocsinventoryng plugin for GLPI
5 | Copyright (C) 2015-2022 by the ocsinventoryng Development Team.
6 |
7 | https://github.com/pluginsGLPI/ocsinventoryng
8 | -------------------------------------------------------------------------
9 |
10 | LICENSE
11 |
12 | This file is part of ocsinventoryng.
13 |
14 | ocsinventoryng is free software; you can redistribute it and/or modify
15 | it under the terms of the GNU General Public License as published by
16 | the Free Software Foundation; either version 2 of the License, or
17 | (at your option) any later version.
18 |
19 | ocsinventoryng is distributed in the hope that it will be useful,
20 | but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | GNU General Public License for more details.
23 |
24 | You should have received a copy of the GNU General Public License
25 | along with ocsinventoryng. If not, see .
26 | --------------------------------------------------------------------------
27 | */
28 |
29 | // ----------------------------------------------------------------------
30 | // Original Author of file: Walid Nouh
31 | // Purpose of file: CHANGELOG
32 | // ----------------------------------------------------------------------
33 |
34 | See https://github.com/pluginsGLPI/ocsinventoryng/milestones
35 |
36 |
--------------------------------------------------------------------------------
/docs/LISEZMOI.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
3 | -------------------------------------------------------------------------
4 | ocsinventoryng plugin for GLPI
5 | Copyright (C) 2015-2022 by the ocsinventoryng Development Team.
6 |
7 | https://github.com/pluginsGLPI/ocsinventoryng
8 | -------------------------------------------------------------------------
9 |
10 | LICENSE
11 |
12 | This file is part of ocsinventoryng.
13 |
14 | ocsinventoryng is free software; you can redistribute it and/or modify
15 | it under the terms of the GNU General Public License as published by
16 | the Free Software Foundation; either version 2 of the License, or
17 | (at your option) any later version.
18 |
19 | ocsinventoryng is distributed in the hope that it will be useful,
20 | but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | GNU General Public License for more details.
23 |
24 | You should have received a copy of the GNU General Public License
25 | along with ocsinventoryng. If not, see .
26 | --------------------------------------------------------------------------
27 | */
28 |
29 | // ----------------------------------------------------------------------
30 | // Original Author of file: Remi COLLET
31 | // Purpose of file: LISEZMOI (for english, see README)
32 | // ----------------------------------------------------------------------
33 |
34 | Authors : Walid NOUH & Remi COLLET
35 |
36 | Ce plugin fait la synchronisation entre OCS et GLPI.
37 |
38 | Howto : https://github.com/pluginsGLPI/ocsinventoryng/wiki
39 |
--------------------------------------------------------------------------------
/docs/README.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
3 | -------------------------------------------------------------------------
4 | ocsinventoryng plugin for GLPI
5 | Copyright (C) 2015-2022 by the ocsinventoryng Development Team.
6 |
7 | https://github.com/pluginsGLPI/ocsinventoryng
8 | -------------------------------------------------------------------------
9 |
10 | LICENSE
11 |
12 | This file is part of ocsinventoryng.
13 |
14 | ocsinventoryng is free software; you can redistribute it and/or modify
15 | it under the terms of the GNU General Public License as published by
16 | the Free Software Foundation; either version 2 of the License, or
17 | (at your option) any later version.
18 |
19 | ocsinventoryng is distributed in the hope that it will be useful,
20 | but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | GNU General Public License for more details.
23 |
24 | You should have received a copy of the GNU General Public License
25 | along with ocsinventoryng. If not, see .
26 | --------------------------------------------------------------------------
27 | */
28 |
29 | // ----------------------------------------------------------------------
30 | // Original Author of file: Remi COLLET
31 | // Purpose of file: README (pour le français, voir LISEZMOI)
32 | // ----------------------------------------------------------------------
33 |
34 | Authors : Walid NOUH & Remi COLLET
35 |
36 | This plugin perform synchronisation between OCS and GLPI
37 |
38 | Howto : https://github.com/pluginsGLPI/ocsinventoryng/wiki
39 |
--------------------------------------------------------------------------------
/docs/ROADMAP.txt:
--------------------------------------------------------------------------------
1 | /*
2 | * @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
3 | -------------------------------------------------------------------------
4 | ocsinventoryng plugin for GLPI
5 | Copyright (C) 2015-2022 by the ocsinventoryng Development Team.
6 |
7 | https://github.com/pluginsGLPI/ocsinventoryng
8 | -------------------------------------------------------------------------
9 |
10 | LICENSE
11 |
12 | This file is part of ocsinventoryng.
13 |
14 | ocsinventoryng is free software; you can redistribute it and/or modify
15 | it under the terms of the GNU General Public License as published by
16 | the Free Software Foundation; either version 2 of the License, or
17 | (at your option) any later version.
18 |
19 | ocsinventoryng is distributed in the hope that it will be useful,
20 | but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | GNU General Public License for more details.
23 |
24 | You should have received a copy of the GNU General Public License
25 | along with ocsinventoryng. If not, see .
26 | --------------------------------------------------------------------------
27 | */
28 |
29 | // ----------------------------------------------------------------------
30 | // Original Author of file: Remi COLLET
31 | // Purpose of file: ROADMAP
32 | // ----------------------------------------------------------------------
33 |
34 | See https://github.com/pluginsGLPI/ocsinventoryng/issues
35 |
--------------------------------------------------------------------------------
/front/config.form.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight("plugin_ocsinventoryng", UPDATE);
33 |
34 | if (Plugin::isPluginActive("ocsinventoryng")) {
35 | $config = new PluginOcsinventoryngConfig();
36 |
37 | global $CFG_GLPI;
38 |
39 | if (isset($_POST["update"])) {
40 | $config->update($_POST);
41 | Html::back();
42 | }
43 | if (isset($_POST["soft_lock"])) {
44 | $config->setScriptLock();
45 | }
46 | if (isset($_POST["soft_unlock"])) {
47 | $config->removeScriptLock();
48 | }
49 |
50 | Html::header(__("Automatic synchronization's configuration", 'ocsinventoryng'), '', "tools", "pluginocsinventoryngmenu", "config");
51 |
52 | $config->display(['id' => 1]);
53 | } else {
54 | Html::header(__('Setup'), '', "tools", "pluginocsinventoryngmenu", "config");
55 | echo "
";
56 | echo "" . __('Please activate the plugin', 'ocsinventoryng') . "
";
57 | }
58 |
59 | Html::footer();
60 |
--------------------------------------------------------------------------------
/front/config.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | global $CFG_GLPI;
33 |
34 | if (Plugin::isPluginActive("ocsinventoryng")
35 | && Session::haveRight("plugin_ocsinventoryng", UPDATE)) {
36 |
37 | Html::header('OCSInventory NG', '', "tools", "pluginocsinventoryngmenu", "ocsinventoryng");
38 |
39 | // choose config server or config synchro
40 | PluginOcsinventoryngConfig::showMenu();
41 |
42 | } else {
43 | Html::header(__('Setup'), '', "tools", "pluginocsinventoryngmenu", "config");
44 | echo "";
45 | echo "" . __('Please activate the plugin', 'ocsinventoryng') . "
";
46 | }
47 |
48 | Html::footer();
49 |
--------------------------------------------------------------------------------
/front/detail.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight("plugin_ocsinventoryng_import", READ);
33 |
34 | Html::header(__('Computers imported by automatic actions', 'ocsinventoryng'), '', "tools", "pluginocsinventoryngmenu", "detail");
35 |
36 | Search::show('PluginOcsinventoryngDetail');
37 |
38 | Html::footer();
39 |
--------------------------------------------------------------------------------
/front/index.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
--------------------------------------------------------------------------------
/front/ipdiscover.modifynetwork.php:
--------------------------------------------------------------------------------
1 | .
28 | --------------------------------------------------------------------------
29 | */
30 |
31 | include('../../../inc/includes.php');
32 |
33 | Session::checkRight("plugin_ocsinventoryng", UPDATE);
34 |
35 | Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "modifysubnet");
36 |
37 | $ip = new PluginOcsinventoryngIpdiscoverOcslink();
38 |
39 | if (isset($_GET["ip"])) {
40 | $_POST["ip"] = $_GET["ip"];
41 | }
42 | if (isset($_POST["ip"])) {
43 |
44 | $ipAdress = $_POST["ip"];
45 | $values = [];
46 | if (isset($_POST["subnetName"]) && isset($_POST["subnetChoice"]) && isset($_POST["SubnetMask"])) {
47 | $values = ["subnetName" => $_POST["subnetName"], "subnetChoice" => $_POST["subnetChoice"], "subnetMask" => $_POST["SubnetMask"]];
48 | }
49 | $ip->modifyNetworkForm($ipAdress, $values);
50 | }
51 |
52 | Html::footer();
53 |
--------------------------------------------------------------------------------
/front/ipdiscover.php:
--------------------------------------------------------------------------------
1 | .
28 | --------------------------------------------------------------------------
29 | */
30 |
31 | include('../../../inc/includes.php');
32 |
33 | Session::checkRight("plugin_ocsinventoryng", READ);
34 |
35 | Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "importipdiscover");
36 |
37 | $ip = new PluginOcsinventoryngIpdiscoverOcslink();
38 | if (empty($_POST)) {
39 | $_POST = $_GET;
40 | }
41 | if (!isset($_GET['action'])) {
42 | $_GET['action'] = "import";
43 | }
44 |
45 | if (isset($_GET['subnetsChoice'])) {
46 | $_POST["subnetsChoice"] = $_GET['subnetsChoice'];
47 | }
48 |
49 | if (isset($_POST["subnetsChoice"])
50 | && isset($_SESSION["subnets"])
51 | || isset($_SESSION["subnets"])
52 | ) {
53 | $sN = "";
54 | $networksDetail = [];
55 | $ocsServerId = $_SESSION["plugin_ocsinventoryng_ocsservers_id"];
56 | $tab = $_SESSION["subnets"];
57 | $subnets = $ip->getSubnets($ocsServerId);
58 |
59 | if (isset($_POST["subnetsChoice"])) {
60 | $sN = $_POST["subnetsChoice"];
61 | $knownMacAdresses = $ip->getKnownMacAdresseFromGlpi();
62 | $networksDetail["subnets"] = $ip->showSubnets($ocsServerId, $subnets, $knownMacAdresses, $sN);
63 | $networksDetail["subnetsChoice"] = $_POST["subnetsChoice"];
64 |
65 | } else {
66 | $sN = "";
67 | if (isset($_GET["ident"])) {
68 | $sN = $_GET["ident"];
69 |
70 | } else if (isset($_GET["nonident"])) {
71 | $sN = $_GET["nonident"];
72 | }
73 | $knownMacAdresses = $ip->getKnownMacAdresseFromGlpi();
74 | $networksDetail["subnets"] = $ip->showSubnets($ocsServerId, $subnets, $knownMacAdresses, $sN);
75 | $networksDetail["subnetsChoice"] = $sN;
76 | }
77 | $lim = count($networksDetail["subnets"]);
78 | $start = isset($_POST['start']) ? $_POST['start'] : 0;
79 | PluginOcsinventoryngIpdiscoverOcslink::showSubnetSearchForm($_GET["action"]);
80 | if ($lim > $_SESSION["glpilist_limit"]) {
81 | $ip->showSubnetsDetails($networksDetail, $_SESSION["glpilist_limit"], $start, $_GET["action"]);
82 | } else {
83 | $ip->showSubnetsDetails($networksDetail, $lim, $start, $_GET["action"]);
84 | }
85 | }
86 |
87 | Html::footer();
88 |
--------------------------------------------------------------------------------
/front/logs.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight("plugin_ocsinventoryng", UPDATE);
33 |
34 | Html::header(_n('Log', 'Logs', 2), '', "tools", "pluginocsinventoryngmenu", "ocsinventoryng");
35 |
36 | $thread = new PluginOcsinventoryngThread();
37 | $thread->showErrorLog();
38 |
39 | Html::footer();
40 |
--------------------------------------------------------------------------------
/front/networkport.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight('networking', READ);
33 |
34 | Html::header(_n('Unknown imported network port type', 'Unknown imported network ports types', 2, 'ocsinventoryng'), '', "tools", "pluginocsinventoryngmenu", 'networkport');
35 |
36 | PluginOcsinventoryngNetworkPort::displayInvalidList();
37 |
38 | Html::footer();
39 |
--------------------------------------------------------------------------------
/front/networkporttype.form.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | $dropdown = new PluginOcsinventoryngNetworkPortType();
33 | include(GLPI_ROOT . "/front/dropdown.common.form.php");
34 |
--------------------------------------------------------------------------------
/front/networkporttype.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | $dropdown = new PluginOcsinventoryngNetworkPortType();
33 | include(GLPI_ROOT . "/front/dropdown.common.php");
34 |
--------------------------------------------------------------------------------
/front/notimportedcomputer.form.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | $dropdown = new PluginOcsinventoryngNotimportedcomputer();
33 |
34 | if (isset($_POST['action'])) {
35 | switch ($_POST['action']) {
36 | case 'plugin_ocsinventoryng_import' :
37 | $_POST['force'] = true;
38 |
39 | case 'plugin_ocsinventoryng_replayrules' :
40 | if (PluginOcsinventoryngNotimportedcomputer::computerImport($_POST)) {
41 | $dropdown->redirectToList();
42 | } else {
43 | Html::redirect(Html::getItemTypeFormURL('PluginOcsinventoryngNotimportedcomputer') .
44 | '?id=' . $_POST['id']);
45 | }
46 | break;
47 |
48 | case 'plugin_ocsinventoryng_link' :
49 | $dropdown->linkComputer($_POST);
50 | $dropdown->redirectToList();
51 | break;
52 | }
53 | }
54 |
55 | include(GLPI_ROOT . "/front/dropdown.common.form.php");
56 |
--------------------------------------------------------------------------------
/front/notimportedcomputer.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight("plugin_ocsinventoryng", UPDATE);
33 |
34 | Html::header(__('Computers not imported by automatic actions', 'ocsinventoryng'), '', "tools", "pluginocsinventoryngmenu", "notimported");
35 |
36 | Search::show('PluginOcsinventoryngNotimportedcomputer');
37 |
38 | Html::footer();
39 |
--------------------------------------------------------------------------------
/front/ocsalert.form.php:
--------------------------------------------------------------------------------
1 | .
26 | --------------------------------------------------------------------------
27 | */
28 |
29 | include('../../../inc/includes.php');
30 |
31 | if (Plugin::isPluginActive("ocsinventoryng")) {
32 | $state = new PluginOcsinventoryngNotificationState();
33 | $ocsalert = new PluginOcsinventoryngOcsAlert();
34 |
35 | if (isset($_POST["add"])) {
36 |
37 | if ($ocsalert->canUpdate()) {
38 | $newID = $ocsalert->add($_POST);
39 | }
40 | Html::back();
41 |
42 | } else if (isset($_POST["update"])) {
43 |
44 | if ($ocsalert->canUpdate()) {
45 | $ocsalert->update($_POST);
46 | }
47 | Html::back();
48 |
49 | } else if (isset($_POST["add_state"])) {
50 |
51 | if ($ocsalert->canUpdate()) {
52 | $newID = $state->add($_POST);
53 | }
54 | Html::back();
55 |
56 | } else if (isset($_POST["delete_state"])) {
57 |
58 | if ($ocsalert->canUpdate()) {
59 | $state->getFromDB($_POST["id"]);
60 | foreach ($_POST["item"] as $key => $val) {
61 | if ($val == 1) {
62 | $state->delete(['id' => $key]);
63 | }
64 | }
65 | }
66 | Html::back();
67 |
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/front/ocslink.form.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight("computer", READ);
33 |
34 | if (isset($_POST["launch_ocs_resynch"])) {
35 | $computer = new Computer();
36 | $computer->check($_POST['id'], UPDATE);
37 |
38 | //Get the ocs server id associated with the machine
39 | $ocsservers_id = PluginOcsinventoryngOcsServer::getServerByComputerID($_POST["id"]);
40 | //Update the computer
41 | $cfg_ocs = PluginOcsinventoryngOcsServer::getConfig($ocsservers_id);
42 | $sync_params = ['ID' => $_POST["resynch_id"],
43 | 'plugin_ocsinventoryng_ocsservers_id' => $ocsservers_id,
44 | 'cfg_ocs' => $cfg_ocs,
45 | 'force' => 0];
46 | PluginOcsinventoryngOcsProcess::synchronizeComputer($sync_params);
47 | Html::back();
48 | } else if (isset($_POST["force_ocs_resynch"])) {
49 | $computer = new Computer();
50 | $computer->check($_POST['id'], UPDATE);
51 |
52 | //Get the ocs server id associated with the machine
53 | $ocsservers_id = PluginOcsinventoryngOcsServer::getServerByComputerID($_POST["id"]);
54 | //Update the computer
55 | $cfg_ocs = PluginOcsinventoryngOcsServer::getConfig($ocsservers_id);
56 | $sync_params = ['ID' => $_POST["resynch_id"],
57 | 'plugin_ocsinventoryng_ocsservers_id' => $ocsservers_id,
58 | 'cfg_ocs' => $cfg_ocs,
59 | 'force' => 1];
60 | PluginOcsinventoryngOcsProcess::synchronizeComputer($sync_params);
61 | Html::back();
62 | } else if (isset ($_POST["update"])) {
63 | $link = new PluginOcsinventoryngOcslink();
64 | $values["id"] = $_POST["link_id"];
65 | $values["use_auto_update"] = $_POST["use_auto_update"];
66 | $link->update($values);
67 | Html::back();
68 |
69 | } else if (isset ($_POST["delete_link"])) {
70 | $comp = new Computer();
71 | $link = new PluginOcsinventoryngOcslink();
72 | if ($comp->getFromDB($_POST["items_id"])) {
73 | $link->purgeComputer($comp);
74 | Html::back();
75 | }
76 | } else {
77 | Html::displayErrorAndDie("lost");
78 | }
79 |
--------------------------------------------------------------------------------
/front/ocsng.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkSeveralRightsOr(["plugin_ocsinventoryng" => READ,
33 | "plugin_ocsinventoryng_clean" => READ]);
34 |
35 | Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "ocsinventoryng");
36 |
37 | if (isset ($_SESSION["ocs_import"])) {
38 | unset ($_SESSION["ocs_import"]);
39 | }
40 | if (isset ($_SESSION["ocs_link"])) {
41 | unset ($_SESSION["ocs_link"]);
42 | }
43 | if (isset ($_SESSION["ocs_update"])) {
44 | unset ($_SESSION["ocs_update"]);
45 | }
46 | // when open the menu, no $_POST
47 | if (isset($_POST["plugin_ocsinventoryng_ocsservers_id"])) {
48 | $_SESSION["plugin_ocsinventoryng_ocsservers_id"] = $_POST["plugin_ocsinventoryng_ocsservers_id"];
49 | } else {
50 | $_SESSION["plugin_ocsinventoryng_ocsservers_id"] = PluginOcsinventoryngOcsServer::getFirstServer();
51 | }
52 |
53 | //PluginOcsinventoryngOcsServer::newOcsMenu($_SESSION["plugin_ocsinventoryng_ocsservers_id"]);
54 | echo "";
55 | $menu = new PluginOcsinventoryngMenu();
56 | $menu->display();
57 | //load mac constructors in sessionMemory
58 | $_SESSION["OCS"]["count"] = 0;
59 | if (!isset($_SESSION["OCS"]["IpdiscoverMacConstructors"])) {
60 | $ip = new PluginOcsinventoryngIpdiscoverOcslink();
61 | $ip->loadMacConstructor();
62 | $_SESSION["OCS"]["count"] = $_SESSION["OCS"]["count"] + 1;
63 | }
64 | //PluginOcsinventoryngOcsServer::ocsMenu($_SESSION["plugin_ocsinventoryng_ocsservers_id"]);
65 |
66 | Html::footer();
67 |
--------------------------------------------------------------------------------
/front/ocsserver.form.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight("plugin_ocsinventoryng", READ);
33 |
34 | $ocs = new PluginOcsinventoryngOcsServer();
35 |
36 | if (!isset($_GET["id"]) || $_GET["id"] == -1) {
37 | $_GET["id"] = "";
38 | }
39 |
40 | Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "ocsserver");
41 |
42 | //Delete template or server
43 | if (isset ($_POST["purge"])) {
44 | $ocs->check($_POST['id'], PURGE);
45 | $ocs->delete($_POST);
46 | $ocs->redirectToList();
47 |
48 | //Update server
49 | } else if (isset ($_POST["update"])
50 | || isset ($_POST["updateSNMP"])
51 | ) {
52 | $ocs->check($_POST['id'], UPDATE);
53 | $ocs->update($_POST);
54 | Html::back();
55 |
56 | //Add new server
57 | } else if (isset ($_POST["add"])) {
58 | $ocs->check(-1, CREATE, $_POST);
59 | $newID = $ocs->add($_POST);
60 | if ($_SESSION['glpibackcreated']) {
61 | Html::redirect($ocs->getFormURL() . "?id=" . $newID);
62 | }
63 | Html::back();
64 |
65 | //Other
66 | } else if (isset ($_POST["force_checksum"])) {
67 | $ocs->check($_POST['id'], UPDATE);
68 | $_POST['checksum'] = 0;
69 | $ocs->update($_POST);
70 | Html::back();
71 |
72 | } else {
73 | $ocs->display($_GET);
74 | }
75 | Html::footer();
76 |
--------------------------------------------------------------------------------
/front/ocsserver.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight("plugin_ocsinventoryng", READ);
33 |
34 | Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "ocsserver");
35 |
36 | Search::show('PluginOcsinventoryngOcsServer');
37 |
38 | Html::footer();
39 |
--------------------------------------------------------------------------------
/front/profile.form.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight("profile", READ);
33 |
34 | $profservers = new PluginOcsinventoryngOcsserver_Profile();
35 | $prof = new PluginOcsinventoryngProfile();
36 |
37 | if (isset($_POST["addocsserver"]) && ($_POST['plugin_ocsinventoryng_ocsservers_id'] > 0)) {
38 | $input['profiles_id'] = $_POST['profile'];
39 | $input['plugin_ocsinventoryng_ocsservers_id'] = $_POST['plugin_ocsinventoryng_ocsservers_id'];
40 |
41 | $newID = $profservers->add($input);
42 | Html::back();
43 |
44 | } else if (isset($_POST["addocsserver"]) && $_POST["plugin_ocsinventoryng_ocsservers_id"] == -1) {
45 | $prof::addAllServers($_POST['profile']);
46 | Html::back();
47 | }
48 |
49 | // stock selected servers in session
50 | $_SESSION["plugin_ocsinventoryng_ocsservers_id"] = PluginOcsinventoryngOcsServer::getFirstServer();
51 |
52 | if (isset ($_POST['delete'])) {
53 | $input = [];
54 | foreach ($_POST['item'] as $id => $val) {
55 | $input['id'] = $id;
56 | $profservers->delete($input);
57 | }
58 | Html::back();
59 | }
60 |
--------------------------------------------------------------------------------
/front/snmpocslink.form.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | if (isset($_POST["force_ocssnmp_resynch"])) {
33 | $item = new $_POST['itemtype']();
34 | $item->check($_POST['items_id'], UPDATE);
35 |
36 | PluginOcsinventoryngSnmpOcslink::updateSnmp($_POST["id"], $_POST["plugin_ocsinventoryng_ocsservers_id"]);
37 | Html::back();
38 |
39 | } else if (isset($_POST["delete_link"])) {
40 | $link = new PluginOcsinventoryngSnmpOcslink();
41 | $link->delete(['id' => $_POST["id"]], 1);
42 | Html::back();
43 |
44 | } else {
45 | Html::displayErrorAndDie("lost");
46 | }
47 |
--------------------------------------------------------------------------------
/front/thread.form.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight("plugin_ocsinventoryng", UPDATE);
33 |
34 | Html::header(__('Information about the script', 'ocsinventoryng'), '', "tools", "pluginocsinventoryngmenu", "thread");
35 |
36 | $thread = new PluginOcsinventoryngThread();
37 | $thread->title();
38 | $thread->showThreadForm($_GET["pid"]);
39 |
40 | Html::footer();
41 |
--------------------------------------------------------------------------------
/front/thread.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | include('../../../inc/includes.php');
31 |
32 | Session::checkRight("plugin_ocsinventoryng", UPDATE);
33 |
34 | if (!isset($_GET["plugin_ocsinventoryng_ocsservers_id"])) {
35 | $_GET["plugin_ocsinventoryng_ocsservers_id"] = "0";
36 | }
37 |
38 | $thread = new PluginOcsinventoryngThread();
39 |
40 |
41 | Html::header(__('Processes execution of automatic actions', 'ocsinventoryng'), '', "tools", "pluginocsinventoryngmenu", "thread");
42 |
43 | if (isset ($_POST["delete_processes"])) {
44 |
45 | if (count($_POST["item"])) {
46 | foreach ($_POST["item"] as $key => $val) {
47 | $thread->deleteThreadsByProcessId($key);
48 | }
49 | }
50 | Html::back();
51 |
52 | } else {
53 | $thread->showProcesses($_SERVER["PHP_SELF"], $_GET["plugin_ocsinventoryng_ocsservers_id"]);
54 | }
55 |
56 | Html::footer();
57 |
--------------------------------------------------------------------------------
/inc/index.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
--------------------------------------------------------------------------------
/inc/ministat.class.php:
--------------------------------------------------------------------------------
1 | .
28 | --------------------------------------------------------------------------
29 | */
30 |
31 | /**
32 | * Class PluginOcsinventoryngMiniStat
33 | */
34 | class PluginOcsinventoryngMiniStat {
35 |
36 | /**
37 | * @var int
38 | */
39 | public $Min = 0;
40 | /**
41 | * @var int
42 | */
43 | public $Max = 0;
44 | /**
45 | * @var int
46 | */
47 | public $Tot = 0;
48 | /**
49 | * @var int
50 | */
51 | public $Nb = 0;
52 |
53 | /**
54 | *
55 | */
56 | function Reset() {
57 | $this->Min = $this->Max = $this->Tot = $this->Nb = 0;
58 | }
59 |
60 | /**
61 | * @return int
62 | */
63 | function GetMinimum() {
64 | return $this->Min;
65 | }
66 |
67 | /**
68 | * @return int
69 | */
70 | function GetMaximum() {
71 | return $this->Max;
72 | }
73 |
74 | /**
75 | * @return int
76 | */
77 | function GetTotal() {
78 | return $this->Tot;
79 | }
80 |
81 | /**
82 | * @return int
83 | */
84 | function GetCount() {
85 | return $this->Nb;
86 | }
87 |
88 | /**
89 | * @return float|int
90 | */
91 | function GetAverage() {
92 | return $this->Nb > 0 ? $this->Tot / $this->Nb : 0;
93 | }
94 |
95 | /**
96 | * @param $Value
97 | */
98 | function AddValue($Value) {
99 |
100 | if ($this->Nb > 0) {
101 | if ($Value < $this->Min) {
102 | $this->Min = $Value;
103 | }
104 | if ($Value > $this->Max) {
105 | $this->Max = $Value;
106 | }
107 | $this->Tot += $Value;
108 | $this->Nb++;
109 | } else {
110 | $this->Min = $this->Max = $this->Tot = $Value;
111 | $this->Nb = 1;
112 | }
113 | }
114 |
115 | }
116 |
--------------------------------------------------------------------------------
/inc/ocsserver_profile.class.php:
--------------------------------------------------------------------------------
1 | .
26 | --------------------------------------------------------------------------
27 | */
28 |
29 | if (!defined('GLPI_ROOT')) {
30 | die("Sorry. You can't access directly to this file");
31 | }
32 |
33 | /**
34 | * Class PluginOcsinventoryngOcsserver_Profile
35 | */
36 | class PluginOcsinventoryngOcsserver_Profile extends CommonDBTM {
37 |
38 |
39 | static $rightname = "profile";
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/inc/ocssoaprequest.class.php:
--------------------------------------------------------------------------------
1 | .
28 | --------------------------------------------------------------------------
29 | */
30 |
31 | /**
32 | * Class PluginOcsinventoryngOcsSoapRequest
33 | */
34 | class PluginOcsinventoryngOcsSoapRequest {
35 | /**
36 | * @var mixed
37 | */
38 | private $params;
39 |
40 | /**
41 | * @param mixed $params
42 | */
43 | public function __construct($params) {
44 | $this->params = $params;
45 | }
46 |
47 | /**
48 | * @return string
49 | */
50 | public function toXml() {
51 | return $this->_toXml('REQUEST', $this->params);
52 | }
53 |
54 | /**
55 | * @param $tagName
56 | * @param $value
57 | *
58 | * @return string
59 | */
60 | private function _toXml($tagName, $value) {
61 | $xml = '';
62 |
63 | if (is_array($value)) {
64 | if ($this->isIndexed($value)) {
65 | foreach ($value as $val) {
66 | $xml .= $this->_toXml($tagName, $val);
67 | }
68 | } else {
69 | $xml .= "<$tagName>";
70 | foreach ($value as $key => $val) {
71 | $xml .= $this->_toXml($key, $val);
72 | }
73 | $xml .= "$tagName>";
74 | }
75 | } else {
76 | $xml .= "<$tagName>$value$tagName>";
77 | }
78 |
79 | return $xml;
80 | }
81 |
82 | /**
83 | * @param $array
84 | *
85 | * @return bool
86 | */
87 | private function isIndexed($array) {
88 | return (bool)count(array_filter(array_keys($array), 'is_numeric'));
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/inc/server.class.php:
--------------------------------------------------------------------------------
1 | .
28 | --------------------------------------------------------------------------
29 | */
30 |
31 | /**
32 | * Class PluginOcsinventoryngServer
33 | */
34 | class PluginOcsinventoryngServer extends CommonDBTM {
35 |
36 | /**
37 | * @param $id
38 | *
39 | * @return bool
40 | */
41 | function getFromDBbyOcsServer($id) {
42 | global $DB;
43 |
44 | $query = "SELECT *
45 | FROM `" . $this->getTable() . "`
46 | WHERE `plugin_ocsinventoryng_ocsservers_id` = $id";
47 |
48 | if ($result = $DB->query($query)) {
49 | if ($DB->numrows($result) != 1) {
50 | return false;
51 | }
52 | $this->fields = $DB->fetchAssoc($result);
53 | if (is_array($this->fields) && count($this->fields)) {
54 | return true;
55 | }
56 | }
57 | return false;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/inc/uptime.class.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
30 | if (!defined('GLPI_ROOT')) {
31 | die("Sorry. You can't access directly to this file");
32 | }
33 |
34 | /**
35 | * Class PluginOcsinventoryngUptime
36 | */
37 | class PluginOcsinventoryngUptime extends CommonDBChild {
38 |
39 | // From CommonDBChild
40 | static public $itemtype = 'Computer';
41 | static public $items_id = 'computers_id';
42 |
43 | static $rightname = "plugin_ocsinventoryng";
44 |
45 | /**
46 | * @param $id
47 | * @param $ocsComputer
48 | *
49 | * @throws \GlpitestSQLError
50 | */
51 | static function updateUptime($id, $ocsComputer) {
52 | global $DB;
53 |
54 | if ($id) {
55 | if (isset($ocsComputer["DURATION"])) {
56 | $query = "UPDATE `glpi_plugin_ocsinventoryng_ocslinks`
57 | SET `uptime` = '" . $ocsComputer["DURATION"] . "'
58 | WHERE `id` = $id";
59 |
60 | $DB->query($query);
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
--------------------------------------------------------------------------------
/install/index.php:
--------------------------------------------------------------------------------
1 | .
27 | --------------------------------------------------------------------------
28 | */
29 |
--------------------------------------------------------------------------------
/install/mysql/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | deny from all
3 |
4 | = 2.4>
5 | Require all denied
6 |
--------------------------------------------------------------------------------
/install/mysql/1.3.0-update.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `glpi_plugin_ocsinventoryng_snmpocslinks` ADD `linked` TINYINT(1) NOT NULL DEFAULT '0';
2 |
3 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_antivirus` TINYINT(1) NOT NULL DEFAULT '0';
4 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `use_locks` TINYINT(1) NOT NULL DEFAULT '1';
5 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `importsnmp_printermemory` TINYINT(1) NOT NULL DEFAULT '0';
6 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers`
7 | ADD `linksnmp_name` TINYINT(1) NOT NULL DEFAULT '0',
8 | ADD `linksnmp_serial` TINYINT(1) NOT NULL DEFAULT '0',
9 | ADD `linksnmp_comment` TINYINT(1) NOT NULL DEFAULT '0',
10 | ADD `linksnmp_contact` TINYINT(1) NOT NULL DEFAULT '0',
11 | ADD `linksnmp_location` TINYINT(1) NOT NULL DEFAULT '0',
12 | ADD `linksnmp_domain` TINYINT(1) NOT NULL DEFAULT '0',
13 | ADD `linksnmp_manufacturer` TINYINT(1) NOT NULL DEFAULT '0',
14 | ADD `linksnmp_createport` TINYINT(1) NOT NULL DEFAULT '0',
15 | ADD `linksnmp_last_pages_counter` TINYINT(1) NOT NULL DEFAULT '0',
16 | ADD `linksnmp_firmware` TINYINT(1) NOT NULL DEFAULT '0',
17 | ADD `linksnmp_power` TINYINT(1) NOT NULL DEFAULT '0',
18 | ADD `linksnmp_fan` TINYINT(1) NOT NULL DEFAULT '0',
19 | ADD `linksnmp_printermemory` TINYINT(1) NOT NULL DEFAULT '0',
20 | ADD `importsnmp_computernetworkcards` TINYINT(1) NOT NULL DEFAULT '0',
21 | ADD `importsnmp_computermemory` TINYINT(1) NOT NULL DEFAULT '0',
22 | ADD `importsnmp_computerprocessors` TINYINT(1) NOT NULL DEFAULT '0',
23 | ADD `importsnmp_computersoftwares` TINYINT(1) NOT NULL DEFAULT '0',
24 | ADD `importsnmp_computervm` TINYINT(1) NOT NULL DEFAULT '0',
25 | ADD `linksnmp_computernetworkcards` TINYINT(1) NOT NULL DEFAULT '0',
26 | ADD `linksnmp_computermemory` TINYINT(1) NOT NULL DEFAULT '0',
27 | ADD `linksnmp_computerprocessors` TINYINT(1) NOT NULL DEFAULT '0',
28 | ADD `linksnmp_computersoftwares` TINYINT(1) NOT NULL DEFAULT '0',
29 | ADD `linksnmp_computervm` TINYINT(1) NOT NULL DEFAULT '0';
30 |
31 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` CHANGE `history_sofware` `history_software` TINYINT(1) NOT NULL DEFAULT '0';
--------------------------------------------------------------------------------
/install/mysql/1.3.2-update.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_uptime` TINYINT(1) NOT NULL DEFAULT '0';
2 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_officepack` TINYINT(1) NOT NULL DEFAULT '0';
3 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_winupdatestate` TINYINT(1) NOT NULL DEFAULT '0';
4 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `action_cleancron` TINYINT(1) NOT NULL DEFAULT '0';
5 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `use_restorationcron` TINYINT(1) NOT NULL DEFAULT '0';
6 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `delay_restorationcron` INT(11) NOT NULL DEFAULT '0';
7 |
8 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocslinks` ADD `uptime` VARCHAR(64) COLLATE utf8_unicode_ci DEFAULT NULL;
9 |
10 | CREATE TABLE `glpi_plugin_ocsinventoryng_winupdates` (
11 | `id` INT(11) NOT NULL AUTO_INCREMENT,
12 | `computers_id` INT(11) NOT NULL DEFAULT '0',
13 | `auoptions` INT(11) NOT NULL DEFAULT '0',
14 | `scheduleinstalldate` DATETIME DEFAULT NULL,
15 | `lastsuccesstime` DATETIME DEFAULT NULL,
16 | `detectsuccesstime` DATETIME DEFAULT NULL,
17 | `downloadsuccesstime` DATETIME DEFAULT NULL,
18 | PRIMARY KEY (`id`),
19 | KEY `computers_id` (`computers_id`)
20 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--------------------------------------------------------------------------------
/install/mysql/1.3.3-update.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE `glpi_plugin_ocsinventoryng_ruleimportentities` (
2 | `id` INT(11) NOT NULL AUTO_INCREMENT,
3 | PRIMARY KEY (`id`)
4 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
5 |
6 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `use_checkruleimportentity` TINYINT(1) NOT NULL DEFAULT '0';
7 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_teamviewer` TINYINT(1) NOT NULL DEFAULT '0';
8 |
9 | ALTER TABLE `glpi_plugin_ocsinventoryng_winupdates` ADD `entities_id` INT(11) NOT NULL DEFAULT '0';
10 |
11 | CREATE TABLE `glpi_plugin_ocsinventoryng_teamviewers` (
12 | `id` INT(11) NOT NULL AUTO_INCREMENT,
13 | `computers_id` INT(11) NOT NULL DEFAULT '0',
14 | `twid` VARCHAR(255) DEFAULT NULL,
15 | `version` VARCHAR(255) DEFAULT NULL,
16 | PRIMARY KEY (`id`),
17 | KEY `computers_id` (`computers_id`)
18 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--------------------------------------------------------------------------------
/install/mysql/1.3.4-update.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_proxysetting` TINYINT(1) NOT NULL DEFAULT '0';
2 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_winusers` TINYINT(1) NOT NULL DEFAULT '0';
3 |
4 | CREATE TABLE `glpi_plugin_ocsinventoryng_proxysettings` (
5 | `id` INT(11) NOT NULL AUTO_INCREMENT,
6 | `computers_id` INT(11) NOT NULL DEFAULT '0',
7 | `user` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
8 | `enabled` INT(11) NOT NULL DEFAULT '0',
9 | `autoconfigurl` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
10 | `address` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
11 | `override` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
12 | PRIMARY KEY (`id`),
13 | KEY `computers_id` (`computers_id`)
14 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
15 |
16 | CREATE TABLE `glpi_plugin_ocsinventoryng_winusers` (
17 | `id` INT(11) NOT NULL AUTO_INCREMENT,
18 | `computers_id` INT(11) NOT NULL DEFAULT '0',
19 | `name` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
20 | `type` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
21 | `description` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
22 | `disabled` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
23 | `sid` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
24 | PRIMARY KEY (`id`),
25 | KEY `computers_id` (`computers_id`)
26 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--------------------------------------------------------------------------------
/install/mysql/1.4.3-update.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_osinstall` TINYINT(1) NOT NULL DEFAULT '0';
2 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_networkshare` TINYINT(1) NOT NULL DEFAULT '0';
3 |
4 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_user` TINYINT(1) NOT NULL DEFAULT '1';
5 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_user_location` TINYINT(1) NOT NULL DEFAULT '1';
6 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_user_group` TINYINT(1) NOT NULL DEFAULT '1';
7 |
8 | CREATE TABLE `glpi_plugin_ocsinventoryng_osinstalls` (
9 | `id` INT(11) NOT NULL AUTO_INCREMENT,
10 | `computers_id` INT(11) NOT NULL DEFAULT '0',
11 | `build_version` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
12 | `install_date` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
13 | `codeset` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
14 | `countrycode` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
15 | `oslanguage` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
16 | `curtimezone` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
17 | `locale` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
18 | PRIMARY KEY (`id`),
19 | KEY `computers_id` (`computers_id`)
20 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
21 |
22 | CREATE TABLE `glpi_plugin_ocsinventoryng_networkshares` (
23 | `id` INT(11) NOT NULL AUTO_INCREMENT,
24 | `computers_id` INT(11) NOT NULL DEFAULT '0',
25 | `drive` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
26 | `path` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
27 | `size` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
28 | `freespace` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
29 | `quota` VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL,
30 | PRIMARY KEY (`id`),
31 | KEY `computers_id` (`computers_id`)
32 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--------------------------------------------------------------------------------
/install/mysql/1.4.4-update.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_runningprocess` TINYINT(1) NOT NULL DEFAULT '0';
2 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_service` TINYINT(1) NOT NULL DEFAULT '0';
3 |
4 | CREATE TABLE `glpi_plugin_ocsinventoryng_runningprocesses` (
5 | `id` INT(11) NOT NULL AUTO_INCREMENT,
6 | `computers_id` INT(11) NOT NULL DEFAULT '0',
7 | `cpuusage` VARCHAR(255) DEFAULT NULL,
8 | `tty` VARCHAR(255) DEFAULT NULL,
9 | `started` VARCHAR(15) DEFAULT NULL,
10 | `virtualmemory` VARCHAR(255) DEFAULT NULL,
11 | `processname` VARCHAR(255) DEFAULT NULL,
12 | `processid` VARCHAR(255) DEFAULT NULL,
13 | `username` VARCHAR(255) DEFAULT NULL,
14 | `processmemory` VARCHAR(255) DEFAULT NULL,
15 | `commandline` VARCHAR(255) DEFAULT NULL,
16 | `description` VARCHAR(255) DEFAULT NULL,
17 | `company` VARCHAR(255) DEFAULT NULL,
18 | PRIMARY KEY (`id`),
19 | KEY `computers_id` (`computers_id`)
20 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
21 |
22 | CREATE TABLE `glpi_plugin_ocsinventoryng_services` (
23 | `id` INT(11) NOT NULL AUTO_INCREMENT,
24 | `computers_id` INT(11) NOT NULL DEFAULT '0',
25 | `svcname` VARCHAR(128) NOT NULL,
26 | `svcdn` VARCHAR(255) NOT NULL,
27 | `svcstate` VARCHAR(32) DEFAULT NULL,
28 | `svcdesc` VARCHAR(1536) DEFAULT NULL,
29 | `svcstartmode` VARCHAR(32) DEFAULT NULL,
30 | `svcpath` VARCHAR(512) DEFAULT NULL,
31 | `svcstartname` VARCHAR(128) DEFAULT NULL,
32 | `svcexitcode` INTEGER DEFAULT NULL,
33 | `svcspecexitcode` INTEGER DEFAULT NULL,
34 | PRIMARY KEY (`id`),
35 | KEY `computers_id` (`computers_id`)
36 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
37 |
38 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `linksnmp_computerdisks` TINYINT(1) NOT NULL DEFAULT '0';
39 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `importsnmp_computerdisks` TINYINT(1) NOT NULL DEFAULT '0';
--------------------------------------------------------------------------------
/install/mysql/1.6.0-update.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` DROP `states_id_default`;
2 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` DROP `import_user`;
3 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_user_group_default` tinyint(1) NOT NULL DEFAULT '1';
--------------------------------------------------------------------------------
/install/mysql/1.6.1-update.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_customapp` TINYINT(1) NOT NULL DEFAULT '0';
2 |
3 | CREATE TABLE `glpi_plugin_ocsinventoryng_customapps` (
4 | `id` int(11) NOT NULL AUTO_INCREMENT,
5 | `computers_id` int(11) NOT NULL DEFAULT '0',
6 | `path` varchar(255) DEFAULT NULL,
7 | `text` TEXT DEFAULT NULL,
8 | PRIMARY KEY (`id`),
9 | KEY `computers_id` (`computers_id`)
10 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
11 |
12 | ALTER TABLE `glpi_plugin_ocsinventoryng_configs` CHANGE `use_newocs_alert` `use_newocs_alert` INT(11) NOT NULL DEFAULT '-1';
13 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsalerts` CHANGE `use_newocs_alert` `use_newocs_alert` INT(11) NOT NULL DEFAULT '-1';
14 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `cleancron_nb_days` int(11) NOT NULL DEFAULT '90';
--------------------------------------------------------------------------------
/install/mysql/1.7.1-update.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `import_bitlocker` TINYINT(1) NOT NULL DEFAULT '0';
2 |
3 | CREATE TABLE `glpi_plugin_ocsinventoryng_bitlockerstatuses` (
4 | `id` int(11) NOT NULL AUTO_INCREMENT,
5 | `computers_id` int(11) NOT NULL DEFAULT '0',
6 | `item_disks_id` int(11) NOT NULL DEFAULT '0',
7 | `volume_type` varchar(255) DEFAULT NULL,
8 | `protection_status` varchar(255) DEFAULT NULL,
9 | `init_project` varchar(255) DEFAULT NULL,
10 |
11 | PRIMARY KEY (`id`),
12 | KEY `computers_id` (`computers_id`)
13 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--------------------------------------------------------------------------------
/install/mysql/2.0.0-update.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `glpi_plugin_ocsinventoryng_ocsservers` ADD `link_with_user` tinyint NOT NULL DEFAULT '1';
2 | UPDATE `glpi_plugin_ocsinventoryng_networkports` SET `items_devicenetworkcards_id` = '0' WHERE `items_devicenetworkcards_id` = '-1';
3 |
--------------------------------------------------------------------------------
/lib/DataTables/Buttons-1.6.1/css/buttons.bootstrap.min.css:
--------------------------------------------------------------------------------
1 | @keyframes dtb-spinner{100%{transform:rotate(360deg)}}@-o-keyframes dtb-spinner{100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes dtb-spinner{100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dtb-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes dtb-spinner{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}div.dt-button-collection-title{text-align:center;padding:0.3em 0 0.5em;font-size:0.9em}div.dt-button-collection-title:empty{display:none}div.dt-button-collection{position:absolute}div.dt-button-collection ul.dropdown-menu{display:block;z-index:2002;min-width:100%}div.dt-button-collection div.dt-button-collection-title{background-color:white}div.dt-button-collection.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}div.dt-button-collection.fixed.two-column{margin-left:-200px}div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-button-collection>:last-child{display:block !important;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}div.dt-button-collection>:last-child>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-button-collection.two-column{width:400px}div.dt-button-collection.two-column>:last-child{padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}div.dt-button-collection.three-column{width:450px}div.dt-button-collection.three-column>:last-child{padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}div.dt-button-collection.four-column{width:600px}div.dt-button-collection.four-column>:last-child{padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}div.dt-button-collection .dt-button{border-radius:0}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:2001}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5em}div.dt-buttons a.btn{float:none}}div.dt-buttons button.btn.processing,div.dt-buttons div.btn.processing,div.dt-buttons a.btn.processing{color:rgba(0,0,0,0.2)}div.dt-buttons button.btn.processing:after,div.dt-buttons div.btn.processing:after,div.dt-buttons a.btn.processing:after{position:absolute;top:50%;left:50%;width:16px;height:16px;margin:-8px 0 0 -8px;box-sizing:border-box;display:block;content:' ';border:2px solid #282828;border-radius:50%;border-left-color:transparent;border-right-color:transparent;animation:dtb-spinner 1500ms infinite linear;-o-animation:dtb-spinner 1500ms infinite linear;-ms-animation:dtb-spinner 1500ms infinite linear;-webkit-animation:dtb-spinner 1500ms infinite linear;-moz-animation:dtb-spinner 1500ms infinite linear}
2 |
--------------------------------------------------------------------------------
/lib/DataTables/Buttons-1.6.1/css/buttons.bootstrap4.min.css:
--------------------------------------------------------------------------------
1 | @keyframes dtb-spinner{100%{transform:rotate(360deg)}}@-o-keyframes dtb-spinner{100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes dtb-spinner{100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dtb-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes dtb-spinner{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}div.dt-button-collection-title{text-align:center;padding:0.3em 0 0.5em;font-size:0.9em}div.dt-button-collection-title:empty{display:none}div.dt-button-collection{position:absolute;z-index:2001}div.dt-button-collection div.dropdown-menu{display:block;z-index:2002;min-width:100%}div.dt-button-collection div.dt-button-collection-title{background-color:white;border:1px solid rgba(0,0,0,0.15)}div.dt-button-collection.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}div.dt-button-collection.fixed.two-column{margin-left:-200px}div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-button-collection>:last-child{display:block !important;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}div.dt-button-collection>:last-child>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-button-collection.two-column{width:400px}div.dt-button-collection.two-column>:last-child{padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}div.dt-button-collection.three-column{width:450px}div.dt-button-collection.three-column>:last-child{padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}div.dt-button-collection.four-column{width:600px}div.dt-button-collection.four-column>:last-child{padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}div.dt-button-collection .dt-button{border-radius:0}div.dt-button-collection.fixed{max-width:none}div.dt-button-collection.fixed:before,div.dt-button-collection.fixed:after{display:none}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5em}div.dt-buttons a.btn{float:none}}div.dt-buttons button.btn.processing,div.dt-buttons div.btn.processing,div.dt-buttons a.btn.processing{color:rgba(0,0,0,0.2)}div.dt-buttons button.btn.processing:after,div.dt-buttons div.btn.processing:after,div.dt-buttons a.btn.processing:after{position:absolute;top:50%;left:50%;width:16px;height:16px;margin:-8px 0 0 -8px;box-sizing:border-box;display:block;content:' ';border:2px solid #282828;border-radius:50%;border-left-color:transparent;border-right-color:transparent;animation:dtb-spinner 1500ms infinite linear;-o-animation:dtb-spinner 1500ms infinite linear;-ms-animation:dtb-spinner 1500ms infinite linear;-webkit-animation:dtb-spinner 1500ms infinite linear;-moz-animation:dtb-spinner 1500ms infinite linear}
2 |
--------------------------------------------------------------------------------
/lib/DataTables/Buttons-1.6.1/css/buttons.foundation.min.css:
--------------------------------------------------------------------------------
1 | @keyframes dtb-spinner{100%{transform:rotate(360deg)}}@-o-keyframes dtb-spinner{100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes dtb-spinner{100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dtb-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes dtb-spinner{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}div.dt-button-collection-title{text-align:center;padding:0.3em 0 0.5em;font-size:0.9em}div.dt-button-collection-title:empty{display:none}ul.dt-buttons li{margin:0}ul.dt-buttons li.active a{box-shadow:inset 0 0 10px rgba(0,0,0,0.6)}ul.dt-buttons.button-group a{margin-bottom:0}div.dt-button-collection{position:absolute}div.dt-button-collection.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}div.dt-button-collection.fixed.two-column{margin-left:-200px}div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-button-collection>:last-child{display:block !important;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}div.dt-button-collection>:last-child>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-button-collection.two-column{width:400px}div.dt-button-collection.two-column>:last-child{padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}div.dt-button-collection.three-column{width:450px}div.dt-button-collection.three-column>:last-child{padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}div.dt-button-collection.four-column{width:600px}div.dt-button-collection.four-column>:last-child{padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}div.dt-button-collection .dt-button{border-radius:0}div.dt-button-collection.fixed{max-width:none}div.dt-button-collection.fixed:before,div.dt-button-collection.fixed:after{display:none}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:88}@media screen and (max-width: 767px){ul.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5rem}ul.dt-buttons li{float:none}}div.button-group.stacked.dropdown-pane{margin-top:2px;padding:1px;z-index:89}div.button-group.stacked.dropdown-pane a.button{display:block;margin-bottom:1px;border-right:none}div.button-group.stacked.dropdown-pane a.button:last-child{margin-bottom:0;margin-right:1px}div.dt-buttons button.button.processing,div.dt-buttons div.button.processing,div.dt-buttons a.button.processing{color:rgba(0,0,0,0.2);color:rgba(255,255,255,0.2);border-top-color:white;border-bottom-color:white}div.dt-buttons button.button.processing:after,div.dt-buttons div.button.processing:after,div.dt-buttons a.button.processing:after{position:absolute;top:50%;left:50%;width:16px;height:16px;margin:-8px 0 0 -8px;box-sizing:border-box;display:block;content:' ';border:2px solid #282828;border-radius:50%;border-left-color:transparent;border-right-color:transparent;animation:dtb-spinner 1500ms infinite linear;-o-animation:dtb-spinner 1500ms infinite linear;-ms-animation:dtb-spinner 1500ms infinite linear;-webkit-animation:dtb-spinner 1500ms infinite linear;-moz-animation:dtb-spinner 1500ms infinite linear}
2 |
--------------------------------------------------------------------------------
/lib/DataTables/Buttons-1.6.1/css/buttons.semanticui.min.css:
--------------------------------------------------------------------------------
1 | @keyframes dtb-spinner{100%{transform:rotate(360deg)}}@-o-keyframes dtb-spinner{100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes dtb-spinner{100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dtb-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes dtb-spinner{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border:2px solid #111;box-shadow:3px 3px 8px rgba(0,0,0,0.3);border-radius:3px;text-align:center;z-index:21}div.dt-button-info h2{padding:0.5em;margin:0;font-weight:normal;border-bottom:1px solid #ddd;background-color:#f3f3f3}div.dt-button-info>div{padding:1em}div.dt-button-collection-title{text-align:center;padding:0.3em 0 0.5em;font-size:0.9em}div.dt-button-collection-title:empty{display:none}div.dt-button-collection{position:absolute;top:0;left:0;min-width:200px;margin-top:3px !important;z-index:2002;background:white}div.dt-button-collection.fixed{position:fixed;top:50%;left:50%;margin-left:-75px;border-radius:0}div.dt-button-collection.fixed.two-column{margin-left:-200px}div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-button-collection>:last-child{display:block !important;-webkit-column-gap:8px;-moz-column-gap:8px;-ms-column-gap:8px;-o-column-gap:8px;column-gap:8px}div.dt-button-collection>:last-child>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-button-collection.two-column{width:400px}div.dt-button-collection.two-column>:last-child{padding-bottom:1px;-webkit-column-count:2;-moz-column-count:2;-ms-column-count:2;-o-column-count:2;column-count:2}div.dt-button-collection.three-column{width:450px}div.dt-button-collection.three-column>:last-child{padding-bottom:1px;-webkit-column-count:3;-moz-column-count:3;-ms-column-count:3;-o-column-count:3;column-count:3}div.dt-button-collection.four-column{width:600px}div.dt-button-collection.four-column>:last-child{padding-bottom:1px;-webkit-column-count:4;-moz-column-count:4;-ms-column-count:4;-o-column-count:4;column-count:4}div.dt-button-collection .dt-button{border-radius:0}button.buttons-collection.ui.button span:after{display:inline-block;content:"▾";padding-left:0.5em}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:2001}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:0.5em}div.dt-buttons a.btn{float:none}}div.dt-buttons button.button.processing,div.dt-buttons div.button.processing,div.dt-buttons a.button.processing{position:relative;color:rgba(0,0,0,0.2)}div.dt-buttons button.button.processing:after,div.dt-buttons div.button.processing:after,div.dt-buttons a.button.processing:after{position:absolute;top:50%;left:50%;width:16px;height:16px;margin:-8px 0 0 -8px;box-sizing:border-box;display:block;content:' ';border:2px solid #282828;border-radius:50%;border-left-color:transparent;border-right-color:transparent;animation:dtb-spinner 1500ms infinite linear;-o-animation:dtb-spinner 1500ms infinite linear;-ms-animation:dtb-spinner 1500ms infinite linear;-webkit-animation:dtb-spinner 1500ms infinite linear;-moz-animation:dtb-spinner 1500ms infinite linear}
2 |
--------------------------------------------------------------------------------
/lib/DataTables/Buttons-1.6.1/css/common.scss:
--------------------------------------------------------------------------------
1 |
2 | div.dt-button-info {
3 | position: fixed;
4 | top: 50%;
5 | left: 50%;
6 | width: 400px;
7 | margin-top: -100px;
8 | margin-left: -200px;
9 | background-color: white;
10 | border: 2px solid #111;
11 | box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
12 | border-radius: 3px;
13 | text-align: center;
14 | z-index: 21;
15 |
16 | h2 {
17 | padding: 0.5em;
18 | margin: 0;
19 | font-weight: normal;
20 | border-bottom: 1px solid #ddd;
21 | background-color: #f3f3f3;
22 | }
23 |
24 | > div {
25 | padding: 1em;
26 | }
27 | }
28 |
29 | div.dt-button-collection-title {
30 | text-align: center;
31 | padding: 0.3em 0 0.5em;
32 | font-size: 0.9em;
33 | }
34 |
35 | div.dt-button-collection-title:empty {
36 | display: none;
37 | }
38 |
--------------------------------------------------------------------------------
/lib/DataTables/Buttons-1.6.1/js/buttons.bootstrap.js:
--------------------------------------------------------------------------------
1 | /*! Bootstrap integration for DataTables' Buttons
2 | * ©2016 SpryMedia Ltd - datatables.net/license
3 | */
4 |
5 | (function (factory) {
6 | if (typeof define === 'function' && define.amd) {
7 | // AMD
8 | define(['jquery', 'datatables.net-bs', 'datatables.net-buttons'], function ($) {
9 | return factory($, window, document);
10 | });
11 | } else if (typeof exports === 'object') {
12 | // CommonJS
13 | module.exports = function (root, $) {
14 | if (!root) {
15 | root = window;
16 | }
17 |
18 | if (!$ || !$.fn.dataTable) {
19 | $ = require('datatables.net-bs')(root, $).$;
20 | }
21 |
22 | if (!$.fn.dataTable.Buttons) {
23 | require('datatables.net-buttons')(root, $);
24 | }
25 |
26 | return factory($, root, root.document);
27 | };
28 | } else {
29 | // Browser
30 | factory(jQuery, window, document);
31 | }
32 | }(function ($, window, document, undefined) {
33 | 'use strict';
34 | var DataTable = $.fn.dataTable;
35 |
36 |
37 | $.extend(true, DataTable.Buttons.defaults, {
38 | dom: {
39 | container: {
40 | className: 'dt-buttons btn-group'
41 | },
42 | button: {
43 | className: 'btn btn-default'
44 | },
45 | collection: {
46 | tag: 'ul',
47 | className: 'dropdown-menu',
48 | button: {
49 | tag: 'li',
50 | className: 'dt-button',
51 | active: 'active',
52 | disabled: 'disabled'
53 | },
54 | buttonLiner: {
55 | tag: 'a',
56 | className: ''
57 | }
58 | }
59 | }
60 | });
61 |
62 | DataTable.ext.buttons.collection.text = function (dt) {
63 | return dt.i18n('buttons.collection', 'Collection ');
64 | };
65 |
66 |
67 | return DataTable.Buttons;
68 | }));
69 |
--------------------------------------------------------------------------------
/lib/DataTables/Buttons-1.6.1/js/buttons.bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | Bootstrap integration for DataTables' Buttons
3 | ©2016 SpryMedia Ltd - datatables.net/license
4 | */
5 | (function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-buttons"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-bs")(a,b).$);b.fn.dataTable.Buttons||require("datatables.net-buttons")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){a=c.fn.dataTable;c.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group"},
6 | button:{className:"btn btn-default"},collection:{tag:"ul",className:"dropdown-menu",button:{tag:"li",className:"dt-button",active:"active",disabled:"disabled"},buttonLiner:{tag:"a",className:""}}}});a.ext.buttons.collection.text=function(a){return a.i18n("buttons.collection",'Collection ')};return a.Buttons});
7 |
--------------------------------------------------------------------------------
/lib/DataTables/Buttons-1.6.1/js/buttons.bootstrap4.js:
--------------------------------------------------------------------------------
1 | /*! Bootstrap integration for DataTables' Buttons
2 | * ©2016 SpryMedia Ltd - datatables.net/license
3 | */
4 |
5 | (function (factory) {
6 | if (typeof define === 'function' && define.amd) {
7 | // AMD
8 | define(['jquery', 'datatables.net-bs4', 'datatables.net-buttons'], function ($) {
9 | return factory($, window, document);
10 | });
11 | } else if (typeof exports === 'object') {
12 | // CommonJS
13 | module.exports = function (root, $) {
14 | if (!root) {
15 | root = window;
16 | }
17 |
18 | if (!$ || !$.fn.dataTable) {
19 | $ = require('datatables.net-bs4')(root, $).$;
20 | }
21 |
22 | if (!$.fn.dataTable.Buttons) {
23 | require('datatables.net-buttons')(root, $);
24 | }
25 |
26 | return factory($, root, root.document);
27 | };
28 | } else {
29 | // Browser
30 | factory(jQuery, window, document);
31 | }
32 | }(function ($, window, document, undefined) {
33 | 'use strict';
34 | var DataTable = $.fn.dataTable;
35 |
36 | $.extend(true, DataTable.Buttons.defaults, {
37 | dom: {
38 | container: {
39 | className: 'dt-buttons btn-group flex-wrap'
40 | },
41 | button: {
42 | className: 'btn btn-secondary'
43 | },
44 | collection: {
45 | tag: 'div',
46 | className: 'dropdown-menu',
47 | button: {
48 | tag: 'a',
49 | className: 'dt-button dropdown-item',
50 | active: 'active',
51 | disabled: 'disabled'
52 | }
53 | }
54 | },
55 | buttonCreated: function (config, button) {
56 | return config.buttons ?
57 | $('').append(button) :
58 | button;
59 | }
60 | });
61 |
62 | DataTable.ext.buttons.collection.className += ' dropdown-toggle';
63 | DataTable.ext.buttons.collection.rightAlignClassName = 'dropdown-menu-right';
64 |
65 | return DataTable.Buttons;
66 | }));
67 |
--------------------------------------------------------------------------------
/lib/DataTables/Buttons-1.6.1/js/buttons.bootstrap4.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | Bootstrap integration for DataTables' Buttons
3 | ©2016 SpryMedia Ltd - datatables.net/license
4 | */
5 | (function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net-bs4","datatables.net-buttons"],function(a){return c(a,window,document)}):"object"===typeof exports?module.exports=function(a,b){a||(a=window);b&&b.fn.dataTable||(b=require("datatables.net-bs4")(a,b).$);b.fn.dataTable.Buttons||require("datatables.net-buttons")(a,b);return c(b,a,a.document)}:c(jQuery,window,document)})(function(c,a,b,d){a=c.fn.dataTable;c.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group flex-wrap"},
6 | button:{className:"btn btn-secondary"},collection:{tag:"div",className:"dropdown-menu",button:{tag:"a",className:"dt-button dropdown-item",active:"active",disabled:"disabled"}}},buttonCreated:function(a,b){return a.buttons?c('').append(b):b}});a.ext.buttons.collection.className+=" dropdown-toggle";a.ext.buttons.collection.rightAlignClassName="dropdown-menu-right";return a.Buttons});
7 |
--------------------------------------------------------------------------------
/lib/DataTables/Buttons-1.6.1/js/buttons.colVis.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | Column visibility buttons for Buttons and DataTables.
3 | 2016 SpryMedia Ltd - datatables.net/license
4 | */
5 | (function(f){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(c){return f(c,window,document)}):"object"===typeof exports?module.exports=function(c,e){c||(c=window);e&&e.fn.dataTable||(e=require("datatables.net")(c,e).$);e.fn.dataTable.Buttons||require("datatables.net-buttons")(c,e);return f(e,c,c.document)}:f(jQuery,window,document)})(function(f,c,e,h){c=f.fn.dataTable;f.extend(c.ext.buttons,{colvis:function(a,b){return{extend:"collection",
6 | text:function(b){return b.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",buttons:[{extend:"columnsToggle",columns:b.columns,columnText:b.columnText}]}},columnsToggle:function(a,b){return a.columns(b.columns).indexes().map(function(a){return{extend:"columnToggle",columns:a,columnText:b.columnText}}).toArray()},columnToggle:function(a,b){return{extend:"columnVisibility",columns:b.columns,columnText:b.columnText}},columnsVisibility:function(a,b){return a.columns(b.columns).indexes().map(function(a){return{extend:"columnVisibility",
7 | columns:a,visibility:b.visibility,columnText:b.columnText}}).toArray()},columnVisibility:{columns:h,text:function(a,b,d){return d._columnText(a,d)},className:"buttons-columnVisibility",action:function(a,b,d,g){a=b.columns(g.columns);b=a.visible();a.visible(g.visibility!==h?g.visibility:!(b.length&&b[0]))},init:function(a,b,d){var g=this;b.attr("data-cv-idx",d.columns);a.on("column-visibility.dt"+d.namespace,function(b,c){c.bDestroying||c.nTable!=a.settings()[0].nTable||g.active(a.column(d.columns).visible())}).on("column-reorder.dt"+
8 | d.namespace,function(c,e,f){1===a.columns(d.columns).count()&&(b.text(d._columnText(a,d)),g.active(a.column(d.columns).visible()))});this.active(a.column(d.columns).visible())},destroy:function(a,b,d){a.off("column-visibility.dt"+d.namespace).off("column-reorder.dt"+d.namespace)},_columnText:function(a,b){var d=a.column(b.columns).index(),c=a.settings()[0].aoColumns[d].sTitle.replace(/\n/g," ").replace(/
/gi," ").replace(/