.. Reminder for header structure:
  Parts (H1)          : #################### with overline
  Chapters (H2)       : ******************** with overline
  Sections (H3)       : ====================
  Subsections (H4)    : --------------------
  Subsubsections (H5) : ^^^^^^^^^^^^^^^^^^^^
  Paragraphs (H6)     : """"""""""""""""""""

.. meta::
  :description: Using the WAPT Console
  :keywords: waptconsole, WAPT, documentation, the WAPT Console

.. role:: red

.. |ok| image:: wapt-resources/icon-ok.png
  :scale: 5%
  :alt: ok

.. |nok| image:: wapt-resources/icon-nok.png
  :scale: 5%
  :alt: Feature not available

.. role:: green
.. role:: blue
.. role:: purple
.. role:: red

.. |date| date::

.. _wapt_console:

######################
Using the WAPT Console
######################


..  youtube:: 44Tbo-i8vUE
   :width: 50%
   :align: center


To install and start the WAPT Console visit the documentation for :ref:`installing the WAPT Console <installing_the_WAPT_console>`.

If you have skipped the step for creating the WAPT Agent, return to the documentation on :ref:`building the WAPT Agent installer <create_WAPT_agent>`.

On your **management computer**, hosts are displayed in the WAPT Console.

.. figure:: wapt-resources/wapt_console_registered-clients_container-window.png
  :align: center
  :scale: 50%
  :alt: Inventory of hosts registered with WAPT

  Inventory of hosts registered with WAPT

.. note::

  The recommended size for using the WAPT console is 1920x1080 and the minimum size is 1280x1024.

  If a host does not appear in the WAPT Console after having installed the WAPT Agent, open the Windows command line utility :program:`cmd.exe` on the host and type :command:`wapt-get register`.

******************************************
Overview of the wapt console inventory tab
******************************************

The Inventory tab of the WAPT console is organised into four main sections.

.. figure:: wapt-resources/wapt_inventory_tab.png
  :align: center
  :scale: 50%
  :alt: wapt inventory tab

  WAPT inventory tab


.. tabs::

  .. tab:: :purple:`Top section (purple frame)`

    The :purple:`top section (purple frame)` features a customisable toolbar, with shortcuts for frequent actions (e.g. checking for updates, installing packages, refreshing the console). This layout ensures quick access to essential functions while allowing users to adapt the interface to their workflow.

    To modify the toolbar, do a right-click in the toolbar. In the "available commands", select the button you need and add in the "toolbar commands". A example with :ref:`The Export selected hosts to WADS button <export_selected_host_button>`.

  .. tab:: :blue:`Left section (blue frame)`

    On the :blue:`left (blue frame)`, the tree displays machines grouped according to their Active Directory (AD) location, derived from the :file:`computer_ad_dn property` in the host information. 
    
    Machines without AD appear by default in the "All" category **BUT** with WAPT, you can create some "fake OU" to regroup computer, more information :ref:`here <fake_ou>`.
  
  .. tab:: :green:`Centre section (green frame)`

    The :green:`centre (green frame)` lists **all registered machines** in a customisable table, displaying default columns such as packet status, reachability, audit status, hostname and IP address. 
    
    Users can :ref:`customise the columns <customize_columns>` by adding, deleting or rearranging them using drag and drop, and save their preferred layout in the waptconsole user file.
  
  .. tab:: :red:`Right section (red frame)`

    The :red:`right section (red frame)` provides detailed information about the selected machine, with various tabs:

    - *General*; basic informations like package status, host name, last user logged on, UUID, etc.
    - *Hardware inventory*; basic inventory of the machine (OS, WAPT version, etc.).
    - *Software inventory*; All installed software, including applications installed without WAPT.
    - *Tasks*; Real-time monitoring of WAPT service actions.
    - *Package overview*; All installed packages, with their versions, audit results, etc.
    - *Audit data*; Set of data returned via package audit functions or custom fields such as warranty dates directly added to the machine database.
    - *Certificates*; Displays the public certificates registered on the machine, enabling WAPT actions to be performed.
    - *Repositories*; server/agent which is the source of package import/export for the machine.





*********************
Showing the inventory
*********************

When the WAPT Agents *register*, they send some information to the WAPT Server.

Information displayed in the WAPT Console is not updated in real-time, you have to refresh the display to view new status and information.

Click on the :guilabel:`Refresh` button or press :kbd:`F5` on the keyboard.

.. figure:: wapt-resources/wapt_console_main-grid_screen-item.png
  :align: center
  :scale: 75%
  :alt: The WAPT Console displaying the WAPT inventory

  The WAPT Console displaying the WAPT inventory

The WAPT Console lists hosts that are registered with the WAPT Server and some information that is useful for managing the hosts.

Selecting a host displays its information in the right panel of the WAPT Console (:guilabel:`Hardware inventory` and :guilabel:`Software inventory`).

*****************************
Dark mode on the WAPT Console
*****************************

You can activate the dark mode of the wapt console by going to :guilabel:`display`, then selecting the desired mode from the drop-down list. Auto mode is your machine's default mode.
After modification restart the wapt console.

.. figure:: wapt-resources/wapt_console-dark_mode.png
  :align: center
  :scale: 50%
  :alt: WAPT interface in dark mode

  WAPT interface in dark mode

.. note::
  
  As of |date|, is not possible to change mode for Macos and Linux WAPTConsole.

*******************************
Performing actions on the hosts
*******************************

.. figure:: wapt-resources/wapt_console_host-configuration_menu-list.png
  :align: center
  :scale: 75%
  :alt: Host configuration menu list in the WAPT Console

  Host configuration menu list in the WAPT Console

.. Hint::

  :guilabel:`Show Configuration` allows you to view the :file:`wapt-get.ini` file configuration of your client machine.

Some actions are not available when selecting multiple hosts.

.. white_toggle::
  :titleen: List of actions available on a selection of hosts in the WAPT Console
  :titlefr: Liste des actions disponibles sur une sélection d'hôtes dans la console WAPT

  .. list-table::
    :header-rows: 1
    :widths: auto

    * - Name
      - Multi-selection
      - Description
    * - Edit host
      - |nok|
      - Used to modify the host package (add dependencies, set conflicts, etc.).
    * - Check updates
      - |ok|
      - Used to update packages on the host package (without installation).
    * - Apply upgrades
      - |ok|
      - Used to update and install packages on the host package.
    * - Apply upgrades for applications not currently running
      - |ok|
      - Apply upgrades for applications not currently running.
    * - Propose upgrades for applications not currently running
      - |ok|
      - Propose upgrades for applications not currently running.
    * - Send a message to users
      - |ok|
      - Send a html formatted message.
    * - Run package audits
      - |ok|
      - Enables an audit to be run on the host package.
    * - Add packages to host dependencies
      - |ok|
      - Add packages to host dependencies.
    * - Remove packages from host dependencies
      - |ok|
      - Remove packages from host dependencies.
    * - Re-sign *host* packages
      - |ok|
      - Re-sign host packets with the certificate used by the console during the action.
    * - Add package to host conflicts
      - |ok|
      - Add package to host conflicts for uninstall this package.
    * - Remove package from host conflicts
      - |ok|
      - Remove package from host conflicts.
    * - Remove the host
      - |ok|
      - Remove the host in the inventory.
    * - Connect via RDP
      - |nok|
      - Allows you to connect via RDP to the remote workstation.
    * - Remote Assistance
      - |nok|
      - Remote Assistance for Windows workstation.
    * - Mesh remote desktop
      - |ok|
      - Allows you to connect via mesh to the remote workstation.
    * - Windows Computer management
      - |nok|
      - Used to use the console MMC.
    * - Update AD Group Policies on hosts
      - |ok|
      - Update AD Group Policies on hosts.
    * - Run CleanMgr on host
      - |nok|
      - Run CleanMgr on host.
    * - Computer management
      - |nok|
      - Used to use the console Computer management.
    * - Local users and groups management
      - |nok|
      - Run local users and groups management.
    * - Service management
      - |nok|
      - Manage Windows services (start, stop, restart).
    * - Power ON with WakeOnLan
      - |ok|
      - Power ON a workstation with WakeOnLan.
    * - Reboot computers
      - |nok|
      - Reboot computers.
    * - Shutdown computers
      - |nok|
      - Shutdown computers.
    * - Trigger the scan of missing Windows updates
      - |ok|
      - Trigger the scan of missing Windows updates.
    * - Trigger the download pending Windows updates
      - |ok|
      - Trigger the download pending Windows updates.
    * - Trigger the install of pending Windows updates
      - |ok|
      - Trigger the install of pending Windows updates.
    * - Refresh host inventory
      - |ok|
      - Update host inventory.
    * - Trigger a restart of waptservice
      - |ok|
      - Trigger a restart of waptservice.
    * - Show Configuration
      - |nok|
      - Allows to view the :file:`wapt-get.ini` file configuration of your client machine

.. _send_waptmessage:

**********************************
Sending messages to selected hosts
**********************************

With option :guilabel:`Send message to users`, when you do a right-click on select hosts, you can send a html formatted message to connected users.

You can send html format only, no css nor javascript.
It is possible to send images, gifs, anything as long you can encode it with html.

Here is an example of code to send a text and an image.
Images and gif have to be in base64 encoded or else you may use the *base64image* id.

.. code-block:: html

  <h1>Hello from Tranquil IT</h1>
    <h2>Discover WAPT Enterprise !</h2>
     <body>
     <img
        id='base64image'
       src="https://www.tranquil.it/wp-content/uploads/LOGO-ENTERPRISE.png">
     </body>
    <h2>Thanks.</h2>

When you create your message, you will have a preview on the right pane.

.. figure:: wapt-resources/wapt_console_send-message-to-users.png
  :align: center
  :scale: 50%
  :alt: Sending a message to connected users from the inventory tab

  Sending a message to connected users from the inventory tab

When you have finished, click on :guilabel:`Send`, this is how your user will see it.

.. figure:: wapt-resources/wapt_console_send-message-to-users-result.png
  :align: center
  :scale: 75%
  :alt: Result of a message sent

  Result of a message sent

The first icon above can be customized.
Please see how to :ref:`use a custom icon in your waptmessage <custom_icon_waptmessage>`.

.. _importing_wapt_from_public_repository:

**************************************************
Importing WAPT packages from external repositories
**************************************************

Importing a WAPT package consists of:

* Importing an existing WAPT package from an external repository.

* Changing its prefix (for example from *tis* to *my-prefix*).

* Re-signing the WAPT package with the :term:`Administrator`'s or the :guilabel:`Code signing` private key to allow the deployment of the imported package on your WAPT equipped hosts.

* Finally, uploading it on the main WAPT repository.

.. attention::
  
  Please pay attention to the **certificate fingerprint** when you download your first package from our **testing** repository.
  Our **testing** repository certificate fingerprint: **b82fc8ef4a4475c0f69ac168176c2bfc58f572eb716c4eadd65e4785c155dd8e**

  official repository certificate fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb (this certificate should already be trusted after you install the WAPT agent).
  
  
  By importing a package in your repository and signing it, **YOU THEN BECOME RESPONSIBLE** for that package and for what it does.
  **It has been signed with your own private key**.

  **Tranquil IT disclaims any liability if you choose to use WAPT packages retrieved from its repositories**.

  Without a support contract, Tranquil IT does not guarantee the suitability of the package for your own particular use case, nor does she guarantee the ability of the package to comply with your :term:`Organization`'s internal security policies.

Tranquil IT uses a package build farm to maintain its repository up to date, which is nicknamed LUTI (from the French word "l'outil", the tool).
LUTI status is now available publicly at https://luti.tranquil.it.

LUTI monitors, when possible, the software vendor website to trigger a package update.
It will check the software installer file status on virustotal, and then test the install, uninstall and upgrade of the package.
The build results are available in the `WAPT testing repository <https://wapt.tranquil.it/wapt-testing>`_.

After 5 days, if the virustotal status of the package has not changed, the new package will be uploaded to WAPT main repository.
There is an exception to this rule for web browsers, which are uploaded from the WAPT testing repository to the WAPT public repository after 1/2 an hour.

* Go to the :guilabel:`Packages inventory` tab.

.. figure:: wapt-resources/wapt_console_import-package-from-internet_container-window.png
  :align: center
  :scale: 30%
  :alt: Available WAPT packages displayed in the WAPT Console

  Available WAPT packages displayed in the WAPT Console

Every WAPT package version loaded on the WAPT repository is shown.

If no package has been imported, the list is empty.
Only the *test-waptupgrade* package will be present if :ref:`the WAPT Agent has been generated previously <create_WAPT_agent>`.

Importing a WAPT package from an external repository on the Internet
====================================================================

This method allows you to download WAPT packages directly from a WAPT repository that is outside of your :term:`Organization`.

By default the Tranquil IT repository is configured.
To add another repository, check the documentation for :ref:`configuring external repositories <repositories_setting>`.

By default, the SSL/ TLS certificates to external repositories are verified.

* Click on :guilabel:`Import from Internet`.

.. image:: wapt-resources/wapt_console_import-package1_menu-list.png
  :align: center
  :alt: Menu list for importing a WAPT package into the WAPT repository

.. note::

  The grid view displays the list of available packages on the remote repository.
  It is possible to choose the architecture, the OS and the locale.

.. figure:: wapt-resources/wapt_console_imported-package-into-repository_container-window.png
  :align: center
  :scale: 50%
  :alt: Imported WAPT package in the local WAPT repository

  Imported WAPT package in the local WAPT repository

.. tabs::

  .. tab:: First Method - Direct Import

    - :menuselection:`Right-click --> Import in repository`

    - Validate the importation in your local repository.
      It is possible to :ref:`change the maturity <maturity_import>` of a WAPT package before importing the WAPT package into your Packages inventory.

    - Then, click on :guilabel:`Import`.

    - The download of the WAPT package starts.

    - The WAPT Console confirms that the WAPT package has been imported into the local WAPT repository.

    - The package then appears in the local WAPT repository **with the Organization's prefix**.

    .. image:: wapt-resources/wapt_external_import_first_method.gif
      :align: center
      :alt: External import first method

  .. tab:: Second method - Use the basket

    - :menuselection:`Right-click --> Add to basket` (or select somes rows and click on :guilabel:`Add to basket`)

    - Then, click on :guilabel:`Import basket packages`.

    - Validate the importation in your local repository.
      It is possible to :ref:`change the maturity <maturity_import>` of a WAPT package before importing the WAPT package into your Packages inventory.

    - Then click on :guilabel:`Import`.

    - The download of the WAPT package starts.

    - Finally, a confirmation message will appear.

    - The WAPT Console confirms that the WAPT package has been imported into the local WAPT repository.

    - The package then appears in the local WAPT repository **with the Organization's prefix**.

    .. image:: wapt-resources/wapt_external_import_second_method.gif
      :align: center
      :alt: External import second method

.. hint::

  You can check the package with Virus Total in order to check if the package is not flagged in the Antivirus list.

* Validate the importation in your local repository.
  It is possible to :ref:`change the maturity <maturity_import>` of a WAPT package before importing the WAPT package into your Packages inventory.

.. hint::

  You can update all your packages from your repository by checking :guilabel:`Newer packages than mine only` and :guilabel:`Last version only`, then use :kbd:`Ctrl+A` to select all newer packages that are available on the Tranquil IT store and that you have on your repository in a older version, then click on :guilabel:`Import in repository`.

  You can search WAPT packages that are not in your local repository if you check :guilabel:`Not in my Repository`.


.. _restricted_access_package:

Downloading a restricted package version from your repository
-------------------------------------------------------------

.. note::

  * The WAPT Enterprise theme store is reserved for customers with a valid WAPT Enterprise license.

  * Packages downloaded from the WAPT Enterprise store can be deployed on all workstations with a WAPT Enterprise license.

  * It is the **customer's responsibility to validate** the license of the software he is deploying and to respect the constraints related to this license (depending on the software: paying the license, deploying the software totle in a given context, e.g. educational environment only, etc.).

To meet the needs of her WAPT Enterprise customers, Tranquil IT started a thematic store program with some of her WAPT Enterprise customers.

Currently more than 1800 packages have been prepared by Tranquil IT teams and are progressively being put online on the `WAPT store <https://wapt.tranquil.it/store>`_. 

To download a package from the thematic store, it is necessary to be identified.

