Skip to content

Commit 29ef82e

Browse files
authored
Merge pull request #790 from jschoiRR/europa-2026
[Mold Europa] 목록 화면 우클릭 누락 부분 수정
2 parents 0c008c3 + 276fec9 commit 29ef82e

1 file changed

Lines changed: 32 additions & 14 deletions

File tree

ui/src/components/view/ListView.vue

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,20 +1291,36 @@ export default {
12911291
return []
12921292
}
12931293
if (this.selectedRowKeys.length > 1) {
1294-
return this.actions.filter(action =>
1295-
action.groupAction &&
1296-
action.api in this.$store.getters.apis &&
1297-
('groupShow' in action ? action.groupShow(this.selectionList, this.$store.getters) : true)
1298-
)
1294+
return this.actions.map(action => {
1295+
if (!(action.api in this.$store.getters.apis)) {
1296+
return null
1297+
}
1298+
if (!action.groupAction) {
1299+
return null
1300+
}
1301+
const canShow = 'groupShow' in action ? action.groupShow(this.selectionList, this.$store.getters) : true
1302+
if (!canShow) {
1303+
return null
1304+
}
1305+
return { ...action, dataView: true }
1306+
}).filter(Boolean)
12991307
}
13001308
if (!this.contextQuickViewRecord) {
13011309
return []
13021310
}
1303-
return this.actions.filter(action =>
1304-
action.dataView &&
1305-
action.api in this.$store.getters.apis &&
1306-
('show' in action ? action.show(this.contextQuickViewRecord, this.$store.getters) : true)
1307-
)
1311+
return this.actions.map(action => {
1312+
if (!(action.api in this.$store.getters.apis)) {
1313+
return null
1314+
}
1315+
const canShow = 'show' in action ? action.show(this.contextQuickViewRecord, this.$store.getters) : true
1316+
if (!canShow) {
1317+
return null
1318+
}
1319+
if (!action.dataView && !action.listView) {
1320+
return null
1321+
}
1322+
return { ...action, dataView: action.dataView || action.listView || false }
1323+
}).filter(Boolean)
13081324
},
13091325
contextMenuTitle () {
13101326
if (this.selectedRowKeys.length > 1) {
@@ -1340,7 +1356,7 @@ export default {
13401356
this.closeContextQuickView()
13411357
return
13421358
}
1343-
if (!this.quickViewEnabled() || !this.actions || this.actions.length === 0) {
1359+
if (!this.quickViewEnabled(this.actions) || !this.actions || this.actions.length === 0) {
13441360
return
13451361
}
13461362
let record = null
@@ -1426,9 +1442,11 @@ export default {
14261442
'/tungstenpolicyset', '/tungstenroutingpolicy', '/firewallrule', '/tungstenfirewallpolicy'].includes(this.$route.path)
14271443
},
14281444
createPathBasedOnVmType: createPathBasedOnVmType,
1429-
quickViewEnabled (actions, columns, key) {
1430-
return actions.length > 0 &&
1431-
(columns && key === columns[0].dataIndex) &&
1445+
quickViewEnabled (actions = this.actions, columns = null, key = null) {
1446+
const hasActions = Array.isArray(actions) && actions.length > 0
1447+
const matchesFirstColumn = !columns || !key || (columns[0] && key === columns[0].dataIndex)
1448+
return hasActions &&
1449+
matchesFirstColumn &&
14321450
new RegExp(['/vm', '/desktop', '/kubernetes', '/ssh', '/userdata', '/vmgroup', '/affinitygroup', '/autoscalevmgroup',
14331451
'/volume', '/snapshot', '/vmsnapshot', '/backup', '/event', '/publicip', '/comment', '/asnumbers', '/guestvlans',
14341452
'/guestnetwork', '/vpc', '/vpncustomergateway', '/vnfapp', '/securitygroups', '/quotasummary',

0 commit comments

Comments
 (0)