Page 1 of 1

Empty description in the console

Published: March 3, 2017 - 11:23 PM
by f4242
Hello,

I just wanted to report that the "description" column for machines in the "inventory" tab is always empty in the console. The "description" textbox is also empty when a machine is selected and its information is viewed in the "general" tab. This bug occurred in version 1.3.8 and is still present in 1.3.9.

Re: Empty description in the console

Published: May 18, 2017 - 10:56 PM
by f4242
Hello,

I noticed you were experiencing the same issue in your YouTube live stream.

Is there a more appropriate place to report bugs?

Re: Empty description in the console

Published: May 19, 2017 - 09:24
by htouvet
On our infrastructure, if the "Computer Description" is not empty, the column in the console will indeed contain the information...

You can test it on one of your workstations:
Launch a cmd.exe command as Administrator with elevated privileges
Then type:

Code: Select all

wapt-get register "La description de mon ordinateur"
Then refresh the display in the console (F5).

Re: Empty description in the console

Published: May 19, 2017 - 2:49 PM
by f4242
Hmm, indeed, if I change the description from the machine (using `wapt-get register`), it works.

However, if I change it in the console, it doesn't work.

Before manually registering with the description, I had this:

Picture
Picture

EDIT: the images aren't displaying, here are the links:

https://framapic.org/62AwcY0JmLkd/G7CDP8nEOBif.png
https://framapic.org/keCke8M8jItq/WA1ZY4nXD33q.png

Once registered, the description appears in the list. If I change the computer (second screenshot), I also see the new description displayed. However, once the description is initialized by the client, it can no longer be modified from the console. The field is editable but not saved.

Re: Empty description in the console

Published: May 19, 2017 - 3:09 PM
by htouvet
OK... it wasn't really supposed to work.
If you want to adopt this behavior,
you just need to modify the file

Code: Select all

c:\wapt\templates\setup_host_template.py
with a text editor.

and replace with the following content:

Code: Select all

# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = []

def install():
    if control.description:
        print('Change local computer description to match package description')
        set_computer_description(control.description)
        
The "new" machine packages will automatically change the machine description according to the machine package description.

Machines that already have a package (in /var/www/wapt-host) will not experience this behavior, because the package is pre-existing and setup.py will not be changed.

Re: Empty description in the console

Published: May 19, 2017 - 4:33 PM
by f4242
Hmm, so I'd have to modify the agent on each machine and remember to reapply the change after an update?

Is there a reason why the description can't be modified from the console by editing the machine package? It's much more convenient to modify a machine's description centrally in the console than individually on each machine.

Thanks!

Re: Empty description in the console

Published: May 19, 2017 - 4:54 PM
by htouvet
The template modification should only be done on the administration machine because it is the one that initializes the machine packages.

So far, Wapt's rule is that
  • - All configuration is done via a signed packet.
    - All information in the console comes from client machines (no information is added to the database afterward).
That's why in my example above the description change is done via the setup.py of the machine package.

Now, we could make things more transparent by -
  • - Editing the package description (+signature) in the background when a description is entered in the grid
    - Allowing the wapt client to modify the machine description based on the package description (option to add to wapt-get.ini such as enable_host_description_management)