The authentication of the store in the console is supported from the latest WAPT 2.4 version and upward.
If you are in WAPT 2.3 version, you have to download the package from the website and import it into your WAPT console.

|

To authenticate yourself on the thematic store, follow the procedure below:

* Connect to the following url: https://wapt.tranquil.it/store and click on the **my account** link

* Click on login.

* The store will redirect you to the Tranquil IT SSO client authentication.
  If you are logging in for the first time, click on **forgot password** (An email will be sent to you sent to you to initialize your password).

* After changing your password (or just login), return in your account.

* Navigate to the API key tab.

* Create a new api keys for example name is 'WAPT CONSOLE' (your token is create you will be able to see it once, so **keep it carefully**).

This is illustrated in GIF format as:

.. figure:: wapt-resources/wapt-store_web_connexion_and_creation_of_a_token.gif
  :align: center
  :scale: 50%
  :alt: WAPT Store web connexion and creation of a token

  WAPT Store web connexion and creation of a token

.. _repositories_setting:

* In your WAPT Console, go to :menuselection:`Tools --> External Repositories Settings` then select the Tranquil IT store in the repository list, click on :guilabel:`Show advanced parameters` then add you user (your email address) and your token copied before.
  
  .. figure:: wapt-resources/wapt_console_credential_restricted_packages.png
    :align: center
    :scale: 75%
    :alt: WAPT Console advanced parameters for credentials

    WAPT Console advanced parameters for credentials

.. important::
  
  The email address used must be the one provided to Tranquil IT sales or technical service.
  If your email address is not known to our services, it will not be possible to authenticate you or to reset your password.
  
  If you have a connection problem you can call your technical or commercial contact person at Tranquil IT sales representative.

Once you are connected you can then download the WAPT Enterprise packages.
  
.. _maturity_import:

Changing the maturity of a WAPT package before importing into the repository
----------------------------------------------------------------------------

It is possible to change the maturity of a WAPT package before loading it into your Packages inventory by choosing **DEV**, **PREPROD** or **PROD** in :guilabel:`Default package maturity`.

.. figure:: wapt-resources/wapt_console_import-package-confirm_dialog-box.png
  :align: center
  :scale: 75%
  :alt: Dialog box to prepare and confirm the import of a WAPT package into a WAPT repository

  Dialog box to prepare and confirm the import of a WAPT package into a WAPT repository

Editing a package before importing into the repository
------------------------------------------------------

It is possible to edit a package downloaded from an external repository before importing it into your main WAPT repository.

.. tabs::

  .. tab:: first method

    Clicking :guilabel:`Edit basket packages` on the bottom right of the window

    .. image:: wapt-resources/wapt-console-import-download-and-edit-first-method.png
      :align: center
      :alt: Import download and edit first method

  .. tab:: second method

    Select the desired package

    Then :menuselection:`Right-click --> Download and Edit`;

    .. image:: wapt-resources/wapt-console-import-download-and-edit-second-method.png
      :align: center
      :alt: Import download and edit second method

:program:`PyScripter`, if installed, will open the :file:`control` and :file:`setup.py` files of the WAPT package.

For more information, visit the documentation on :ref:`creating WAPT packages from scratch <creating_WAPT_packages>`.

Importing WAPT packages from a local file
==========================================

You can import a :mimetype:`.wapt` file from any storage.

* Click on :guilabel:`Import package` and then :guilabel:`Import from file`.

.. image:: wapt-resources/wapt_console_import-package2_menu-list.png
  :align: center
  :alt: Menu list for importing a WAPT package into the WAPT repository

* Select the file to import.

.. figure:: wapt-resources/wapt_console_import-file-select_browser-window.png
  :align: center
  :scale: 75%
  :alt: Selecting the file to import

* Click on the :guilabel:`Open` button to import the file.

The WAPT Console confirms that the package has been imported in the local WAPT repository.

The package then appears in the local WAPT repository with the **Organization's prefix**.

.. note::

  It is not possible to change the maturity before importing here.

  When uploading a new WAPT package to the Packages inventory, the changing of the prefix and the re-signing of the WAPT package are transparent and automatic.

****************************************
Updating WAPT packages in the repository
****************************************

.. _newer_version_package:

Downloading a newer package version from your repository
========================================================

