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

Allow User to Cleanup Repository from UI #53047

Merged
merged 27 commits into from Jan 11, 2020

Conversation

cuff-links
Copy link
Contributor

@cuff-links cuff-links commented Dec 13, 2019

Closes #43904

This PR adds an additional button to the flyout for repositories to allow for cleaning up of unreferenced data.

Screen Shot 2019-12-13 at 4 56 46 PM

Screen Shot 2019-12-13 at 4 56 34 PM

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

@cuff-links cuff-links added v7.6.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Dec 13, 2019
@elasticmachine
Copy link
Contributor

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

@cuff-links cuff-links added Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI release_note:enhancement labels Dec 13, 2019
@cuff-links
Copy link
Contributor Author

Currently, hitting the snapshot.cleanupRepository endpoint does not run successfully and produces no error code. The docs for 7.x shows that this endpoint is in fact in the ES Javascript client. Not sure what's wrong.

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

@cuff-links cuff-links changed the title 43904 Allow User to Cleanup Repository from UI Allow User to Cleanup Repository from UI Dec 20, 2019
…ight now so we need to get those green. Added a functional test. Need to set up kbn-es to be able to set up a file repository before being able to run the functional tests.
@kibanamachine
Copy link
Contributor

💔 Build Failed

History

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

@elastic elastic deleted a comment from elasticmachine Dec 21, 2019
John Dorlus added 3 commits December 23, 2019 11:12
…itory list table so that columns can be individually identified. Added functional test to allow checking the details of repositories.
@kibanamachine
Copy link
Contributor

💔 Build Failed

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

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

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

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

@cjcenizal
Copy link
Contributor

@alisonelizabeth I think your proposed UI/UX changes are spot-on. As long as we can still display info about the error in the callout so the user can figure out what went wrong, a danger callout will make it clearer to the user that there's a problem.

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.

@cuff-links thanks for the quick turnaround on addressing my comments! Retested and works great. I left a few additional comments - mostly nits - but there were a few strings missing i18n that should be addressed before merging.

