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

Query string input - load index patterns instead of saved objects #84457

Merged
merged 15 commits into from
Dec 6, 2020

Conversation

mattkime
Copy link
Contributor

@mattkime mattkime commented Nov 28, 2020

Related to - #84352

Use index pattern service to load index pattern instance instead of loading saved object and transforming into index pattern like object. This correctly loads the field list.

@mattkime mattkime changed the title load index patterns instead of saved objects Query string input - load index patterns instead of saved objects Nov 28, 2020
@mattkime mattkime added v8.0.0 v7.11.0 release_note:skip Skip the PR/issue when compiling release notes Team:AppServices labels Nov 29, 2020
@mattkime mattkime marked this pull request as ready for review November 29, 2020 04:52
@mattkime mattkime requested a review from a team as a code owner November 29, 2020 04:52
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@ppisljar
Copy link
Member

how is this related to #84458 ?

@@ -174,6 +174,20 @@ export class IndexPatternsService {
return this.savedObjectsCache;
};

find = async (search: string, size: number = 10): Promise<IndexPattern[]> => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add a unit test for this function?

const getIndexPatternPromises = savedObjects.map(async (savedObject) => {
return await this.get(savedObject.id);
});
return await Promise.all(getIndexPatternPromises);
Copy link
Contributor

Choose a reason for hiding this comment

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

//nit isn't the await redundant?

@mattkime
Copy link
Contributor Author

@ppisljar Same problem in a different spot in the codebase.

@mattkime
Copy link
Contributor Author

mattkime commented Dec 4, 2020

@elasticmachine merge upstream

@mattkime
Copy link
Contributor Author

mattkime commented Dec 4, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
data 603 602 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
data 244.7KB 244.3KB -413.0B

Distributable file count

id before after diff
default 46890 47649 +759
oss 27566 27565 -1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 988.3KB 987.9KB -426.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

LGTM

@mattkime mattkime merged commit 2c7a85d into elastic:master Dec 6, 2020
mattkime added a commit to mattkime/kibana that referenced this pull request Dec 6, 2020
…astic#84457)

* load index patterns instead of saved objects
* remove getFromSavedObject
* add test
mattkime added a commit that referenced this pull request Dec 7, 2020
…4457) (#85104)

* load index patterns instead of saved objects
* remove getFromSavedObject
* add test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants