Closed cautiouscoyote closed 1 month ago
This looks like an agent issue rather than a plugin one, please report bug or open a discussion on agent repository.
Okay, after some tests, I noticed @cautiouscoyote didn't select a "User Interaction Template". This parameter is required. In his case, the simplest one requiring only "OK" from the user is sufficient.
On my side, if I don't select a template, I obtain the same output. If I select a template, the output is correct.
The problem here seems to be the plugin as there's a red asterisk on the UI Template but the form permits the user to leave it empty.
Problem is there is absolutely no checks for input on that part. There is just the mandatory mark on the label; but no way to know what is required in this whole "generic" code... Adding HTML required attribute would be the simplest solution but would already been quite complex, really checking for value presence seems a quite huge job (honestly, I have no idea how to proceed, all that stuff relies on plugin specific code outside GLPI framework)..
Not sure we'll spend time on that, will be fixed in replacement plugin I guess.
Also, I'm not able to understand how a missing entry in that form can lend to character display issues.
If I remember well, this is just a matter of EOL encoding an we had a consensus to encode them in some way. Don't remember why exactly. And maybe this should be changed in the replacement plugin.
Anyway I think I should handle more nicely the case where "User Interaction Template" is missing on agent side.
Maybe we can close this issue with "wontfix" as we will provide an alternative in replacement plugin in the future.
To me, as a user first exploring this GLPI universe and fiddling around with these plugins, the workflow is not always too clear. Specifically for this inventory plugin, the flow to get a deployment task out there, is not all that intuitive. Afterwards, yeah, there is some logic to it, but the interface and user experience could benefit from some more love, I think.
Also, the red asterix is cute and all, but there is no indication whatsover what that would mean. A foot note on every page where such asterix is displayed, indicating that these options are mandatory, would have helped. Here I didn't pay much attention to it. And since nothing popped up pointing to the missing input, surely it will be ignored.
Anyway, I think I can work with it knowing this now. You devs may figure out what to do with it improving the whole package :-) There is already a replacement plugin in the works, yeah?
Yes, the team is working on a replacement plugin dedicated to Deploy task. I don't have more details to share, but we have the same user experience difficulties in mind.
If that can help you or people sticking around, there's an official KB with an article detected to Deploy task: https://faq.teclib.com/03_knowledgebase/inventory/glpiinventory_deploy
Just proposed a PR which fixes the message. It doesn't fix the template requirement. And indeed if no template is selected, the agent will still show a default combo with just the OK button. But the text will be correct with #512.
Describe the bug
When using the GLPI Inventory plugin to deploy a task on a client, and display a message afterwards, the formatting of this message is being screwed up: carriage return and line feed characters are being displayed instead of the proper new lines and what-not; see attached pictures.
To reproduce
Expected behavior
The message should be displayed on the client in the same markup with new lines as composed in the User Interactions field.
Operating system
Windows
GLPI Agent version
Other (See additional context below)
GLPI version
10.0.11
GLPIInventory plugin
1.3.5
Additional context
GLPI Agent version = 1.7.1.
Composed package action message:![image](https://github.com/glpi-project/glpi-inventory-plugin/assets/64739233/4d49a5e9-33f9-43df-ac77-e234b403ce98)
Actual message as displayed on client:![image](https://github.com/glpi-project/glpi-inventory-plugin/assets/64739233/c80cec76-18df-479a-850e-dfa9d7a12571)