ui: fix ssh keypair navigation (#5931)

Fixes #5930

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2022-02-04 18:29:47 +05:30 committed by GitHub
parent 56a8852c4c
commit 966b32c234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -100,7 +100,7 @@
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ $t(text.toLowerCase()) }}</router-link>
</span>
<span v-else>
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ text }}</router-link>
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id && $route.path !== '/ssh'">{{ text }}</router-link>
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ text }}</router-link>
</span>
</span>

View File

@ -840,6 +840,10 @@ export default {
this.loading = true
if (this.$route.params && this.$route.params.id) {
params.id = this.$route.params.id
if (['listSSHKeyPairs'].includes(this.apiName)) {
delete params.id
params.name = this.$route.params.id
}
if (this.$route.path.startsWith('/vmsnapshot/')) {
params.vmsnapshotid = this.$route.params.id
} else if (this.$route.path.startsWith('/ldapsetting/')) {