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

Client Runs Delete check boxes not showing up. #3804

Merged
merged 2 commits into from
May 28, 2020

Conversation

lancewf
Copy link
Contributor

@lancewf lancewf commented May 27, 2020

🔩 Description: What code changed, and why?

Fixing a bug where admin users were not provided the checkboxes to delete missing nodes. The problem was the API path used was incorrect. The incorrect path that was being used was "/ingest/events/chef/node-multiple-deletes", but it was correct path is "/api/v0/ingest/events/chef/node-multiple-deletes".

⛓️ Related Resources

#3802

👟 How to Build and Test the Change

  1. build components/automate-ui-devproxy && start_all_services && start_automate_ui_background
  2. Add a older node with send_chef_run_example
  3. Watch the UI logs for the UI to start up. ui_logs
  4. Mark the node missing by changing the mark node missing job.
  5. Go to https://a2-dev.test/settings/data-lifecycle
  6. Update the "When no Chef Infra Client run data has been received from a node in" to 0.
  7. Go to https://a2-dev.test/infrastructure/client-runs
  8. Ensure the checkboxes next to the nodes are visible and checkable.

✅ Checklist

📷 Screenshots, if applicable

image

Signed-off-by: Lance Finfrock <lfinfrock@chef.io>
@lancewf lancewf added automate-ui bug 🐛 Something isn't working labels May 27, 2020
@susanev susanev added customer-reported issues reported by customers ui labels May 27, 2020
Signed-off-by: Lance Finfrock <lfinfrock@chef.io>
@lancewf lancewf marked this pull request as ready for review May 27, 2020 19:42
@lancewf lancewf requested a review from a team May 27, 2020 20:41
@@ -16,7 +16,7 @@ <h2 id="confirm-delete-modal-label" class="status-modal-heading">Warning</h2>
<strong>{{nodesSelectedForDelete.size}} node{{ nodesSelectedForDelete.size | i18nPlural: pluralMapping }}</strong>.
</p>
<p>This action can not be undone.</p>
<chef-button primary caution (click)="closeModal(true)">
<chef-button class="delete-button-confirm" primary caution (click)="closeModal(true)">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added to allow the cypress test to find this control.

Copy link
Contributor

Choose a reason for hiding this comment

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

In other places, I believe we've used data-cy for that.

Choose a reason for hiding this comment

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

@@ -374,7 +374,7 @@ export class ClientRunsComponent implements OnInit, OnDestroy {
this.authorizedChecker = new AuthorizedChecker(this.store);
this.authorizedChecker.setPermissions([
{
endpoint: '/ingest/events/chef/node-multiple-deletes',
endpoint: '/api/v0/ingest/events/chef/node-multiple-deletes',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the fix.

@@ -16,7 +16,7 @@ <h2 id="confirm-delete-modal-label" class="status-modal-heading">Warning</h2>
<strong>{{nodesSelectedForDelete.size}} node{{ nodesSelectedForDelete.size | i18nPlural: pluralMapping }}</strong>.
</p>
<p>This action can not be undone.</p>
<chef-button primary caution (click)="closeModal(true)">
<chef-button class="delete-button-confirm" primary caution (click)="closeModal(true)">
Copy link
Contributor

Choose a reason for hiding this comment

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

In other places, I believe we've used data-cy for that.

Copy link

@vjeffrey vjeffrey left a comment

Choose a reason for hiding this comment

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

im gonna go ahead and merge since this is one of the prs that we need before promoting - we can make the change to data-cy in a future pr if ppl want to make that change

@vjeffrey vjeffrey merged commit c743168 into master May 28, 2020
@chef-expeditor chef-expeditor bot deleted the lancewf/client_runs_delete_nodes branch May 28, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automate-ui bug 🐛 Something isn't working customer-reported issues reported by customers ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants