You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by su...@apache.org on 2021/12/27 20:00:58 UTC

[cloudstack] branch 4.16 updated: Change UI VM deployment to show SSH keys only if user has keys (#5804)

This is an automated email from the ASF dual-hosted git repository.

sureshanaparti pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.16 by this push:
     new 19325d0  Change UI VM deployment to show SSH keys only if user has keys (#5804)
19325d0 is described below

commit 19325d02866b1216fce3ae3130c7768250444abd
Author: Gabriel Beims Bräscher <ga...@apache.org>
AuthorDate: Mon Dec 27 16:53:36 2021 -0300

    Change UI VM deployment to show SSH keys only if user has keys (#5804)
---
 ui/src/views/compute/DeployVM.vue | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue
index 1608e35..990d2ea 100644
--- a/ui/src/views/compute/DeployVM.vue
+++ b/ui/src/views/compute/DeployVM.vue
@@ -391,6 +391,7 @@
                 </template>
               </a-step>
               <a-step
+                v-if="isUserAllowedToListSshKeys"
                 :title="this.$t('label.sshkeypairs')"
                 :status="zoneSelected ? 'process' : 'wait'">
                 <template slot="description">
@@ -1059,6 +1060,9 @@ export default {
     showSecurityGroupSection () {
       return (this.networks.length > 0 && this.zone.securitygroupsenabled) || (this.zone && this.zone.networktype === 'Basic')
     },
+    isUserAllowedToListSshKeys () {
+      return Boolean('listSSHKeyPairs' in this.$store.getters.apis)
+    },
     dynamicScalingVmConfigValue () {
       return this.options.dynamicScalingVmConfig?.[0]?.value === 'true'
     },