Skip to content

ui: Go back for delete actions before querying async job#5360

Merged
DaanHoogland merged 2 commits into
apache:4.15from
shapeblue:fix-async-completion
Aug 27, 2021
Merged

ui: Go back for delete actions before querying async job#5360
DaanHoogland merged 2 commits into
apache:4.15from
shapeblue:fix-async-completion

Conversation

@davidjumani
Copy link
Copy Markdown
Contributor

Description

Fixes #5352
Navigates back in history before querying the result of an async job for any delete action
Querying the result leads to a page refresh which can cause an error if it is a delete action and the page has not been changed

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

@davidjumani davidjumani added this to the 4.15.2.0 milestone Aug 24, 2021
@davidjumani
Copy link
Copy Markdown
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link
Copy Markdown

@davidjumani a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/5360 (SL-JID-557)

Copy link
Copy Markdown

@utchoang utchoang left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread ui/src/views/AutogenView.vue Outdated
break
}
}
if ((action.icon === 'delete' || ['archiveEvents', 'archiveAlerts', 'unmanageVirtualMachine'].includes(action.api)) && this.dataView) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could this cause regression that you go back to previous screen and the action fails for some reason?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Comment thread ui/src/views/AutogenView.vue Outdated
}
}
if ((action.icon === 'delete' || ['archiveEvents', 'archiveAlerts', 'unmanageVirtualMachine'].includes(action.api)) && this.dataView) {
this.$router.go(-1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@davidjumani is it possible to check if previous page even exist? Like I can login with a VM details page redirect and then delete that VM. In that case will this take me back to VM list?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will redirect to the dashboard. Right now vue doesn't support getting the history list so instead we need to use hooks for every navigation (to ensure we go up instead of to the dashboard) which will slow down the UI

@nvazquez nvazquez linked an issue Aug 24, 2021 that may be closed by this pull request
@nvazquez nvazquez changed the base branch from 4.15 to main August 25, 2021 01:40
@nvazquez nvazquez changed the base branch from main to 4.15 August 25, 2021 01:41
@davidjumani
Copy link
Copy Markdown
Contributor Author

@blueorangutan ui

@blueorangutan
Copy link
Copy Markdown

@davidjumani a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/5360 (SL-JID-562)

Copy link
Copy Markdown
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

LGTM. Tested deleting and deploying resource, works fine.

@DaanHoogland DaanHoogland merged commit b3dca8c into apache:4.15 Aug 27, 2021
@davidjumani davidjumani deleted the fix-async-completion branch August 27, 2021 10:17
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.

Strange error message when deleting account

7 participants