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

Cannot disable rorviswild for a given route/action #32

Open
leewaa opened this issue Aug 23, 2024 · 1 comment
Open

Cannot disable rorviswild for a given route/action #32

leewaa opened this issue Aug 23, 2024 · 1 comment

Comments

@leewaa
Copy link

leewaa commented Aug 23, 2024

I have a conflict with swagger documentation that I have built into my Rails app. rorvswild overrides styles which prevent highlighting selected text within json bodies of swagger ui.

I tried using ignore_requests for the specific controller and action however this does not seem to do anything. I ensured that I configured it correctly.

e.g.

development:
  ignore_requests:
    - Admin::ApiDocsController#file
    - Admin::ApiDocsController#index

However the widget still appears and it loads all related assets into the DOM. Is this an error on my part or is something lacking hear?

I would like to completely disable rorvswild for a specific route so that nothing at all is added to the dom.

@alexisbernard
Copy link
Member

Hi,

ignore_request only disable the monitoring for the specified actions. I guess, you want to hide the toggle button in the corner (https://www.rorvswild.com/docs/monitoring/profiler#hide-or-change-the-widget-position).

development:
  widget: hidden # top-left, top-right, bottom-right, bottom-left

But that will hide the button for all pages. However you can change dynamically on each request: RorVsWild.agent.config[:widget] = "hidden".

But the best would be fixing this CSS issue. Could you share the overridden rule?

@antoinem.

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

2 participants