-
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
[NP] Migrate uiSettings owned by Kibana app #64321
Conversation
@elasticmachine merge upstream |
merge conflict between base and head |
@elasticmachine merge upstream |
merge conflict between base and head |
@elasticmachine merge upstream |
merge conflict between base and head |
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.
Maps changes LGTM
code review
src/plugins/saved_objects_management/public/management_section/mount_section.tsx
Outdated
Show resolved
Hide resolved
…to setting accessors
I agree with that plugins should only have access to the settings that either (1) Core exposes (2) plugins they depend on expose (3) they own themselves. I also think that to accomplish that we need a much larger change to how this service works in order to enforce those boundaries. Same goes for saved object types. We probably shouldn't allow arbitrary access to any SO type. So maybe for now we try to follow the pattern @pgayvallet laid out above where it's easy & feasible, but if there are some cases that don't fit nicely into that pattern we can solve that separately later? |
I do agree and I'm currently adapting the PR to the pattern @pgayvallet suggested, where possible |
schema: schema.arrayOf(schema.string()), | ||
}, |
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.
Optional: I'm wondering whether we know all of them to declare validation as a union of well-known strings.
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.
here are mapping fields. but not all e.g. _score of the query context is missing, think it should stay flexible, just in case
https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-fields.html
src/plugins/visualize/public/application/listing/visualize_listing.js
Outdated
Show resolved
Hide resolved
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.
Tested against current master and all settings are still there. LGTM.
While looking through the code I noticed we need to do the same thing for a bunch of timelion settings, I will create a separate issue for that.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
@@ -33,6 +33,7 @@ import { i18n } from '@kbn/i18n'; | |||
import { fieldWildcardMatcher } from '../../../../../../../../../plugins/kibana_utils/public'; | |||
import { IndexPatternManagementStart } from '../../../../../../../../../plugins/index_pattern_management/public'; | |||
import { IndexPattern, IndexPatternField } from '../../../../../../../../../plugins/data/public'; | |||
import { META_FIELDS_SETTING } from '../../../../../../../../../plugins/data/common'; |
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.
If I'm not wrong we are trying to avoid imports from /common
folder.
Also I think that this approach introduce a lot of fields in our static contract which also not good.
Maybe we can move all into one variable:
const UI_SETTINGS = {
META_FIELDS_SETTING: 'meta_field',
DEFAULT_QUERY_LANGUAGE: 'kuery',
META_FIELDS_SETTING: `'metaFields',`
}
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.
sorry, seems we had a comment/merge race condition. seen this comment after the merge. since this part of Kibana was in the legacy world, and it's currently migrated, this could be done in or after #65026
* Move META_FIELDS_SETTING, DOC_HIGHLIGHT_SETTING to data plugin.ts * Refactor table_list_view.tsx to no longer get PER_PAGE_SETTING by uiSettings * Migrate graph, visualize, dashboard usage of saved_objects module constants to accessor functions * Remove redundant logging in plugins start and setup methods Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co> # Conflicts: # src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts
* Move META_FIELDS_SETTING, DOC_HIGHLIGHT_SETTING to data plugin.ts * Refactor table_list_view.tsx to no longer get PER_PAGE_SETTING by uiSettings * Migrate graph, visualize, dashboard usage of saved_objects module constants to accessor functions * Remove redundant logging in plugins start and setup methods Co-authored-by: Maryia Lapata <mary.lopato@gmail.com> Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
* master: (191 commits) [Maps] Get number of categories from palette (elastic#66454) move oss features registration to KP (elastic#66524) [kbn/plugin-helpers] typescript-ify (elastic#66513) Add kibana-operations as codeowners for .ci/es-snapshots and vars/ (elastic#66746) FTR: move basic services under common folder (elastic#66563) Migrate Beats Management UI to KP (elastic#65791) [CI] Add 20 minutes to overall build timeout lint import from restricted zones for export exressions (elastic#66588) [SIEM][Detection Engine] Add validation for Rule Actions (elastic#63332) KP plugins shouldn't need package.json (elastic#66654) Replace agent metrics link with the new one (elastic#66632) [CI] Add one retry to setup step (elastic#66638) [CI] Add slack alerts to tracked branch jobs, change default channel, change formatting (elastic#66580) [docLinks] Add docLinks to CoreSetup. (elastic#66631) [DOCS] Rename monitoring collection from internal to legacy (elastic#65781) unskip newsfeed tests (elastic#66562) [NP] Migrate uiSettings owned by Kibana app (elastic#64321) [ML] Functional tests - stabilize typing in DFA mml input (elastic#66706) [Map] return bounding box for static feature collection without joins (elastic#66607) remove trailing slash in graph sample data links (elastic#66358) ...
Pinging @elastic/kibana-app (Team:KibanaApp) |
Summary
Fixes #63597.
This PR migrates the following ui settings to the new platform:
discover
:defaultColumns
discover:sampleSize
discover:aggs:terms:size
discover:sort:defaultOrder
discover:searchOnPageLoad
doc_table:hideTimeColumn
fields:popularLimit
context:defaultSize
context:step
context:tieBreakerFields
data
:metaFields
doc_table:highlight
charts
:visualization:colorMapping
vis_type_vislib
:visualization:dimmingOpacity
visualization:heatmap:maxBuckets
saved_objects
:savedObjects:perPage
savedObjects:listingLimit
vis_type_timeseries
:metrics:max_buckets
visualization:loadingDelay
since it's unused.i18n
IDs were updated respectively.