Skip to content

[SR] Add callout for managed repository and prevent deletion from UI#36947

Merged
jen-huang merged 7 commits intoelastic:masterfrom
jen-huang:snapshot-managed-repo
May 30, 2019
Merged

[SR] Add callout for managed repository and prevent deletion from UI#36947
jen-huang merged 7 commits intoelastic:masterfrom
jen-huang:snapshot-managed-repo

Conversation

@jen-huang
Copy link
Copy Markdown
Contributor

@jen-huang jen-huang commented May 22, 2019

Relates to https://github.com/elastic/cloud/issues/29439

Summary

This PR adjusts the UI logic when a repository is detected to be a Cloud-managed repository. We want to:

  • Surface messaging to the user that changing the Cloud-managed repository may have unwanted effects (aka - make sure they know what they are doing!)
  • Prevent user from accidentally deleting this repository from the UI

Testing instructions

  1. Add cluster.metadata.managed_repository setting via Console:
PUT /_cluster/settings
{
  "persistent": {
    "cluster.metadata.managed_repository": "found-snapshots"
  }
}
  1. Create a repository with the same name as your setting value (found-snapshots)

Note: Neither step is necessary when this goes live on Cloud, as both the repository and the setting will already exist, we are just mocking the environment locally here 🙂

Copy feedback

I would love some help from @zanbel / @yaronp68 / @gchaps on refining the messaging of these two strings. You can see them in action in the screenshots below.

Short version:

This is a managed repository. Proceed with caution!

Verbose version:

This is a managed repository. Changing these settings may have adverse effects. Proceed with caution!

Screenshots

In the table, a Managed badge appears next to the name, and deletion is disabled (user is not able to select the row and trash can icon is disabled):

image

In repository details, Remove button is disabled, and a warning callout appears:

image

When editing the managed repository, another warning callout appears, and the Save button is treated differently:

image
image

@jen-huang jen-huang added non-issue Indicates to automation that a pull request should not appear in the release notes Team:Cloud v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v7.2.0 Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI v7.3.0 labels May 22, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/es-ui

@jen-huang jen-huang requested a review from cjcenizal May 22, 2019 22:49
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Copy link
Copy Markdown
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

I haven't reviewed the code yet, but I have a couple suggestions WRT copy and UX.

image

This is a detail panel where typically I'd expect users to look to learn more about a repository before editing it. You also can't do anything directly bad here (like delete the repo), so I think it might make more sense to leave out the "proceed with caution" warning, but add more copy to explain what a managed repository is. For example, "Managed repositories are created and consumed by other systems. Making changes to them can interfere with those systems' operation." I would like to hear @gchaps's thoughts on this.

image

For the edit form, I think the copy at the top is great, but we should incorporate whatever additional detail we add to the detail panel. In other words, let's keep the pattern of presenting a more verbose form of the detail panel warning.

Also, what do you think of having a less-enticing looking button at the bottom? I was thinking of maybe using a confirmation modal instead, but that seems like the wrong pattern to use here. If someone is in here, they should have already read a warning at some point in the UX and if they're making changes they probably know what they're doing. A modal just introduces more steps without informing them any more than they're already informed.

Copy link
Copy Markdown
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.

Tested locally. LGTM.

One minor suggestion - what do you think about adding a tooltip to the checkbox/delete icon when its disabled in the table to explain why it can't be selected? Or do you think the badge is enough?

@gchaps
Copy link
Copy Markdown
Contributor

gchaps commented May 23, 2019

Going off what @cjcenizal and @alisonelizabeth said, here are some suggestions:

Details pane

This is a managed repository used by other systems. Any changes you make might affect how these systems operate.

Edit pane

This is a managed repository. Changing this repository might affect other systems that use it. Proceed with caution.

Button label

I played around with the button label a bit. I'm not really a fan of including parens in a button label. Maybe using the warning at the top and this button label would be enough?

Save repository changes

Tooltip

You cannot delete a managed repository.

@cjcenizal
Copy link
Copy Markdown
Contributor

@gchaps You're right, the warning at the top is probably enough. I don't feel too strongly about the copy inside the button, as long as it is styled differently so that users pause before instinctively clicking it.

Copy link
Copy Markdown
Contributor

@cjcenizal cjcenizal 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!

@jen-huang
Copy link
Copy Markdown
Contributor Author

I've adjusted the copy, Save button styling, and added tooltips to disabled delete actions for a managed repository. Screenshots in main description has been updated.

@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@jen-huang jen-huang merged commit 7bd21c7 into elastic:master May 30, 2019
@jen-huang jen-huang deleted the snapshot-managed-repo branch May 30, 2019 19:12
jen-huang added a commit to jen-huang/kibana that referenced this pull request May 30, 2019
…lastic#36947)

* Check repository plugins using callWithInternalUser instead

* Add information about whether repository is managed (by Cloud)

* Adjust warning copy, add warning Save button styling, and remove button tooltips

* Add same tooltip to trash can icon

* Fix prop
jen-huang added a commit to jen-huang/kibana that referenced this pull request May 30, 2019
…lastic#36947)

* Check repository plugins using callWithInternalUser instead

* Add information about whether repository is managed (by Cloud)

* Adjust warning copy, add warning Save button styling, and remove button tooltips

* Add same tooltip to trash can icon

* Fix prop
jen-huang added a commit that referenced this pull request May 30, 2019
…36947) (#37536)

* Check repository plugins using callWithInternalUser instead

* Add information about whether repository is managed (by Cloud)

* Adjust warning copy, add warning Save button styling, and remove button tooltips

* Add same tooltip to trash can icon

* Fix prop
jen-huang added a commit that referenced this pull request May 30, 2019
…36947) (#37535)

* Check repository plugins using callWithInternalUser instead

* Add information about whether repository is managed (by Cloud)

* Adjust warning copy, add warning Save button styling, and remove button tooltips

* Add same tooltip to trash can icon

* Fix prop
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 NeededFor:Cloud non-issue Indicates to automation that a pull request should not appear in the release notes Team:Cloud Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v7.2.0 v7.3.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants