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

[NP] Cutover ensureDefaultIndexPattern to kibana_utils #59895

Merged
merged 16 commits into from
Mar 18, 2020

Conversation

sulemanof
Copy link
Contributor

@sulemanof sulemanof commented Mar 11, 2020

Summary

A part of #58999

This moves ensureDefaultIndexPattern helper to kibana_utils, got rid of $rootScope & kbnUrl, uses history dependency instead.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@sulemanof sulemanof requested review from kertal and flash1293 March 11, 2020 13:52
…lt_index

# Conflicts:
#	src/legacy/core_plugins/kibana/public/dashboard/np_ready/legacy_app.js
#	src/legacy/core_plugins/kibana/public/discover/kibana_services.ts
#	src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js
#	src/legacy/core_plugins/kibana/public/visualize/np_ready/editor/editor.js
#	src/legacy/core_plugins/kibana/public/visualize/np_ready/legacy_app.js
#	src/plugins/kibana_utils/public/history/index.ts
#	src/plugins/kibana_utils/public/history/redirect_when_missing.tsx
#	src/plugins/kibana_utils/public/index.ts
@sulemanof sulemanof marked this pull request as ready for review March 17, 2020 12:48
@sulemanof sulemanof requested a review from a team March 17, 2020 12:48
@sulemanof sulemanof requested a review from a team as a code owner March 17, 2020 12:48
@sulemanof sulemanof added Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.7.0 v8.0.0 labels Mar 17, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Code LGTM, tested locally in Chrome, was redirected to management

@@ -41,8 +40,7 @@ let timeoutId: NodeJS.Timeout | undefined;
export async function ensureDefaultIndexPattern(
newPlatform: CoreStart,
Copy link
Member

Choose a reason for hiding this comment

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

Nit, could you rename newPlatformto core since we're already in NP?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, makes sense !
Just was hesitant to rename it after Joe gave this name 😃

Copy link
Contributor

@streamich streamich left a comment

Choose a reason for hiding this comment

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

AppArch code changes LGTM.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@sulemanof sulemanof merged commit 965679a into elastic:master Mar 18, 2020
@sulemanof sulemanof deleted the shim/ensure_default_index branch March 18, 2020 15:28
sulemanof added a commit to sulemanof/kibana that referenced this pull request Mar 18, 2020
* Cutover ensure_default_index_pattern to kibana_utils

* Fix conflicts

* Proper name for argument

Co-authored-by: Elastic Machine <[email protected]>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 18, 2020
* master:
  [NP] Cutover ensureDefaultIndexPattern to kibana_utils (elastic#59895)
  Closes elastic#60265. Adds Beta badge to service map (elastic#60482)
  [Visualize] Duplicated query filters in es request (elastic#60106)
  [ML] Disable functional transform tests
  Fixes to service map single node banner (elastic#60072)
  [Uptime] replace fetch with kibana http (elastic#59881)
  Upgrade @types/node to match Node.js runtime (elastic#60368)
@lukeelmers
Copy link
Member

Since ensureDefaultIndexPattern is specific to index patterns, I wonder if longer-term it would make sense to eventually relocate this somewhere in data.indexPatterns or data.ui instead of in kibana_utils? That feels like it would be a more logical place for this, as index patterns feels like the clear owner of this functionality.
cc @lizozom @mattkime

jloleysens added a commit that referenced this pull request Mar 18, 2020
…nless

* 'app/painless' of github.com:elastic/kibana: (64 commits)
  Fix filter scope in bool query (#60488)
  change index pattern id to be the same as index pattern title (#60436)
  [Endpoint] resolver v1 events (#59233)
  Branding fixes for dashboard, loader and space selector (#60073)
  skip flaky suite (#60535)
  [SIEM][Detection Engine] Fixes bug with timeline templates not working
  Fixed errors which are happening if switch between alert types (#60453)
  [EPM] Add mapping field types to index template generation v2 (#60266)
  [NP] Cutover ensureDefaultIndexPattern to kibana_utils (#59895)
  Closes #60265. Adds Beta badge to service map (#60482)
  [Visualize] Duplicated query filters in es request (#60106)
  [ML] Disable functional transform tests
  Fixes to service map single node banner (#60072)
  [Uptime] replace fetch with kibana http (#59881)
  Upgrade @types/node to match Node.js runtime (#60368)
  [License Management] NP migration (#60250)
  Fix create alert button from not showing in alerts list (#60444)
  [SIEM][Case] Update connector through flyout (#60307)
  add data-test-subj where possible on SO management table (#60226)
  Enforce `required` presence for value/key validation of `recordOf` and `mapOf`. (#60406)
  ...
sulemanof added a commit that referenced this pull request Mar 18, 2020
* Cutover ensure_default_index_pattern to kibana_utils

* Fix conflicts

* Proper name for argument

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Mar 19, 2020
* upstream/app/painless: (66 commits)
  Another i18n issue
  Fix i18n
  Fix filter scope in bool query (elastic#60488)
  change index pattern id to be the same as index pattern title (elastic#60436)
  [Endpoint] resolver v1 events (elastic#59233)
  Branding fixes for dashboard, loader and space selector (elastic#60073)
  skip flaky suite (elastic#60535)
  [SIEM][Detection Engine] Fixes bug with timeline templates not working
  Fixed errors which are happening if switch between alert types (elastic#60453)
  [EPM] Add mapping field types to index template generation v2 (elastic#60266)
  [NP] Cutover ensureDefaultIndexPattern to kibana_utils (elastic#59895)
  Closes elastic#60265. Adds Beta badge to service map (elastic#60482)
  [Visualize] Duplicated query filters in es request (elastic#60106)
  [ML] Disable functional transform tests
  Fixes to service map single node banner (elastic#60072)
  [Uptime] replace fetch with kibana http (elastic#59881)
  Upgrade @types/node to match Node.js runtime (elastic#60368)
  [License Management] NP migration (elastic#60250)
  Fix create alert button from not showing in alerts list (elastic#60444)
  [SIEM][Case] Update connector through flyout (elastic#60307)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants