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

Validate text box entry in form.yml #3830

Closed
btsherid opened this issue Sep 25, 2024 · 6 comments
Closed

Validate text box entry in form.yml #3830

btsherid opened this issue Sep 25, 2024 · 6 comments
Milestone

Comments

@btsherid
Copy link

Hi,

I have created an OnDemand app where a user enters a file path into a text box and then that file path is used to find the R executable to run the app. This has the downfall that if the user happens to input a file path that does not exist or does not contain an R executable, the app fails to start. This is expected, but failing to start is all the user sees. Is there a way to either

  1. Run a check (like a bash script) and if it fails throw an error on the form page (like the required fields if nothing is entered)
    For example, run a ls of the path entered and if no results throw and error and don't submit the job.

or

  1. Print something on the app card that informs the user it was their entry in the text box that caused the app to fail. In the same example, this would run the ls after job submission and if no results report that on the session card.

Thank you,
Brendan Sheridan

@osc-bot osc-bot added this to the Backlog milestone Sep 25, 2024
@johrstrom
Copy link
Contributor

Have you tried to use the path_selector widget where users can navigate the filesystem and choose the file?

@btsherid
Copy link
Author

I didn't realize that was an option. However, I just tried it and nothing appears in the text box. The Select Path button appears, I can navigate to a folder, but when I click the Select Path button the pop-up disappears and nothing is populated into the text box.

-Brendan

@johrstrom
Copy link
Contributor

Errrm, you may have found a bug. I can take a look at replicating.

@btsherid
Copy link
Author

btsherid commented Sep 25, 2024

I found another issue saying that I should update to 3.1 and I tested that on our dev server and that fixed the problem. I'll just plan on upgrading our prod server from 3.0 to 3.1 soon.

However, all my passenger apps and the Active Jobs apps broke after upgrading to 3.1. Is there documentation for the upgrade in terms of those apps?

@johrstrom
Copy link
Contributor

However, all my passenger apps and the Active Jobs apps broke after upgrading to 3.1. Is there documentation for the upgrade in terms of those apps?

Only in the release notes that likely mention a Ruby/nodejs/python versions got upgraded.

@btsherid
Copy link
Author

I found an error in the logs I'll open another issue for. Thanks for the help. I think the path_selector will solve this issue.

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

No branches or pull requests

3 participants