-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
allows plugins to define validation schema for "enabled" flag #50286
allows plugins to define validation schema for "enabled" flag #50286
Conversation
Pinging @elastic/kibana-platform (Team:Platform) |
if (!config.has(enabledPath)) { | ||
|
||
// if plugin hasn't got a config schema, we try to read "enabled" directly | ||
const isEnabled = |
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.
As an alternative solution, we can always extend the plugin config with a schema for the enabled
flag. Although, I'd prefer to do not touch the user schema.
💔 Build Failed |
Hi @restrry |
@paul-tavares right now you can only specify |
@elasticmachine merge upstream |
💚 Build Succeeded |
@restrry thanks for that. I would not have thought of looking in the Migration docs because we're a brand new plugin that will be using only the new platform - but we're probably the exception. I will make a mental note to also review migration type of docs when looking for info. 😄 Re: Docs One observation I would like to share, which perhaps is more specific to the disablement of a plugin, is the |
@elasticmachine merge upstream |
💚 Build Succeeded |
…c#50286) * validation error message gives a hint about error source * allows plugins to define validation schema for "enabled" flag
#50885) * validation error message gives a hint about error source * allows plugins to define validation schema for "enabled" flag
…her [skip ci] * upstream/master: (54 commits) allows plugins to define validation schema for "enabled" flag (elastic#50286) Add retry to find.existsByDisplayedByCssSelector (elastic#48734) [i18n] integrate latest translations (elastic#50864) ui/resize_checker 👉 src/plugins/kibana_utils (elastic#44750) Fix @reach/router types (elastic#50863) [ML] Adding ML node warning to overview and analytics pages (elastic#50766) Bump storybook dependencies (elastic#50752) [APM Replace usage of idx with optional chaining (elastic#50849) [SIEM] Fix eslint errors (elastic#49713) Improve "Browser client is out of date" error message (elastic#50296) [SIEM][Detection Engine] REST API improvements and changes from UI/UX feedback (elastic#50797) Move @kbn/es-query into data plugin - es-query folder (elastic#50182) Index Management new platform migration (elastic#49359) Increase retry for cloud snapshot to finish (elastic#50781) Removing EuiCode from inside EuiPanel (elastic#50683) [SIEM] Tests for search_after and bulk index (elastic#50129) Make babel understand TypeScript 3.7 syntax (elastic#50772) Fixing mocha tests and broken password change status codes (elastic#50704) [Canvas] Use compressed forms in sidebar (elastic#49419) Add labels to shell scripts in Jenkins (elastic#49657) ...
Summary
the first commit closes: #49012
validation error message gives a hint about source of the error:
"[config validation of [key]]:...
the second commit closes: #49289
plugins are able to define config schema with default value for
enabled
flagChecklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
Dev docs
If you want your plugin to be disabled by default you can specify it via config: