Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ui/src/components/view/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,14 @@
<template v-if="['isfeatured'].includes(column.key) && ['guestoscategory'].includes($route.path.split('/')[1])">
{{ record.isfeatured ? $t('label.yes') : $t('label.no') }}
</template>
<template v-if="['agentscount'].includes(column.key)">
<router-link
v-if="['managementserver'].includes($route.path.split('/')[1]) && $router.resolve('/host').matched[0].redirect !== '/exception/404'"
Comment on lines +868 to +870
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

Using .includes() with single-element arrays is less efficient than direct equality comparison. For checking a single value, consider using column.key === 'agentscount' instead of ['agentscount'].includes(column.key) for better performance and consistency with the majority of column checks in this file (e.g., lines 207, 210, 227, 230, 280, etc.). The same applies to the route path check on line 870 which could use $route.path.split('/')[1] === 'managementserver'.

Copilot uses AI. Check for mistakes.
:to="{ path: '/host', query: { managementserverid: record.id } }">
{{ text }}
</router-link>
<span v-else> {{ text }} </span>
</template>
<template v-if="column.key === 'order'">
<div class="shift-btns">
<a-tooltip
Expand Down
Loading