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
Prometheus: Add default editor configuration #61510
Conversation
Awesome! I remember back to the Porto offsite when we were talking about this. I created a new datasource with a 'code' default editor and opened up explore and it was in the code editor. I changed the mode to 'builder' in the editor and this overrode the default editor configuration, so when I navigated away and then returned to explore with the same datasource, 'builder' was selected. One thing that confused me was that when I went into a previously created datasource plugin and changed the default editor to 'code', if I had previously clicked 'builder' in the editor before changing the configuration, this overrode the default editor configuration. So when I navigated away from the configuration page to explore, I saw the builder. Does the editor toggle always override? Is it possible to get the default editor from a datasource that had been created before this feature? defaultEditorMode.mov |
@bohandley editor toggle has priority always. That was intended. So if you decide on something you will get it always no matter what the configuration was. |
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!
It looks like this feature did not make it into release 9.3.4? |
What is this feature?
We show builder mode by default for Prometheus. When you switch it to code mode it stays this way for you only. Some of our users want to configure this in the settings of datasource. So this PR adds this functionality. It has backward compatibility so if that setting is not specified nothing will happen. The selection you made while querying will override this setting only for the user.
Why do we need this feature?
Some people want to set the default editor option for their datasources. This PR gives that flexibility to them.
Who is this feature for?
Anyone who uses Prometheus and wants to set the default editor for the datasource
Which issue(s) does this PR fix?:
Fixes #57366
Special notes for your reviewer: