ansibleguy / webui

Basic WebUI for using Ansible
https://webui.ansibleguy.net
GNU General Public License v3.0
92 stars 7 forks source link

Feature: create more type of forms #51

Closed vampywiz17 closed 3 months ago

vampywiz17 commented 3 months ago

Scope

Frontend (User Interface)

Description

It would be good to use other type of variable, for example drop down menu, etc...

ansibleguy commented 3 months ago

Greetings!

Makes sense - yes.

Just to clarify: you are talking about the custom execution, yes? image

If we use the current format we could use something like that: var_choice=action_type#Action to perform#add,update,delete

Which would create a dropdown with:

What do you think?

vampywiz17 commented 3 months ago

@ansibleguy

yes, talking about custom execution.

It seems good yes!

Or also think that would be good to define the type of variables... for example string, number, password, url, etc... and in interface, only accept these type of values.

similar with suse manager salt formulas editor:

https://documentation.suse.com/suma/4.3/en/suse-manager/specialized-guides/salt/salt-formulas-custom.html

ansibleguy commented 3 months ago

What do you think of that approach? I think a regex is easy to implement and can empower users to validate their data as needed.

image image

vampywiz17 commented 3 months ago

Yes it seems really good!

ansibleguy commented 3 months ago

Would be nice if you could give some feedback on the feature: https://github.com/ansibleguy/webui/releases/tag/0.0.22-2

vampywiz17 commented 3 months ago

@ansibleguy

Hi, I tested it. the option works well! the new configuration mode is also good. but I think the regex is a problem. I'm trying to set a variable that only receives email. I'm using these regexes, but it seems to accept any string:

https://regex101.com/r/gZ0aQ7/1

I use a wrong regex, now it working well :)

vampywiz17 commented 3 months ago

What do you think the grouping? For example:

image

ansibleguy commented 3 months ago

Yeah. Will give it a shot when I find time (: