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

feat: add confirmation pop-up for VM stop and pause actions #94

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

houhoucoop
Copy link
Collaborator

@houhoucoop houhoucoop commented Jan 16, 2025

Summary

  • A confirmation pop-up should display when the Stop or Pause action is clicked
  • Mac users can bypass the confirmation pop-up by holding the Command key while clicking the action

PR Checklists

  • Do we need to backport this PR change to the Harvester Dashboard?
    • Yes, the relevant PR is at:
  • Are backend engineers aware of UI changes?
    • Yes, the backend owner is:

Related Issue

[ENHANCEMENT] Add confirmation pop-up for VM stop and pause actions #7382

Test screenshot/video

Confirm pop-up for stop VM
Screenshot 2025-01-17 at 5 30 40 PM (2)

Confirm pop-up for pause VM
Screenshot 2025-01-17 at 5 30 34 PM (2)

Extra technical notes summary

N/A

Signed-off-by: Yi-Ya Chen <[email protected]>
.actions {
text-align: right;
}
</style>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy the dialog content from https://github.com/harvester/harvester-ui-extension/blob/main/pkg/harvester/dialog/ConfirmRelatedToRemoveDialog.vue.
We can modify the component if we prefer a simpler confirmation pop-up.

stop:
message: "Are you sure you want to continue stop the {type} {names}?"
pause:
message: "Are you sure you want to continue pause the {type} {names}?"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@houhoucoop houhoucoop self-assigned this Jan 16, 2025
</h4>
</template>

<template #body>
Copy link
Collaborator

@a110605 a110605 Jan 17, 2025

Choose a reason for hiding this comment

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

I don't think we need to input the VM name to stop or pause a VM.
An alert modal is enough. User can press cmd key to bypass the popup modal.

@houhoucoop
Copy link
Collaborator Author

TODO: Test bulk action functionality

@torchiaf
Copy link
Collaborator

@houhoucoop I agree with Andy, I would avoid typing vm name for confirmation. Otherwise LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants