This is an automated email from the ASF dual-hosted git repository.
weizhou pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push:
new 2d4d370be80 ui: support isdynamicallyscalable param for iso (#9092)
2d4d370be80 is described below
commit 2d4d370be802e4363326932b8741e0bd6743ff5e
Author: Abhishek Kumar <[email protected]>
AuthorDate: Fri May 24 21:18:27 2024 +0530
ui: support isdynamicallyscalable param for iso (#9092)
Register/List/Update iso APIs already support isdynamicallyscalable
parama. This PR makes them available in the UI.
Signed-off-by: Abhishek Kumar <[email protected]>
---
ui/src/config/section/image.js | 2 +-
ui/src/views/image/RegisterOrUploadIso.vue | 59 ++++++++++++++++++------------
ui/src/views/image/UpdateISO.vue | 8 +++-
3 files changed, 43 insertions(+), 26 deletions(-)
diff --git a/ui/src/config/section/image.js b/ui/src/config/section/image.js
index 7a5d52d1b89..aa21b262037 100644
--- a/ui/src/config/section/image.js
+++ b/ui/src/config/section/image.js
@@ -231,7 +231,7 @@ export default {
}
return fields
},
- details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size',
'bootable', 'isready', 'directdownload', 'isextractable', 'ispublic',
'isfeatured', 'crosszones', 'account', 'domain', 'created', 'userdatadetails',
'userdatapolicy', 'url'],
+ details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size',
'bootable', 'isready', 'directdownload', 'isextractable', 'ispublic',
'isfeatured', 'isdynamicallyscalable', 'crosszones', 'account', 'domain',
'created', 'userdatadetails', 'userdatapolicy', 'url'],
searchFilters: () => {
var filters = ['name', 'zoneid', 'tags']
if (['Admin',
'DomainAdmin'].includes(store.getters.userInfo.roletype)) {
diff --git a/ui/src/views/image/RegisterOrUploadIso.vue
b/ui/src/views/image/RegisterOrUploadIso.vue
index 1a461ee6bf6..f27676b8e7f 100644
--- a/ui/src/views/image/RegisterOrUploadIso.vue
+++ b/ui/src/views/image/RegisterOrUploadIso.vue
@@ -227,29 +227,39 @@
</a-col>
</a-row>
- <a-form-item ref="isextractable" name="isextractable">
- <template #label>
- <tooltip-label :title="$t('label.isextractable')"
:tooltip="apiParams.isextractable.description"/>
- </template>
- <a-switch v-model:checked="form.isextractable" />
- </a-form-item>
-
- <a-form-item
- ref="ispublic"
- name="ispublic"
- v-if="$store.getters.userInfo.roletype === 'Admin' ||
$store.getters.features.userpublictemplateenabled" >
- <template #label>
- <tooltip-label :title="$t('label.ispublic')"
:tooltip="apiParams.ispublic.description"/>
- </template>
- <a-switch v-model:checked="form.ispublic" />
- </a-form-item>
-
- <a-form-item ref="isfeatured" name="isfeatured"
v-if="$store.getters.userInfo.roletype === 'Admin'">
- <template #label>
- <tooltip-label :title="$t('label.isfeatured')"
:tooltip="apiParams.isfeatured.description"/>
- </template>
- <a-switch v-model:checked="form.isfeatured" />
- </a-form-item>
+ <a-row :gutter="12">
+ <a-col :md="24" :lg="12">
+ <a-form-item ref="isdynamicallyscalable"
name="isdynamicallyscalable">
+ <template #label>
+ <tooltip-label :title="$t('label.isdynamicallyscalable')"
:tooltip="apiParams.isdynamicallyscalable.description"/>
+ </template>
+ <a-switch v-model:checked="form.isdynamicallyscalable" />
+ </a-form-item>
+ <a-form-item
+ ref="ispublic"
+ name="ispublic"
+ v-if="$store.getters.userInfo.roletype === 'Admin' ||
$store.getters.features.userpublictemplateenabled" >
+ <template #label>
+ <tooltip-label :title="$t('label.ispublic')"
:tooltip="apiParams.ispublic.description"/>
+ </template>
+ <a-switch v-model:checked="form.ispublic" />
+ </a-form-item>
+ </a-col>
+ <a-col :md="24" :lg="12">
+ <a-form-item ref="isextractable" name="isextractable">
+ <template #label>
+ <tooltip-label :title="$t('label.isextractable')"
:tooltip="apiParams.isextractable.description"/>
+ </template>
+ <a-switch v-model:checked="form.isextractable" />
+ </a-form-item>
+ <a-form-item ref="isfeatured" name="isfeatured"
v-if="$store.getters.userInfo.roletype === 'Admin'">
+ <template #label>
+ <tooltip-label :title="$t('label.isfeatured')"
:tooltip="apiParams.isfeatured.description"/>
+ </template>
+ <a-switch v-model:checked="form.isfeatured" />
+ </a-form-item>
+ </a-col>
+ </a-row>
<div :span="24" class="action-button">
<a-button @click="closeAction">{{ $t('label.cancel') }}</a-button>
@@ -332,7 +342,8 @@ export default {
this.form = reactive({
bootable: true,
isextractable: false,
- ispublic: false
+ ispublic: false,
+ isdynamicallyscalable: false
})
this.rules = reactive({
url: [{ required: true, message:
this.$t('label.upload.iso.from.local') }],
diff --git a/ui/src/views/image/UpdateISO.vue b/ui/src/views/image/UpdateISO.vue
index 4d7140df165..92386823c16 100644
--- a/ui/src/views/image/UpdateISO.vue
+++ b/ui/src/views/image/UpdateISO.vue
@@ -61,6 +61,12 @@
</a-select-option>
</a-select>
</a-form-item>
+ <a-form-item name="isdynamicallyscalable" ref="isdynamicallyscalable">
+ <template #label>
+ <tooltip-label :title="$t('label.isdynamicallyscalable')"
:tooltip="apiParams.isdynamicallyscalable.description"/>
+ </template>
+ <a-switch v-model:checked="form.isdynamicallyscalable" />
+ </a-form-item>
<a-row :gutter="12">
<a-col :md="24" :lg="12">
@@ -162,7 +168,7 @@ export default {
displaytext: [{ required: true, message:
this.$t('message.error.required.input') }],
ostypeid: [{ required: true, message: this.$t('message.error.select')
}]
})
- const resourceFields = ['name', 'displaytext', 'ostypeid', 'userdataid',
'userdatapolicy']
+ const resourceFields = ['name', 'displaytext', 'ostypeid',
'isdynamicallyscalable', 'userdataid', 'userdatapolicy']
for (var field of resourceFields) {
var fieldValue = this.resource[field]