</div>
) : (
<EuiCallOut
title="Sorry, there was an error cleaning the repository."
Copy link
Contributor

Choose a reason for hiding this comment

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

i18n

x-pack/test/functional/apps/snapshot_restore/home_page.ts Outdated Show resolved Hide resolved
async getRepoList() {
const table = await testSubjects.find('repositoryTable');
const rows = await table.findAllByCssSelector('[data-test-subj="row"]');
return await mapAsync(rows, async row => {
Copy link
Contributor

Choose a reason for hiding this comment

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

could you use Promise.all here instead of importing bluebird?

@cuff-links
Copy link
Contributor Author

jenkins test this

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

@cuff-links
Copy link
Contributor Author

@alisonelizabeth I think we are good now.

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.

LGTM. Great job on this! I left one comment around your use of JSON.stringify(), but going to go ahead and approve so I don't block you.

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@cuff-links cuff-links merged commit 10733b5 into elastic:master Jan 11, 2020
@cuff-links cuff-links deleted the 43904_Add_Cleanup_Action_To_UI branch January 11, 2020 07:51
thomasneirynck pushed a commit to thomasneirynck/kibana that referenced this pull request Jan 12, 2020
* Added repository cleanup button. Added logic for spinner while loading, added new repository request, type and telemetry metric.

* Added additional bindings for server side to hit the cleanup endpoint.

* fix cleanup request

* Added data test subject to the code editors to differentiate them and fixed a broken inport of RepositoryCleanup.

* Added files for a component integration test. The tests are failing right now so we need to get those green. Added a functional test. Need to set up kbn-es to be able to set up a file repository before being able to run the functional tests.

* Added change to the way data-test-subjects were created for the repository list table so that columns can be individually identified. Added functional test to allow checking the details of repositories.

* Removed the jest tests for repository details until we get jest fixed.

* Fixed jest test to reflect updated test subjects.

* Made changes per feedback in PR comments.

* Fixed i10n issues using <FormattedMessage>. Removed reference to blueBird and used Promise.all(). Fixed all nits in PR comments.

* Added i10n fixes for header.

* Added i10n fixes for header.

* Added name parameter for i18n strings.

* Removed i18n string from JSON.stringify call since it's already a string.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 13, 2020
* master: (69 commits)
  [Graph] Fix various a11y issues (elastic#54097)
  Add ApplicationService app status management (elastic#50223)
  logs in one time (elastic#54447)
  Deprecate using `elasticsearch.ssl.certificate` without `elasticsearch.ssl.key` and vice versa (elastic#54392)
  [Optimizer] Fix a stack overflow with watch_cache when it attempts to delete very large folders. (elastic#54457)
  Security - Role Mappings UI (elastic#53620)
  [SIEM] [Detection engine] Permission II (elastic#54292)
  Allow User to Cleanup Repository from UI  (elastic#53047)
  [Detection engine] Some UX for rule creation (elastic#54471)
  share specific instances of some ui packages (elastic#54079)
  [ML] APM modules configs for RUM Javascript and NodeJS (elastic#53792)
  [APM] Delay rendering invalid license notification (elastic#53924)
  [Graph] Improve error message on graph requests (elastic#54230)
  [ILM] Kibana should allow a min_age setting of 0ms in ILM policy phases (elastic#53719)
  Unit Tests for common/lib (elastic#53736)
  [Graph] Only show explorable fields (elastic#54101)
  remove linting rule exception for markdown (elastic#54232)
  [Monitoring] Fetch shard data more efficiently (elastic#54028)
  [Maps] Add hiddenLayers option to embeddable map input (elastic#54355)
  Pass termOrder and hasTermsAgg properties to serializeThresholdWatch function (elastic#54391)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jan 13, 2020
* master: (69 commits)
  [Graph] Fix various a11y issues (elastic#54097)
  Add ApplicationService app status management (elastic#50223)
  logs in one time (elastic#54447)
  Deprecate using `elasticsearch.ssl.certificate` without `elasticsearch.ssl.key` and vice versa (elastic#54392)
  [Optimizer] Fix a stack overflow with watch_cache when it attempts to delete very large folders. (elastic#54457)
  Security - Role Mappings UI (elastic#53620)
  [SIEM] [Detection engine] Permission II (elastic#54292)
  Allow User to Cleanup Repository from UI  (elastic#53047)
  [Detection engine] Some UX for rule creation (elastic#54471)
  share specific instances of some ui packages (elastic#54079)
  [ML] APM modules configs for RUM Javascript and NodeJS (elastic#53792)
  [APM] Delay rendering invalid license notification (elastic#53924)
  [Graph] Improve error message on graph requests (elastic#54230)
  [ILM] Kibana should allow a min_age setting of 0ms in ILM policy phases (elastic#53719)
  Unit Tests for common/lib (elastic#53736)
  [Graph] Only show explorable fields (elastic#54101)
  remove linting rule exception for markdown (elastic#54232)
  [Monitoring] Fetch shard data more efficiently (elastic#54028)
  [Maps] Add hiddenLayers option to embeddable map input (elastic#54355)
  Pass termOrder and hasTermsAgg properties to serializeThresholdWatch function (elastic#54391)
  ...
chrisronline pushed a commit to chrisronline/kibana that referenced this pull request Jan 13, 2020
* Added repository cleanup button. Added logic for spinner while loading, added new repository request, type and telemetry metric.

* Added additional bindings for server side to hit the cleanup endpoint.

* fix cleanup request

* Added data test subject to the code editors to differentiate them and fixed a broken inport of RepositoryCleanup.

* Added files for a component integration test. The tests are failing right now so we need to get those green. Added a functional test. Need to set up kbn-es to be able to set up a file repository before being able to run the functional tests.

* Added change to the way data-test-subjects were created for the repository list table so that columns can be individually identified. Added functional test to allow checking the details of repositories.

* Removed the jest tests for repository details until we get jest fixed.

* Fixed jest test to reflect updated test subjects.

* Made changes per feedback in PR comments.

* Fixed i10n issues using <FormattedMessage>. Removed reference to blueBird and used Promise.all(). Fixed all nits in PR comments.

* Added i10n fixes for header.

* Added i10n fixes for header.

* Added name parameter for i18n strings.

* Removed i18n string from JSON.stringify call since it's already a string.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
cjcenizal pushed a commit to cjcenizal/kibana that referenced this pull request Jan 13, 2020
* Added repository cleanup button. Added logic for spinner while loading, added new repository request, type and telemetry metric.

* Added additional bindings for server side to hit the cleanup endpoint.

* fix cleanup request

* Added data test subject to the code editors to differentiate them and fixed a broken inport of RepositoryCleanup.

* Added files for a component integration test. The tests are failing right now so we need to get those green. Added a functional test. Need to set up kbn-es to be able to set up a file repository before being able to run the functional tests.

* Added change to the way data-test-subjects were created for the repository list table so that columns can be individually identified. Added functional test to allow checking the details of repositories.

* Removed the jest tests for repository details until we get jest fixed.

* Fixed jest test to reflect updated test subjects.

* Made changes per feedback in PR comments.

* Fixed i10n issues using <FormattedMessage>. Removed reference to blueBird and used Promise.all(). Fixed all nits in PR comments.

* Added i10n fixes for header.

* Added i10n fixes for header.

* Added name parameter for i18n strings.

* Removed i18n string from JSON.stringify call since it's already a string.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
cjcenizal added a commit that referenced this pull request Jan 13, 2020
* Added repository cleanup button. Added logic for spinner while loading, added new repository request, type and telemetry metric.
jkelastic pushed a commit to jkelastic/kibana that referenced this pull request Jan 17, 2020
* Added repository cleanup button. Added logic for spinner while loading, added new repository request, type and telemetry metric.

* Added additional bindings for server side to hit the cleanup endpoint.

* fix cleanup request

* Added data test subject to the code editors to differentiate them and fixed a broken inport of RepositoryCleanup.

* Added files for a component integration test. The tests are failing right now so we need to get those green. Added a functional test. Need to set up kbn-es to be able to set up a file repository before being able to run the functional tests.

* Added change to the way data-test-subjects were created for the repository list table so that columns can be individually identified. Added functional test to allow checking the details of repositories.

* Removed the jest tests for repository details until we get jest fixed.

* Fixed jest test to reflect updated test subjects.

* Made changes per feedback in PR comments.

* Fixed i10n issues using <FormattedMessage>. Removed reference to blueBird and used Promise.all(). Fixed all nits in PR comments.

* Added i10n fixes for header.

* Added i10n fixes for header.

* Added name parameter for i18n strings.

* Removed i18n string from JSON.stringify call since it's already a string.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI release_note:enhancement Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.6.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SR] Allow users to perform cleanup action for a repository
6 participants