{# # --------------------------------------------------------------------- # # GLPI - Gestionnaire Libre de Parc Informatique # # http://glpi-project.org # # @copyright 2015-2023 Teclib' and contributors. # @copyright 2003-2014 by the INDEPNET Development Team. # @licence https://www.gnu.org/licenses/gpl-3.0.html # # --------------------------------------------------------------------- # # LICENSE # # This file is part of GLPI. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # --------------------------------------------------------------------- #} {% if has_profile_right('inventory', constant('READ')) and item.isDynamic() != false %}

{{ __('Inventory information') }}

{% set inventory_filename = item is usingtrait('Glpi\\Features\\Inventoriable') ? item.getInventoryFileName(false) : null %} {% if inventory_filename is not null %} {% else %} {{ __('Inventory file missing') }} {% endif %}
{% set agent = item is usingtrait('Glpi\\Features\\Inventoriable') ? item.getInventoryAgent() : null %} {% if agent is not null %}
{{ get_item_link(agent) }}
{{ agent.fields['useragent']|verbatim_value }}
{{ agent.fields['tag']|verbatim_value }}
{{ agent.fields['last_contact']|formatted_datetime }}
{{ agent.fields['remote_addr']|verbatim_value }}
{{ __('Unknown') }}
{{ __('Unknown') }}
{% else %}
{{ __('Agent information is not available.') }}
{% endif %} {# display last_inventory_update for asset using Inventoriable Trait and without agent #} {# like NetworkEquipement, Printer or Unmanaged Device converted #} {% if item is usingtrait('Glpi\\Features\\Inventoriable') and item.getInventoryAgent() == null and item.isField('last_inventory_update') %}
{{ item.fields['last_inventory_update']|formatted_datetime }}
{% endif %} {% if item.fields['id'] > 0 and item.isField('is_dynamic') %} {{ call_plugin_hook(constant('Glpi\\Plugin\\Hooks::AUTOINVENTORY_INFORMATION'), item) }} {% endif %}
{% endif %}