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

[CCR] Fix row actions in follower index and auto-follow pattern tables #84433

Merged
merged 7 commits into from
Dec 1, 2020

Conversation

yuliacech
Copy link
Contributor

@yuliacech yuliacech commented Nov 26, 2020

Fixes #84236, #63361, #63441 (all related issues).

Summary

This PR changes how providers for follower index and auto-follow pattern actions wrap the components.

Before a provider would wrap around span element rendered in a custom table action. That way a modal (that the action displays) is mounted inside the rendered action.
A recent update to EUI now causes table action popup to auto-close after an action was clicked and thus the modal is closed short after the click too (Similar issue #70383 in ML).

This PR proposes to use providers to wrap around tables, so that the modal would be mounted after the table (and outside of row action buttons). Follower index table has 3 different action providers which can be grouped together for easier use.

How to test

  1. Start Kibana with yarn start
  2. Start 'local' cluster with yarn es snapshot --license=trial
  3. Start 'remote' cluster with yarn es snapshot --license=trial -E cluster.name=europe -E transport.port=9400 in a separate terminal tab.
    • Alternatively, checkout elasticsearch repo in a folder adjacent to Kibana and use yarn es source --license=trial -E cluster.name=europe -E transport.port=9400
  4. Index a document into my-leader-index on 'remote' cluster with curl -X PUT http://elastic:changeme@localhost:9201/my-leader-index --data '{"settings":{"number_of_shards":1,"soft_deletes.enabled":true}}' --header "Content-Type: application/json"
  5. Navigate to 'Stack Management' -> 'Remote Clusters' and add a remote cluster available at 127.0.0.1:9400
  6. Navigate tot 'Stack Management' -> 'Cross-Cluster Replication' and add a follower index (for my-leader-index)and an auto-follow pattern

Release Note

Fixes issues in Cross-Cluster Replication app where pausing/resuming index replication, unfollowing leader index or deleting an auto-follow pattern was not possible from table actions.

@yuliacech yuliacech added Feature:CCR and Remote Clusters release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.11.0 v8.0.0 labels Nov 26, 2020
@yuliacech
Copy link
Contributor Author

This PR will need a 7.10 backport as the issue is reproducible on 7.10 branch

@yuliacech
Copy link
Contributor Author

@elasticmachine merge upstream

@yuliacech yuliacech marked this pull request as ready for review November 30, 2020 10:18
@yuliacech yuliacech requested a review from a team as a code owner November 30, 2020 10:18
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Nice work @yuliacech! Closing 3 issues in one PR 🎉 . Tested locally and confirmed fix. Are there any tests that should be added for this?

*/

import { FollowerIndexPauseProvider } from './follower_index_pause_provider';
import React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: move react import to top

export { FollowerIndexPauseProvider } from './follower_index_pause_provider';
export { FollowerIndexResumeProvider } from './follower_index_resume_provider';
export { FollowerIndexUnfollowProvider } from './follower_index_unfollow_provider';
export { FollowerIndexPauseProvider } from './follower_index_actions_providers/follower_index_pause_provider';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I haven't looked too closely at the folder structure of CCR, but we typically have an index.js file to export files in a directory. In this case, follower_index_actions_providers would have an index.js file, where you would export FollowerIndexPauseProvider, FollowerIndexResumeProvider, etc. Then, here, you could export everything from ./follower_index_actions_providers.

Copy link
Contributor Author

@yuliacech yuliacech Dec 1, 2020

Choose a reason for hiding this comment

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

thanks for the tip, @alisonelizabeth ! I added index.js file actually removed the individual imports for pause, resume and unfollow providers, since they are not needed anymore and providers can now be imported from the same folder.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-accessibility (Project:Accessibility)

@cjcenizal
Copy link
Contributor

Great work @yuliacech! FWIW, this should be considered a bug fix PR and will need a release note, since it's fixing some issues noticed back in April.

@alisonelizabeth
Copy link
Contributor

Good catch @cjcenizal!

This PR will need a 7.10 backport as the issue is reproducible on 7.10 branch

@yuliacech I also forgot to ask, based on this comment^, can you add the 7.10.2 tag?

@yuliacech yuliacech added release_note:fix v7.10.2 and removed release_note:skip Skip the PR/issue when compiling release notes labels Dec 1, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
crossClusterReplication 159 161 +2

Async chunks

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

id before after diff
crossClusterReplication 357.7KB 356.7KB -962.0B

History

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

@yuliacech yuliacech merged commit 4ae84a0 into elastic:master Dec 1, 2020
yuliacech added a commit to yuliacech/kibana that referenced this pull request Dec 1, 2020
elastic#84433)

* Fixed auto follow actions

* Created a provider for all follower index table actions to fix modal auto-closing

* Moved i18n texts into a const to avoid duplication

* Removed unnecessary imports and added index.js file for follower_index_actions_provider imports

* Fixed wrong imports deletion

* Fixed wrong imports deletion

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
yuliacech added a commit to yuliacech/kibana that referenced this pull request Dec 1, 2020
elastic#84433)

* Fixed auto follow actions

* Created a provider for all follower index table actions to fix modal auto-closing

* Moved i18n texts into a const to avoid duplication

* Removed unnecessary imports and added index.js file for follower_index_actions_provider imports

* Fixed wrong imports deletion

* Fixed wrong imports deletion

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
yuliacech added a commit that referenced this pull request Dec 2, 2020
#84433) (#84704)

* Fixed auto follow actions

* Created a provider for all follower index table actions to fix modal auto-closing

* Moved i18n texts into a const to avoid duplication

* Removed unnecessary imports and added index.js file for follower_index_actions_provider imports

* Fixed wrong imports deletion

* Fixed wrong imports deletion

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 2, 2020
* master:
  [Lens] Show color in flyout instead of auto (elastic#84532)
  [Lens] Use index pattern through service instead of reading saved object (elastic#84432)
  Make it possible to use Kibana anonymous authentication provider with ES anonymous access. (elastic#84074)
  TelemetryCollectionManager: Use X-Pack strategy as an OSS overwrite (elastic#84477)
  migrate away from rest_total_hits_as_int (elastic#84508)
  [Input Control] Custom renderer (elastic#84423)
  Attempt to more granularly separate App Search vs Workplace Search vs shared GitHub notifications (elastic#84713)
  [Security Solutino][Case] Case connector alert UI (elastic#82405)
  [Maps] Support runtime fields in tooltips (elastic#84377)
  [CCR] Fix row actions in follower index and auto-follow pattern tables (elastic#84433)
  [Enterprise Search] Migrate shared Indexing Status component (elastic#84571)
  [maps] remove fields from index-pattern test artifacts (elastic#84379)
  Add routes for use in Sources Schema (elastic#84579)
  Changes UI links for drilldowns (elastic#83971)
  endpoint telemetry cloned endpoint tests (elastic#81498)
  [Fleet] Handler api key creation errors when Fleet Admin is invalid (elastic#84576)
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 2, 2020
* master: (72 commits)
  Make alert status fetching more resilient (elastic#84676)
  [APM] Refactor hooks and context (elastic#84615)
  Added word break styles to the texts in the item details card. (elastic#84654)
  [Search] Disable "send to background" when auto-refresh is enabled (elastic#84106)
  Add readme for new palette service (elastic#84512)
  Make all providers to preserve original URL when session expires. (elastic#84229)
  [Lens] Show color in flyout instead of auto (elastic#84532)
  [Lens] Use index pattern through service instead of reading saved object (elastic#84432)
  Make it possible to use Kibana anonymous authentication provider with ES anonymous access. (elastic#84074)
  TelemetryCollectionManager: Use X-Pack strategy as an OSS overwrite (elastic#84477)
  migrate away from rest_total_hits_as_int (elastic#84508)
  [Input Control] Custom renderer (elastic#84423)
  Attempt to more granularly separate App Search vs Workplace Search vs shared GitHub notifications (elastic#84713)
  [Security Solutino][Case] Case connector alert UI (elastic#82405)
  [Maps] Support runtime fields in tooltips (elastic#84377)
  [CCR] Fix row actions in follower index and auto-follow pattern tables (elastic#84433)
  [Enterprise Search] Migrate shared Indexing Status component (elastic#84571)
  [maps] remove fields from index-pattern test artifacts (elastic#84379)
  Add routes for use in Sources Schema (elastic#84579)
  Changes UI links for drilldowns (elastic#83971)
  ...
yuliacech added a commit that referenced this pull request Dec 3, 2020
#84433) (#84705)

* Fixed auto follow actions

* Created a provider for all follower index table actions to fix modal auto-closing

* Moved i18n texts into a const to avoid duplication

* Removed unnecessary imports and added index.js file for follower_index_actions_provider imports

* Fixed wrong imports deletion

* Fixed wrong imports deletion

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@yuliacech yuliacech deleted the ccr_fix branch February 24, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CCR] Table actions not working (follower index and auto-follow pattern)
5 participants