ui: Add quickview to the list of VM Snapshot (#4614)

This PR is used to fix the Quick access menu bar missing for VM Snapshots
Fixes #4607
This commit is contained in:
Hoang Nguyen 2021-01-27 17:03:35 +07:00 committed by GitHub
parent c5b1fec11b
commit 2a7f84eafd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -93,6 +93,12 @@
<span v-else>{{ text }}</span>
</template>
<a slot="displayname" slot-scope="text, record" href="javascript:;">
<QuickView
style="margin-left: 5px"
:actions="actions"
:resource="record"
:enabled="quickViewEnabled() && actions.length > 0 && columns && columns[0].dataIndex === 'displayname' "
@exec-action="$parent.execAction"/>
<router-link :to="{ path: $route.path + '/' + record.id }">{{ text }}</router-link>
</a>
<span slot="username" slot-scope="text, record" href="javascript:;">
@ -404,7 +410,7 @@ export default {
methods: {
quickViewEnabled () {
return new RegExp(['/vm', '/kubernetes', '/ssh', '/vmgroup', '/affinitygroup',
'/volume', '/snapshot', '/backup',
'/volume', '/snapshot', '/vmsnapshot', '/backup',
'/guestnetwork', '/vpc', '/vpncustomergateway',
'/template', '/iso',
'/project', '/account',