From 276fec99679aca858db5c49d7ca7447ec85ea0d4 Mon Sep 17 00:00:00 2001 From: JS Choi <77760789+jschoiRR@users.noreply.github.com> Date: Wed, 11 Mar 2026 10:06:43 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EC=9A=B0=ED=81=B4=EB=A6=AD=20=EB=88=84=EB=9D=BD=20=EB=B6=80?= =?UTF-8?q?=EB=B6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/components/view/ListView.vue | 46 ++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/ui/src/components/view/ListView.vue b/ui/src/components/view/ListView.vue index 831fe1a79ea0..86a2665807fa 100644 --- a/ui/src/components/view/ListView.vue +++ b/ui/src/components/view/ListView.vue @@ -1291,20 +1291,36 @@ export default { return [] } if (this.selectedRowKeys.length > 1) { - return this.actions.filter(action => - action.groupAction && - action.api in this.$store.getters.apis && - ('groupShow' in action ? action.groupShow(this.selectionList, this.$store.getters) : true) - ) + return this.actions.map(action => { + if (!(action.api in this.$store.getters.apis)) { + return null + } + if (!action.groupAction) { + return null + } + const canShow = 'groupShow' in action ? action.groupShow(this.selectionList, this.$store.getters) : true + if (!canShow) { + return null + } + return { ...action, dataView: true } + }).filter(Boolean) } if (!this.contextQuickViewRecord) { return [] } - return this.actions.filter(action => - action.dataView && - action.api in this.$store.getters.apis && - ('show' in action ? action.show(this.contextQuickViewRecord, this.$store.getters) : true) - ) + return this.actions.map(action => { + if (!(action.api in this.$store.getters.apis)) { + return null + } + const canShow = 'show' in action ? action.show(this.contextQuickViewRecord, this.$store.getters) : true + if (!canShow) { + return null + } + if (!action.dataView && !action.listView) { + return null + } + return { ...action, dataView: action.dataView || action.listView || false } + }).filter(Boolean) }, contextMenuTitle () { if (this.selectedRowKeys.length > 1) { @@ -1340,7 +1356,7 @@ export default { this.closeContextQuickView() return } - if (!this.quickViewEnabled() || !this.actions || this.actions.length === 0) { + if (!this.quickViewEnabled(this.actions) || !this.actions || this.actions.length === 0) { return } let record = null @@ -1426,9 +1442,11 @@ export default { '/tungstenpolicyset', '/tungstenroutingpolicy', '/firewallrule', '/tungstenfirewallpolicy'].includes(this.$route.path) }, createPathBasedOnVmType: createPathBasedOnVmType, - quickViewEnabled (actions, columns, key) { - return actions.length > 0 && - (columns && key === columns[0].dataIndex) && + quickViewEnabled (actions = this.actions, columns = null, key = null) { + const hasActions = Array.isArray(actions) && actions.length > 0 + const matchesFirstColumn = !columns || !key || (columns[0] && key === columns[0].dataIndex) + return hasActions && + matchesFirstColumn && new RegExp(['/vm', '/desktop', '/kubernetes', '/ssh', '/userdata', '/vmgroup', '/affinitygroup', '/autoscalevmgroup', '/volume', '/snapshot', '/vmsnapshot', '/backup', '/event', '/publicip', '/comment', '/asnumbers', '/guestvlans', '/guestnetwork', '/vpc', '/vpncustomergateway', '/vnfapp', '/securitygroups', '/quotasummary',