UI: Fix templates page redirection after delete job is finished (#6345)

This commit is contained in:
Nicolas Vazquez 2022-05-03 13:59:47 -03:00 committed by GitHub
parent 5fa8fa5580
commit efb1f2b719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -453,10 +453,9 @@ export default {
successMethod: result => {
if (singleZone) {
const isResourcePage = (this.$route.params && this.$route.params.id)
if (isResourcePage) {
if (this.selectedItems.length === 0 && !this.showGroupActionModal) {
this.$router.push({ path: '/template' })
}
const isSameResource = isResourcePage && this.$route.params.id === result.jobinstanceid
if (isResourcePage && isSameResource && this.selectedItems.length === 0 && !this.showGroupActionModal) {
this.$router.push({ path: '/template' })
}
} else {
if (this.selectedItems.length === 0) {