ui-template-bulk-delete-404-fix-4.22#12681
ui-template-bulk-delete-404-fix-4.22#12681dheeraj12347 wants to merge 129 commits intoapache:4.22from
Conversation
Signed-off-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
Co-authored-by: Davi Torres <dtorres@simnet.ca> Co-authored-by: dahn <daan.hoogland@gmail.com>
…se (apache#8151) Co-authored-by: dahn <daan.hoogland@gmail.com> Co-authored-by: dahn <daan@onecht.net>
Adds a 4.22.0 to 4.23.0 upgrade path. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
https://github.com/thlorenz/doctoc?tab=readme-ov-file#usage-as-a-git-hook https://github.com/thlorenz/doctoc/releases/tag/v2.2.0 Generates table of contents for Markdown files inside local git repository. Links are compatible with anchors generated by github or other sites. Added TOC to 3 Markdown files. Never have to create a TOC again just run: `pre-commit run doctoc --all-files` - CONTRIBUTING.md - INSTALL.md - README.md So both Apache Airflow and Apache Sedona use `doctoc`: https://github.com/apache/airflow/blob/eb4a8bc03c92d84e8238dcd76becb267ec8c3dd5/.pre-commit-config.yaml#L32 https://github.com/apache/sedona/blob/b0d86fda010e42f30b090aef1b2dbf06aa0a19d2/.pre-commit-config.yaml#L34
Fix and standardize one license header
…mit (apache#12070) * Add shebang to shell scripts
Co-authored-by: Daan Hoogland <dahn@apache.org>
Co-authored-by: Daan Hoogland <dahn@apache.org>
shwstppr
left a comment
There was a problem hiding this comment.
Sorry but I'm just seeing some refactors. Am I missing something?
There was a problem hiding this comment.
Pull request overview
This PR claims to fix a 404 issue after bulk deleting template zones by redirecting to the Templates list view when all zones are deleted. However, the actual changes consist entirely of formatting modifications with no functional bug fix implemented.
Changes:
- Indentation fixes for router-link elements
- Multi-line reformatting of pageSizeOptions array (inconsistent with codebase conventions)
- String concatenation refactoring for v-html attribute (inconsistent with codebase conventions)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| computed: { | ||
| isActionsOnTemplatePermitted () { | ||
| return (['Admin'].includes(this.$store.getters.userInfo.roletype) || // If admin or owner or belongs to current project | ||
| return (['Admin'].includes(this.$store.getters.userInfo.roletype) || | ||
| (this.resource.domainid === this.$store.getters.userInfo.domainid && this.resource.account === this.$store.getters.userInfo.account) || | ||
| (this.resource.domainid === this.$store.getters.userInfo.domainid && this.resource.projectid && this.$store.getters.project && this.$store.getters.project.id && this.resource.projectid === this.$store.getters.project.id)) && | ||
| (this.resource.isready || !this.resource.status || this.resource.status.indexOf('Downloaded') === -1) && // Template is ready or downloaded | ||
| (this.resource.isready || !this.resource.status || this.resource.status.indexOf('Downloaded') === -1) && | ||
| this.resource.templatetype !== 'SYSTEM' | ||
| } | ||
| }, |
There was a problem hiding this comment.
This PR description claims to fix a 404 issue after bulk deleting template zones by redirecting to the Templates list view when all zones are deleted. However, the diff only contains formatting changes with no actual logic modifications to address this issue. The actual bug fix for the 404 navigation issue is missing from this PR. The handleCancel method (around line 486) still uses this.$router.go(-1) which goes back in browser history and could lead to a 404 page. It should be changed to this.$router.push({ path: '/template' }) to explicitly redirect to the Templates list.
ui/src/views/image/TemplateZones.vue
Outdated
| :pageSizeOptions="[ | ||
| '10', | ||
| '20', | ||
| '40', | ||
| '80', | ||
| '100' | ||
| ]" |
There was a problem hiding this comment.
This multi-line formatting of the pageSizeOptions array is inconsistent with the codebase convention. Throughout the codebase (e.g., IsoZones.vue:133, FirewallRules.vue:136, MigrateWizard.vue:90), pageSizeOptions arrays are consistently formatted as inline arrays. This should be kept as :pageSizeOptions="['10', '20', '40', '80', '100']" to maintain consistency.
| :pageSizeOptions="[ | |
| '10', | |
| '20', | |
| '40', | |
| '80', | |
| '100' | |
| ]" | |
| :pageSizeOptions="['10', '20', '40', '80', '100']" |
ui/src/views/image/TemplateZones.vue
Outdated
| <span style="padding-left: 5px" v-html="`<b>${selectedRowKeys.length} ` + $t('label.items.selected') + `. </b>`" /> | ||
| <span | ||
| style="padding-left: 5px" | ||
| v-html="'<b>' + selectedRowKeys.length + ' ' + $t('label.items.selected') + '. </b>'" /> |
There was a problem hiding this comment.
This string concatenation change is inconsistent with the codebase convention and reduces readability. The codebase consistently uses template literals for v-html attributes with interpolated values (see AutogenView.vue:229, 241 and SnapshotZones.vue:202). This should use template literals like: v-html="\${selectedRowKeys.length} ` + $t('label.items.selected') + `. `"`
| v-html="'<b>' + selectedRowKeys.length + ' ' + $t('label.items.selected') + '. </b>'" /> | |
| v-html="`<b>${selectedRowKeys.length} ` + $t('label.items.selected') + `. </b>`" /> |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12681 +/- ##
============================================
+ Coverage 17.62% 17.92% +0.30%
- Complexity 15668 16158 +490
============================================
Files 5917 5939 +22
Lines 531255 533181 +1926
Branches 64951 65237 +286
============================================
+ Hits 93639 95595 +1956
+ Misses 427077 426846 -231
- Partials 10539 10740 +201
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@shwstppr Thanks for your question! You were correct—the first commit (2244c01) only had formatting changes. I've now pushed a new commit (cf2f331) that includes the actual 404 bug fix: What was added in the new commit:
The previous comments from Copilot about missing the actual bug fix have now been addressed. Please let me know if you'd like me to make any other adjustments! |
|
@dheeraj12347 maybe it would make sense to keep the changes just from the second commit |
@shwstppr, so I do these two changes =>
will that be okay ?? |
|
Nevermind, you may leave it as it is. |
|
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
@shwstppr I’ve updated this PR as requested: Left the original changes as they are (no revert of the earlier commits). Created a new branch based on apache/4.22 and cherry‑picked my two commits (ui: avoid 404 after deleting template zones and ui: correctly redirect after bulk deleting template zones) onto it. Pushed this branch to my fork and changed the PR base to apache:4.22 with the new head branch. Please let me know if anything else is needed. |
|
@dheeraj12347 , I think you still need to rebase your two commits on 4.22 as now 127 merged commits from main are in your PR and these are not supposed to go on 4.22. should do the trick. after that you need to force push your branch to your fork. |
@DaanHoogland, I created a fresh branch from upstream/4.22, cherry‑picked only my two UI commits, and force‑pushed it over ui-template-bulk-delete-404-fix-4.22. git log --oneline upstream/4.22..ui-template-bulk-delete-404-fix-4.22-clean shows exactly these two commits only. |
@dheeraj12347 , I see 129 commits. It looks like you didn’t create your new branch form the head of 4.22 but from main. First |
I have made two commits as you have asked ... If in the commits you scroll down you will see my two commits .... That was the commit you are looking for or do I need to again change something?? |
all the other commits are on main, this means your commits are still based on main and if we merge this we merge all of main into 4.22. I do not know what you did but this is not the result of the git rebase, as I described it. |
|
@dheeraj12347 can you
this should result in only the commits on top of c79b33c remaining in the ui-template-bulk-delete-404-fix created PR. |
Description
Fixes an issue where the UI navigates to a 404 page after bulk deleting template zones from the Templates → Zones tab.
After this change, when all selected zones for a template are deleted, the UI redirects back to the Templates list view instead of showing the 404 screen. When some zones remain, the page stays on the template view as expected. [web:327][web:335]
Types of changes
How Has This Been Tested?