-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
ui: Add 'Scenario' debug function for easy saving debug scenarios #9675
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
50d7746
to
bc65125
Compare
ae96dfd
to
b190b7a
Compare
I rebased and added some README here also before merging 👍 |
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/320669. |
Following on from #9666, this PR adds a
Scenario()
debug function to allow you to easily save off 'scenarios' for easy debugging or demoing purposes.When called with no arguments (using WebInspector's
console
, or via a bookmarklet), the function will open a new tab with an easily copy/pastable URL (for sharing preview sites) and a draggable bookmarklet link containing the configuration for your current development/debug configuration settings (which we can set via the cookies panel in the WebInspector). Whilst this function only exists in non-production environments we also only emit cookies that begin withCONSUL_
which we know are our own debug/dev cookies.Scenarios are composable, so instead of having lots of multiple bookmarklets, you can save say one for enabling nspace/acls another for metrics - clicking one after the other will give you nspaces/acls plus metrics.
We haven't added this to the README as yet , we'll wait until #9666 has been merged and also possibly decide a more central place for all these types of functions to live.
Directions below: