mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
# Backport This will backport the following commits from `main` to `8.9`: - [[Discover] Refresh fields when entering Discover (#160195)](https://github.com/elastic/kibana/pull/160195) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2023-07-04T08:19:30Z","message":"[Discover] Refresh fields when entering Discover (#160195)\n\n- Closes https://github.com/elastic/kibana/issues/156556\r\n- Probably also addresses\r\nhttps://github.com/elastic/kibana/issues/157239\r\n\r\n## Summary\r\n\r\nThis PR allows to refresh fields list when revisiting Discover page.\r\n\r\n## For testing\r\n\r\n1. Open discover\r\n2. In a separate tab open Dev Tools and create documents which include\r\nnew field names\r\n3. Press \"Refresh\" in the unified search bar on Discover and notice that\r\nnew fields appear under Unmapped section\r\n4. Navigate to another Kibana app (for example Home page)\r\n5. Navigate back to Discover and notice that new fields are now under\r\nAvailable section and have a proper icon.","sha":"4819efa8eb16529db807043d36a1214070e10c79","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:prev-minor","v8.10.0"],"number":160195,"url":"https://github.com/elastic/kibana/pull/160195","mergeCommit":{"message":"[Discover] Refresh fields when entering Discover (#160195)\n\n- Closes https://github.com/elastic/kibana/issues/156556\r\n- Probably also addresses\r\nhttps://github.com/elastic/kibana/issues/157239\r\n\r\n## Summary\r\n\r\nThis PR allows to refresh fields list when revisiting Discover page.\r\n\r\n## For testing\r\n\r\n1. Open discover\r\n2. In a separate tab open Dev Tools and create documents which include\r\nnew field names\r\n3. Press \"Refresh\" in the unified search bar on Discover and notice that\r\nnew fields appear under Unmapped section\r\n4. Navigate to another Kibana app (for example Home page)\r\n5. Navigate back to Discover and notice that new fields are now under\r\nAvailable section and have a proper icon.","sha":"4819efa8eb16529db807043d36a1214070e10c79"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160195","number":160195,"mergeCommit":{"message":"[Discover] Refresh fields when entering Discover (#160195)\n\n- Closes https://github.com/elastic/kibana/issues/156556\r\n- Probably also addresses\r\nhttps://github.com/elastic/kibana/issues/157239\r\n\r\n## Summary\r\n\r\nThis PR allows to refresh fields list when revisiting Discover page.\r\n\r\n## For testing\r\n\r\n1. Open discover\r\n2. In a separate tab open Dev Tools and create documents which include\r\nnew field names\r\n3. Press \"Refresh\" in the unified search bar on Discover and notice that\r\nnew fields appear under Unmapped section\r\n4. Navigate to another Kibana app (for example Home page)\r\n5. Navigate back to Discover and notice that new fields are now under\r\nAvailable section and have a proper icon.","sha":"4819efa8eb16529db807043d36a1214070e10c79"}}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
This commit is contained in:
parent
b94d041dc5
commit
64a465c8f5
1 changed files with 5 additions and 2 deletions
|
@ -70,7 +70,7 @@ export async function loadDataView({
|
|||
let fetchedDataView: DataView | null = null;
|
||||
// try to fetch adhoc data view first
|
||||
try {
|
||||
fetchedDataView = fetchId ? await dataViews.get(fetchId, false) : null;
|
||||
fetchedDataView = fetchId ? await dataViews.get(fetchId, false, true) : null;
|
||||
if (fetchedDataView && !fetchedDataView.isPersisted()) {
|
||||
return {
|
||||
list: dataViewList || [],
|
||||
|
@ -88,7 +88,10 @@ export async function loadDataView({
|
|||
let defaultDataView: DataView | null = null;
|
||||
if (!fetchedDataView) {
|
||||
try {
|
||||
defaultDataView = await dataViews.getDefaultDataView({ displayErrors: false });
|
||||
defaultDataView = await dataViews.getDefaultDataView({
|
||||
displayErrors: false,
|
||||
refreshFields: true,
|
||||
});
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue