Skip to content

Commit 966b32c

Browse files
authored
ui: fix ssh keypair navigation (apache#5931)
Fixes apache#5930 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent 56a8852 commit 966b32c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

ui/src/components/view/ListView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ $t(text.toLowerCase()) }}</router-link>
101101
</span>
102102
<span v-else>
103-
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ text }}</router-link>
103+
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id && $route.path !== '/ssh'">{{ text }}</router-link>
104104
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ text }}</router-link>
105105
</span>
106106
</span>

ui/src/views/AutogenView.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,10 @@ export default {
840840
this.loading = true
841841
if (this.$route.params && this.$route.params.id) {
842842
params.id = this.$route.params.id
843+
if (['listSSHKeyPairs'].includes(this.apiName)) {
844+
delete params.id
845+
params.name = this.$route.params.id
846+
}
843847
if (this.$route.path.startsWith('/vmsnapshot/')) {
844848
params.vmsnapshotid = this.$route.params.id
845849
} else if (this.$route.path.startsWith('/ldapsetting/')) {

0 commit comments

Comments
 (0)