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

ui: Add 'Scenario' debug function for easy saving debug scenarios #9675

Merged
merged 4 commits into from
Feb 1, 2021

Conversation

johncowen
Copy link
Contributor

@johncowen johncowen commented Feb 1, 2021

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 with CONSUL_ 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:

data:text/html,<a href="javascript:Scenario()">Save Current Scenario</a>

scenario

Copy link
Contributor

@kaxcode kaxcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@johncowen
Copy link
Contributor Author

I rebased and added some README here also before merging 👍

@johncowen johncowen merged commit 0b7d676 into master Feb 1, 2021
@johncowen johncowen deleted the ui/feature/debug-scenario branch February 1, 2021 17:50
@hashicorp-ci
Copy link
Contributor

🍒 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants