Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abillity to add buttons next to (expressions / text / enum) form fields and trigger some endpoint / external URL / fn / refresh #151

Open
nikos445 opened this issue Feb 15, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@nikos445
Copy link

Feature:

  • Abillity to add buttons next expressions / text / enum and trigger some endpoint / external URL
  • Additionally, Buttons can be programmed to execute some expression.

Use case example:

  • Button next to free text field, to request an API endpoint for adding data to database.
  • Authentication shall be considered also like fn.advancdRest()...
@nikos445 nikos445 changed the title Abillity to add buttons next expressions / text / enum and trigger some endpoint / external URL Abillity to add buttons next to (expressions / text / enum) form fields and trigger some endpoint / external URL Feb 15, 2024
@nikos445 nikos445 changed the title Abillity to add buttons next to (expressions / text / enum) form fields and trigger some endpoint / external URL Abillity to add buttons next to (expressions / text / enum) form fields and trigger some endpoint / external URL / fn / refresh Feb 15, 2024
@ansibleguy76
Copy link
Owner

ansibleguy76 commented Feb 15, 2024

Can you give a more detailed example ? What data would be added to the database for example ? And what if a double click happens, should it add the data twice ? This wouldn't be such a big change, in the end the expression fields already to that (and not that you can have a post in the expressions. The post would then happen once or repost when a dependency changed. And there is a feature to refresh an expression too.

@ansibleguy76 ansibleguy76 self-assigned this Feb 15, 2024
@ansibleguy76 ansibleguy76 added the enhancement New feature or request label Feb 15, 2024
@nikos445
Copy link
Author

I don't have something specific currently in mind but, using ansible forms daily, I found that this sometimes would be awesome to have a button that calls an FN fuctnion.

  1. A quick example that comes in mind:
  • Lets say "want to add a new user" to a "database" with a "Restapi call" to a custom backend
    • A textfield with user email
    • [ + ] button next to it that calls the RestAPI with FN function.
  • Use User email in extra vars after to some ansible automation for granting priviledges to access a UI
  1. Another quick example that comes in mind:
  • Reset to default button value for a field.
    • Next to expression / text field

@ansibleguy76
Copy link
Owner

that is a bit vague isn't it.

@nikos445
Copy link
Author

It is I agree, but good feature to be able to add buttons in a UI.
I only suggest, your application, your choice for adding it or ignoring it!
Happy to help! :)

@nikos445
Copy link
Author

Additionally, you can have a counter and allow the button to be clicked only once or twice or specific number of times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants