fix(ui): restore Account column hyperlink routing in list views (#13639)#13642
Conversation
There was a problem hiding this comment.
Pull request overview
Restores the Account column’s router-link behavior in ListView table cells by preventing non-Quota list views from falling back to an unclickable <span> for administrators/domain admins.
Changes:
- Adds an explicit
/accountroute link for non-Userroles when rendering theaccountcolumn outside of QuotaSummary. - Keeps the existing QuotaSummary-specific routing to
${$route.path}/${record.accountid}when the target route exists.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <router-link | ||
| v-else-if="$store.getters.userInfo.roletype !== 'User'" | ||
| :to="{ path: '/account', query: { name: text, domainid: record.domainid, dataView: true } }" | ||
| >{{ (record.projectname || record.account).concat(' (').concat($t('label.project')).concat(')') }}</router-link> | ||
| <span v-else>{{ text }}</span> |
|
thanks @Chinmay048 @winterhazel could you review ? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13642 +/- ##
============================================
- Coverage 19.65% 19.64% -0.01%
+ Complexity 19792 19790 -2
============================================
Files 6368 6368
Lines 575107 575107
Branches 70370 70370
============================================
- Hits 113016 112997 -19
- Misses 449808 449826 +18
- Partials 12283 12284 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@blueorangutan packge |
|
@winterhazel a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
There was a problem hiding this comment.
@Chinmay048 to restore the previous behavior, I would change the block that begins with <template v-if="text"> (line 693 in your commit) to:
<template v-if="text">
<template v-if="!text.startsWith('PrjAcct-')">
<router-link
v-if="$route.path.startsWith('/quotasummary')"
:to="{ path: `${$route.path}/${record.accountid}` }">{{ text }}</router-link>
<router-link v-else-if="record.accountid" :to="{ path: '/account/' + record.accountid }">{{ text }}</router-link>
<router-link
v-else-if="$store.getters.userInfo.roletype !== 'User'"
:to="{ path: '/account', query: { name: record.account, domainid: record.domainid, dataView: true } }">
{{ text }}
</router-link>
<span v-else>{{ text }}</span>
</template>
<template v-else-if="$route.path.startsWith('/quotasummary')">
<router-link :to="{ path: `${$route.path}/${record.accountid}` }">
{{ (record.projectname || record.account).concat(' (').concat($t('label.project')).concat(')') }}
</router-link>
</template>
</template>The difference is that, previously, records belonging to a project that for some reason include the account field, with the project's account, in their response did not render anything in the Account column. The way ListView.vue is now allows it to render.
|
Hi @winterhazel, thank you for the review! I have updated |
| </template> | ||
|
|
||
| <template v-if="column.key === 'clustername'"> | ||
| <template v-if="column.key === 'clustername'"> |
There was a problem hiding this comment.
@Chinmay048 could you remove this indentation change from the PR?
| </template> | ||
|
|
||
| <template v-if="column.key === 'clustername'"> | ||
| <template v-if="column.key === 'clustername'"> |
There was a problem hiding this comment.
@Chinmay048 could you remove this indentation change from the PR?
| </template> | ||
| </template> | ||
| <template v-if="text"> | ||
| <template v-else-if="text"> |
There was a problem hiding this comment.
This is changing the original behavior. Use just v-if instead.
|
I have pushed an updated commit that completely reverts the accidental whitespace/indentation change on the |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
ui/src/components/view/ListView.vue:658
- The
<template v-if="column.key === 'clustername'">line lost its indentation relative to the surroundingbodyCelltemplates, making this block inconsistent and harder to read. Please restore the previous indentation level.
<template v-if="column.key === 'clustername'">
ui/src/components/view/ListView.vue:697
- This account link is currently rendered for any role when
record.accountidis present. Elsewhere in this sameaccountcell (e.g. therecord.ownerblock), account navigation is restricted to non-Userroles; regular users shouldn’t get a clickable account link here either.
<router-link v-else-if="record.accountid" :to="{ path: '/account/' + record.accountid }">{{ text }}</router-link>
@Chinmay048 the indentation changes were still present in commit 9e98d68. I have reverted them. It looks good now. I'll just build the UI and do some manual checking before merging. |
|
Trying again... |
|
@winterhazel a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
winterhazel
left a comment
There was a problem hiding this comment.
Tested, and its looks ok.
I verified that the account column now displays a hyperlink to the respective account's details page in listings except the quota summary, and that account hyperlinks in the quota summary page still work as intended.
|
Awesome work, congrats on your first merged pull request! |


Fixes #13639
Root Cause:
The block in ListView.vue contained an overly specific conditional check for /quotasummary that fell back to rendering a plain, unclickable for all other views, breaking general account hyperlink routing across tables.
Solution:
Added an explicit v-else-if routing check for /account to restore navigation for administrators and domain admins in non-Quota views, aligning with the existing record.owner routing architecture.
How Has This Been Tested?
Verified locally in cloud workspace:
npm run lint — 0 AST/formatting errors.
npm run test:unit — 4 test suites passed, 175 total tests passed cleanly.