Tranquil It maintains its packages as far as possible (https://store.wapt.fr/wapt).

- Open the wapt console and go to the  :guilabel:`Packages Iventory`.
- Click on :guilabel:`Import from internet`.
- Confirm window **repositories settings** by click on :kbd:`OK`.
- Check :guilabel:`Newer packages than mine only`, :guilabel:`last version only` and :guilabel:`Compatible with the registered hosts`.
- Here is a list of packages with new versions.
- Select the packages with :guilabel:`add to basket`.
- Now you can import few packages by clicking on :guilabel:`Import basket packages`.
- Wait few minutes.



.. figure:: wapt-resources/wapt-console_import_packages_new_version.png
  :align: center
  :scale: 75%
  :alt: WAPT-Console import packages new version

  WAPT-Console import packages new version

You can choose to update all the packages in your repository by adding it to your basket, or focus on upgrading only some packages.

.. hint::

  .. figure:: wapt-resources/wapt-letter-icon.png
    :align: left
    :scale: 75%
    :alt: WAPT letter icon

  **Package Update Notifications**

  |

  You can subscribe to specific packages and receive a daily email at 09:00 AM whenever updates are available for your subscribed packages. The email summarizes all relevant changes, ensuring you stay informed and can take timely action.

  Simply click the "Subscribe" button located in the top-right corner of the package page (https://wapt.tranquil.it/store/fr/).

.. _launch_update_from_store:

Updating packages from the Tranquil IT repository
=================================================

When you want to upgrade one or several WAPT Packages with the :guilabel:`Update the package from the store` option, here is how it works.
First, select on or several package you want to upgrade.

.. figure:: wapt-resources/wapt_console_package-download-newer-from-repo.png
  :align: center
  :scale: 75%
  :alt: WAPT Console displaying a newer package version

  WAPT Console displaying a newer package version

Then a window with the selected packages will open, you can click on :guilabel:`Update the package from the store`.
After that, it will fetch the new version from the Tranquil IT repository with our code improvement.
You will see the same dialog box when you :guilabel:`import from internet`.

.. figure:: wapt-resources/wapt_console_import-package-confirm_dialog-box.png
  :align: center
  :scale: 75%
  :alt: WAPT Console update_package windows displaying a newer package version

  WAPT Console update_package windows displaying a newer package version

.. _launch_update_package:

Updating WAPT packages in the local repository
==============================================

.. warning::
  
  The package code is static and fixed. If the repository changes URL or if the publisher changes the method of retrieving the binary (for example, by changing the API, the download link or the installation process), you will not be able to automatically update your package to the new version. Manual intervention will be required to adapt the code and maintain compatibility.

  So prefer the :ref:`recommended method <newer_version_package>`.

When you want to upgrade one or several WAPT Packages with the :guilabel:`Launch update package` option, here is how it works.
First, select one or several packages that you want to upgrade.

.. figure:: wapt-resources/wapt_console_package-download-newer-from-update_package.png
  :align: center
  :scale: 75%
  :alt: WAPT Console displaying a newer versions of packages

  WAPT Console displaying a newer versions of packages

Then a window with the selected packages will open, you can click on :guilabel:`Launch update_package on selected packages`.
After that, if you did not check :guilabel:`Upload directly`, you will have to click on :guilabel:`Upload selected packages` in order to sign, build and upload the package to the WAPT Server.

.. figure:: wapt-resources/wapt_console_package-download-newer-from-update_package_menu.png
  :align: center
  :scale: 75%
  :alt: WAPT Console update_package windows displaying a newer package version

  WAPT Console update_package windows displaying a newer package version

***********************************************
Managing WAPT packages hosted in the repository
***********************************************

In the :guilabel:`Packages Inventory` tab, the list of packages currently available in the WAPT repository appears.
By default, the WAPT Console will only show the latest version of WAPT packages.

.. image:: wapt-resources/wapt_console_packages_filter_screen-item.png
  :align: center
  :scale: 75%
  :alt: Changing the maturity of a WAPT package

.. white_toggle::
  :titleen: Listing of items in the WAPT Packages tab
  :titlefr: Liste des éléments de l'onglet dépôt privé

  .. list-table:: 
    :header-rows: 1
    :widths: auto

    * - Label
      - Description
    * - The :guilabel:`Type name or description` search bar
      - Allows to search by WAPT package name or description.
    * - The :guilabel:`Last version only` checkbox 
      - Allows to display all version of WAPT packages in the WAPT Console.
    * - The :guilabel:`Filter packages` dropdown menu
      - Allows to filter WAPT packages by type (*all*, *base*, *group*, *profile*, *selfservice*, *unit*, *waptwua*).
    * - The :guilabel:`Show hosts` 
      - Displays the hosts on which the selected WAPT package is installed.
    * - The :guilabel:`Architecture x86` checkbox
      - Allows to filter on hosts having a x86 based processor architecture.
    * - The :guilabel:`Architecture x64` checkbox 
      - Allows to filters on hosts having a x64 based processor architecture.
    * - The :guilabel:`OS all` checkbox
      - Allows to filter hosts based on any :abbr:`OS (Operating System)`.
    * - The :guilabel:`OS Windows` checkbox
      - Allows to filter hosts based on the Windows :abbr:`OS (Operating System)`.
    * - The :guilabel:`OS macOS` checkbox
      - Allows to filter hosts based on the macOS :abbr:`OS (Operating System)`.
    * - The :guilabel:`OS Linux` checkbox
      - Allows to filter hosts based on the Linux :abbr:`OS (Operating System)`.
    * - The :guilabel:`Locale en` checkbox
      - Allows to filter hosts localized in English.
    * - The :guilabel:`Locale fr` checkbox
      - Allows to filter hosts localized in French.
    * - The :guilabel:`Locale de` checkbox
      - Allows to filter hosts localized in German.
    * - The :guilabel:`Locale it` checkbox
      - Allows to filter hosts localized in Italian.
    * - The :guilabel:`Locale es` checkbox
      - Allows to filter hosts localized in Spanish.
    * - The :guilabel:`Maturity` dropdown list
      - Allows to filter on the maturity level configured on the hosts.

Doing a search based on a WAPT package
======================================

In the repository, select the package and then click on :guilabel:`Show Hosts`.

The grid will display the hosts on which the package is installed.
Note that the filter is only active on the :guilabel:`Package` attribute of the selected package.

The different columns display information about the packages installed on the host (e.g. *package version*, *package status*, *audit status*, *installation date*, *architecture*).

.. figure:: wapt-resources/wapt_console_show-hosts-configured-with-selected-package_screen-item.png
  :align: center
  :scale: 75%
  :alt: Filtering hosts based on a WAPT package

  Filtering hosts based on a WAPT package

You can also add the columns :guilabel:`Log install` and :guilabel:`Last Audit Output` to display at a glance the installation and audit logs.

Showing package dependencies
============================

In the :guilabel:`Repository` tab, select the WAPT package and then click on :guilabel:`Show Depending Packages`.
It will show whether the WAPT package has a dependency.

.. figure:: wapt-resources/wapt_console_show-depending-selected-package_right-click.png
  :align: center
  :scale: 75%
  :alt: Right-click on selected package to see if some other software is a dependency

  Right-click on selected package to see if some other software is a dependency

In this example, the *unit* package *Computers* has :program:`demo-vlc` in its dependencies.

.. figure:: wapt-resources/wapt_console_show-depending-selected-package_screen-item.png
  :align: center
  :scale: 40%
  :alt: Example of a package of which the selected package has a dependency

  Example of a package of which the selected package has a dependency

.. note:: 

  A quick reminder of :ref:`how dependencies work in WAPT <dependency_mechanism>`.

Showing dependencies graph
==========================

In the repository, select the WAPT package and then click on :guilabel:`Show Dependencies graph` to see all dependencies and sub-dependencies. 

.. figure:: wapt-resources/wapt_console_show-graph-dependencies-right-click.png
  :align: center
  :scale: 75%
  :alt: Right-clicking on a package to see its dependency graph

  Right-clicking on a package to see its dependency graph

In this example, we can see all dependencies and sub-dependencies of :file:`demo-waptdev` package.

.. figure:: wapt-resources/wapt_console_show-graph-dependencies-item-window.png
  :align: center
  :scale: 40%
  :alt: Exemple of a package with its graph dependencies

  Exemple of a package with its graph dependencies

.. hint::

  You can do the same thing with a host in :guilabel:`Inventory` tab.

  .. figure:: wapt-resources/wapt_console_show-graph-dependencies-right-click-host.png
    :align: center
    :scale: 50%
    :alt: Right-clicking on a host to see its dependency graph

  In this example, we can see all dependencies and sub-dependencies of the selected host.

  .. figure:: wapt-resources/wapt_console_show-graph-dependencies-item-window-host.png
      :align: center
      :scale: 20%
      :alt: Exemple of a host with its graph dependencies

      Exemple of a host with its graph dependencies

Changing the maturity of a WAPT package after having imported it in the local repository
========================================================================================

When a package is imported on a WAPT repository it is possible to change the maturity by rigth-clicking on the WAPT package.

.. image:: wapt-resources/wapt_console_packages_menu-list.png
  :align: center
  :scale: 75%
  :alt: Changing the maturity of a WAPT package

Choose the maturity of the WAPT package to import using the :guilabel:`Change packages maturity` menu item.

.. figure:: wapt-resources/wapt_console_package-change-maturity_container-window.png
  :align: center
  :scale: 75%
  :alt: Window for changing the maturity of a WAPT package

  Window for changing the maturity of a WAPT package

.. list-table:: Options for changing the maturity of WAPT packages
  :header-rows: 1
  :widths: auto

  * - Label
    - Description
  * - The :guilabel:`Increment the package version` checkbox
    - Increments the packaging version (version number after `-`).
  * - The :guilabel:`Delete old packages after successful process` checkbox
    - Delete the old WAPT package after having changed the maturity.
  * - The :guilabel:`Change package maturity` dropdown list
    - Configure the new maturity of the WAPT package.
  * - The :guilabel:`New packages prefix` field
    - Configure a new prefix for the WAPT package.
      Prefix is case sensitive, we recommand to use lower case.

You can stop the process by pressing the :guilabel:`Abort process` button.

You can confirm the process by pressing the :guilabel:`Change the package maturity` button.

Once finished, the status switches to |ok|.

.. warning::

  You can change the maturity of a selection of WAPT packages at once

  Changing the maturity of the WAPT package will change the hash of the file.

  If the package is used in a :abbr:`GPO (Group Policy Object)`, like :program:`waptupgrade`, the hash in the GPO will need to be changed.

Removing a WAPT package
=======================

.. figure:: wapt-resources/wapt_console_packages_menu-list.png
  :align: center
  :scale: 75%
  :alt: Remove a package

To delete a WAPT package from the repository, do a :menuselection:`Right-click --> Remove from repository`.

You can select multiple WAPT packages to delete at once.

Removing the package this way will **only** delete this package and not anterior versions.
To do so, you will have to uncheck :guilabel:`Last version only` and select all packages version to delete.
You can use the option :guilabel:`Select obsolete packages` to help you then :guilabel:`Remove from repository` to go faster.

If you remove a package used by at least one host, you will have an alert window.
If you check :guilabel:`Apply to the following` it will remove the dependencies on all other concerned hosts.

.. figure:: wapt-resources/wapt_console_packages_warning-delete-depends.png
  :align: center
  :scale: 75%
  :alt: Window alerting that a package is used by at least one host when attempting to delete a package from the local repository

  Window alerting that a package is used by at least one host when attempting to delete a package from the local repository

.. note::
  If a package is installed on a workstation, removing a dependency will not uninstall the package itself.
  To uninstall a package from multiple workstations, you must explicitly uninstall it.

Editing a WAPT package
======================

.. figure:: wapt-resources/wapt_console_packages_menu-list.png
  :align: center
  :scale: 75%
  :alt: Editing a WAPT package

To edit a WAPT package, do a :menuselection:`Right-click --> Edit package`.

The WAPT package will be downloaded locally in **the base package development folder**, set in the WAPT Console settings.

If :program:`PyScripter` is installed, :program:`PyScripter` will automatically open the :file:`control` and :file:`setup.py` files.

Once edited you can upload the WAPT package :ref:`using the WAPT Console <build_upload_from_console>`.

Deploying WAPT packages from the WAPT Console
=============================================

You can deploy WAPT packages on hosts using multiple methods:

* Directly by :ref:`adding a WAPT package to the selected host(s) <add_package_on_host>`.

* By :ref:`adding a WAPT package to an Organizational Unit <create_edit_ou_packages>` of which the host is a member.

* By :ref:`adding a package to a host profile <ad_profile_package>` that is applied to the host.

* By :ref:`adding the package to a group package <creating_group_package>` of which the host is a member.

.. _add_package_on_host:

*******************************
Adding a WAPT package to a host
*******************************

If you want to add WAPT packages directly on the host, you have to edit the *host* package.

To do so, there are 3 methods:

1. Double-click on the host.

2. Right-click on the host then :guilabel:`Edit host`.

3. Select a host and use the :guilabel:`Edit host` button.

Then, you just have to drag and drop wanted package(s) and confirm.

.. figure:: wapt-resources/wapt_console_add_package_host_container-window.gif
  :align: center
  :scale: 75%
  :alt: Method for adding a WAPT package onto a host

  Method for adding a WAPT package onto a host

Pressing :guilabel:`Save` does the same thing as doing an :ref:`update <update_host>`.

Pressing :guilabel:`Save and apply` does the same thing as an :ref:`update <update_host>` immediatelly followed by an :ref:`upgrade <upgrade_host>`.

***************************************************
Adding or removing a WAPT package to several hosts
***************************************************

If you want to add or remove WAPT packages directly on several hosts, select the hosts then on one of them :guilabel:`Right-click` → :guilabel:`Edit mulitple hosts packages`.
You can add conflicting packages and remove conflicting packages from here too.

A new window will open, check the wanted package then click on :guilabel:`OK`.

.. figure:: wapt-resources/wapt_console_add_remove_package_several_hosts.png
  :align: center
  :scale: 75%
  :alt: Method for adding or removing a WAPT package onto several host

  Method for adding or removing a WAPT package onto several host

After that, do an :ref:`update <update_host>` immediately followed by an :ref:`upgrade <upgrade_host>` on the hosts.

.. _update_host:

***************************************************************************
Uninstalling a package using the conflict feature (do a prohibited package)
***************************************************************************

Once the package dependency has been removed, we can be sure that the package will not be reinstalled on the workstation via WAPT.
However, the package is installed on many workstations and you want to uninstall it.

    To do this, :kbd:`right-click` on the Organizational Unit → :guilabel:`Create or Edit Organizational Unit package`, go to the :guilabel:`Conflict` tab, and add the package to be uninstalled.

.. figure:: wapt-resources/Uninstalling_a_package_using_the_conflict_feature.png
  :align: center
  :scale: 75%
  :alt: Uninstalling a package using the conflict feature

  Uninstalling a package using the conflict feature

The conflict feature also work for one host.

    To do this, :kbd:`right-click` on the host → :guilabel:`Edit host`, go to the :guilabel:`Conflict` tab, and add the package to be uninstalled.

*************************************
Checking available updates for a host
*************************************

This button will execute 2 actions:

.. image:: wapt-resources/wapt_console_check-for-updates_menu-item.png
  :scale: 75%
  :align: left
  :alt: Checking available updates for a host

1. give current state of the host to the WAPT Server

2. the WAPT Server displays whether the host **MUST** get updates

Every configuration modification require a :guilabel:`Check updates`.

.. _upgrade_host:

**************************
Applying updates on a host
**************************

This button allows to apply pending updates on the selected host(s).

.. image:: wapt-resources/wapt_console_apply-upgrades_menu-item.png
  :scale: 75%
  :align: left
  :alt: Menu option for applying updates on selected host(s)

.. warning::

  Use with caution, it will **force close the software titles that the users are currently running**.

  One can use instead :guilabel:`Apply upgrade for not running applications` to prevent the users losing their unsaved work.

.. _global_search:

***************************************
Performing a global search on all hosts
***************************************

Performing global searches on all the criteria presented above is possible.

Choose the filters to check or uncheck.

.. figure:: wapt-resources/wapt_console_advanced-search_screen-item.png
  :align: center
  :scale: 75%
  :alt: Advanced search functionalities in the WAPT Console

  Advanced search functionalities in the WAPT Console

.. white_toggle::
  :titleen: Choice of filters
  :titlefr: Choix des filtres

  .. list-table::
    :header-rows: 1
    :widths: auto

    * - Options
      - Description
    * - :guilabel:`Host`
      - :guilabel:`Host` section in the :guilabel:`Hardware inventory` tab when a host is selected.
    * - :guilabel:`Hardware`
      - :guilabel:`DMI` section in the :guilabel:`Hardware inventory` tab when a host is selected.
    * - :guilabel:`Software`
      - :guilabel:`Software inventory` section when a host is selected.
    * - :guilabel:`Packages`
      - Lists WAPT packages installed on the selected hosts.
    * - :guilabel:`Has errors`
      - Searches only for hosts for which a task has not finished correctly.
    * - :guilabel:`Needs updating`
      - Searches only for hosts needing upgrades.
    * - :guilabel:`Connected only`
      - Searches only for connected hosts.
    * - :guilabel:`Only authorized computers`
      - Searches only for hosts authorized by certificate of current WAPT Console user.
    * - :guilabel:`WAPT Group`
      - Filters hosts based on their membership / dependency to a WAPT *group* package.
    * - :guilabel:`AD Site`
      - Filter hosts based on their membership / dependency to a Site within Active Directory.
    * - :guilabel:`AD Group`
      - Filters hosts based on their membership / dependency to a Active Directory group.
    * - :guilabel:`OS`
      - Filters hosts based on their Operating System.

.. hint::

  Filters work with `regular expression <https://en.wikipedia.org/wiki/Regular_expression>`_.

.. _creating_config_package:

********************************
Creating a configuration package
********************************

WAPT **configuration** packages allow to create several WAPT configurations without having to create several WAPT Agents.

To create a configuration package, go to the :guilabel:`Packages Iventory` tab in the WAPT console, then click on the :guilabel:`Make package template from setup file` button and finally choose the :guilabel:`Host agent dynamic configuration` menu item.

.. figure:: wapt-resources/wapt_console_package-host_configuration_screen-item.png
  :align: center
  :scale: 75%
  :alt: Package host configuration screen

  Package host configuration screen

A new window will open in order to create your new **configuration** package.

.. figure:: wapt-resources/wapt_console_package-config.png
  :align: center
  :scale: 60%
  :alt: Package group grid

Change the name in the :guilabel:`Package name` field.
Now there are several things that can be done.

The configuration toolbar
=========================

The :guilabel:`Advanced Editing` option will switch the simplified view into a complete list of options.
Please see this section for :ref:`advanced waptagent options <wapt_get_ini_full_options>`.

.. figure:: wapt-resources/wapt_console_package-config-advanced-mode.png
  :align: center
  :scale: 60%
  :alt: Advanced WAPT package configuration form

  Advanced WAPT package configuration form

You can use a filter to search the name of an attribute.

* The :guilabel:`Load Json` button will import a :mimetype:`json` file which can be a configuration file.

  .. figure:: wapt-resources/wapt_console_package-config-load-json.png
    :align: center
    :scale: 75%
    :alt: Loading a json file from a file or from the WAPT server

    Loading a json file from a file or from the WAPT server

  If you choose to download a :mimetype:`json` configuration file from the WAPT Server, you can choose amongst existing configurations.

  .. figure:: wapt-resources/wapt_console_package-config-load-json-server.png
    :align: center
    :scale: 75%
    :alt: Selecting a json file from the WAPT server

    Selecting a json file from the WAPT server

* The :guilabel:`Official documentation` button will open a link to the Tranquil IT documentation with all :file:`wapt-get.ini` options.

The configuration tabs
======================

By default, there are 3 tabs: :guilabel:`global`, :guilabel:`waptwua` and :guilabel:`repo-sync`.


.. tabs::

  .. tab:: Global

    The :guilabel:`global` tab will have the same options when you create a :ref:`WAPT Agent <create_WAPT_agent>`.
    The right pane summarizes the options that will be set.

    .. figure:: wapt-resources/wapt_console_package-config-global-tab.png
      :align: center
      :scale: 60%
      :alt: Global tab for configuring a WAPT package

    Global tab for configuring a WAPT package
  
  .. tab:: waptwua

    The :guilabel:`waptwua` tab will help you choose the options to use with :ref:`WAPT Windows Updates <wapt_wua>`.

    .. figure:: wapt-resources/wapt_console_package-config-waptwua-tab.png
      :align: center
      :scale: 60%
      :alt: Tab for enabling a remote host to use WAPT Windows Updates

      Tab for enabling a remote host to use WAPT Windows Updates
  
  .. tab:: repo-sync

    The :guilabel:`repo-sync` tab will help configure the remote host to become a :ref:`remote repository <repository_location>`.

    .. figure:: wapt-resources/wapt_console_package-config-reposync-tab.png
      :align: center
      :scale: 60%
      :alt: Tab for configuring a WAPT package to make a WAPT Agent become a remote repository

      Tab for configuring a WAPT package to make a WAPT Agent become a remote repository

Removing a configuration section
================================

To delete an option or an entire section, use :menuselection:`Right-click --> Delete selected property`.

.. figure:: wapt-resources/wapt_console_package-config-delete-property.png
   :align: center
   :scale: 60%
   :alt: Deleting a property, an option or a section

   Deleting a property, an option or a section

Saving the configuration package and applying the new configuration to a remote host
====================================================================================

Click on the :guilabel:`Save` button to save the new configuration bundle.
The configuration file will be uploaded onto the WAPT Server in :mimetype:`.json` file format.
Select the hosts and apply the configuration package like any WAPT package.

On the host, the configuration package will be located in the :file:`conf.d` WAPT installation directory in a :mimetype:`json` format which can look like this:

.. figure:: wapt-resources/wapt_config_file_json.png
   :align: center
   :scale: 75%
   :alt: Example of a configuration file done by a WAPT configuration package

   Example of a configuration file done by a WAPT configuration package

*********************************************
Removing the WAPT agent from the WAPT Console
*********************************************

If you want to delete a WAPT Agent from the console, right-click on the target agent then click-right and select :guilabel:`Remove Host` (see above).
You will have the possiblity to check :guilabel:`And delete host configuration (Package)`, if you do so, it will delete the targeted :ref:`host pakage <host_packages>` and delete all information about the selected computer.

.. figure:: wapt-resources/wapt_console-usage_delete-host.png
  :align: center
  :scale: 75%
  :alt: Window confirming host suppression from the WAPT Console

.. note::

  Deleting a host from the WAPT Console **does not** uninstall the WAPT Agent from the computer.
  Please refer to this :ref:`documentation to uninstall the WAPT Agent <uninstall_waptagent_linux>`.
  If the WAPT Agent is not properly removed, the computer will register again with the WAPT Server.
