Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
9ddd78ea91 | |||
3bae0bc39a |
8
Mission4/glpi.yml
Normal file
8
Mission4/glpi.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
- name: Playbook pour glpi
|
||||||
|
hosts: onfinfra
|
||||||
|
# become: yes
|
||||||
|
# become_method: sudo
|
||||||
|
# become_user: root
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- glpi
|
6
Mission4/hosts
Normal file
6
Mission4/hosts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#[localhost]
|
||||||
|
|
||||||
|
[onfarbo]
|
||||||
|
onfarbo ansible_python_interpreter=/usr/bin/python3
|
||||||
|
[onfinfra]
|
||||||
|
onfinfra ansible_python_interpreter=/usr/bin/python3
|
10
Mission4/onfarbo44.yml
Normal file
10
Mission4/onfarbo44.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
- name: Playbook pour onfarbo
|
||||||
|
hosts: onfarbo
|
||||||
|
# become: yes
|
||||||
|
# become_method: sudo
|
||||||
|
# become_user: root
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- bdd
|
||||||
|
- dokuwiki
|
||||||
|
- goss
|
4
Mission4/roles/bdd/handlers/main.yml
Normal file
4
Mission4/roles/bdd/handlers/main.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- name: restart apache
|
||||||
|
service:
|
||||||
|
name: apache2
|
||||||
|
state: restarted
|
56
Mission4/roles/bdd/tasks/main.yml
Normal file
56
Mission4/roles/bdd/tasks/main.yml
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
- name: apt update
|
||||||
|
tags: update
|
||||||
|
apt:
|
||||||
|
update-cache: yes
|
||||||
|
cache_valid_time: 3600
|
||||||
|
|
||||||
|
- name: installation des utilitaires
|
||||||
|
tags: utils
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- apache2
|
||||||
|
- php
|
||||||
|
- php-common
|
||||||
|
- libapache2-mod-php
|
||||||
|
- php-cli
|
||||||
|
- php-xml
|
||||||
|
- php-mysql
|
||||||
|
- php-curl
|
||||||
|
- mariadb-server
|
||||||
|
- adminer
|
||||||
|
- python3-pymysql
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Create a symbolic link
|
||||||
|
ansible.builtin.file:
|
||||||
|
src: /usr/share/adminer/adminer
|
||||||
|
dest: /var/www/html/adminer
|
||||||
|
# owner:
|
||||||
|
# group:
|
||||||
|
state: link
|
||||||
|
|
||||||
|
- name: Message d'information
|
||||||
|
tags: msg
|
||||||
|
debug: msg="Adminer sera accessible depuis l'adresse http://onfarbo44/adminer/"
|
||||||
|
|
||||||
|
- name: On démarre MariaDB
|
||||||
|
tags: mariadb
|
||||||
|
service:
|
||||||
|
name: mysql
|
||||||
|
state: started
|
||||||
|
|
||||||
|
- name: Création de la BDD bdarbre
|
||||||
|
tags: bdarbre
|
||||||
|
mysql_db:
|
||||||
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||||
|
name: bdarbre
|
||||||
|
|
||||||
|
- name: Création de l'utilisateur slam
|
||||||
|
tags: user
|
||||||
|
mysql_user:
|
||||||
|
name: slam
|
||||||
|
password: Azerty1+
|
||||||
|
priv: '*.*:ALL,GRANT'
|
||||||
|
state: present
|
||||||
|
login_unix_socket: /var/run/mysqld/mysqld.sock
|
||||||
|
notify: restart apache
|
1
Mission4/roles/bdd/vars/main.yml
Normal file
1
Mission4/roles/bdd/vars/main.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
alias: "Alias /adminer.php /usr/share/adminer/adminer.php"
|
19
Mission4/roles/dokuwiki/files/dokuwiki.sh
Normal file
19
Mission4/roles/dokuwiki/files/dokuwiki.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
chemin=/var/www/html/doku
|
||||||
|
|
||||||
|
apt install -y apache2 php php-mbstring php-gd php-xml
|
||||||
|
cd /root
|
||||||
|
[ -r dokuwiki-stable.tgz ] || wget http://depl/store/dokuwiki-stable.tgz
|
||||||
|
|
||||||
|
if [ $? !=0 ]; then
|
||||||
|
echo "$0 : erreurwget" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
tar xvfz dokuwiki-stable.tgz
|
||||||
|
[ -d "${chemin}" ] || mkdir "${chemin}"
|
||||||
|
|
||||||
|
cp -a dokuwiki-2020-07-29/* "${chemin}"
|
||||||
|
cd "${chemin}"
|
||||||
|
chown -R root:root .
|
||||||
|
chmod -R 755 .
|
||||||
|
chown -R www-data:www-data data lib conf
|
||||||
|
exit 0
|
26
Mission4/roles/dokuwiki/tasks/main.yml
Normal file
26
Mission4/roles/dokuwiki/tasks/main.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
- name: Création du dossier DokuWiki
|
||||||
|
tags: createfile
|
||||||
|
file:
|
||||||
|
path: /root/dokuwiki
|
||||||
|
state: directory
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: copie du fichier script d'install de dokuwiki
|
||||||
|
tags: sh
|
||||||
|
copy:
|
||||||
|
src: dokuwiki.sh
|
||||||
|
dest: /root/dokuwiki
|
||||||
|
|
||||||
|
- name: On rend exécutable le script d'install
|
||||||
|
tags: chmod
|
||||||
|
file:
|
||||||
|
path: /root/dokuwiki/dokuwiki.sh
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: exécution du script d'install de dokuwiki
|
||||||
|
tags: exec
|
||||||
|
command: bash /root/dokuwiki/dokuwiki.sh
|
||||||
|
|
||||||
|
- name: Message d'information pour dokuwiki
|
||||||
|
tags: msg2
|
||||||
|
debug: msg="Le dokuwiki devra être installer depuis l'adresse http://onfarbo44/doku/install.php"
|
231
Mission4/roles/glpi/files/apache2.conf
Normal file
231
Mission4/roles/glpi/files/apache2.conf
Normal file
@ -0,0 +1,231 @@
|
|||||||
|
# This is the main Apache server configuration file. It contains the
|
||||||
|
# configuration directives that give the server its instructions.
|
||||||
|
# See http://httpd.apache.org/docs/2.4/ for detailed information about
|
||||||
|
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
|
||||||
|
# hints.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Summary of how the Apache 2 configuration works in Debian:
|
||||||
|
# The Apache 2 web server configuration in Debian is quite different to
|
||||||
|
# upstream's suggested way to configure the web server. This is because Debian's
|
||||||
|
# default Apache2 installation attempts to make adding and removing modules,
|
||||||
|
# virtual hosts, and extra configuration directives as flexible as possible, in
|
||||||
|
# order to make automating the changes and administering the server as easy as
|
||||||
|
# possible.
|
||||||
|
|
||||||
|
# It is split into several files forming the configuration hierarchy outlined
|
||||||
|
# below, all located in the /etc/apache2/ directory:
|
||||||
|
#
|
||||||
|
# /etc/apache2/
|
||||||
|
# |-- apache2.conf
|
||||||
|
# | `-- ports.conf
|
||||||
|
# |-- mods-enabled
|
||||||
|
# | |-- *.load
|
||||||
|
# | `-- *.conf
|
||||||
|
# |-- conf-enabled
|
||||||
|
# | `-- *.conf
|
||||||
|
# `-- sites-enabled
|
||||||
|
# `-- *.conf
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# * apache2.conf is the main configuration file (this file). It puts the pieces
|
||||||
|
# together by including all remaining configuration files when starting up the
|
||||||
|
# web server.
|
||||||
|
#
|
||||||
|
# * ports.conf is always included from the main configuration file. It is
|
||||||
|
# supposed to determine listening ports for incoming connections which can be
|
||||||
|
# customized anytime.
|
||||||
|
#
|
||||||
|
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
|
||||||
|
# directories contain particular configuration snippets which manage modules,
|
||||||
|
# global configuration fragments, or virtual host configurations,
|
||||||
|
# respectively.
|
||||||
|
#
|
||||||
|
# They are activated by symlinking available configuration files from their
|
||||||
|
# respective *-available/ counterparts. These should be managed by using our
|
||||||
|
# helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
|
||||||
|
# their respective man pages for detailed information.
|
||||||
|
#
|
||||||
|
# * The binary is called apache2. Due to the use of environment variables, in
|
||||||
|
# the default configuration, apache2 needs to be started/stopped with
|
||||||
|
# /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
|
||||||
|
# work with the default configuration.
|
||||||
|
|
||||||
|
|
||||||
|
# Global configuration
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# ServerRoot: The top of the directory tree under which the server's
|
||||||
|
# configuration, error, and log files are kept.
|
||||||
|
#
|
||||||
|
# NOTE! If you intend to place this on an NFS (or otherwise network)
|
||||||
|
# mounted filesystem then please read the Mutex documentation (available
|
||||||
|
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
|
||||||
|
# you will save yourself a lot of trouble.
|
||||||
|
#
|
||||||
|
# Do NOT add a slash at the end of the directory path.
|
||||||
|
#
|
||||||
|
#ServerRoot "/etc/apache2"
|
||||||
|
|
||||||
|
#
|
||||||
|
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
|
||||||
|
#
|
||||||
|
#Mutex file:${APACHE_LOCK_DIR} default
|
||||||
|
|
||||||
|
#
|
||||||
|
# The directory where shm and other runtime files will be stored.
|
||||||
|
#
|
||||||
|
|
||||||
|
DefaultRuntimeDir ${APACHE_RUN_DIR}
|
||||||
|
|
||||||
|
#
|
||||||
|
# PidFile: The file in which the server should record its process
|
||||||
|
# identification number when it starts.
|
||||||
|
# This needs to be set in /etc/apache2/envvars
|
||||||
|
#
|
||||||
|
PidFile ${APACHE_PID_FILE}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Timeout: The number of seconds before receives and sends time out.
|
||||||
|
#
|
||||||
|
Timeout 300
|
||||||
|
|
||||||
|
#
|
||||||
|
# KeepAlive: Whether or not to allow persistent connections (more than
|
||||||
|
# one request per connection). Set to "Off" to deactivate.
|
||||||
|
#
|
||||||
|
KeepAlive On
|
||||||
|
|
||||||
|
#
|
||||||
|
# MaxKeepAliveRequests: The maximum number of requests to allow
|
||||||
|
# during a persistent connection. Set to 0 to allow an unlimited amount.
|
||||||
|
# We recommend you leave this number high, for maximum performance.
|
||||||
|
#
|
||||||
|
MaxKeepAliveRequests 100
|
||||||
|
|
||||||
|
#
|
||||||
|
# KeepAliveTimeout: Number of seconds to wait for the next request from the
|
||||||
|
# same client on the same connection.
|
||||||
|
#
|
||||||
|
KeepAliveTimeout 5
|
||||||
|
|
||||||
|
|
||||||
|
# These need to be set in /etc/apache2/envvars
|
||||||
|
User ${APACHE_RUN_USER}
|
||||||
|
Group ${APACHE_RUN_GROUP}
|
||||||
|
|
||||||
|
#
|
||||||
|
# HostnameLookups: Log the names of clients or just their IP addresses
|
||||||
|
# e.g., www.apache.org (on) or 204.62.129.132 (off).
|
||||||
|
# The default is off because it'd be overall better for the net if people
|
||||||
|
# had to knowingly turn this feature on, since enabling it means that
|
||||||
|
# each client request will result in AT LEAST one lookup request to the
|
||||||
|
# nameserver.
|
||||||
|
#
|
||||||
|
HostnameLookups Off
|
||||||
|
|
||||||
|
# ErrorLog: The location of the error log file.
|
||||||
|
# If you do not specify an ErrorLog directive within a <VirtualHost>
|
||||||
|
# container, error messages relating to that virtual host will be
|
||||||
|
# logged here. If you *do* define an error logfile for a <VirtualHost>
|
||||||
|
# container, that host's errors will be logged there and not here.
|
||||||
|
#
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
|
||||||
|
#
|
||||||
|
# LogLevel: Control the severity of messages logged to the error_log.
|
||||||
|
# Available values: trace8, ..., trace1, debug, info, notice, warn,
|
||||||
|
# error, crit, alert, emerg.
|
||||||
|
# It is also possible to configure the log level for particular modules, e.g.
|
||||||
|
# "LogLevel info ssl:warn"
|
||||||
|
#
|
||||||
|
LogLevel warn
|
||||||
|
|
||||||
|
# Include module configuration:
|
||||||
|
IncludeOptional mods-enabled/*.load
|
||||||
|
IncludeOptional mods-enabled/*.conf
|
||||||
|
|
||||||
|
# Include list of ports to listen on
|
||||||
|
Include ports.conf
|
||||||
|
|
||||||
|
|
||||||
|
# Sets the default security model of the Apache2 HTTPD server. It does
|
||||||
|
# not allow access to the root filesystem outside of /usr/share and /var/www.
|
||||||
|
# The former is used by web applications packaged in Debian,
|
||||||
|
# the latter may be used for local directories served by the web server. If
|
||||||
|
# your system is serving content from a sub-directory in /srv you must allow
|
||||||
|
# access here, or in any related virtual host.
|
||||||
|
<Directory />
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
Require all denied
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /usr/share>
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /var/www/>
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /var/www/html>
|
||||||
|
AllowOverride All
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
#<Directory /srv/>
|
||||||
|
# Options Indexes FollowSymLinks
|
||||||
|
# AllowOverride None
|
||||||
|
# Require all granted
|
||||||
|
#</Directory>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# AccessFileName: The name of the file to look for in each directory
|
||||||
|
# for additional configuration directives. See also the AllowOverride
|
||||||
|
# directive.
|
||||||
|
#
|
||||||
|
AccessFileName .htaccess
|
||||||
|
|
||||||
|
#
|
||||||
|
# The following lines prevent .htaccess and .htpasswd files from being
|
||||||
|
# viewed by Web clients.
|
||||||
|
#
|
||||||
|
<FilesMatch "^\.ht">
|
||||||
|
Require all denied
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# The following directives define some format nicknames for use with
|
||||||
|
# a CustomLog directive.
|
||||||
|
#
|
||||||
|
# These deviate from the Common Log Format definitions in that they use %O
|
||||||
|
# (the actual bytes sent including headers) instead of %b (the size of the
|
||||||
|
# requested file), because the latter makes it impossible to detect partial
|
||||||
|
# requests.
|
||||||
|
#
|
||||||
|
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
|
||||||
|
# Use mod_remoteip instead.
|
||||||
|
#
|
||||||
|
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %O" common
|
||||||
|
LogFormat "%{Referer}i -> %U" referer
|
||||||
|
LogFormat "%{User-agent}i" agent
|
||||||
|
|
||||||
|
# Include of directories ignores editors' and dpkg's backup files,
|
||||||
|
# see README.Debian for details.
|
||||||
|
|
||||||
|
# Include generic snippets of statements
|
||||||
|
IncludeOptional conf-enabled/*.conf
|
||||||
|
|
||||||
|
# Include the virtual host configurations:
|
||||||
|
IncludeOptional sites-enabled/*.conf
|
||||||
|
|
||||||
|
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
|
Binary file not shown.
Binary file not shown.
113
Mission4/roles/glpi/files/fusioninventory/.github/workflows/tests.yml
vendored
Normal file
113
Mission4/roles/glpi/files/fusioninventory/.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
# GitHub Actions docs
|
||||||
|
# https://help.github.com/en/articles/about-github-actions
|
||||||
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.3', '7.4', '8.0']
|
||||||
|
name: lint (${{ matrix.php-versions }})
|
||||||
|
env:
|
||||||
|
extensions: zip
|
||||||
|
key: cache-v1
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Setup cache environment
|
||||||
|
id: extcache
|
||||||
|
uses: shivammathur/cache-extensions@v1
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: ${{ env.extensions }}
|
||||||
|
key: ${{ env.key }}
|
||||||
|
|
||||||
|
- name: Cache extensions
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.extcache.outputs.dir }}
|
||||||
|
key: ${{ steps.extcache.outputs.key }}
|
||||||
|
restore-keys: ${{ steps.extcache.outputs.key }}
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: ${{ env.extensions }}
|
||||||
|
|
||||||
|
- name: Cache Composer dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: /tmp/composer-cache
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
|
||||||
|
- uses: php-actions/composer@v5
|
||||||
|
with:
|
||||||
|
php_version: 7.4
|
||||||
|
- name: Lint
|
||||||
|
run: php vendor/bin/robo --no-interaction code:cs
|
||||||
|
|
||||||
|
phpunit:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php-versions: ['7.3', '7.4', '8.0']
|
||||||
|
name: phpunit (${{ matrix.php-versions }})
|
||||||
|
env:
|
||||||
|
extensions: zip, hash, fileinfo, mysqli, gd, bz2, xdebug
|
||||||
|
key: cache-v1
|
||||||
|
steps:
|
||||||
|
- uses: ankane/setup-mariadb@v1
|
||||||
|
with:
|
||||||
|
mariadb-version: 10.5
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Setup cache environment
|
||||||
|
id: extcache
|
||||||
|
uses: shivammathur/cache-extensions@v1
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: ${{ env.extensions }}
|
||||||
|
key: ${{ env.key }}
|
||||||
|
|
||||||
|
- name: Cache extensions
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ steps.extcache.outputs.dir }}
|
||||||
|
key: ${{ steps.extcache.outputs.key }}
|
||||||
|
restore-keys: ${{ steps.extcache.outputs.key }}
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
extensions: ${{ env.extensions }}
|
||||||
|
|
||||||
|
- name: Cache Composer dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: /tmp/composer-cache
|
||||||
|
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
|
||||||
|
- uses: php-actions/composer@v5
|
||||||
|
with:
|
||||||
|
php_version: 7.4
|
||||||
|
- name: Get GLPI
|
||||||
|
run: wget https://github.com/glpi-project/glpi/releases/download/9.5.3/glpi-9.5.3.tgz
|
||||||
|
- name: Uncompress GLPI
|
||||||
|
run: tar zxvf glpi-9.5.3.tgz
|
||||||
|
- name: Copy Plugin FusionInventory
|
||||||
|
run: rsync -avr --exclude='glpi' ./* glpi/plugins/fusioninventory/
|
||||||
|
- name: Create the database
|
||||||
|
run: mysqladmin create glpi
|
||||||
|
- name: Check php dependencies
|
||||||
|
run: cd glpi && php bin/console glpi:system:check_requirements
|
||||||
|
- name: Install GLPI
|
||||||
|
run: cd glpi && mkdir tests && php bin/console glpi:database:install -n --config-dir=tests --db-name=glpi --db-user=root
|
||||||
|
- name: Install plugin FusionInventory
|
||||||
|
run: cd glpi && php bin/console glpi:plugin:install -vvv -n --config-dir=tests --username=glpi fusioninventory
|
||||||
|
- name: Activate plugin FusionInventory
|
||||||
|
run: cd glpi && php bin/console glpi:plugin:activate -n --config-dir=tests fusioninventory
|
||||||
|
- name: run tests
|
||||||
|
run: cd glpi/plugins/fusioninventory/ && php vendor/bin/phpunit --testdox tests/
|
661
Mission4/roles/glpi/files/fusioninventory/LICENSE
Normal file
661
Mission4/roles/glpi/files/fusioninventory/LICENSE
Normal file
@ -0,0 +1,661 @@
|
|||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU Affero General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works, specifically designed to ensure
|
||||||
|
cooperation with the community in the case of network server software.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
our General Public Licenses are intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
Developers that use our General Public Licenses protect your rights
|
||||||
|
with two steps: (1) assert copyright on the software, and (2) offer
|
||||||
|
you this License which gives you legal permission to copy, distribute
|
||||||
|
and/or modify the software.
|
||||||
|
|
||||||
|
A secondary benefit of defending all users' freedom is that
|
||||||
|
improvements made in alternate versions of the program, if they
|
||||||
|
receive widespread use, become available for other developers to
|
||||||
|
incorporate. Many developers of free software are heartened and
|
||||||
|
encouraged by the resulting cooperation. However, in the case of
|
||||||
|
software used on network servers, this result may fail to come about.
|
||||||
|
The GNU General Public License permits making a modified version and
|
||||||
|
letting the public access it on a server without ever releasing its
|
||||||
|
source code to the public.
|
||||||
|
|
||||||
|
The GNU Affero General Public License is designed specifically to
|
||||||
|
ensure that, in such cases, the modified source code becomes available
|
||||||
|
to the community. It requires the operator of a network server to
|
||||||
|
provide the source code of the modified version running there to the
|
||||||
|
users of that server. Therefore, public use of a modified version, on
|
||||||
|
a publicly accessible server, gives the public access to the source
|
||||||
|
code of the modified version.
|
||||||
|
|
||||||
|
An older license, called the Affero General Public License and
|
||||||
|
published by Affero, was designed to accomplish similar goals. This is
|
||||||
|
a different license, not a version of the Affero GPL, but Affero has
|
||||||
|
released a new version of the Affero GPL which permits relicensing under
|
||||||
|
this license.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, if you modify the
|
||||||
|
Program, your modified version must prominently offer all users
|
||||||
|
interacting with it remotely through a computer network (if your version
|
||||||
|
supports such interaction) an opportunity to receive the Corresponding
|
||||||
|
Source of your version by providing access to the Corresponding Source
|
||||||
|
from a network server at no charge, through some standard or customary
|
||||||
|
means of facilitating copying of software. This Corresponding Source
|
||||||
|
shall include the Corresponding Source for any work covered by version 3
|
||||||
|
of the GNU General Public License that is incorporated pursuant to the
|
||||||
|
following paragraph.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the work with which it is combined will remain governed by version
|
||||||
|
3 of the GNU General Public License.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU Affero General Public License from time to time. Such new versions
|
||||||
|
will be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU Affero General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU Affero General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU Affero General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for the
|
||||||
|
specific requirements.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
39
Mission4/roles/glpi/files/fusioninventory/README.md
Normal file
39
Mission4/roles/glpi/files/fusioninventory/README.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
## Fusioninventory Plugin
|
||||||
|
[](https://travis-ci.org/fusioninventory/fusioninventory-for-glpi)
|
||||||
|
[](https://coveralls.io/r/fusioninventory/fusioninventory-for-glpi)
|
||||||
|
( + )
|
||||||
|
|
||||||
|
This plugin makes GLPI to process various types of tasks for Fusioninventory agents:
|
||||||
|
* Computer inventory
|
||||||
|
* Network discovery
|
||||||
|
* Network (SNMP) inventory
|
||||||
|
* Software deployment
|
||||||
|
* VMWare ESX host remote inventory
|
||||||
|
* Collect data (files, Windows registry, WMI)
|
||||||
|
|
||||||
|
## Third-party code
|
||||||
|
|
||||||
|
* PluginFusioninventoryFindFiles() is copyright [rosettacode.org](http://rosettacode.org/wiki/Walk_a_directory/Recursively#PHP) and made available under GNU Free Documentation License.
|
||||||
|
|
||||||
|
## Third-party icons and images
|
||||||
|
|
||||||
|
Some icons used in the project comes from the following set of graphics licensed:
|
||||||
|
* Dortmund is copyright by [PC.DE](http://pc.de/icons/) and made available under a [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/deed).
|
||||||
|
|
||||||
|
* Fugue Icons is copyright by [Yusuke Kamiyamame](http://p.yusukekamiyamane.com/) and made available under a [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/deed).
|
||||||
|
|
||||||
|
* [Icojam](http://www.icojam.com) : icon_deployinstall.png, icon_deployuninstall.png
|
||||||
|
|
||||||
|
* [myBaco](http://mybaco.deviantart.com) : icon_icon_InventoryComputerESX.png
|
||||||
|
|
||||||
|
* [VistaICO.com](http://www.vistaico.com) : icon_wakeonlan.png
|
||||||
|
|
||||||
|
* Aha-Soft : icon_collect.png
|
||||||
|
|
||||||
|
* [BlueMalboro](http://bluemalboro.deviantart.com/art/Micro-Icon-Set-42295693) : icon_networkdiscovery.png, icon_networkinventory.png
|
||||||
|
|
||||||
|
## Additional resources
|
||||||
|
|
||||||
|
* [Official website](http://fusioninventory.org/)
|
||||||
|
* [Translations on transifex service](https://www.transifex.com/ddurieux/FusionInventory/content/)
|
||||||
|
* [Issues](https://github.com/fusioninventory/fusioninventory-for-glpi)
|
18
Mission4/roles/glpi/files/fusioninventory/README.tests.md
Normal file
18
Mission4/roles/glpi/files/fusioninventory/README.tests.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# How to run tests
|
||||||
|
|
||||||
|
|
||||||
|
## Install GLPI tests
|
||||||
|
|
||||||
|
```
|
||||||
|
cd glpi/
|
||||||
|
php bin/console glpi:database:install --config-dir=tests --force
|
||||||
|
php bin/console glpi:plugin:install --config-dir=tests --username=glpi fusioninventory
|
||||||
|
php bin/console glpi:plugin:activate --config-dir=tests fusioninventory
|
||||||
|
```
|
||||||
|
|
||||||
|
## Run FusionInventory tests
|
||||||
|
|
||||||
|
```
|
||||||
|
cd plugins/fusioninventory/
|
||||||
|
php vendor/bin/phpunit --testdox tests/
|
||||||
|
```
|
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
FusionInventory
|
||||||
|
Copyright (C) 2010-2011 by the FusionInventory Development Team.
|
||||||
|
|
||||||
|
http://www.fusioninventory.org/ http://forge.fusioninventory.org/
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
LICENSE
|
||||||
|
|
||||||
|
This file is part of FusionInventory project.
|
||||||
|
|
||||||
|
FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@package FusionInventory
|
||||||
|
@author Walid Nouh
|
||||||
|
@co-author
|
||||||
|
@copyright Copyright (c) 2010-2011 FusionInventory team
|
||||||
|
@license AGPL License 3.0 or (at your option) any later version
|
||||||
|
http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
@link http://www.fusioninventory.org/
|
||||||
|
@link http://forge.fusioninventory.org/projects/fusioninventory-for-glpi/
|
||||||
|
@since 2010
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
header("Content-Type: text/json; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
|
||||||
|
if (isset($_REQUEST['jobstate_id'])) {
|
||||||
|
$jobstate = new PluginFusioninventoryTaskjobstate();
|
||||||
|
$jobstate->getFromDB($_REQUEST['jobstate_id']);
|
||||||
|
|
||||||
|
$job = new PluginFusioninventoryTaskjob();
|
||||||
|
$job->delete(['id' => $jobstate->fields['plugin_fusioninventory_taskjobs_id']], true);
|
||||||
|
}
|
@ -0,0 +1,76 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display deploy type value.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$rand = filter_input(INPUT_POST, "rand");
|
||||||
|
$mode = filter_input(INPUT_POST, "mode");
|
||||||
|
$type = filter_input(INPUT_POST, "type");
|
||||||
|
$classname = filter_input(INPUT_POST, "class");
|
||||||
|
|
||||||
|
if (empty($rand) && (empty($type))) {
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
//Only process class that are related to software deployment
|
||||||
|
if (!class_exists($classname)
|
||||||
|
|| !in_array($classname,
|
||||||
|
['PluginFusioninventoryDeployCheck',
|
||||||
|
'PluginFusioninventoryDeployFile',
|
||||||
|
'PluginFusioninventoryDeployAction',
|
||||||
|
'PluginFusioninventoryDeployUserinteraction'
|
||||||
|
])) {
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
$class = new $classname();
|
||||||
|
$request_data = [
|
||||||
|
'packages_id' => filter_input(INPUT_POST, "packages_id"),
|
||||||
|
'orders_id' => filter_input(INPUT_POST, "orders_id"),
|
||||||
|
'value' => filter_input(INPUT_POST, "value")
|
||||||
|
];
|
||||||
|
$class->displayAjaxValues(null, $request_data, $rand, $mode);
|
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display packages server file
|
||||||
|
* tree.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
PluginFusioninventoryDeployFile::showServerFileTree(
|
||||||
|
filter_input(INPUT_POST, "rand"));
|
@ -0,0 +1,121 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display deploy package form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$fi_move_item = filter_input(INPUT_POST, "move_item");
|
||||||
|
if (!empty($fi_move_item)) { //ajax request
|
||||||
|
|
||||||
|
$json_response = ["success" => true, "reason" => ''];
|
||||||
|
|
||||||
|
if (Session::haveRight('plugin_fusioninventory_package', UPDATE)) {
|
||||||
|
$params = [
|
||||||
|
'old_index' => filter_input(INPUT_POST, "old_index"),
|
||||||
|
'new_index' => filter_input(INPUT_POST, "new_index"),
|
||||||
|
'id' => filter_input(INPUT_POST, "id")
|
||||||
|
];
|
||||||
|
$itemtype = filter_input(INPUT_POST, "itemtype");
|
||||||
|
if (class_exists($itemtype)) {
|
||||||
|
$item = new $itemtype();
|
||||||
|
$item->move_item($params);
|
||||||
|
} else {
|
||||||
|
Toolbox::logDebug("package subtype not found : " . $params['itemtype']);
|
||||||
|
Html::displayErrorAndDie ("package subtype not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$json_response['success'] = false;
|
||||||
|
$json_response['reason'] = __('Package modification is forbidden by your profile.');
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode( $json_response );
|
||||||
|
//exit;
|
||||||
|
} else {
|
||||||
|
$packages_id = filter_input(INPUT_POST, "packages_id");
|
||||||
|
$rand = filter_input(INPUT_POST, "rand");
|
||||||
|
$mode = filter_input(INPUT_POST, "mode");
|
||||||
|
$fi_subtype = filter_input(INPUT_POST, "subtype");
|
||||||
|
if (empty($packages_id) && empty($rand)
|
||||||
|
&& empty($fi_subtype)) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_numeric($packages_id)) {
|
||||||
|
Toolbox::logDebug("Error: orders_id in request is not an integer");
|
||||||
|
Toolbox::logDebug(print_r($packages_id, true));
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$pfDeployPackage = new PluginFusioninventoryDeployPackage();
|
||||||
|
$pfDeployPackage->getFromDB($packages_id);
|
||||||
|
|
||||||
|
//TODO: In the displayForm function, $_REQUEST is somewhat too much for the '$datas' parameter
|
||||||
|
// I think we could use only $order -- Kevin 'kiniou' Roy
|
||||||
|
$input = [
|
||||||
|
'index' => filter_input(INPUT_POST, "index"),
|
||||||
|
'value' => filter_input(INPUT_POST, "value"),
|
||||||
|
'packages_id' => filter_input(INPUT_POST, "packages_id"),
|
||||||
|
'orders_id' => filter_input(INPUT_POST, "orders_id"),
|
||||||
|
];
|
||||||
|
$itemtype = filter_input(INPUT_POST, "subtype");
|
||||||
|
switch (filter_input(INPUT_POST, "subtype")) {
|
||||||
|
case 'package_json_debug':
|
||||||
|
if (isset($order->fields['json'])) {
|
||||||
|
$pfDeployPackage->displayJSONDebug();
|
||||||
|
} else {
|
||||||
|
echo "{}";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$classname = 'PluginFusioninventoryDeploy'.ucfirst($itemtype);
|
||||||
|
$class = new $classname();
|
||||||
|
$class->displayForm($pfDeployPackage, $input, $rand, $mode);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display deploy user logged.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Kevin Roy
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
$loggedin = [];
|
||||||
|
$loggedin['result'] = 1;
|
||||||
|
if (!isset($_SESSION["glpiname"])) {
|
||||||
|
if (!getLoginUserID()) {
|
||||||
|
$loggedin['result'] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($loggedin);
|
||||||
|
|
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown credentials
|
||||||
|
* for ESX.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Walid Nouh
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownCredentials.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_credential', READ);
|
||||||
|
$params = [
|
||||||
|
'itemtype' => filter_input(INPUT_POST, "itemtype"),
|
||||||
|
'id' => filter_input(INPUT_POST, "id")
|
||||||
|
];
|
||||||
|
PluginFusioninventoryCredential::dropdownCredentialsForItemtype($params);
|
||||||
|
|
@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown task jobs.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdown_taskjob.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Can not acces directly to this file");
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
$id = filter_input(INPUT_POST, "id");
|
||||||
|
if (!empty($id) AND $id > 0) {
|
||||||
|
Dropdown::show('PluginFusioninventoryTaskjob', [
|
||||||
|
'name' => "taskjobs_id",
|
||||||
|
'condition' => "`plugin_fusioninventory_tasks_id`='".$id."'"
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and displaydropdown task action
|
||||||
|
* list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Walid Nouh
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownactionlist.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Can not acces directly to this file");
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
$pfTaskjob->dropdownAction(
|
||||||
|
"ActionList",
|
||||||
|
filter_input(INPUT_POST, "ActionType"),
|
||||||
|
filter_input(INPUT_POST, "method"),
|
||||||
|
filter_input(INPUT_POST, "actiontypeid"));
|
||||||
|
|
@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown action
|
||||||
|
* selection.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownactionselection.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Can not acces directly to this file");
|
||||||
|
}
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
echo "<script type='text/javascript'>
|
||||||
|
var select = document.getElementById('actionlist');
|
||||||
|
var obj = document.getElementById('".filter_input(INPUT_POST, "actionselectadd")."');
|
||||||
|
var actiontype = document.getElementById('".filter_input(INPUT_POST, "actiontypeid")."');
|
||||||
|
|
||||||
|
var list = document.getElementById('actionselection').innerHTML;
|
||||||
|
|
||||||
|
var pattern1 = new RegExp(actiontype.options[actiontype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + ',');
|
||||||
|
var pattern2 = new RegExp(actiontype.options[actiontype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + '$');
|
||||||
|
if ((select.value.match(pattern1)) || (select.value.match(pattern2))) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
document.getElementById('actionselection').innerHTML = list + '<br>' + actiontype.options[actiontype.selectedIndex].text + ' -> ' + obj.options[obj.selectedIndex].text +
|
||||||
|
' <img src=\"".$CFG_GLPI['root_doc']."/pics/delete.png\" onclick=\'delaction(\"' + actiontype.options[actiontype.selectedIndex].text + '->' + obj.options[obj.selectedIndex].text + '->' + actiontype.options[actiontype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + '\")\'>';
|
||||||
|
if (actiontype.value !== '0') {
|
||||||
|
document.getElementById('actionlist').value = document.getElementById('actionlist').value + ',' + actiontype.options[actiontype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value;
|
||||||
|
} else {
|
||||||
|
document.getElementById('actionlist').value = document.getElementById('actionlist').value + ',' + obj.options[obj.selectedIndex].value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>";
|
||||||
|
|
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown action types.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownactiontype.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob;
|
||||||
|
$pfTaskjob->dropdownActionType(
|
||||||
|
"ActionType",
|
||||||
|
filter_input(INPUT_POST, "method"),
|
||||||
|
filter_input(INPUT_POST, "value"),
|
||||||
|
"");
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown task
|
||||||
|
* definition list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowndefinitionlist.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Can not acces directly to this file");
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob;
|
||||||
|
$pfTaskjob->showDefinitions(filter_input(INPUT_POST, "taskjobs_id"));
|
||||||
|
|
@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown task
|
||||||
|
* definition selection.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowndefinitionselection.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Can not acces directly to this file");
|
||||||
|
}
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
echo "<script type='text/javascript'>
|
||||||
|
var select = document.getElementById('definitionlist');
|
||||||
|
var obj = document.getElementById('".filter_input(INPUT_POST, "defselectadd")."');
|
||||||
|
var deftype = document.getElementById('".filter_input(INPUT_POST, "definitiontypeid")."');
|
||||||
|
|
||||||
|
var list = document.getElementById('definitionselection').innerHTML;
|
||||||
|
|
||||||
|
var pattern1 = new RegExp(deftype.options[deftype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + ',');
|
||||||
|
var pattern2 = new RegExp(deftype.options[deftype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + '$');
|
||||||
|
if ((select.value.match(pattern1)) || (select.value.match(pattern2))) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
document.getElementById('definitionselection').innerHTML = list + '<br>' + deftype.options[deftype.selectedIndex].text + ' -> ' + obj.options[obj.selectedIndex].text +
|
||||||
|
' <img src=\"".$CFG_GLPI['root_doc']."/pics/delete.png\" onclick=\'deldef(\"' + deftype.options[deftype.selectedIndex].text + '->' + obj.options[obj.selectedIndex].text + '->' + deftype.options[deftype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + '\")\'>';
|
||||||
|
if (deftype.value !== '0') {
|
||||||
|
document.getElementById('definitionlist').value = document.getElementById('definitionlist').value + ',' + deftype.options[deftype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value;
|
||||||
|
} else {
|
||||||
|
document.getElementById('definitionlist').value = document.getElementById('definitionlist').value + ',' + obj.options[obj.selectedIndex].value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>";
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown task
|
||||||
|
* definition type.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowndefinitiontype.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob;
|
||||||
|
$pfTaskjob->dropdownDefinitionType(
|
||||||
|
"DefinitionType",
|
||||||
|
filter_input(INPUT_POST, "method"),
|
||||||
|
filter_input(INPUT_POST, "taskjobs_id"),
|
||||||
|
"");
|
||||||
|
|
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown task
|
||||||
|
* definition type list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowndefinitiontypelist.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Can not acces directly to this file");
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob;
|
||||||
|
$pfTaskjob->dropdownDefinition(
|
||||||
|
"DefinitionList",
|
||||||
|
filter_input(INPUT_POST, "DefinitionType"),
|
||||||
|
filter_input(INPUT_POST, "method"),
|
||||||
|
filter_input(INPUT_POST, "deftypeid"),
|
||||||
|
filter_input(INPUT_POST, "taskjobs_id"));
|
||||||
|
|
@ -0,0 +1,119 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown task job
|
||||||
|
* definition.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
// Make a select box
|
||||||
|
$type = filter_input(INPUT_POST, "type");
|
||||||
|
$actortype = filter_input(INPUT_POST, "actortype");
|
||||||
|
|
||||||
|
if (!empty($type) && !empty($actortype)) {
|
||||||
|
$rand = mt_rand();
|
||||||
|
|
||||||
|
$entity_restrict = filter_input(INPUT_POST, "entity_restrict");
|
||||||
|
switch ($type) {
|
||||||
|
case "user" :
|
||||||
|
$right = 'all';
|
||||||
|
/// TODO : review depending of itil object
|
||||||
|
// Only steal or own ticket whit empty assign
|
||||||
|
if ($actortype == 'assign') {
|
||||||
|
$right = "own_ticket";
|
||||||
|
if (!$item->canAssign()) {
|
||||||
|
$right = 'id';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$options = ['name' => '_itil_'.$actortype.'[users_id]',
|
||||||
|
'entity' => $entity_restrict,
|
||||||
|
'right' => $right,
|
||||||
|
'ldap_import' => true];
|
||||||
|
$withemail = false;
|
||||||
|
if ($CFG_GLPI["use_mailing"]) {
|
||||||
|
$allow_email = filter_input(INPUT_POST, "allow_email");
|
||||||
|
$withemail = (!empty($allow_email) ? $allow_email : false);
|
||||||
|
$paramscomment = ['value' => '__VALUE__',
|
||||||
|
'allow_email' => $withemail,
|
||||||
|
'field' => "_itil_".$actortype];
|
||||||
|
// Fix rand value
|
||||||
|
$options['rand'] = $rand;
|
||||||
|
$options['toupdate'] = ['value_fieldname' => 'value',
|
||||||
|
'to_update' => "notif_user_$rand",
|
||||||
|
'url' => $CFG_GLPI["root_doc"]."/ajax/uemailUpdate.php",
|
||||||
|
'moreparams' => $paramscomment];
|
||||||
|
}
|
||||||
|
$rand = User::dropdown($options);
|
||||||
|
|
||||||
|
if ($CFG_GLPI["use_mailing"]==1) {
|
||||||
|
echo "<br><span id='notif_user_$rand'>";
|
||||||
|
if ($withemail) {
|
||||||
|
echo __('Email followup').' : ';
|
||||||
|
$rand = Dropdown::showYesNo('_itil_'.$actortype.'[use_notification]', 1);
|
||||||
|
echo '<br>'.__('Email').' : ';
|
||||||
|
echo "<input type='text' size='25' name='_itil_".$actortype."[alternative_email]'>";
|
||||||
|
}
|
||||||
|
echo "</span>";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "group" :
|
||||||
|
$cond = ($actortype=='assign' ? $cond = '`is_assign`' : $cond = '`is_requester`');
|
||||||
|
Dropdown::show('Group', ['name' => '_itil_'.$actortype.'[groups_id]',
|
||||||
|
'entity' => $entity_restrict,
|
||||||
|
'condition' => $cond]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "supplier" :
|
||||||
|
Dropdown::show('Supplier', ['name' => 'suppliers_id_assign',
|
||||||
|
'entity' => $entity_restrict]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown task jobs.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownlist.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Can not acces directly to this file");
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
$pfTaskjob->showList();
|
||||||
|
|
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown location
|
||||||
|
* related to deploy mirrors.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownlocation.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$pfDeployMirror= new PluginFusioninventoryDeployMirror();
|
||||||
|
$id = filter_input(INPUT_POST, "id");
|
||||||
|
if ($id != '') {
|
||||||
|
$pfDeployMirror->getFromDB($id);
|
||||||
|
} else {
|
||||||
|
$pfDeployMirror->getEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
Location::dropdown(
|
||||||
|
[
|
||||||
|
'value' => $pfDeployMirror->fields["locations_id"],
|
||||||
|
'entity' => $pfDeployMirror->fields["entities_id"],
|
||||||
|
'entity_sons' => filter_input(INPUT_POST, "is_recursive"),
|
||||||
|
]
|
||||||
|
);
|
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown method types.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowntype.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$typename = filter_input(INPUT_POST, "typename");
|
||||||
|
$method = filter_input(INPUT_POST, "method");
|
||||||
|
$taskjobs_id = filter_input(INPUT_POST, "taskjobs_id");
|
||||||
|
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
if (!empty($typename)
|
||||||
|
&& !empty($method)
|
||||||
|
&& !empty($taskjobs_id)) {
|
||||||
|
$pfTaskjob->dropdownType($typename, $method,
|
||||||
|
filter_input(INPUT_POST, "value"), $taskjobs_id, "");
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display dropdown task type
|
||||||
|
* list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowntypelist.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Can not acces directly to this file");
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
$myname = filter_input(INPUT_POST, "myname");
|
||||||
|
$myamemore = filter_input(INPUT_POST, $myname);
|
||||||
|
if ($myamemore != '') {
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
$pfTaskjob->dropdownvalue($myname, $myamemore,
|
||||||
|
filter_input(INPUT_POST, "method"),
|
||||||
|
filter_input(INPUT_POST, filter_input(INPUT_POST, "name").'typeid'),
|
||||||
|
filter_input(INPUT_POST, "taskjobs_id"));
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and expand tasks.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
header("Content-Type: text/json; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
|
||||||
|
$_SESSION['plugin_fusioninventory_tasks_expanded'][intval(filter_input(INPUT_GET, "task_id"))] = filter_input(INPUT_GET, "expanded");
|
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display logs of task job
|
||||||
|
* states.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Kevin Roy
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "jobstates_logs.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
}
|
||||||
|
//unlock session since access checks have been done
|
||||||
|
session_write_close();
|
||||||
|
header("Content-Type: text/json; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
$pfJobstate = new PluginFusioninventoryTaskjobstate();
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
"id" => filter_input(INPUT_GET, "id"),
|
||||||
|
"last_date" => filter_input(INPUT_GET, "last_date")
|
||||||
|
];
|
||||||
|
$pfJobstate->ajaxGetLogs($params);
|
112
Mission4/roles/glpi/files/fusioninventory/ajax/remote_status.php
Normal file
112
Mission4/roles/glpi/files/fusioninventory/ajax/remote_status.php
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
FusionInventory
|
||||||
|
Copyright (C) 2010-2011 by the FusionInventory Development Team.
|
||||||
|
|
||||||
|
http://www.fusioninventory.org/ http://forge.fusioninventory.org/
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
LICENSE
|
||||||
|
|
||||||
|
This file is part of FusionInventory project.
|
||||||
|
|
||||||
|
FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@package FusionInventory
|
||||||
|
@author Walid Nouh
|
||||||
|
@co-author
|
||||||
|
@copyright Copyright (c) 2010-2011 FusionInventory team
|
||||||
|
@license AGPL License 3.0 or (at your option) any later version
|
||||||
|
http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
@link http://www.fusioninventory.org/
|
||||||
|
@link http://forge.fusioninventory.org/projects/fusioninventory-for-glpi/
|
||||||
|
@since 2010
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
header("Content-Type: text/json; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
|
||||||
|
if (isset($_REQUEST['id'])) {
|
||||||
|
$agent = new PluginFusioninventoryAgent;
|
||||||
|
$agent->getFromDB((int) $_REQUEST['id']);
|
||||||
|
|
||||||
|
if (isset($_REQUEST['action'])) {
|
||||||
|
|
||||||
|
switch ($_REQUEST['action']) {
|
||||||
|
case "get_status":
|
||||||
|
$agentStatus = $agent->getStatus();
|
||||||
|
$agentStatus['waiting'] = false;
|
||||||
|
|
||||||
|
switch ($agentStatus['message']) {
|
||||||
|
|
||||||
|
case 'executing scheduled tasks':
|
||||||
|
case 'running':
|
||||||
|
$agentStatus['message'] = __('Running');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'noanswer':
|
||||||
|
$agentStatus['message'] = "<i class='fa fa-exclamation-triangle'></i>".
|
||||||
|
__('cannot contact the agent', 'fusioninventory');
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'waiting':
|
||||||
|
$agentStatus['waiting'] = true;
|
||||||
|
$agentStatus['message'] = sprintf(
|
||||||
|
__('Available on %1$s', 'fusioninventory'),
|
||||||
|
'<a target="_blank" href="'. $agentStatus['url_ok'] . '">' . $agentStatus['url_ok'] . '</a>'
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
if (strstr($agentStatus['message'], 'running')) {
|
||||||
|
$agentStatus['message'] = $agentStatus['message'];
|
||||||
|
} else {
|
||||||
|
$agentStatus['message'] = "SELinux problem, do 'setsebool -P httpd_can_network_connect on'";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
echo json_encode($agentStatus);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "start_agent";
|
||||||
|
if ($agent->wakeUp()) {
|
||||||
|
Session::addMessageAfterRedirect(__('The agent is running', 'fusioninventory'));
|
||||||
|
$response = [
|
||||||
|
'status' => 'ok'
|
||||||
|
];
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Session::addMessageAfterRedirect(__('Impossible to communicate with agent!', 'fusioninventory'));
|
||||||
|
$response = [
|
||||||
|
'status' => 'ko'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($response);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
FusionInventory
|
||||||
|
Copyright (C) 2010-2011 by the FusionInventory Development Team.
|
||||||
|
|
||||||
|
http://www.fusioninventory.org/ http://forge.fusioninventory.org/
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
LICENSE
|
||||||
|
|
||||||
|
This file is part of FusionInventory project.
|
||||||
|
|
||||||
|
FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@package FusionInventory
|
||||||
|
@author Kevin Roy
|
||||||
|
@co-author
|
||||||
|
@copyright Copyright (c) 2010-2011 FusionInventory team
|
||||||
|
@license AGPL License 3.0 or (at your option) any later version
|
||||||
|
http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
@link http://www.fusioninventory.org/
|
||||||
|
@link http://forge.fusioninventory.org/projects/fusioninventory-for-glpi/
|
||||||
|
@since 2010
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
header("Content-Type: text/json; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
|
||||||
|
if (isset($_REQUEST['params']) && is_array($_REQUEST['params'])) {
|
||||||
|
foreach ($_REQUEST['params'] as $params) {
|
||||||
|
PluginFusioninventoryTaskjob::restartJob($params);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
PluginFusioninventoryTaskjob::restartJob($_REQUEST);
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display server file tree for
|
||||||
|
* deploy package.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$AJAX_INCLUDE = 1;
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
PluginFusioninventoryDeployFile::getServerFileTree(filter_input(INPUT_POST, "node"));
|
||||||
|
|
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display task job log detail.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "showtaskjoblogdetail.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Can not acces directly to this file");
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$pftaskjoblog = new PluginFusioninventoryTaskjoblog();
|
||||||
|
echo $pftaskjoblog->showHistoryInDetail(
|
||||||
|
filter_input(INPUT_POST, "agents_id"),
|
||||||
|
filter_input(INPUT_POST, "uniqid"),
|
||||||
|
"900")."</td>";
|
||||||
|
|
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display task job form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjob_form.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
// $_GET['taskjobs_id'] => update taskjob
|
||||||
|
// $_GET['tasks_id'] => add new taskjob
|
||||||
|
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
"id" => filter_input(INPUT_GET, "id"),
|
||||||
|
"task_id" => filter_input(INPUT_GET, "task_id")
|
||||||
|
];
|
||||||
|
|
||||||
|
$pfTaskjob->ajaxGetForm($params);
|
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display task job modules types.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjob_itemtypes.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
"moduletype" => filter_input(INPUT_GET, "moduletype"),
|
||||||
|
"method" => filter_input(INPUT_GET, "method"),
|
||||||
|
];
|
||||||
|
|
||||||
|
$pfTaskjob->ajaxModuleTypesDropdown($params);
|
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display task job logs.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @author Kevin Roy
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!isset($_SERVER['PHP_SELF'])
|
||||||
|
|| strpos(filter_input(INPUT_SERVER, 'PHP_SELF'), "taskjob_logs.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
|
||||||
|
$pfTask = new PluginFusioninventoryTask();
|
||||||
|
$pfTask->ajaxGetJobLogs($_GET);
|
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display task job module items.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjob_moduleitems.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
"moduletype" => filter_input(INPUT_GET, "moduletype"),
|
||||||
|
"itemtype" => filter_input(INPUT_GET, "itemtype"),
|
||||||
|
"method" => filter_input(INPUT_GET, "method"),
|
||||||
|
];
|
||||||
|
|
||||||
|
$pfTaskjob->ajaxModuleItemsDropdown($params);
|
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and display task job module types.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjob_moduletypes.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
"moduletype" => filter_input(INPUT_GET, "moduletype"),
|
||||||
|
"method" => filter_input(INPUT_GET, "method")
|
||||||
|
];
|
||||||
|
|
||||||
|
$pfTaskjob->ajaxModuleTypesDropdown($params);
|
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and add task job type.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjobaddtype.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
$pfTaskjob->additemtodefatc(
|
||||||
|
filter_input(INPUT_POST, "type"),
|
||||||
|
filter_input(INPUT_POST, "itemtype"),
|
||||||
|
filter_input(INPUT_POST, "items_id"),
|
||||||
|
filter_input(INPUT_POST, "taskjobs_id"));
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and delete task job type.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjobdeletetype.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
$pfTaskjob->deleteitemtodefatc(
|
||||||
|
filter_input(INPUT_POST, "type"),
|
||||||
|
filter_input(INPUT_POST, filter_input(INPUT_POST, "type").'item'),
|
||||||
|
filter_input(INPUT_POST, "taskjobs_id"));
|
||||||
|
|
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is called by ajax function and update task method.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskmethodupdate.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
}
|
||||||
|
|
||||||
|
Session::checkCentralAccess();
|
||||||
|
|
||||||
|
if (filter_input(INPUT_POST, "method") != '') {
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
$pfTaskjob->updateMethod(
|
||||||
|
filter_input(INPUT_POST, "method"),
|
||||||
|
filter_input(INPUT_POST, "taskjobs_id"));
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the REST communication for collect module
|
||||||
|
* with the agent
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
include ("../../../../inc/includes.php");
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
//Agent communication using REST protocol
|
||||||
|
|
||||||
|
$pfCollect = new PluginFusioninventoryCollect();
|
||||||
|
|
||||||
|
$response = $pfCollect->communication(filter_input(INPUT_GET, "action"), filter_input(INPUT_GET, "machineid"), filter_input(INPUT_GET, "uuid"));
|
||||||
|
|
||||||
|
echo json_encode($response);
|
290
Mission4/roles/glpi/files/fusioninventory/b/deploy/index.php
Normal file
290
Mission4/roles/glpi/files/fusioninventory/b/deploy/index.php
Normal file
@ -0,0 +1,290 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the REST communication for deploy module
|
||||||
|
* with the agent
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Kevin Roy
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
include ("../../../../inc/includes.php");
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
//Store deploy task version
|
||||||
|
//If task is lower than 2.2, there's no version sent by the agent
|
||||||
|
//we set it to 0
|
||||||
|
$deploy_task_version = 0;
|
||||||
|
if (isset($_GET['version'])) {
|
||||||
|
$deploy_task_version = $_GET['version'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = false;
|
||||||
|
//Agent communication using REST protocol
|
||||||
|
switch (filter_input(INPUT_GET, "action")) {
|
||||||
|
|
||||||
|
case 'getJobs':
|
||||||
|
$machineid = filter_input(INPUT_GET, "machineid");
|
||||||
|
if (isset($machineid)) {
|
||||||
|
$pfAgent = new PluginFusioninventoryAgent();
|
||||||
|
$pfAgentModule = new PluginFusioninventoryAgentmodule();
|
||||||
|
$pfTask = new PluginFusioninventoryTask();
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
$pfTaskjobstate = new PluginFusioninventoryTaskjobstate();
|
||||||
|
|
||||||
|
$agent = $pfAgent->infoByKey(Toolbox::addslashes_deep($machineid));
|
||||||
|
|
||||||
|
if (isset($agent['id'])) {
|
||||||
|
|
||||||
|
$taskjobstates = $pfTask->getTaskjobstatesForAgent(
|
||||||
|
$agent['id'],
|
||||||
|
['deployinstall']
|
||||||
|
);
|
||||||
|
if (!$pfAgentModule->isAgentCanDo("DEPLOY", $agent['id'])) {
|
||||||
|
foreach ($taskjobstates as $taskjobstate) {
|
||||||
|
$taskjobstate->cancel(
|
||||||
|
__("Deploy module has been disabled for this agent", 'fusioninventory')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$response = "{}";
|
||||||
|
} else {
|
||||||
|
$package = new PluginFusioninventoryDeployPackage();
|
||||||
|
$deploycommon = new PluginFusioninventoryDeployCommon();
|
||||||
|
|
||||||
|
//sort taskjobs by key id
|
||||||
|
/**
|
||||||
|
* TODO: sort taskjobs by 'index' field in the taskjob query since it can be
|
||||||
|
* manipulated by drag and drop (cf. Task::getTaskjobsForAgent() ).
|
||||||
|
*/
|
||||||
|
////start of json response
|
||||||
|
$order = new stdClass();
|
||||||
|
$order->jobs = [];
|
||||||
|
$order->associatedFiles = new stdClass();
|
||||||
|
|
||||||
|
////aggregate json orders in a single json response
|
||||||
|
foreach ($taskjobstates as $taskjobstate) {
|
||||||
|
|
||||||
|
// TODO: The run() method should be renamed as getData() and moved to the Package
|
||||||
|
// class since we want package configuration (Order class may be useless ... needs
|
||||||
|
// some thinking)
|
||||||
|
|
||||||
|
// Get taskjob json order
|
||||||
|
$jobstate_order = $deploycommon->run($taskjobstate);
|
||||||
|
if (!$jobstate_order) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Build the json to be sent
|
||||||
|
//check response depending on the
|
||||||
|
$jobstate_order = $package->buildJson($deploy_task_version,
|
||||||
|
$jobstate_order);
|
||||||
|
|
||||||
|
// Append order to the final json
|
||||||
|
$order->jobs[] = $jobstate_order['job'];
|
||||||
|
|
||||||
|
// Update associated files list
|
||||||
|
foreach ($jobstate_order['associatedFiles'] as $hash=>$associatedFiles) {
|
||||||
|
if (!array_key_exists($hash, $order->associatedFiles)) {
|
||||||
|
$order->associatedFiles->$hash = $associatedFiles;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$taskjobstate->changeStatus(
|
||||||
|
$taskjobstate->fields['id'],
|
||||||
|
$taskjobstate::SERVER_HAS_SENT_DATA
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// return an empty dictionnary if there are no jobs.
|
||||||
|
if (count($order->jobs) == 0) {
|
||||||
|
$response = "{}";
|
||||||
|
} else {
|
||||||
|
$response = json_encode($order);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'getFilePart':
|
||||||
|
$DB->close();
|
||||||
|
PluginFusioninventoryDeployFilepart::httpSendFile(filter_input(INPUT_GET, "file"));
|
||||||
|
exit;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'setStatus':
|
||||||
|
|
||||||
|
$partjob_mapping = [
|
||||||
|
"checking" => __('Checks', 'fusioninventory'),
|
||||||
|
"downloading" => __('Files download', 'fusioninventory'),
|
||||||
|
"prepare" => __('Files preparation', 'fusioninventory'),
|
||||||
|
"processing" => __('Actions', 'fusioninventory'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$error = false;
|
||||||
|
|
||||||
|
$params = [
|
||||||
|
'machineid' => filter_input(INPUT_GET, "machineid"),
|
||||||
|
'uuid' => filter_input(INPUT_GET, "uuid")
|
||||||
|
];
|
||||||
|
|
||||||
|
if (filter_input(INPUT_GET, "status") == 'ko') {
|
||||||
|
$params['code'] = 'ko';
|
||||||
|
$fi_currentStep = filter_input(INPUT_GET, "currentStep");
|
||||||
|
if (!empty($fi_currentStep)) {
|
||||||
|
$params['msg'] = $partjob_mapping[filter_input(INPUT_GET, "currentStep")]
|
||||||
|
. ":" . filter_input(INPUT_GET, "msg");
|
||||||
|
} else {
|
||||||
|
$params['msg'] = filter_input(INPUT_GET, "msg");
|
||||||
|
}
|
||||||
|
$error = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($error != true) {
|
||||||
|
if (filter_input(INPUT_GET, "msg") === 'job successfully completed'
|
||||||
|
|| filter_input(INPUT_GET, "msg") === 'job skipped') {
|
||||||
|
//Job has ended or has been skipped and status should be ok
|
||||||
|
$params['code'] = 'ok';
|
||||||
|
$params['msg'] = filter_input(INPUT_GET, "msg");
|
||||||
|
} else {
|
||||||
|
$params['code'] = 'running';
|
||||||
|
$fi_currentStep = filter_input(INPUT_GET, "currentStep");
|
||||||
|
if (!empty($fi_currentStep)) {
|
||||||
|
$params['msg'] = $partjob_mapping[filter_input(INPUT_GET, "currentStep")]
|
||||||
|
. ":" . filter_input(INPUT_GET, "msg");
|
||||||
|
} else {
|
||||||
|
$params['msg'] = filter_input(INPUT_GET, "msg");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (is_array($params['msg'])) {
|
||||||
|
$htmlspecialchars_flags = ENT_SUBSTITUTE | ENT_DISALLOWED;
|
||||||
|
|
||||||
|
$tmp_msg = implode("\n", $params['msg']);
|
||||||
|
$flags = null;
|
||||||
|
$tmp_msg =
|
||||||
|
stripcslashes(
|
||||||
|
htmlspecialchars(
|
||||||
|
$tmp_msg,
|
||||||
|
$htmlspecialchars_flags,
|
||||||
|
'UTF-8',
|
||||||
|
false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$params['msg'] = nl2br($tmp_msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Generic method to update logs
|
||||||
|
PluginFusioninventoryCommunicationRest::updateLog($params);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'setUserEvent':
|
||||||
|
$params = [
|
||||||
|
'machineid' => filter_input(INPUT_GET, "machineid"),
|
||||||
|
'uuid' => filter_input(INPUT_GET, "uuid")
|
||||||
|
];
|
||||||
|
|
||||||
|
//Action : postpone, cancel, continue
|
||||||
|
$behavior = filter_input(INPUT_GET, "behavior");
|
||||||
|
|
||||||
|
//before, after_download, after_download_failure,
|
||||||
|
//after_failure, after
|
||||||
|
$type = filter_input(INPUT_GET, "type");
|
||||||
|
|
||||||
|
//on_nouser, on_ok, on_cancel, on_abort, on_retry, on_ignore,
|
||||||
|
//on_yes, on_no, on_tryagain, on_continue, on_timeout, on_async,
|
||||||
|
//on_multiusers
|
||||||
|
$event = filter_input(INPUT_GET, "event");
|
||||||
|
|
||||||
|
//The user who did the interaction
|
||||||
|
$user = filter_input(INPUT_GET, "user");
|
||||||
|
|
||||||
|
//Process response if an agent provides a behavior, a type and an event
|
||||||
|
//the user parameter is not mandatory
|
||||||
|
if ($behavior !== false && $type !== false
|
||||||
|
&& $event !== false && $user !== false) {
|
||||||
|
$interaction = new PluginFusioninventoryDeployUserinteraction();
|
||||||
|
$cancel = false;
|
||||||
|
$postpone = false;
|
||||||
|
$params['msg'] = $interaction->getLogMessage($behavior, $type, $event,
|
||||||
|
$user);
|
||||||
|
switch ($behavior) {
|
||||||
|
case PluginFusioninventoryDeployUserinteraction::RESPONSE_STOP:
|
||||||
|
$params['code'] = 'ko';
|
||||||
|
$cancel = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PluginFusioninventoryDeployUserinteraction::RESPONSE_CONTINUE:
|
||||||
|
$params['code'] = 'running';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PluginFusioninventoryDeployUserinteraction::RESPONSE_POSTPONE:
|
||||||
|
$params['code'] = 'running';
|
||||||
|
$postpone = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PluginFusioninventoryDeployUserinteraction::RESPONSE_BAD_EVENT:
|
||||||
|
$params['code'] = 'ko';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Generic method to update logs
|
||||||
|
PluginFusioninventoryCommunicationRest::updateLog($params);
|
||||||
|
|
||||||
|
//If needed : cancel or postpone the job
|
||||||
|
if ($cancel || $postpone) {
|
||||||
|
$pfTaskjobstate = new PluginFusioninventoryTaskjobstate();
|
||||||
|
$pfTaskjobstate->getFromDBByUniqID($params['uuid']);
|
||||||
|
if ($cancel) {
|
||||||
|
$pfTaskjobstate->cancel(__('User canceled the job', 'fusioninventory'));
|
||||||
|
} else {
|
||||||
|
$pfTaskjobstate->postpone($type, __('User postponed the job', 'fusioninventory'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($response !== false) {
|
||||||
|
echo $response;
|
||||||
|
} else {
|
||||||
|
echo json_encode((object)[]);
|
||||||
|
}
|
115
Mission4/roles/glpi/files/fusioninventory/b/esx/index.php
Normal file
115
Mission4/roles/glpi/files/fusioninventory/b/esx/index.php
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the REST communication for ESX module
|
||||||
|
* with the agent
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Walid Nouh
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
//This call is to check that the ESX inventory service is up and running
|
||||||
|
$fi_status =filter_input(INPUT_GET, "status");
|
||||||
|
if (!empty($fi_status)) {
|
||||||
|
return 'ok';
|
||||||
|
}
|
||||||
|
ob_start();
|
||||||
|
include ("../../../../inc/includes.php");
|
||||||
|
ob_end_clean();
|
||||||
|
|
||||||
|
$response = false;
|
||||||
|
//Agent communication using REST protocol
|
||||||
|
$fi_machineid = filter_input(INPUT_GET, "machineid");
|
||||||
|
if (!empty($fi_machineid)) {
|
||||||
|
|
||||||
|
switch (filter_input(INPUT_GET, "action")) {
|
||||||
|
|
||||||
|
case 'getJobs':
|
||||||
|
$pfAgent = new PluginFusioninventoryAgent();
|
||||||
|
$pfTask = new PluginFusioninventoryTask();
|
||||||
|
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||||
|
$pfTaskjobstate = new PluginFusioninventoryTaskjobstate();
|
||||||
|
|
||||||
|
$agent = $pfAgent->infoByKey(Toolbox::addslashes_deep(filter_input(INPUT_GET, "machineid")));
|
||||||
|
|
||||||
|
if (isset($agent['id'])) {
|
||||||
|
$taskjobstates = $pfTask->getTaskjobstatesForAgent(
|
||||||
|
$agent['id'],
|
||||||
|
['InventoryComputerESX']
|
||||||
|
);
|
||||||
|
|
||||||
|
////start of json response
|
||||||
|
$order = new stdClass;
|
||||||
|
$order->jobs = [];
|
||||||
|
|
||||||
|
$module = new PluginFusioninventoryInventoryComputerESX();
|
||||||
|
foreach ($taskjobstates as $taskjobstate) {
|
||||||
|
$order->jobs[] = $module->run($taskjobstate);
|
||||||
|
|
||||||
|
$taskjobstate->changeStatus(
|
||||||
|
$taskjobstate->fields['id'],
|
||||||
|
$taskjobstate::SERVER_HAS_SENT_DATA
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// return an empty dictionnary if there are no jobs.
|
||||||
|
if (count($order->jobs) == 0) {
|
||||||
|
$response = "{}";
|
||||||
|
} else {
|
||||||
|
$response = json_encode($order);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'setLog':
|
||||||
|
//Generic method to update logs
|
||||||
|
PluginFusioninventoryCommunicationRest::updateLog($_GET);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($response !== false) {
|
||||||
|
echo $response;
|
||||||
|
} else {
|
||||||
|
echo json_encode((object)[]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
109
Mission4/roles/glpi/files/fusioninventory/css/deploy.css
Normal file
109
Mission4/roles/glpi/files/fusioninventory/css/deploy.css
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
table.package_item {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
table.package_item th {
|
||||||
|
width: 150px;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.package_item input[type=text],
|
||||||
|
table.package_item input[type=file],
|
||||||
|
table.package_item textarea {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.package_item textarea {
|
||||||
|
resize: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.package_item input[type=text] {
|
||||||
|
padding: 0 3px;
|
||||||
|
margin-right: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.package_item .table_retchecks {
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
table.package_item .table_retchecks input {
|
||||||
|
width: 65px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.package_item_list {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
table.package_item_list td {
|
||||||
|
max-width: 70px;
|
||||||
|
vertical-align: top;
|
||||||
|
overflow: auto;
|
||||||
|
word-wrap: break-word;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
table.package_item_list td.control {
|
||||||
|
width: 14px;
|
||||||
|
}
|
||||||
|
table.package_item_list .more {
|
||||||
|
float: right;
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
table.package_item_list .filename {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
table.package_item_list ul.retChecks {
|
||||||
|
list-style-type: disc;
|
||||||
|
padding-left:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.package_item_list ul.retChecks li {
|
||||||
|
margin-left:3px;
|
||||||
|
}
|
||||||
|
table.package_item_list tr.selected {
|
||||||
|
background-color: #DFC8C8;
|
||||||
|
}
|
||||||
|
a.edit {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filename .size {
|
||||||
|
font-size: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fingerprint {
|
||||||
|
font-size: 8px;
|
||||||
|
margin-top: 2px;
|
||||||
|
margin-bottom:2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fingerprint_good {
|
||||||
|
min-height: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
background-image: url("../pics/fingerprint-good.png");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
color:#003000;
|
||||||
|
padding-left : 18px;
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fingerprint_bad {
|
||||||
|
min-height: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
background-image: url("../pics/fingerprint-bad.png");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
color:#FF0000;
|
||||||
|
padding-left : 18px;
|
||||||
|
vertical-align:middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fingerprint_badmsg {
|
||||||
|
background-color: #FFEEEE;
|
||||||
|
color:#550000;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
/* drag and drop element */
|
||||||
|
.drag {
|
||||||
|
background-image: url("../pics/drag.png");
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
cursor: move;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border:0 !important;
|
||||||
|
}
|
991
Mission4/roles/glpi/files/fusioninventory/css/views.css
Normal file
991
Mission4/roles/glpi/files/fusioninventory/css/views.css
Normal file
@ -0,0 +1,991 @@
|
|||||||
|
.msgboxmonit {
|
||||||
|
margin: 0 auto 20px;
|
||||||
|
width: 700px;
|
||||||
|
padding: 11px 0;
|
||||||
|
font-size: 11px;
|
||||||
|
text-align: center;
|
||||||
|
font-family: "Trebuchet MS", Tahoma, Arial, Helvetica, sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
-moz-border-radius: 7px;
|
||||||
|
-webkit-border-radius: 7px;
|
||||||
|
-o-border-radius: 7px;
|
||||||
|
-moz-box-shadow: 0px 1px 3px #888;
|
||||||
|
-webkit-box-shadow: 0px 1px 3px #888;
|
||||||
|
box-shadow: 0px 1px 3px #888;
|
||||||
|
/* Anciens navigateurs */
|
||||||
|
-o-background-size: 100% 100%;
|
||||||
|
-moz-background-size: 100% 100%;
|
||||||
|
-webkit-background-size: 100% 100%;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.msgboxmonit-red {
|
||||||
|
border: 1px red solid;
|
||||||
|
background-color: #FDD;
|
||||||
|
background-image: -webkit-gradient(linear,left top, left bottom,from(#FEE),to(#FDD));
|
||||||
|
background-image: -webkit-linear-gradient(top,#FEE,#FDD);
|
||||||
|
background-image: -moz-linear-gradient(top,#FEE,#FDD);
|
||||||
|
background-image: -o-linear-gradient(top,#FEE,#FDD);
|
||||||
|
background-image: linear-gradient(top,#FEE,#FDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
.msgboxmonit-orange {
|
||||||
|
border: 1px orange solid;
|
||||||
|
background-color: #FFD;
|
||||||
|
background-image: -webkit-gradient(linear,left top, left bottom,from(#FFE),to(#FFD));
|
||||||
|
background-image: -webkit-linear-gradient(top,#FFE,#FFD);
|
||||||
|
background-image: -moz-linear-gradient(top,#FFE,#FFD);
|
||||||
|
background-image: -o-linear-gradient(top,#FFE,#FFD);
|
||||||
|
background-image: linear-gradient(top,#FFE,#FFD);
|
||||||
|
}
|
||||||
|
|
||||||
|
.msgboxmonit-green {
|
||||||
|
border: 1px #659900 solid;
|
||||||
|
background-color: #DFD;
|
||||||
|
background-image: -webkit-gradient(linear,left top, left bottom,from(#EFE),to(#DFD));
|
||||||
|
background-image: -webkit-linear-gradient(top,#EFE,#DFD);
|
||||||
|
background-image: -moz-linear-gradient(top,#EFE,#DFD);
|
||||||
|
background-image: -o-linear-gradient(top,#EFE,#DFD);
|
||||||
|
background-image: linear-gradient(top,#EFE,#DFD);
|
||||||
|
}
|
||||||
|
|
||||||
|
.msgboxmonit-grey {
|
||||||
|
border: 1px #CCC solid;
|
||||||
|
background-color: #DDD;
|
||||||
|
background-image: -webkit-gradient(linear,left top, left bottom,from(#FFF),to(#DDD));
|
||||||
|
background-image: -webkit-linear-gradient(top,#FFF,#DDD);
|
||||||
|
background-image: -moz-linear-gradient(top,#FFF,#DDD);
|
||||||
|
background-image: -o-linear-gradient(top,#FFF,#DDD);
|
||||||
|
background-image: linear-gradient(top,#FFF,#DDD);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*td > input[type=radio] {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
float: left;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td > label {
|
||||||
|
width: 60px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 18px;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
td:not(#foo) > input:hover + label, td:not(#foo) > input:focus + label,
|
||||||
|
td:not(#foo) > input + label:hover, td:not(#foo) > input:focus + label {
|
||||||
|
background-color: #e1d39e;
|
||||||
|
border: 1px solid #a99f78;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Checked styles */
|
||||||
|
td:not(#foo) > input[type=radio]:checked + label {
|
||||||
|
background-color: #e1d39e;
|
||||||
|
border: 1px solid #a99f78;
|
||||||
|
}
|
||||||
|
|
||||||
|
.storage {
|
||||||
|
margin: 0px auto 20px;
|
||||||
|
padding: 11px 0;
|
||||||
|
font-size: 10px;
|
||||||
|
text-align: center;
|
||||||
|
-moz-border-radius: 7px;
|
||||||
|
-webkit-border-radius: 7px;
|
||||||
|
-o-border-radius: 7px;
|
||||||
|
-moz-box-shadow: 0px 1px 3px #888;
|
||||||
|
-webkit-box-shadow: 0px 1px 3px #888;
|
||||||
|
box-shadow: 0px 1px 3px #888;
|
||||||
|
/* Anciens navigateurs */
|
||||||
|
-o-background-size: 100% 100%;
|
||||||
|
-moz-background-size: 100% 100%;
|
||||||
|
-webkit-background-size: 100% 100%;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* set task's comments to monospace and left align */
|
||||||
|
.fusinv_task_comment {
|
||||||
|
width: 500px;
|
||||||
|
max-width: 500px;
|
||||||
|
text-align: left;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following css is used with elements from PluginFusioninventoryCommonView
|
||||||
|
*/
|
||||||
|
|
||||||
|
.fusinv_panel {
|
||||||
|
width: 90%;
|
||||||
|
background: #EFEFEF;
|
||||||
|
padding: 10px;
|
||||||
|
border: #AAA solid 1px;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fusinv_form {
|
||||||
|
width: 50%;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fusinv_form.large {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fusinv_form label,
|
||||||
|
.fusinv_form input ,
|
||||||
|
.fusinv_form textarea
|
||||||
|
{
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fusinv_form label
|
||||||
|
{
|
||||||
|
width: 30%;
|
||||||
|
text-align: right;
|
||||||
|
vertical-align:top;
|
||||||
|
padding:2px;
|
||||||
|
/*border-top: solid 1px #ccc;*/
|
||||||
|
/*border-bottom: solid 1px #ccc;*/
|
||||||
|
margin-bottom: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fusinv_panel .fusinv_form label {
|
||||||
|
width: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fusinv_form .input_wrap.split_column {
|
||||||
|
padding: 5px;
|
||||||
|
width:45%;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fusinv_form div.input_wrap {
|
||||||
|
margin: 0 0 0 0;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
width:60%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fusinv_panel div.input_wrap {
|
||||||
|
margin: 0 5px 0 0;
|
||||||
|
width: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.fusinv_form label + div.input_wrap > span +i input,*/
|
||||||
|
.fusinv_form label + div.input_wrap > input,
|
||||||
|
.fusinv_form label + div.input_wrap > select,
|
||||||
|
.fusinv_form label + div.input_wrap > textarea,
|
||||||
|
.fusinv_form label + div.input_wrap > div > textarea {
|
||||||
|
width:100%;
|
||||||
|
padding: 2px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-top: solid 1px #ccc;
|
||||||
|
max-width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fusinv_form div.input_wrap > span.description {
|
||||||
|
font-size: 0.8em;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.fusinv_form label + div.input_wrap.datetime input[type="text"],
|
||||||
|
.fusinv_form label + div.input_wrap input[type="checkbox"]
|
||||||
|
{
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taskjob_item {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 2px;
|
||||||
|
padding: 2px;
|
||||||
|
border: 1px #e0e0e0 solid;
|
||||||
|
border-radius: 3px;
|
||||||
|
background-color: #e7e7e7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taskjob_item.new {
|
||||||
|
background-color: #FDDB6F;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taskjob_item:hover {
|
||||||
|
border-color: #CCC;
|
||||||
|
box-shadow: 0 0 2px #CCC;
|
||||||
|
background-color: #D7D7D7;
|
||||||
|
color: black;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Logs monitoring styles */
|
||||||
|
|
||||||
|
.jobs_block {
|
||||||
|
width: 90%;
|
||||||
|
text-align: left;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.monitoring-logs .tasks_block {
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.monitoring-logs .task_block .jobs_block {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.monitoring-logs .task_block.expand .jobs_block {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.monitoring-logs .task_block > h3 {
|
||||||
|
cursor: pointer;
|
||||||
|
background: url(../../../pics/expand.gif) no-repeat left center;
|
||||||
|
padding-left: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.monitoring-logs .task_block.expand > h3 {
|
||||||
|
background: url(../../../pics/collapse.gif) no-repeat left center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jobs_block .job_block {
|
||||||
|
border: #AAA solid 1px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background: #EFEFEF;
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block > h3 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block {
|
||||||
|
border: #CCC solid 1px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background: #F7F7F7;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job_target h4 {
|
||||||
|
margin:0;
|
||||||
|
padding-bottom: 3px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
border-bottom: 1px dotted #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agents_block li{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a > div.fold {
|
||||||
|
display: inline-block;
|
||||||
|
background-image: url('../pics/toggle-expand.png');
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
vertical-align: bottom;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.expanded > div.fold {
|
||||||
|
background-image: url('../pics/toggle.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.job_target h4 > a {
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.job_target div.stats {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
.job_target ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 80%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
.job_target > div {
|
||||||
|
margin: 0 auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block div.target_stats .stats_block
|
||||||
|
{
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter_block .counter_value {
|
||||||
|
text-align: right;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
.target_block div.target_stats .counter_block > a,
|
||||||
|
.target_block div.target_stats .counter_block.empty > a {
|
||||||
|
margin: 2px;
|
||||||
|
padding: 2px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #EFEFEF;
|
||||||
|
color: #777;
|
||||||
|
display: block;
|
||||||
|
font-style: italic;
|
||||||
|
font-size:80%;
|
||||||
|
padding-left: 5px;
|
||||||
|
text-align: left;
|
||||||
|
font-family: monospace;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
.target_block div.target_stats .counter_block > a,
|
||||||
|
.target_block div.target_stats .counter_block.empty > a {
|
||||||
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
background: inherit;
|
||||||
|
color: inherit;
|
||||||
|
font-family: monospace;
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter_block {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.progressbar.empty {
|
||||||
|
background-image: url('../pics/stripes-nodata.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter_block,
|
||||||
|
.job_agents span.state
|
||||||
|
{
|
||||||
|
color: black;
|
||||||
|
background: #CCC;
|
||||||
|
border-color: #efefef;
|
||||||
|
font-weight: bolder;
|
||||||
|
font-style: normal;
|
||||||
|
margin: 2px;
|
||||||
|
padding: 2px;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-size:0.8em;
|
||||||
|
padding-left: 5px;
|
||||||
|
text-align: left;
|
||||||
|
font-family: monospace;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block div.target_stats .counter_block.empty:hover,
|
||||||
|
.target_block div.target_stats .counter_block:hover
|
||||||
|
{
|
||||||
|
border-style: dotted;
|
||||||
|
border-width: 1px;
|
||||||
|
border-color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block div.target_stats .counter_block.empty {
|
||||||
|
background: #EFEFEF;
|
||||||
|
border-color: #EFEFEF;
|
||||||
|
color: #777;
|
||||||
|
font-weight: lighter;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block div.target_stats .agents_success {
|
||||||
|
color: green;
|
||||||
|
background: #AAFFAA;
|
||||||
|
font-weight: bolder;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block div.target_stats .agents_error {
|
||||||
|
color: white;
|
||||||
|
background: red;
|
||||||
|
font-weight: bolder;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block div.target_stats .agents_running {
|
||||||
|
color: #000077;
|
||||||
|
background: #AAAAFF;
|
||||||
|
font-weight: bolder;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block div.target_stats .agents_cancelled {
|
||||||
|
color: white;
|
||||||
|
background: #9c7964;
|
||||||
|
font-weight: bolder;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block > div {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block > div.target_details {
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.target_block .target_infos {
|
||||||
|
max-width: 400px;
|
||||||
|
vertical-align: top;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block h4 {
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block h4 > a {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_stats {
|
||||||
|
margin: 0;
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
#onetimedeploy_form .target_stats {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.target_block div.progressbar {
|
||||||
|
height: 100px;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #EFEFEF;
|
||||||
|
width: 400px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agents_block {
|
||||||
|
border-top: dashed #ccc 1px;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.agent_block {
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
border-left-width: 5px;
|
||||||
|
/* padding: 2px 5px;*/
|
||||||
|
margin: 2px;
|
||||||
|
right:0;
|
||||||
|
vertical-align: bottom;
|
||||||
|
display: block;
|
||||||
|
background: #EEE;
|
||||||
|
font-size: xx-small;
|
||||||
|
color: #777;
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block.pinned {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block.agent_success{
|
||||||
|
background: #AFA;
|
||||||
|
border-color: green;
|
||||||
|
}
|
||||||
|
.agent_block.agent_success > * {
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block.agent_error{
|
||||||
|
background: #FDD;
|
||||||
|
border-color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block.agent_error > * {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block.agent_prepared {
|
||||||
|
border-color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block.agent_prepared > *{
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block.agent_cancelled {
|
||||||
|
border-color: #785036;
|
||||||
|
}
|
||||||
|
.agent_block.agent_cancelled > *{
|
||||||
|
color: #785036;
|
||||||
|
|
||||||
|
}
|
||||||
|
.agent_block.agent_running {
|
||||||
|
border-color: #7777EE;
|
||||||
|
}
|
||||||
|
.agent_block.agent_running > * {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.agent_block > *
|
||||||
|
{
|
||||||
|
padding: 5px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.agent_block > a {
|
||||||
|
line-height: 16px;
|
||||||
|
vertical-align: bottom;
|
||||||
|
display: block;
|
||||||
|
padding: 0;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block.pinned > a.name{
|
||||||
|
padding-left: 20px;
|
||||||
|
margin-left: 68px;
|
||||||
|
background: url('../../../pics/menu_show.png');
|
||||||
|
background: url('../pics/pinned.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block > span.comment {
|
||||||
|
opacity: 0.8;
|
||||||
|
font-weight: bold;
|
||||||
|
min-height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block:hover > * {
|
||||||
|
opacity: 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block a.name:hover {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block > a.link {
|
||||||
|
background: url(../pics/link.png) no-repeat;
|
||||||
|
display: inline-block;
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block input[type=checkbox] {
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.agent_block > a.btn {
|
||||||
|
display: inline-block;
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.agent_block > a.restart > i,
|
||||||
|
.agent_block > a.cancel > i {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block > a.btn:hover {
|
||||||
|
opacity: .7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_block > span.date {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Execution tables */
|
||||||
|
|
||||||
|
table.runs,
|
||||||
|
table.runs *{
|
||||||
|
background: white;
|
||||||
|
opacity: 1.0;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.runs {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.runs th {
|
||||||
|
background-color: grey;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.runs td {
|
||||||
|
white-space: nowrap;
|
||||||
|
padding-right: 10px;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
table.runs tr {
|
||||||
|
border-bottom : 1px dashed grey;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.runs tr.void {
|
||||||
|
border: none;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.runs td.comment {
|
||||||
|
width: 100%;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.runs_block {
|
||||||
|
background: white;
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.run_block {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.run_block h4 {
|
||||||
|
margin: 0;
|
||||||
|
font-family: monospace;
|
||||||
|
border-bottom: 1px dotted black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.run_block table {
|
||||||
|
border-bottom: 1px dotted #ccc;
|
||||||
|
border-collapse:collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.run_block .logs_block {
|
||||||
|
/* display:none; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.run_block table tr {
|
||||||
|
width: 100%;
|
||||||
|
margin: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.run_block table tr > td {
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
padding: 5px;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 20%;
|
||||||
|
margin: 3px 0;
|
||||||
|
}
|
||||||
|
.run_block table tr > td.log_state {
|
||||||
|
width: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.run_block .log_state span {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
background: #F1F1F1;
|
||||||
|
border-radius: 3px;
|
||||||
|
border: 1px solid #DDD;
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
.run_block span.log_error {
|
||||||
|
background: #F22;
|
||||||
|
color: white;
|
||||||
|
font-weight: bolder;
|
||||||
|
border-color: #F66;
|
||||||
|
}
|
||||||
|
|
||||||
|
.run_block span.log_ok {
|
||||||
|
border-radius: 3px;
|
||||||
|
border-color: #6F6;
|
||||||
|
background: #AFA;
|
||||||
|
color: green;
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.run_block table tr > td.log_comment {
|
||||||
|
/* border: 1px solid #CCC; */
|
||||||
|
width: 70%;
|
||||||
|
min-width: 70%;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show_more {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.show_more > .submit {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
margin: 2px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.addbutton {
|
||||||
|
cursor: pointer
|
||||||
|
}
|
||||||
|
|
||||||
|
.refresh_button {
|
||||||
|
padding: 5px;
|
||||||
|
display: block;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refresh_button > span {
|
||||||
|
width: 32px;
|
||||||
|
height:32px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: block;
|
||||||
|
background-image: url('../pics/monitoring_refresh.gif');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.refresh_button > span.fetching {
|
||||||
|
background-image: url('../pics/monitoring_fetching.gif');
|
||||||
|
}
|
||||||
|
.refresh_button > span.computing {
|
||||||
|
background-image: url('../pics/monitoring_computing.gif');
|
||||||
|
}
|
||||||
|
|
||||||
|
.task_export_form > label {
|
||||||
|
font-weight: bold;
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.state_checkboxes {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.agent_state_type_checkbox {
|
||||||
|
float: left;
|
||||||
|
width: 33%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clear_states {
|
||||||
|
clear: both;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#fiTaskExport_modalWindow {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* submit class grabbed from GLPI core
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.submit {
|
||||||
|
cursor:pointer;
|
||||||
|
height: auto;
|
||||||
|
font: bold 12px Arial, Helvetica;
|
||||||
|
color: #8f5a0a;
|
||||||
|
background-color: #ffb94b;
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#fddb6f), to(#ffb94b));
|
||||||
|
background-image: -webkit-linear-gradient(top, #fddb6f, #ffb94b);
|
||||||
|
background-image: -moz-linear-gradient(top, #fddb6f, #ffb94b);
|
||||||
|
background-image: -ms-linear-gradient(top, #fddb6f, #ffb94b);
|
||||||
|
background-image: -o-linear-gradient(top, #fddb6f, #ffb94b);
|
||||||
|
background-image: linear-gradient(top, #fddb6f, #ffb94b);
|
||||||
|
|
||||||
|
/* For Internet Explorer 5.5 - 7 */
|
||||||
|
/* filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fddb6f, endColorstr=#ffb94b);
|
||||||
|
/* For Internet Explorer 8 */
|
||||||
|
/* -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#fddb6f, endColorstr=#ffb94b)";
|
||||||
|
border-radius: 3px;
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
text-shadow: 0 1px 0 rgba(255,255,255,0.5);
|
||||||
|
-moz-box-shadow: 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
|
||||||
|
-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
|
||||||
|
box-shadow: 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #d69e31 #e3a037 #d5982d #e3a037
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
.submit:hover {
|
||||||
|
|
||||||
|
border: 1px inset #888888;
|
||||||
|
background-color: #fddb6f;
|
||||||
|
background-image: -webkit-gradient(linear, left top, left bottom, from(#ffb94b), to(#fddb6f));
|
||||||
|
background-image: -webkit-linear-gradient(top, #ffb94b, #fddb6f);
|
||||||
|
background-image: -moz-linear-gradient(top, #ffb94b, #fddb6f);
|
||||||
|
background-image: -ms-linear-gradient(top, #ffb94b, #fddb6f);
|
||||||
|
background-image: -o-linear-gradient(top, #ffb94b, #fddb6f);
|
||||||
|
background-image: linear-gradient(top, #ffb94b, #fddb6f);
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
.lockfield {
|
||||||
|
background-image: url('../pics/lock.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copyleft {
|
||||||
|
display:inline-block;
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fi_board {
|
||||||
|
width: 1300px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fi_board::after {
|
||||||
|
content: " ";
|
||||||
|
display: block;
|
||||||
|
height: 0;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fi_board .fi_chart {
|
||||||
|
height: 430px; /* 380px for chart + 50px for H2 */
|
||||||
|
width: 400px;
|
||||||
|
float: left;
|
||||||
|
margin: 2px;
|
||||||
|
box-sizing:border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fi_board .fi_chart svg.nvd3-svg {
|
||||||
|
height: initial;
|
||||||
|
width: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fi_board .fi_chart .fi_chart_title {
|
||||||
|
font-size: 1em;
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0.83em 5px;
|
||||||
|
box-sizing:border-box;
|
||||||
|
text-align: center;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fi_board .fi_chart svg {
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 700px) {
|
||||||
|
.fi_board {
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fi_board .fi_chart {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fi_board .fi_chart svg.nvd3-svg {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle_run {
|
||||||
|
background: rgba(255, 255, 255, .5) no-repeat 2px 2px;
|
||||||
|
background-image: url("../../../pics/expand.png");
|
||||||
|
padding: 2px 2px 2px 22px;
|
||||||
|
height: 14px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle_run.expand {
|
||||||
|
background-image: url("../../../pics/collapse.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
#refresh_status {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#force_inventory_button {
|
||||||
|
position: relative;
|
||||||
|
padding: 2px 5px 2px 15px;
|
||||||
|
border: 1px solid #B8B8B8;
|
||||||
|
border-radius: 2px;
|
||||||
|
display: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#force_inventory_button:hover {
|
||||||
|
border: 1px solid #CC7D7D;
|
||||||
|
}
|
||||||
|
|
||||||
|
#force_inventory_button:before {
|
||||||
|
position: absolute;
|
||||||
|
content: '\f0e7';
|
||||||
|
color: #B8B8B8;
|
||||||
|
font-family: FontAwesome;
|
||||||
|
left: 5px;
|
||||||
|
top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#force_inventory_button:hover:before {
|
||||||
|
color: #CC7D7D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beta {
|
||||||
|
position: relative;
|
||||||
|
margin: .5em auto;
|
||||||
|
padding: .5em;
|
||||||
|
border: 1px solid red;
|
||||||
|
border-radius: .5em;
|
||||||
|
width: 40em;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.beta .fa,
|
||||||
|
.beta a {
|
||||||
|
color: red;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beta a:nth-child(2) {
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beta .trans {
|
||||||
|
position: absolute;
|
||||||
|
bottom: .2em;
|
||||||
|
right: .2em;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.beta + h2 {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr.criteriarule {
|
||||||
|
border: 0;
|
||||||
|
height: 1px;
|
||||||
|
background-image: -webkit-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
|
||||||
|
background-image: -moz-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
|
||||||
|
background-image: -ms-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
|
||||||
|
background-image: -o-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
|
||||||
|
}
|
132
Mission4/roles/glpi/files/fusioninventory/docs/CHANGES
Normal file
132
Mission4/roles/glpi/files/fusioninventory/docs/CHANGES
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
Changelog
|
||||||
|
=========
|
||||||
|
|
||||||
|
Here you can see the full list of changes between each release.
|
||||||
|
|
||||||
|
In Development
|
||||||
|
--------------
|
||||||
|
|
||||||
|
|
||||||
|
Version 0.90+1.0
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- Enhanced: udpate checkbox to 0.90 style
|
||||||
|
|
||||||
|
|
||||||
|
Version 0.85+1.3
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- Fix: SQL error when display printer list when use some fields of plugin FusionInventory
|
||||||
|
- Fix: graph javascript and Css load
|
||||||
|
- Fix: software license link in licenses tab of computer
|
||||||
|
- Fix: ok message on remove item from static group
|
||||||
|
- Fix: missing fields in computer lock field
|
||||||
|
- Fix: dynamic computer groups sql query
|
||||||
|
- Fix: timeslot can now select 24:00 instead 23:45
|
||||||
|
- Fix: task job link in networkdiscovery and networkinventory state page
|
||||||
|
- Fix: entity creation of ports when inventory / discovery create unmanaged devices
|
||||||
|
- Fix: various SQL and PHP errors
|
||||||
|
|
||||||
|
- Enhanced: Improve task deletion performance
|
||||||
|
- Enhanced: clean docs folder and move this changelog file to docs folder
|
||||||
|
- Enhanced: Add wake up option in task to force GLPI wake up agent to do the task
|
||||||
|
- Enhanced: update translations
|
||||||
|
- Enhanced: get real contact IP when use proxy-related HTTP
|
||||||
|
- Enhanced: display of monitoring log tasks
|
||||||
|
- Enhanced: minify js
|
||||||
|
|
||||||
|
Version 0.85+1.2
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- Fix: Size of disk of computer
|
||||||
|
- Fix: Translation in printer SNMP tab for day, week, month and year
|
||||||
|
- Fix: PHP error in blacklist in some cases
|
||||||
|
- Fix: Right for link with plugin monitoring
|
||||||
|
- Fix: Massive actions (some has been broken)
|
||||||
|
- Fix: SQL error on printer search list when search / display FusionInventory fields
|
||||||
|
- Fix: PHP notices on computer inventory in some cases
|
||||||
|
- Fix: Display networkInventory in task logs (monitoring)
|
||||||
|
- Fix: Display of several task using same target in task logs (monitoring)
|
||||||
|
- Fix: Update list (prepared, to do, finished...) in task logs (monitoring)
|
||||||
|
- Fix: PHP errors in task / task job preparing
|
||||||
|
- Fix: Remove otherserial in networkinventory because removed from specs
|
||||||
|
- Fix: Fix fatal error on computer inventory for networkport speed
|
||||||
|
- Fix: In default rules import, computer name import is now enable
|
||||||
|
- Fix: List of job in task when job have no name
|
||||||
|
- Fix: Network inventory with printer / networkequipment without IP
|
||||||
|
|
||||||
|
- Enhanced: Rename "delete tasks after n days" into "delete tasks logs after n days" in configuration form
|
||||||
|
- Enhanced: Add cdrom / dvd import
|
||||||
|
- Enhanced: Network equipment display ports tagged
|
||||||
|
- Enhanced: Update travis to use new infrastructure + add test coverage (dev part, but important)
|
||||||
|
- Enhanced: Optimize task logs (monitoring) rendering
|
||||||
|
- Enhanced: Upgrade js lib and optimize js/css loading
|
||||||
|
- Enhanced: Don't display inactive task in monitoring/log
|
||||||
|
- Enhanced: Add regex in action of location rules
|
||||||
|
- Enhanced: Manage entity rule with regexp and entity tag (2 different rules with regexp + action by entity tag)
|
||||||
|
|
||||||
|
|
||||||
|
Version 0.85+1.1
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- Fix: Remove + button in ingored import rules
|
||||||
|
- Fix: Remove cron checkdevices
|
||||||
|
- Fix: 'Security die. trying to load an forbidden class name' in task tab in IPrange form
|
||||||
|
- Fix: Blacklisted values 'name' property should be called 'type'
|
||||||
|
- Fix: In blacklist list, go in next page is a 404 error
|
||||||
|
- Fix: When have computer networkport with many IP, IPv6 is dropped and sometime have empty ip
|
||||||
|
- Fix: right problem in unmanaged devices
|
||||||
|
- Fix: Probl<62>me de traitement des serialized_inventory
|
||||||
|
- Fix: printer search problem when have column "FusInv - SNMP authentication" and search on 'items seen'
|
||||||
|
- Fix: SQL error on deploy
|
||||||
|
- Fix: css overload in ocsinventory when FI is enable
|
||||||
|
- Fix: [0.85+1.0] Mirrors URLs in json->associatedFiles is always empty
|
||||||
|
- Fix: useless indirection in REST API
|
||||||
|
- Fix: TAG nut updated if ACCOUNTINFO section is present twice in the inventory
|
||||||
|
- Fix: Remove wizzard files
|
||||||
|
- Fix: problem on glpi_domains where domains are added with entities_id = -1
|
||||||
|
- Fix: display "SELinux..." when display page to force run agent remotely from server
|
||||||
|
- Fix: Unable to delete agents from the server's list of agents
|
||||||
|
|
||||||
|
- Enhanced: Add a IP type for excluded values
|
||||||
|
- Enhanced: Add oscomment in entity rules, location rule and import rule
|
||||||
|
|
||||||
|
|
||||||
|
Version 0.85+1.0
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- Fix: The dustbin icon has not sense in Unknown Devices section.
|
||||||
|
- Fix: Import sans nom de domaine
|
||||||
|
- Fix: The 'Automatic inventory' information is empty for printers.
|
||||||
|
- Fix: not using MSN field when SSN blacklisted
|
||||||
|
- Fix: activating plugin kills networkports
|
||||||
|
- Fix: Strange menus
|
||||||
|
- Fix: Icon missing.
|
||||||
|
- Fix: compat PHP 5.6
|
||||||
|
|
||||||
|
- Enhanced: Have possibility to lock a field for an itemtype
|
||||||
|
- Enhanced: Add possibility to recreate default rules for import devices
|
||||||
|
- Enhanced: Add cron to delete agent not have contact since xx weeks/months
|
||||||
|
- Enhanced: Use import rules for Devices, Printers, Monitors for a computer inventory
|
||||||
|
- Enhanced: Add SNMP authentication to IP ranges and define order
|
||||||
|
- Enhanced: Add field 'domain' in global criteria in import rules
|
||||||
|
- Enhanced: Multi TaskJob sequencing
|
||||||
|
- Enhanced: server-driven mode (legacy) tasks
|
||||||
|
- Enhanced: agent-driven mode (ondemand) tasks
|
||||||
|
- Enhanced: Modify taskjob Statuses
|
||||||
|
- Enhanced: Monitoring / Logs of tasks
|
||||||
|
- Enhanced: Add criterias for search computer have agent available or not for each modules (NETINVENTORY, DEPLOY, WOL...)
|
||||||
|
- Enhanced: Export / import full packages
|
||||||
|
- Enhanced: Add lock icon for fields locked in computer, networkequipment and printer form
|
||||||
|
- Enhanced: Add "Not Specified" to Fusion inventory blacklist
|
||||||
|
- Enhanced: Dictionnary on computer architecture
|
||||||
|
- Enhanced: Define new import rule (better) at install plugin
|
||||||
|
|
||||||
|
- Task: Review right management
|
||||||
|
- Task: Review tasks
|
||||||
|
- Task: Update hook (giveitem) to be compatible with new engine search of GLPI
|
||||||
|
- Task: Add code to retrieve the speed of computer network devices.
|
||||||
|
- Task: Remove SNMP model management
|
||||||
|
|
||||||
|
|
||||||
|
|
44
Mission4/roles/glpi/files/fusioninventory/docs/README
Normal file
44
Mission4/roles/glpi/files/fusioninventory/docs/README
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
FusionInventory
|
||||||
|
Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
|
||||||
|
http://www.fusioninventory.org/ http://forge.fusioninventory.org/
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
LICENSE
|
||||||
|
|
||||||
|
This file is part of FusionInventory project.
|
||||||
|
|
||||||
|
FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@package FusionInventory
|
||||||
|
@author David Durieux
|
||||||
|
@co-author
|
||||||
|
@copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
@license AGPL License 3.0 or (at your option) any later version
|
||||||
|
http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
@link http://www.fusioninventory.org/
|
||||||
|
@link http://forge.fusioninventory.org/projects/fusioninventory-for-glpi/
|
||||||
|
@since 2010
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
Installation
|
||||||
|
|
||||||
|
See documentation: http://fusioninventory.org/documentation/documentation/fi4g/installation.html
|
||||||
|
|
4
Mission4/roles/glpi/files/fusioninventory/docs/THANKS
Normal file
4
Mission4/roles/glpi/files/fusioninventory/docs/THANKS
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Benoit Machiavello
|
||||||
|
Michał Panasiewicz
|
||||||
|
Alipio Luiz Silva
|
||||||
|
Steve Illichevsky
|
46
Mission4/roles/glpi/files/fusioninventory/docs/THANKSWALKS
Normal file
46
Mission4/roles/glpi/files/fusioninventory/docs/THANKSWALKS
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
Aissa Khaled
|
||||||
|
Alex Mauer
|
||||||
|
Alexandre Poëte
|
||||||
|
Alexandre Valentini
|
||||||
|
Alexis Texier
|
||||||
|
Anthony Boishus
|
||||||
|
Anthony Lesourd
|
||||||
|
Barthelemy Gabillaud
|
||||||
|
Benoit Machiavello
|
||||||
|
Benoit Mortier
|
||||||
|
Chad Gray
|
||||||
|
Clement Chevalier
|
||||||
|
Damien Baron
|
||||||
|
Damien Bastié
|
||||||
|
Daniel Collignon
|
||||||
|
Dietmar Becker
|
||||||
|
Dmitriy Konovalov
|
||||||
|
Elie Goislard
|
||||||
|
Emmanuel Fremion
|
||||||
|
Emmanuel Vaussion
|
||||||
|
Eric Carcaillon
|
||||||
|
Eric Meygret
|
||||||
|
Filip Vanderberghe
|
||||||
|
Gilles Hamoniaux
|
||||||
|
Gregory Ghio
|
||||||
|
Guillaume Rousse
|
||||||
|
Jean-Charles Prin
|
||||||
|
John Brenner
|
||||||
|
Olivier Bruger
|
||||||
|
Manuel Montesino
|
||||||
|
Marco Valcauda
|
||||||
|
Marin Igor Juric
|
||||||
|
Michał Panasiewicz
|
||||||
|
Michel Villaumé
|
||||||
|
Mickael Dily
|
||||||
|
Nicolas Jacquemin
|
||||||
|
Olivier Moron
|
||||||
|
Philippe Relin
|
||||||
|
Roberto Fresco
|
||||||
|
Romain Cartiaux
|
||||||
|
Romain Mariadassou
|
||||||
|
Tamatoa Davio
|
||||||
|
Tarlak Desaydrone
|
||||||
|
Travis Llewellyn
|
||||||
|
Walid Nouh
|
1212
Mission4/roles/glpi/files/fusioninventory/effects.js
vendored
Normal file
1212
Mission4/roles/glpi/files/fusioninventory/effects.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,92 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the agent form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
$agent = new PluginFusioninventoryAgent();
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_agent', READ);
|
||||||
|
|
||||||
|
if (isset ($_POST["update"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_agent', UPDATE);
|
||||||
|
if (isset($_POST['items_id'])) {
|
||||||
|
if (($_POST['items_id'] != "0") AND ($_POST['items_id'] != "")) {
|
||||||
|
$_POST['itemtype'] = '1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$agent->update($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($_POST["purge"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_agent', PURGE);
|
||||||
|
$agent->delete($_POST, true);
|
||||||
|
$agent->redirectToList();
|
||||||
|
} else if (isset ($_POST["disconnect"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_agent', UPDATE);
|
||||||
|
$agent->disconnect($_POST);
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "agent");
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
if (isset($_GET["id"])) {
|
||||||
|
$agent->display(
|
||||||
|
[
|
||||||
|
"id" => $_GET["id"]
|
||||||
|
]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$agent->display(
|
||||||
|
[
|
||||||
|
"id" => 0
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Html::footer();
|
59
Mission4/roles/glpi/files/fusioninventory/front/agent.php
Normal file
59
Mission4/roles/glpi/files/fusioninventory/front/agent.php
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the agent search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "agent");
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_agent', READ);
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
Search::show('PluginFusioninventoryAgent');
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,137 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the agent module form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"fusioninventory", "agentmodules");
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_agent', READ);
|
||||||
|
|
||||||
|
$agentmodule = new PluginFusioninventoryAgentmodule();
|
||||||
|
|
||||||
|
if (isset($_POST["agent_add"])) {
|
||||||
|
$agentmodule->getFromDB($_POST['id']);
|
||||||
|
$a_agentList = importArrayFromDB($agentmodule->fields['exceptions']);
|
||||||
|
$a_agentList[] = $_POST['agent_to_add'][0];
|
||||||
|
$input = [];
|
||||||
|
$input['exceptions'] = exportArrayToDB($a_agentList);
|
||||||
|
$input['id'] = $_POST['id'];
|
||||||
|
$agentmodule->update($input);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset($_POST["agent_delete"])) {
|
||||||
|
$agentmodule->getFromDB($_POST['id']);
|
||||||
|
$a_agentList = importArrayFromDB($agentmodule->fields['exceptions']);
|
||||||
|
foreach ($a_agentList as $key=>$value) {
|
||||||
|
if ($value == $_POST['agent_to_delete'][0]) {
|
||||||
|
unset($a_agentList[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$input = [];
|
||||||
|
$input['exceptions'] = exportArrayToDB($a_agentList);
|
||||||
|
$input['id'] = $_POST['id'];
|
||||||
|
$agentmodule->update($input);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($_POST["updateexceptions"])) {
|
||||||
|
$a_modules = $agentmodule->find();
|
||||||
|
foreach ($a_modules as $data) {
|
||||||
|
$a_agentList = importArrayFromDB($data['exceptions']);
|
||||||
|
$agentModule = 0;
|
||||||
|
if (isset($_POST['activation-'.$data['modulename']])
|
||||||
|
&& $_POST['activation-'.$data['modulename']] != 0) {
|
||||||
|
$agentModule = 1;
|
||||||
|
}
|
||||||
|
$agentModuleBase = 0;
|
||||||
|
if (in_array($_POST['id'], $a_agentList)) {
|
||||||
|
$agentModuleBase = 1;
|
||||||
|
}
|
||||||
|
if ($data['is_active'] == 0) {
|
||||||
|
if (($agentModule == 1) AND ($agentModuleBase == 0)) {
|
||||||
|
$a_agentList[] = $_POST['id'];
|
||||||
|
} else if (($agentModule == 0) AND ($agentModuleBase == 1)) {
|
||||||
|
foreach ($a_agentList as $key=>$value) {
|
||||||
|
if ($value == $_POST['id']) {
|
||||||
|
unset($a_agentList[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if ($data['is_active'] == 1) {
|
||||||
|
if (($agentModule == 1) AND ($agentModuleBase == 1)) {
|
||||||
|
foreach ($a_agentList as $key=>$value) {
|
||||||
|
if ($value == $_POST['id']) {
|
||||||
|
unset($a_agentList[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (($agentModule == 0) AND ($agentModuleBase == 0)) {
|
||||||
|
$a_agentList[] = $_POST['id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$data['exceptions'] = exportArrayToDB($a_agentList);
|
||||||
|
$agentmodule->update($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($_POST["update"])) {
|
||||||
|
$agentmodule->getFromDB($_POST['id']);
|
||||||
|
$input = [];
|
||||||
|
if (isset($_POST['activation'])
|
||||||
|
&& $_POST['activation']) {
|
||||||
|
$input['is_active'] = 1;
|
||||||
|
} else {
|
||||||
|
$input['is_active'] = 0;
|
||||||
|
}
|
||||||
|
if ($agentmodule->fields['is_active'] != $input['is_active']) {
|
||||||
|
$a_agentList = [];
|
||||||
|
$input['exceptions'] = exportArrayToDB($a_agentList);
|
||||||
|
}
|
||||||
|
$input['id'] = $_POST['id'];
|
||||||
|
|
||||||
|
$agentmodule->update($input);
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,77 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the collect form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('Collect management', 'fusioninventory'),
|
||||||
|
$_SERVER["PHP_SELF"],
|
||||||
|
"admin",
|
||||||
|
"pluginfusioninventorymenu",
|
||||||
|
"collect");
|
||||||
|
|
||||||
|
$pfCollect = new PluginFusioninventoryCollect();
|
||||||
|
|
||||||
|
if (isset($_POST["add"])) {
|
||||||
|
$collects_id = $pfCollect->add($_POST);
|
||||||
|
Html::redirect(Toolbox::getItemTypeFormURL('PluginFusioninventoryCollect').
|
||||||
|
"?id=".$collects_id);
|
||||||
|
} else if (isset($_POST["update"])) {
|
||||||
|
$pfCollect->update($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset($_REQUEST["purge"])) {
|
||||||
|
$pfCollect->delete($_POST);
|
||||||
|
$pfCollect->redirectToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
if (!isset($_GET["id"])) {
|
||||||
|
$_GET['id'] = '';
|
||||||
|
}
|
||||||
|
$pfCollect->display($_GET);
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
62
Mission4/roles/glpi/files/fusioninventory/front/collect.php
Normal file
62
Mission4/roles/glpi/files/fusioninventory/front/collect.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the collect search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'),
|
||||||
|
$_SERVER["PHP_SELF"],
|
||||||
|
"admin",
|
||||||
|
"pluginfusioninventorymenu",
|
||||||
|
"collect");
|
||||||
|
|
||||||
|
Session::checkRight("plugin_fusioninventory_collect", READ);
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
Search::show('PluginFusioninventoryCollect');
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the collect file form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
$pfCollect_File = new PluginFusioninventoryCollect_File();
|
||||||
|
|
||||||
|
if (isset($_POST["add"])) {
|
||||||
|
// conversions
|
||||||
|
if ($_POST['sizetype'] != 'none'
|
||||||
|
&& $_POST['size'] != '') {
|
||||||
|
$_POST['filter_size'.$_POST['sizetype']] = $_POST['size'];
|
||||||
|
}
|
||||||
|
if ($_POST['filter_nametype'] != 'none'
|
||||||
|
&& $_POST['filter_name'] != '') {
|
||||||
|
$_POST['filter_'.$_POST['filter_nametype']] = $_POST['filter_name'];
|
||||||
|
}
|
||||||
|
if ($_POST['type'] == 'file') {
|
||||||
|
$_POST['filter_is_file'] = 1;
|
||||||
|
$_POST['filter_is_dir'] = 0;
|
||||||
|
} else {
|
||||||
|
$_POST['filter_is_file'] = 0;
|
||||||
|
$_POST['filter_is_dir'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$pfCollect_File->add($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset($_POST["delete_x"])) {
|
||||||
|
$pfCollect_File->delete($_POST);
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the collect registry form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
$pfCollect_Registry = new PluginFusioninventoryCollect_Registry();
|
||||||
|
|
||||||
|
if (isset($_POST["add"])) {
|
||||||
|
if (!preg_match('/^\/()/', $_POST['path'])) {
|
||||||
|
$_POST['path'] = "/".$_POST['path'];
|
||||||
|
}
|
||||||
|
if (!preg_match('/\/$/', $_POST['path'])) {
|
||||||
|
$_POST['path'] = $_POST['path']."/";
|
||||||
|
}
|
||||||
|
|
||||||
|
$pfCollect_Registry->add($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset($_POST["delete_x"])) {
|
||||||
|
$pfCollect_Registry->delete($_POST);
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the collect WMI form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
$pfCollect_Wmi = new PluginFusioninventoryCollect_Wmi();
|
||||||
|
|
||||||
|
if (isset($_POST["add"])) {
|
||||||
|
$pfCollect_Wmi->add($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset($_POST["delete_x"])) {
|
||||||
|
$pfCollect_Wmi->delete($_POST);
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the collect rules form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'),
|
||||||
|
$_SERVER["PHP_SELF"],
|
||||||
|
"plugins",
|
||||||
|
"pluginfusioninventorymenu",
|
||||||
|
"collectrule");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
$rulecollection = new PluginFusioninventoryCollectRuleCollection();
|
||||||
|
|
||||||
|
include (GLPI_ROOT . "/front/rule.common.form.php");
|
||||||
|
|
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the collect rules list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Session::checkLoginUser();
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'),
|
||||||
|
$_SERVER["PHP_SELF"],
|
||||||
|
"admin",
|
||||||
|
"pluginfusioninventorymenu",
|
||||||
|
"collectrule");
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
RuleCollection::titleBackup();
|
||||||
|
|
||||||
|
$rulecollection = new PluginFusioninventoryCollectRuleCollection();
|
||||||
|
|
||||||
|
include (GLPI_ROOT . "/front/rule.common.php");
|
||||||
|
|
@ -0,0 +1,96 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the communication with the agent.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Vincent Mazzoni
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
ob_start();
|
||||||
|
ini_set("memory_limit", "-1");
|
||||||
|
ini_set("max_execution_time", "0");
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
|
||||||
|
if (session_id()=="") {
|
||||||
|
session_start();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!defined('GLPI_ROOT')) {
|
||||||
|
include_once("../../../inc/includes.php");
|
||||||
|
}
|
||||||
|
$_SESSION['glpi_use_mode'] = Session::NORMAL_MODE;
|
||||||
|
if (!isset($_SESSION['glpilanguage'])) {
|
||||||
|
$_SESSION['glpilanguage'] = 'fr_FR';
|
||||||
|
}
|
||||||
|
$_SESSION['glpi_fusionionventory_nolock'] = true;
|
||||||
|
ini_set('display_errors', 'On');
|
||||||
|
error_reporting(E_ALL | E_STRICT);
|
||||||
|
$_SESSION['glpi_use_mode'] = 0;
|
||||||
|
$_SESSION['glpiparententities'] = '';
|
||||||
|
$_SESSION['glpishowallentities'] = true;
|
||||||
|
|
||||||
|
ob_end_clean();
|
||||||
|
header("server-type: glpi/fusioninventory ".PLUGIN_FUSIONINVENTORY_VERSION);
|
||||||
|
|
||||||
|
if (!class_exists("PluginFusioninventoryConfig")) {
|
||||||
|
header("Content-Type: application/xml");
|
||||||
|
echo "<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<REPLY>
|
||||||
|
<ERROR>Plugin FusionInventory not installed!</ERROR>
|
||||||
|
</REPLY>";
|
||||||
|
session_destroy();
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$pfCommunication = new PluginFusioninventoryCommunication();
|
||||||
|
|
||||||
|
if (!isset($rawdata)) {
|
||||||
|
$rawdata = file_get_contents("php://input");
|
||||||
|
}
|
||||||
|
if (isset($_GET['action']) && isset($_GET['machineid'])) {
|
||||||
|
PluginFusioninventoryCommunicationRest::handleFusionCommunication();
|
||||||
|
} else if (!empty($rawdata)) {
|
||||||
|
$pfCommunication->handleOCSCommunication($rawdata);
|
||||||
|
}
|
||||||
|
|
||||||
|
session_destroy();
|
||||||
|
|
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the computer entity lock configuration form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
if (isset($_GET['id'])
|
||||||
|
&& isset($_GET['lock'])) {
|
||||||
|
|
||||||
|
$pfInventoryComputerComputer = new PluginFusioninventoryInventoryComputerComputer();
|
||||||
|
$input = [];
|
||||||
|
$input['id'] = $_GET['id'];
|
||||||
|
$input['is_entitylocked'] = $_GET['lock'];
|
||||||
|
$pfInventoryComputerComputer->update($input);
|
||||||
|
}
|
||||||
|
Html::back();
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the computer license info form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Vincent Mazzoni
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Session::checkRight('license', UPDATE);
|
||||||
|
|
||||||
|
if (isset($_POST['associate']) && is_array($_POST['associate'])) {
|
||||||
|
$pflicenseinfo = new PluginFusioninventoryComputerLicenseInfo();
|
||||||
|
$pflicenseinfo->associate($_POST);
|
||||||
|
} else if (isset($_POST['dissociate']) && is_array($_POST['dissociate'])) {
|
||||||
|
$pflicenseinfo = new PluginFusioninventoryComputerLicenseInfo();
|
||||||
|
$pflicenseinfo->dissociate($_POST);
|
||||||
|
}
|
||||||
|
|
||||||
|
Html::back();
|
@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the general configuration form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Vincent Mazzoni
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_configuration', READ);
|
||||||
|
|
||||||
|
Html::header(__('Features', 'fusioninventory'), $_SERVER["PHP_SELF"],
|
||||||
|
"admin", "pluginfusioninventorymenu", "config");
|
||||||
|
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
$pfConfig = new PluginFusioninventoryConfig();
|
||||||
|
|
||||||
|
if (isset($_POST['update'])) {
|
||||||
|
$data = $_POST;
|
||||||
|
unset($data['update']);
|
||||||
|
unset($data['id']);
|
||||||
|
unset($data['_glpi_csrf_token']);
|
||||||
|
foreach ($data as $key=>$value) {
|
||||||
|
$pfConfig->updateValue($key, $value);
|
||||||
|
}
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
$a_config = current($pfConfig->find([], [], 1));
|
||||||
|
$pfConfig->getFromDB($a_config['id']);
|
||||||
|
if (isset($_GET['glpi_tab'])) {
|
||||||
|
$_SESSION['glpi_tabs']['pluginfusioninventoryconfiguration'] = $_GET['glpi_tab'];
|
||||||
|
Html::redirect(Toolbox::getItemTypeFormURL($pfConfig->getType()));
|
||||||
|
}
|
||||||
|
$pfConfig->display();
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,92 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the configuration log fields form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Session::checkRight('config', UPDATE);
|
||||||
|
|
||||||
|
Html::header(__('Features', 'fusioninventory'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "configlogfield");
|
||||||
|
|
||||||
|
if (isset($_POST['update'])) {
|
||||||
|
|
||||||
|
if (empty($_POST['cleaning_days'])) {
|
||||||
|
$_POST['cleaning_days'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$_POST['id']=1;
|
||||||
|
switch ($_POST['tabs']) {
|
||||||
|
|
||||||
|
case 'config' :
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'history' :
|
||||||
|
$pfConfigLogField = new PluginFusioninventoryConfigLogField();
|
||||||
|
foreach ($_POST as $key=>$val) {
|
||||||
|
$split = explode("-", $key);
|
||||||
|
if (isset($split[1]) AND is_numeric($split[1])) {
|
||||||
|
$pfConfigLogField->getFromDB($split[1]);
|
||||||
|
$input = [];
|
||||||
|
$input['id'] = $pfConfigLogField->fields['id'];
|
||||||
|
$input['days'] = $val;
|
||||||
|
$pfConfigLogField->update($input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (isset($pfConfig)) {
|
||||||
|
$pfConfig->update($_POST);
|
||||||
|
}
|
||||||
|
Html::back();
|
||||||
|
} else if ((isset($_POST['Clean_history']))) {
|
||||||
|
$pfNetworkPortLog = new PluginFusioninventoryNetworkPortLog();
|
||||||
|
$pfNetworkPortLog->cronCleannetworkportlogs();
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,87 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the configuration security form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_configsecurity', READ);
|
||||||
|
|
||||||
|
$pfConfigSecurity = new PluginFusioninventoryConfigSecurity();
|
||||||
|
$config = new PluginFusioninventoryConfig();
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "configsecurity");
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
|
||||||
|
if (isset ($_POST["add"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_configsecurity', CREATE);
|
||||||
|
$new_ID = 0;
|
||||||
|
$new_ID = $pfConfigSecurity->add($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($_POST["update"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_configsecurity', UPDATE);
|
||||||
|
$pfConfigSecurity->update($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($_POST["delete"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_configsecurity', PURGE);
|
||||||
|
$pfConfigSecurity->delete($_POST);
|
||||||
|
Html::redirect("configsecurity.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
$id = "";
|
||||||
|
if (isset($_GET["id"])) {
|
||||||
|
$id = $_GET["id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strstr($_SERVER['HTTP_REFERER'], "wizard.php")) {
|
||||||
|
Html::redirect($_SERVER['HTTP_REFERER']."&id=".$id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pfConfigSecurity->showForm($id);
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the configuration security search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'), $_SERVER["PHP_SELF"],
|
||||||
|
"admin", "pluginfusioninventorymenu", "configsecurity");
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_configsecurity', READ);
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
$_GET['target']="configsecurity.php";
|
||||||
|
|
||||||
|
Search::show('PluginFusioninventoryConfigSecurity');
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,56 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the ESX credential form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Walid Nouh
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
$dropdown = new PluginFusioninventoryCredential();
|
||||||
|
include (GLPI_ROOT . "/front/dropdown.common.form.php");
|
||||||
|
|
||||||
|
if (isset($_GET['popup'])) {
|
||||||
|
Ajax::refreshDropdownPopupInMainWindow();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the ESX credential search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Walid Nouh
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
$dropdown = new PluginFusioninventoryCredential();
|
||||||
|
include (GLPI_ROOT . "/front/dropdown.common.php");
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the ESX server form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Walid Nouh
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
$dropdown = new PluginFusioninventoryCredentialIp();
|
||||||
|
if (empty($_POST['plugin_fusioninventory_credentials_id'])) {
|
||||||
|
$_POST['plugin_fusioninventory_credentials_id'] = -1;
|
||||||
|
}
|
||||||
|
include (GLPI_ROOT . "/front/dropdown.common.form.php");
|
@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the ESX server search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Walid Nouh
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
$dropdown = new PluginFusioninventoryCredentialIp();
|
||||||
|
include (GLPI_ROOT . "/front/dropdown.common.php");
|
@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to clean the unused deploy files.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_package', PURGE);
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory DEPLOY'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "deploypackage");
|
||||||
|
|
||||||
|
$pfDeployfile = new PluginFusioninventoryDeployFile();
|
||||||
|
|
||||||
|
if (isset($_GET['delete'])) {
|
||||||
|
$pfDeployfile->deleteUnusedFiles();
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
$pfDeployfile->numberUnusedFiles();
|
||||||
|
|
||||||
|
echo "<center>";
|
||||||
|
echo "<a href='".$_SERVER['PHP_SELF']."?delete=1' class='vsubmit'>Delete unused files</a>";
|
||||||
|
echo "</center>";
|
||||||
|
|
||||||
|
Html::footer();
|
@ -0,0 +1,125 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the deploy group form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
$group = new PluginFusioninventoryDeployGroup();
|
||||||
|
|
||||||
|
if (isset($_GET['plugin_fusioninventory_deploygroups_id'])) {
|
||||||
|
$_SESSION['glpisearch']['PluginFusioninventoryComputer'] = $_GET;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_GET['save'])) {
|
||||||
|
$group_item = new PluginFusioninventoryDeployGroup_Dynamicdata();
|
||||||
|
if (!countElementsInTable($group_item->getTable(),
|
||||||
|
['plugin_fusioninventory_deploygroups_id' => $_GET['id']])) {
|
||||||
|
$criteria = ['criteria' => $_GET['criteria'],
|
||||||
|
'metacriteria' => $_GET['metacriteria']];
|
||||||
|
$values['fields_array'] = serialize($criteria);
|
||||||
|
$values['plugin_fusioninventory_deploygroups_id'] = $_GET['id'];
|
||||||
|
$group_item->add($values);
|
||||||
|
} else {
|
||||||
|
$item = getAllDataFromTable($group_item->getTable(),
|
||||||
|
['plugin_fusioninventory_deploygroups_id' => $_GET['id']]);
|
||||||
|
$values = array_pop($item);
|
||||||
|
|
||||||
|
$criteria = ['criteria' => $_GET['criteria'],
|
||||||
|
'metacriteria' => $_GET['metacriteria']];
|
||||||
|
$values['fields_array'] = serialize($criteria);
|
||||||
|
$group_item->update($values);
|
||||||
|
}
|
||||||
|
|
||||||
|
Html::redirect(Toolbox::getItemTypeFormURL("PluginFusioninventoryDeployGroup")."?id=".$_GET['id']);
|
||||||
|
} else if (isset($_FILES['importcsvfile'])) {
|
||||||
|
PluginFusioninventoryDeployGroup_Staticdata::csvImport($_POST, $_FILES);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset($_POST["add"])) {
|
||||||
|
$group->check(-1, UPDATE, $_POST);
|
||||||
|
$newID = $group->add($_POST);
|
||||||
|
Html::redirect(Toolbox::getItemTypeFormURL("PluginFusioninventoryDeployGroup")."?id=".$newID);
|
||||||
|
|
||||||
|
} else if (isset($_POST["delete"])) {
|
||||||
|
// $group->check($_POST['id'], DELETE);
|
||||||
|
$ok = $group->delete($_POST);
|
||||||
|
|
||||||
|
$group->redirectToList();
|
||||||
|
|
||||||
|
} else if (isset($_POST["purge"])) {
|
||||||
|
// $group->check($_POST['id'], DELETE);
|
||||||
|
$ok = $group->delete($_REQUEST, 1);
|
||||||
|
|
||||||
|
$group->redirectToList();
|
||||||
|
|
||||||
|
} else if (isset($_POST["update"])) {
|
||||||
|
$group->check($_POST['id'], UPDATE);
|
||||||
|
$group->update($_POST);
|
||||||
|
|
||||||
|
Html::back();
|
||||||
|
} else {
|
||||||
|
Html::header(__('FusionInventory DEPLOY'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "deploygroup");
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
$values = $_POST;
|
||||||
|
if (!isset($_GET['id'])) {
|
||||||
|
$id = '';
|
||||||
|
} else {
|
||||||
|
$id = $_GET['id'];
|
||||||
|
if (isset($_GET['sort']) AND isset($_GET['order'])) {
|
||||||
|
$group->getFromDB($id);
|
||||||
|
PluginFusioninventoryDeployGroup::getSearchParamsAsAnArray($group, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$values['id'] = $id;
|
||||||
|
if (isset($_GET['preview'])) {
|
||||||
|
$values['preview'] = $_GET['preview'];
|
||||||
|
}
|
||||||
|
$group->display($values);
|
||||||
|
Html::footer();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the deploy group search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
Html::header(__('Groups of computers', 'fusioninventory'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "deploygroup");
|
||||||
|
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
Search::show('PluginFusioninventoryDeployGroup');
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the deploy mirror form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
Html::header(__('Mirror servers'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "deploymirror");
|
||||||
|
|
||||||
|
//PluginFusioninventoryProfile::checkRight("Fusioninventory", "agents", "r");
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
$mirror = new PluginFusioninventoryDeployMirror();
|
||||||
|
|
||||||
|
if (isset ($_POST["add"])) {
|
||||||
|
// PluginFusioninventoryProfile::checkRight("Fusinvdeloy", "package", "w");
|
||||||
|
$newID = $mirror->add($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($_POST["update"])) {
|
||||||
|
// PluginFusioninventoryProfile::checkRight("Fusinvdeloy", "package", "w");
|
||||||
|
$mirror->update($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($_POST["delete"])) {
|
||||||
|
// PluginFusioninventoryProfile::checkRight("Fusinvdeloy", "package", "w");
|
||||||
|
$mirror->delete($_POST);
|
||||||
|
Html::redirect(Toolbox::getItemTypeFormURL('PluginFusioninventoryDeployMirror'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$id = "";
|
||||||
|
if (isset($_GET["id"])) {
|
||||||
|
$id = $_GET["id"];
|
||||||
|
}
|
||||||
|
$mirror->display(['id' => $id]);
|
||||||
|
//$mirror->showForm($id);
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the deploy miror search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
Html::header(__('Mirror servers'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "deploymirror");
|
||||||
|
|
||||||
|
//PluginFusioninventoryProfile::checkRight("Fusioninventory", "agents", "r");
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
Search::show('PluginFusioninventoryDeployMirror');
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,140 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the deploy package form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
$package = new PluginFusioninventoryDeployPackage();
|
||||||
|
if (isset($_POST['update_json'])) {
|
||||||
|
$json_clean = stripcslashes($_POST['json']);
|
||||||
|
|
||||||
|
$json = json_decode($json_clean, true);
|
||||||
|
|
||||||
|
$ret = PluginFusioninventoryDeployPackage::updateOrderJson($_POST['packages_id'], $json);
|
||||||
|
Html::back();
|
||||||
|
exit;
|
||||||
|
} else if (isset($_POST['add_item'])) {
|
||||||
|
$data = array_map(['Toolbox', 'stripslashes_deep'],
|
||||||
|
$package->escapeText($_POST));
|
||||||
|
PluginFusioninventoryDeployPackage::alterJSON('add_item', $data);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset($_POST['save_item'])) {
|
||||||
|
$data = array_map(['Toolbox', 'stripslashes_deep'],
|
||||||
|
$package->escapeText($_POST));
|
||||||
|
PluginFusioninventoryDeployPackage::alterJSON('save_item', $data);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset($_POST['remove_item'])) {
|
||||||
|
$data = array_map(['Toolbox', 'stripslashes_deep'],
|
||||||
|
$package->escapeText($_POST));
|
||||||
|
PluginFusioninventoryDeployPackage::alterJSON('remove_item', $data);
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
//$data = Toolbox::stripslashes_deep($_POST);
|
||||||
|
$data = $_POST;
|
||||||
|
|
||||||
|
//general form
|
||||||
|
if (isset ($data["add"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_package', CREATE);
|
||||||
|
$newID = $package->add($data);
|
||||||
|
Html::redirect(Toolbox::getItemTypeFormURL('PluginFusioninventoryDeployPackage')."?id=".$newID);
|
||||||
|
} else if (isset ($data["update"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_package', UPDATE);
|
||||||
|
$package->update($data);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($data["purge"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_package', PURGE);
|
||||||
|
$package->delete($data, 1);
|
||||||
|
$package->redirectToList();
|
||||||
|
} else if (isset($_POST["addvisibility"])) {
|
||||||
|
if (isset($_POST["_type"]) && !empty($_POST["_type"])
|
||||||
|
&& isset($_POST["plugin_fusioninventory_deploypackages_id"])
|
||||||
|
&& $_POST["plugin_fusioninventory_deploypackages_id"]) {
|
||||||
|
$item = null;
|
||||||
|
switch ($_POST["_type"]) {
|
||||||
|
case 'User' :
|
||||||
|
if (isset($_POST['users_id']) && $_POST['users_id']) {
|
||||||
|
$item = new PluginFusioninventoryDeployPackage_User();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'Group' :
|
||||||
|
if (isset($_POST['groups_id']) && $_POST['groups_id']) {
|
||||||
|
$item = new PluginFusioninventoryDeployPackage_Group();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'Profile' :
|
||||||
|
if (isset($_POST['profiles_id']) && $_POST['profiles_id']) {
|
||||||
|
$item = new PluginFusioninventoryDeployPackage_Profile();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'Entity' :
|
||||||
|
$item = new PluginFusioninventoryDeployPackage_Entity();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (!is_null($item)) {
|
||||||
|
$item->add($_POST);
|
||||||
|
// Event::log($_POST["plugin_fusioninventory_deploypackages_id"], "sla", 4, "tools",
|
||||||
|
// //TRANS: %s is the user login
|
||||||
|
// sprintf(__('%s adds a target'), $_SESSION["glpiname"]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory DEPLOY'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "deploypackage");
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
$id = "";
|
||||||
|
if (isset($_GET["id"])) {
|
||||||
|
$id = $_GET["id"];
|
||||||
|
}
|
||||||
|
$package->display($_GET);
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,69 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the deploy package import form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_package', CREATE);
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory DEPLOY'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "deploypackage");
|
||||||
|
|
||||||
|
$package = new PluginFusioninventoryDeployPackage();
|
||||||
|
if (isset($_POST['importfile'])) {
|
||||||
|
$package->importPackage($_POST['importfile']);
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
|
||||||
|
$package->listPackagesToImport();
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the deploy package search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Alexandre Delaunay
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "deploypackage");
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
$package = new PluginFusioninventoryDeployPackage();
|
||||||
|
$package->showList();
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,95 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the deploy package self-service form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
Html::helpHeader(__('FusionInventory'), $_SERVER["PHP_SELF"], "plugins",
|
||||||
|
"pluginfusioninventorymenu", "deploypackage");
|
||||||
|
$pfDeployPackage = new PluginFusioninventoryDeployPackage();
|
||||||
|
|
||||||
|
if (isset($_POST['prepareinstall'])) {
|
||||||
|
$computers_id = false;
|
||||||
|
|
||||||
|
foreach ($_POST as $key => $data) {
|
||||||
|
if (strstr($key, 'deploypackages_')) {
|
||||||
|
$computers_id = str_replace('deploypackages_', '', $key);
|
||||||
|
foreach ($data as $packages_id) {
|
||||||
|
$pfDeployPackage->deployToComputer($computers_id, $packages_id, $_SESSION['glpiID']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Try to wakeup the agent to perform the deployment task
|
||||||
|
//If it's a local wakeup, local call to the agent RPC service
|
||||||
|
switch ($_POST['wakeup_type']) {
|
||||||
|
case 'local':
|
||||||
|
echo '<link rel="import" href="http://127.0.0.1:62354/now">';
|
||||||
|
echo Html::scriptBlock("setTimeout(function(){
|
||||||
|
window.location='{$_SERVER['HTTP_REFERER']}';
|
||||||
|
}, 500);");
|
||||||
|
exit;
|
||||||
|
break;
|
||||||
|
case 'remote':
|
||||||
|
if ($computers_id) {
|
||||||
|
//Remote call to wakeup the agent, from the server
|
||||||
|
$agent = new PluginFusioninventoryAgent();
|
||||||
|
$agent->getAgentWithComputerid($computers_id);
|
||||||
|
$agent->wakeUp();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
Html::back();
|
||||||
|
} else {
|
||||||
|
Html::header(__('FusionInventory'), $_SERVER["PHP_SELF"], "plugins",
|
||||||
|
"pluginfusioninventorymenu", "deploypackage");
|
||||||
|
|
||||||
|
$pfDeployPackage->showPackageForMe($_SESSION['glpiID']);
|
||||||
|
Html::footer();
|
||||||
|
}
|
@ -0,0 +1,82 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the deploy package form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Walid Nouh
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
if (!isset($_GET["id"])) {
|
||||||
|
$_GET["id"] = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
$template = new PluginFusioninventoryDeployUserinteractionTemplate();
|
||||||
|
//general form
|
||||||
|
if (isset ($_POST["add"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_userinteractiontemplate', CREATE);
|
||||||
|
$newID = $template->add($_POST);
|
||||||
|
Html::redirect($template->getFormURLWithID($newID));
|
||||||
|
} else if (isset ($_POST["update"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_userinteractiontemplate', UPDATE);
|
||||||
|
$template->update($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($_POST["purge"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_userinteractiontemplate', PURGE);
|
||||||
|
$template->delete($_POST, 1);
|
||||||
|
$template->redirectToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_GET['_in_modal']) && $_GET['_in_modal']) {
|
||||||
|
Html::nullHeader(__('FusionInventory DEPLOY'), $_SERVER["PHP_SELF"]);
|
||||||
|
} else {
|
||||||
|
Html::header(__('FusionInventory DEPLOY'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "deployuserinteractiontemplate");
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
}
|
||||||
|
$template->display($_GET);
|
||||||
|
if (isset($_GET['_in_modal']) && $_GET['_in_modal']) {
|
||||||
|
Html::nullFooter();
|
||||||
|
} else {
|
||||||
|
Html::footer();
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the deploy group search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author Walid Nouh
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
Html::header(__('User interaction template', 'fusioninventory'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "deployuserinteractiontemplate");
|
||||||
|
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
Search::show('PluginFusioninventoryDeployUserinteractionTemplate');
|
||||||
|
|
||||||
|
Html::footer();
|
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the redirection to the documentation page.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "documentation");
|
||||||
|
|
||||||
|
echo "<meta http-equiv='refresh' content='0;URL=http://fusioninventory.org/documentation/'>";
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the entity form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
$pfEntity = new PluginFusioninventoryEntity();
|
||||||
|
|
||||||
|
if (isset($_POST["add"])) {
|
||||||
|
$pfEntity->add($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset($_POST["update"])) {
|
||||||
|
$pfEntity->update($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset($_REQUEST["purge"])) {
|
||||||
|
$pfEntity->delete($_POST);
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the ignored import device list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'), $_SERVER["PHP_SELF"], "admin",
|
||||||
|
"pluginfusioninventorymenu", "ignoredimportdevice");
|
||||||
|
|
||||||
|
//PluginFusioninventoryProfile::checkRight("rules", "r");
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
Search::show('PluginFusioninventoryIgnoredimportdevice');
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,84 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the computer black list fields form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'),
|
||||||
|
$_SERVER["PHP_SELF"],
|
||||||
|
"admin",
|
||||||
|
"pluginfusioninventorymenu",
|
||||||
|
"inventorycomputerblacklist");
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_blacklist', READ);
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
$pfInventoryComputerBlacklist = new PluginFusioninventoryInventoryComputerBlacklist();
|
||||||
|
|
||||||
|
if (isset ($_POST["add"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_blacklist', CREATE);
|
||||||
|
if (!empty($_POST['value'])) {
|
||||||
|
$pfInventoryComputerBlacklist->add($_POST);
|
||||||
|
}
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($_POST["update"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_blacklist', UPDATE);
|
||||||
|
$pfInventoryComputerBlacklist->update($_POST);
|
||||||
|
Html::back();
|
||||||
|
} else if (isset ($_POST["delete"])) {
|
||||||
|
Session::checkRight('plugin_fusioninventory_blacklist', PURGE);
|
||||||
|
$pfInventoryComputerBlacklist->delete($_POST);
|
||||||
|
Html::redirect("blacklist.php");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_GET["id"])) {
|
||||||
|
$pfInventoryComputerBlacklist->showForm($_GET["id"]);
|
||||||
|
} else {
|
||||||
|
$pfInventoryComputerBlacklist->showForm("");
|
||||||
|
}
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the computer blaklist fields search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'),
|
||||||
|
$_SERVER["PHP_SELF"],
|
||||||
|
"admin",
|
||||||
|
"pluginfusioninventorymenu",
|
||||||
|
"inventorycomputerblacklist");
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_blacklist', READ);
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
Search::show('PluginFusioninventoryInventoryComputerBlacklist');
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,108 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the computer import inventry XML form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'),
|
||||||
|
$_SERVER["PHP_SELF"],
|
||||||
|
"admin",
|
||||||
|
"pluginfusioninventorymenu",
|
||||||
|
"inventorycomputerimportxml");
|
||||||
|
|
||||||
|
Session::checkRight('plugin_fusioninventory_importxml', CREATE);
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
$pfCommunication = new PluginFusioninventoryCommunication();
|
||||||
|
|
||||||
|
if (isset($_FILES['importfile']) && $_FILES['importfile']['tmp_name'] != '') {
|
||||||
|
|
||||||
|
error_log($_FILES['importfile']['name']);
|
||||||
|
ini_set("memory_limit", "-1");
|
||||||
|
ini_set("max_execution_time", "0");
|
||||||
|
|
||||||
|
if (preg_match('/\.zip/i', $_FILES['importfile']['name'])) {
|
||||||
|
$zip = new ZipArchive;
|
||||||
|
$zip->open($_FILES['importfile']['tmp_name']);
|
||||||
|
|
||||||
|
if (!$zip) {
|
||||||
|
error_log("Zip failure");
|
||||||
|
Session::addMessageAfterRedirect(
|
||||||
|
__("Can't read zip file!", 'fusioninventory'),
|
||||||
|
ERROR
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
for ($n = 0; $n < $zip->numFiles; $n++) {
|
||||||
|
$filename = $zip->getNameIndex($n);
|
||||||
|
$xml = $zip->getFromName($zip->getNameIndex($n));
|
||||||
|
if (!empty($xml)) {
|
||||||
|
$_SESSION['glpi_fusionionventory_nolock'] = true;
|
||||||
|
$pfCommunication->handleOCSCommunication('', $xml);
|
||||||
|
unset($_SESSION['glpi_fusionionventory_nolock']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$zip->close();
|
||||||
|
}
|
||||||
|
} else if (preg_match('/\.(ocs|xml)/i', $_FILES['importfile']['name'])) {
|
||||||
|
|
||||||
|
$xml = file_get_contents($_FILES['importfile']['tmp_name']);
|
||||||
|
$_SESSION['glpi_fusionionventory_nolock'] = true;
|
||||||
|
$pfCommunication->handleOCSCommunication('', $xml, 'glpi');
|
||||||
|
unset($_SESSION['glpi_fusionionventory_nolock']);
|
||||||
|
} else {
|
||||||
|
Session::addMessageAfterRedirect(
|
||||||
|
__('No file to import!', 'fusioninventory'),
|
||||||
|
ERROR
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
$pfInventoryComputerImportXML = new PluginFusioninventoryInventoryComputerImportXML();
|
||||||
|
$pfInventoryComputerImportXML->showForm();
|
||||||
|
|
||||||
|
Html::footer();
|
||||||
|
|
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the rule entity form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'),
|
||||||
|
$_SERVER["PHP_SELF"],
|
||||||
|
"admin",
|
||||||
|
"pluginfusioninventorymenu",
|
||||||
|
"inventoryruleentity");
|
||||||
|
Session::checkLoginUser();
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
$rulecollection = new PluginFusioninventoryInventoryRuleEntityCollection();
|
||||||
|
|
||||||
|
include (GLPI_ROOT . "/front/rule.common.form.php");
|
||||||
|
|
@ -0,0 +1,63 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the rule entity search list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Session::checkLoginUser();
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'),
|
||||||
|
$_SERVER["PHP_SELF"],
|
||||||
|
"admin",
|
||||||
|
"pluginfusioninventorymenu",
|
||||||
|
"inventoryruleentity");
|
||||||
|
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
RuleCollection::titleBackup();
|
||||||
|
|
||||||
|
$rulecollection = new PluginFusioninventoryInventoryRuleEntityCollection();
|
||||||
|
|
||||||
|
include (GLPI_ROOT . "/front/rule.common.php");
|
||||||
|
|
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the device import rule form.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'), $_SERVER["PHP_SELF"],
|
||||||
|
"admin", "pluginfusioninventorymenu", "inventoryruleimport");
|
||||||
|
|
||||||
|
Session::checkLoginUser();
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
$rulecollection = new PluginFusioninventoryInventoryRuleImportCollection();
|
||||||
|
|
||||||
|
include (GLPI_ROOT . "/front/rule.common.form.php");
|
||||||
|
|
@ -0,0 +1,71 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FusionInventory
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||||
|
*
|
||||||
|
* http://www.fusioninventory.org/
|
||||||
|
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
* http://forge.fusioninventory.org/
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* LICENSE
|
||||||
|
*
|
||||||
|
* This file is part of FusionInventory project.
|
||||||
|
*
|
||||||
|
* FusionInventory is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* FusionInventory is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* This file is used to manage the device import rule list.
|
||||||
|
*
|
||||||
|
* ------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* @package FusionInventory
|
||||||
|
* @author David Durieux
|
||||||
|
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||||
|
* @license AGPL License 3.0 or (at your option) any later version
|
||||||
|
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
* @link http://www.fusioninventory.org/
|
||||||
|
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
|
||||||
|
Html::header(__('FusionInventory', 'fusioninventory'), $_SERVER["PHP_SELF"],
|
||||||
|
"admin", "pluginfusioninventorymenu", "inventoryruleimport");
|
||||||
|
|
||||||
|
Session::checkLoginUser();
|
||||||
|
PluginFusioninventoryMenu::displayMenu("mini");
|
||||||
|
|
||||||
|
RuleCollection::titleBackup();
|
||||||
|
|
||||||
|
$rulecollection = new PluginFusioninventoryInventoryRuleImportCollection();
|
||||||
|
|
||||||
|
if (isset($_GET['resetrules'])) {
|
||||||
|
$pfSetup = new PluginFusioninventorySetup();
|
||||||
|
$pfSetup->initRules(1);
|
||||||
|
Html::back();
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<center><a href='". Plugin::getWebDir('fusioninventory') .
|
||||||
|
"/front/inventoryruleimport.php?resetrules=1' class='vsubmit'>";
|
||||||
|
echo __('Reset import rules (define only default rules)', 'fusioninventory');
|
||||||
|
echo "</a></center><br/>";
|
||||||
|
|
||||||
|
include (GLPI_ROOT . "/front/rule.common.php");
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user