Skip to content

Enh: Debug REST service could have namespace dropdown #1482

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

Closed
isc-kiyer opened this issue Feb 12, 2025 · 8 comments · Fixed by #1487
Closed

Enh: Debug REST service could have namespace dropdown #1482

isc-kiyer opened this issue Feb 12, 2025 · 8 comments · Fixed by #1487
Assignees
Labels
enhancement New feature or request

Comments

@isc-kiyer
Copy link
Contributor

Currently if I select "Debug REST service" from a namespace with no REST web apps, it fails with the error "No REST web applications are configured in the server's namespace."

I generally have code in a separate namespace than my running application though so it would be nice to show the Debug REST Service webview anyway, with perhaps a Namespace drop down in addition to the web app dropdown.

@isc-bsaviano isc-bsaviano added the enhancement New feature or request label Feb 12, 2025
@isc-bsaviano
Copy link
Contributor

I can look into ways to make this more user-friendly

@isc-bsaviano isc-bsaviano self-assigned this Feb 12, 2025
@isc-bsaviano
Copy link
Contributor

@gjsjohnmurray @isc-rsingh I think there are two options to resolve this:

  1. Get rid of the web app dropdown entirely. This gives the user the freedom to enter whatever path they want and removes the need for us to query the server for a list of REST web apps.
  2. Keep the dropdown, but populate it with all REST web apps in all namespaces. This could lead to permissions issues on older servers for underprivileged users since we need to query Security.Applications directly. Also, system REST APIs will be present in the dropdown.

I vote for option 1, but would like to hear your opinions.

@isc-kiyer
Copy link
Contributor Author

I think 2 dropdowns would be nice: one for namespace and one for the web apps in that namespace once a namespace is chosen. Isn't Security.Applications already queried right now to find web apps for the current namespace?

@isc-bsaviano
Copy link
Contributor

No, we use a stored procedure in %CSP.Apps. I would rather reduce complexity instead of adding it.

@isc-kiyer
Copy link
Contributor Author

Ah nice. I understand keeping complexity minimal. However, the dropdown is nice from a UX perspective. If there is a namespace dropdown, then couldn't %CSP.Apps be used to make the stored procedure call in the selected namespace?

@isc-bsaviano
Copy link
Contributor

Yes, I could make a REST request to get a list of accessible namespaces, then make a %CSP.Apps query for each namespace when the user changes that dropdown. I don't think the UX of two dropdowns is better than just a text box. It might help with typo's, but since the values that the user entered are saved and restored when the WebView appears again, it's easy to correct a small mistake.

@isc-rsingh
Copy link
Member

I'm against showing web apps from all namespaces. Pandora's box...
The approach right above sounds good to me.

@gjsjohnmurray
Copy link
Contributor

gjsjohnmurray commented Feb 13, 2025

@isc-bsaviano could you use the recently-added server connection picker (#1467) rather than relying on there being a suitable active editor to derive the connection from? Then if @isc-kiyer's workspace already has a folder connecting to the REST app's namespace (even if only an isfs-readonly one) it'd become possible to debug that app.

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
4 participants