ui: Add 'Scenario' debug function for easy saving debug scenarios #9675
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: