-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Feature idea: deletion warnings #275
Comments
For most items, this would be a query of 'related' item counts, to yield: "Removing this would break X items. Are you sure?" For organizations, this would be a hardcoded: "This makes everything in this organization unavailable. Are you sure?" rather than querying the API. Can wordsmith as necessary. |
We had a meeting about this today and wanted to run some things by you. We came up with a few different options for tackling this and would like to get your input on how best to proceed. If we want to display counts in the delete confirmation then we've kind of got two options:
We're concerned about the overhead associated with doing either of these things. The hairiest example is probably credentials. There are quite a few different places that a credential could be used and the number of requests needed to gather up all of that info could be significant (at least half a dozen, maybe more). Even if we had a defined endpoint so that only a single request is made by the UI, the API will still have to hit the database multiple times to gather this information. If we didn't include a count and opted for an implementation similar to what you suggested for organizations everywhere then we could avoid the need for any api work on this feature and greatly reduce the logic that we'd have to add to the UI. @trahman73 was in the meeting and seemed to be OK with us extending the delete warning to say something like (using project as an example):
I'd be interested to see what you think about that. |
I like 2 or 3. I'd ask the API team if there is any work that can simplify this from the query side. |
OK I sat down and ran through what kind of information we'd have to gather to implement option 2: When deleting a project
When deleting a job template
When deleting an inventory
When deleting an inventory source
When deleting a credential
When deleting a credential type
When deleting an inventory script
|
@trahman73 @wenottingham I've got some followup questions on this feature:
|
1.) I would say no because the user will have the option to select anything else that is available on launch. 2.) I would say we should warn the user because even though the Insights credential isn't required, the process will be broken. |
|
I realized during implementation that the api prevents a user from deleting a credential type if that credential type is in use (a credential has been created using that type). If we detect this, then I've added a static message to the delete modal: @trahman73 does that seem OK to you? Feel free to wordsmith as needed. |
@mabashian Looks good to me. |
The wording for the modal seems funky, particularly the term
|
ISSUE TYPE
COMPONENT NAME
SUMMARY
We have a variety of items that can be deleted out from other items that use them.
The AWX UI should warn when deleting an item in use by another item, and show where it is used.
The API does not need to warn (but may need updated so the UI can properly determine this).
ADDITIONAL INFORMATION
This becomes "fun" in the context of #19
The text was updated successfully, but these errors were encountered: