-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add modal prompt to delete integration and associated nodes #4348
Conversation
Deploy preview for chef-automate ready! Built with commit ec2de86 |
<h2 id="delete-prompt-title" slot="title">Delete Integration?</h2> | ||
<div> | ||
<p>Deleting this node manager will also delete all of its associated nodes</p> | ||
<div class="options"> | ||
<chef-button label="confirm" primary caution (click)="handleDelete()">Delete</chef-button> | ||
<chef-button label="cancel" tertiary (click)="resetModal()">Cancel</chef-button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonong1972 - Suggestions for wording on this Modal prompt for deleting a Node Manager (Integration)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete Integration?
This will remove all of its associated nodes and they will not be able to be scanned by scan jobs. To add them back you will need to create a new node integration.
Historical reported data on nodes will still be stored.
@SEAjamieD Try that.
…onent Signed-off-by: seajamied <jdegnan@chef.io>
Signed-off-by: seajamied <jdegnan@chef.io>
Signed-off-by: seajamied <jdegnan@chef.io>
…hings Signed-off-by: seajamied <jdegnan@chef.io>
…e changed Signed-off-by: seajamied <jdegnan@chef.io>
Signed-off-by: seajamied <jdegnan@chef.io>
da326a7
to
20126fd
Compare
@@ -67,3 +67,19 @@ <h2 class="display4 strong">Cloud Platform Providers</h2> | |||
</main> | |||
</div> | |||
</div> | |||
|
|||
<chef-modal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use a <app-delete-object-modal>
here instead of <chef-modal>
if possible. It should have the flexibility to support your use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually used this, and then reverted it. With the current wording, using <app-delete-object-modal>
does not have enough flexibility, unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be a straightforward change to get what you need by (a) adding a custom
flag to the <app-delete-object-modal>
, then display <ng-content>
if custom
is true, otherwise display the standard verbiage. Let's chat Monday if you need more details.
components/automate-ui/src/app/pages/integrations/list/integrations-list.component.spec.ts
Outdated
Show resolved
Hide resolved
components/automate-ui/src/app/pages/integrations/list/integrations-list.component.spec.ts
Show resolved
Hide resolved
Signed-off-by: seajamied <jdegnan@chef.io>
Signed-off-by: seajamied <jdegnan@chef.io>
…roperty, cleanup Signed-off-by: seajamied <jdegnan@chef.io>
...onents/automate-ui/src/app/components/delete-object-modal/delete-object-modal.component.html
Outdated
Show resolved
Hide resolved
</chef-button> | ||
<chef-button tertiary (click)="closeEvent()">Cancel</chef-button> | ||
</div> | ||
<ng-container *ngIf="custom === false"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that this works for all the other components? IIRC when you just use custom
as an HTML attribute without a value, it is undefined
rather than false
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works because I placed a default of false
for custom
on the delete-object-modal
component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good. Unrelated, more standard to test boolean without explicit constants:
<ng-container *ngIf="custom === false"> | |
<ng-container *ngIf="!custom"> |
Signed-off-by: seajamied <jdegnan@chef.io>
🔩 Description: What code changed, and why?
This branch adds two new elements to deleting integrations.
⛓️ Related Resources
Initial Writeup: #4176
Fixes: #4335
👍 Definition of Done
Upon choosing to delete a node integration, the user is first prompted with a modal. Once finally deleted, all associated nodes are also deleted.
👟 How to Build and Test the Change
in root:
build components/automate-ui-devproxy && start_all_services
in components/automate-ui:
make serve
To Test:
✅ Checklist
📷 Screenshots, if applicable