|
49 | 49 | </div> |
50 | 50 | </template> |
51 | 51 | <template #bodyCell="{ column, text, record }"> |
52 | | - <template v-if="['name', 'provider'].includes(column.key) "> |
| 52 | + <template v-if="['name', 'provider'].includes(column.key)"> |
53 | 53 | <span |
54 | 54 | v-if="['vm', 'vnfapp'].includes($route.path.split('/')[1])" |
55 | 55 | style="margin-right: 5px" |
|
70 | 70 | style="margin-left: 5px" |
71 | 71 | :actions="actions" |
72 | 72 | :resource="record" |
73 | | - :enabled="quickViewEnabled() && actions.length > 0 && columns && ['name', 'provider'].includes(columns[0].dataIndex)" |
| 73 | + :enabled="quickViewEnabled(actions, columns, column.key)" |
74 | 74 | @exec-action="$parent.execAction" |
75 | 75 | /> |
76 | 76 | <span |
|
257 | 257 | style="margin-right: 8px" |
258 | 258 | :actions="actions" |
259 | 259 | :resource="record" |
260 | | - :enabled="quickViewEnabled() && actions.length > 0" |
| 260 | + :enabled="quickViewEnabled(actions, columns, column.key)" |
261 | 261 | @exec-action="$parent.execAction" |
262 | 262 | /> |
263 | 263 | <span v-if="record.intervaltype===0"> |
|
282 | 282 | style="margin-left: 5px" |
283 | 283 | :actions="actions" |
284 | 284 | :resource="record" |
285 | | - :enabled="quickViewEnabled() && actions.length > 0 && columns && columns[0].dataIndex === 'displayname' " |
| 285 | + :enabled="quickViewEnabled(actions, columns, column.key)" |
286 | 286 | @exec-action="$parent.execAction" |
287 | 287 | /> |
288 | 288 | <router-link :to="{ path: $route.path + '/' + record.id }">{{ text }}</router-link> |
|
436 | 436 | style="margin-left: 5px" |
437 | 437 | :actions="actions" |
438 | 438 | :resource="record" |
439 | | - :enabled="quickViewEnabled() && actions.length > 0 && columns && columns[0].dataIndex === 'hypervisor' " |
| 439 | + :enabled="quickViewEnabled(actions, columns, column.key)" |
440 | 440 | @exec-action="$parent.execAction" |
441 | 441 | /> |
442 | 442 | <router-link :to="{ path: $route.path + '/' + record.id }">{{ text }}</router-link> |
|
845 | 845 | style="margin-left: 5px" |
846 | 846 | :actions="actions" |
847 | 847 | :resource="record" |
848 | | - :enabled="quickViewEnabled() && actions.length > 0" |
| 848 | + :enabled="quickViewEnabled(actions, columns, column.key)" |
849 | 849 | @exec-action="$parent.execAction" |
850 | 850 | /> |
851 | 851 | </template> |
@@ -1208,17 +1208,19 @@ export default { |
1208 | 1208 | '/tungstenpolicyset', '/tungstenroutingpolicy', '/firewallrule', '/tungstenfirewallpolicy'].includes(this.$route.path) |
1209 | 1209 | }, |
1210 | 1210 | createPathBasedOnVmType: createPathBasedOnVmType, |
1211 | | - quickViewEnabled () { |
1212 | | - return new RegExp(['/vm', '/kubernetes', '/ssh', '/userdata', '/vmgroup', '/affinitygroup', '/autoscalevmgroup', |
1213 | | - '/volume', '/snapshot', '/vmsnapshot', '/backup', |
1214 | | - '/guestnetwork', '/vpc', '/vpncustomergateway', '/vnfapp', |
1215 | | - '/template', '/iso', |
1216 | | - '/project', '/account', 'buckets', 'objectstore', |
1217 | | - '/zone', '/pod', '/cluster', '/host', '/storagepool', '/imagestore', '/systemvm', '/router', '/ilbvm', '/annotation', |
1218 | | - '/computeoffering', '/systemoffering', '/diskoffering', '/backupoffering', '/networkoffering', '/vpcoffering', |
1219 | | - '/tungstenfabric', '/oauthsetting', '/guestos', '/guestoshypervisormapping', '/webhook', 'webhookdeliveries', 'webhookfilters', '/quotatariff', '/sharedfs', |
1220 | | - '/ipv4subnets', '/managementserver', '/gpucard', '/gpudevices', '/vgpuprofile', '/extension', '/snapshotpolicy', '/backupschedule'].join('|')) |
1221 | | - .test(this.$route.path) |
| 1211 | + quickViewEnabled (actions, columns, key) { |
| 1212 | + return actions.length > 0 && |
| 1213 | + (columns && key === columns[0].dataIndex) && |
| 1214 | + new RegExp(['/vm', '/kubernetes', '/ssh', '/userdata', '/vmgroup', '/affinitygroup', '/autoscalevmgroup', |
| 1215 | + '/volume', '/snapshot', '/vmsnapshot', '/backup', |
| 1216 | + '/guestnetwork', '/vpc', '/vpncustomergateway', '/vnfapp', |
| 1217 | + '/template', '/iso', |
| 1218 | + '/project', '/account', 'buckets', 'objectstore', |
| 1219 | + '/zone', '/pod', '/cluster', '/host', '/storagepool', '/imagestore', '/systemvm', '/router', '/ilbvm', '/annotation', |
| 1220 | + '/computeoffering', '/systemoffering', '/diskoffering', '/backupoffering', '/networkoffering', '/vpcoffering', |
| 1221 | + '/tungstenfabric', '/oauthsetting', '/guestos', '/guestoshypervisormapping', '/webhook', 'webhookdeliveries', 'webhookfilters', '/quotatariff', '/sharedfs', |
| 1222 | + '/ipv4subnets', '/managementserver', '/gpucard', '/gpudevices', '/vgpuprofile', '/extension', '/snapshotpolicy', '/backupschedule'].join('|')) |
| 1223 | + .test(this.$route.path) |
1222 | 1224 | }, |
1223 | 1225 | enableGroupAction () { |
1224 | 1226 | return ['vm', 'alert', 'vmgroup', 'ssh', 'userdata', 'affinitygroup', 'autoscalevmgroup', 'volume', 'snapshot', |
|
0 commit comments