You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ha...@apache.org on 2021/02/03 05:36:57 UTC

[cloudstack] 02/06: UI changes

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

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

commit 4a65590eaef0455044f995719202e2d245eb9598
Author: Harikrishna Patnala <ha...@gmail.com>
AuthorDate: Mon Feb 1 11:43:06 2021 +0530

    UI changes
---
 ui/src/views/compute/DeployVM.vue            | 11 +++++++++++
 ui/src/views/offering/AddComputeOffering.vue | 15 +++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/ui/src/views/compute/DeployVM.vue b/ui/src/views/compute/DeployVM.vue
index bee2a38..f2271b3 100644
--- a/ui/src/views/compute/DeployVM.vue
+++ b/ui/src/views/compute/DeployVM.vue
@@ -501,6 +501,15 @@
                         v-decorator="['bootintosetup']">
                       </a-switch>
                     </a-form-item>
+                    <a-form-item>
+                      <span slot="label">
+                        {{ $t('label.isdynamicallyscalable') }}
+                        <a-tooltip :title="$t('label.isdynamicallyscalable')">
+                          <a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
+                        </a-tooltip>
+                      </span>
+                      <a-switch v-decorator="['dynamicscalingenabled', {initialValue: dynamicscalingenabled}]" :checked="dynamicscalingenabled" @change="val => { dynamicscalingenabled = val }"/>
+                    </a-form-item>
                     <a-form-item :label="$t('label.userdata')">
                       <a-textarea
                         v-decorator="['userdata']">
@@ -663,6 +672,7 @@ export default {
       podId: null,
       clusterId: null,
       zoneSelected: false,
+      dynamicscalingenabled: true,
       vm: {
         name: null,
         zoneid: null,
@@ -1404,6 +1414,7 @@ export default {
         deployVmData.keyboard = values.keyboard
         deployVmData.boottype = values.boottype
         deployVmData.bootmode = values.bootmode
+        deployVmData.dynamicscalingenabled = values.dynamicscalingenabled
         if (values.userdata && values.userdata.length > 0) {
           deployVmData.userdata = encodeURIComponent(btoa(this.sanitizeReverse(values.userdata)))
         }
diff --git a/ui/src/views/offering/AddComputeOffering.vue b/ui/src/views/offering/AddComputeOffering.vue
index fe5895d..e14afe5 100644
--- a/ui/src/views/offering/AddComputeOffering.vue
+++ b/ui/src/views/offering/AddComputeOffering.vue
@@ -531,6 +531,15 @@
           </span>
           <a-switch v-decorator="['offerha', {initialValue: false}]" />
         </a-form-item>
+        <a-form-item>
+          <span slot="label">
+            {{ $t('label.isdynamicallyscalable') }}
+            <a-tooltip :title="apiParams.dynamicscalingenabled.description">
+              <a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
+            </a-tooltip>
+          </span>
+          <a-switch v-decorator="['dynamicscalingenabled', {initialValue: dynamicscalingenabled}]" :checked="dynamicscalingenabled" @change="val => { dynamicscalingenabled = val }"/>
+        </a-form-item>
         <a-form-item v-if="this.isAdmin()">
           <span slot="label">
             {{ $t('label.hosttags') }}
@@ -796,7 +805,8 @@ export default {
       ],
       vGpuVisible: false,
       vGpuTypes: [],
-      loading: false
+      loading: false,
+      dynamicscalingenabled: true
     }
   },
   beforeCreate () {
@@ -960,7 +970,8 @@ export default {
           cachemode: values.cachemode,
           customized: values.offeringtype !== 'fixed',
           offerha: values.offerha === true,
-          limitcpuuse: values.limitcpuuse === true
+          limitcpuuse: values.limitcpuuse === true,
+          dynamicscalingenabled: values.dynamicscalingenabled
         }
 
         // custom fields (begin)