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

[ML] Transforms - Updated: Add ability to delete dest index & index pattern when deleting transform job #68800

Closed
wants to merge 20 commits into from

Conversation

qn895
Copy link
Member

@qn895 qn895 commented Jun 10, 2020

This is an updated PR since the original PR #67922 was reverted due to a conflict that happens after merging to masters


This PR adds the option to delete destination index & index pattern when deleting transform job(s) in two scenarios: single delete vs bulk delete.

When we are deleting transforms in bulk:

Delete message
Screen Shot 2020-06-03 at 10 01 38 PM

Delete toast messages when all tasks succeed (in this case one transform job didn't have any index pattern)
Screen Shot 2020-06-02 at 3 35 27 PM

Delete toast messages when some tasks failed
Screen Shot 2020-06-03 at 9 08 12 PM

When we are deleting just one transform job individually:

  • UI checks if user has permission to delete that individual index, shows the option if user has permission, and enables the option by default.
  • UI checks if there's an index pattern that exists with the same name as the destination index, shows the option if user has permission and index pattern does exists, and enables the option by default.

Screen Shot 2020-06-02 at 12 12 47 AM

Screen Shot 2020-06-02 at 12 12 40 AM

  • Toast messages

If all operations succeed
Screen Shot 2020-06-02 at 12 15 57 AM

If one of the tasks failed
Screen Shot 2020-06-03 at 10 09 36 PM

## Original discussion
When we are deleting in bulk:
<img width="493" alt="Screen Shot 2020-06-01 at 10 53 39 PM" src="https://user-images.githubusercontent.com/43350163/83482735-a5975800-a466-11ea-85c7-f3af5ca0f04a.png">

1) Should we assume user has permission to delete all the indices selected?

2) Should option to delete index pattern be visible and enabled? If one job might have index pattern but 2 other jobs might not.

3) Should we show success/error message for each individual job and operation or should we combine them to prevent toast message overload?

Checklist

Delete any items that are not applicable to this PR.

qn895 added 20 commits June 2, 2020 00:01
…index-when-del-job

# Conflicts:
#	x-pack/plugins/transform/public/app/hooks/use_api.ts
…index-when-del-job

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
…index-when-del-job

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Change extractErrorMessage import for action_clone
@qn895 qn895 marked this pull request as ready for review June 10, 2020 17:36
@qn895 qn895 requested a review from a team as a code owner June 10, 2020 17:36
@qn895 qn895 added the :ml label Jun 10, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

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

@qn895 qn895 closed this Jun 11, 2020
@qn895 qn895 deleted the transform-delete-index-when-del-job branch June 16, 2020 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants