Skip to content

Commit 2d4d370

Browse files
authored
ui: support isdynamicallyscalable param for iso (apache#9092)
Register/List/Update iso APIs already support isdynamicallyscalable parama. This PR makes them available in the UI. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent daf6b9d commit 2d4d370

3 files changed

Lines changed: 43 additions & 26 deletions

File tree

ui/src/config/section/image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export default {
231231
}
232232
return fields
233233
},
234-
details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size', 'bootable', 'isready', 'directdownload', 'isextractable', 'ispublic', 'isfeatured', 'crosszones', 'account', 'domain', 'created', 'userdatadetails', 'userdatapolicy', 'url'],
234+
details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size', 'bootable', 'isready', 'directdownload', 'isextractable', 'ispublic', 'isfeatured', 'isdynamicallyscalable', 'crosszones', 'account', 'domain', 'created', 'userdatadetails', 'userdatapolicy', 'url'],
235235
searchFilters: () => {
236236
var filters = ['name', 'zoneid', 'tags']
237237
if (['Admin', 'DomainAdmin'].includes(store.getters.userInfo.roletype)) {

ui/src/views/image/RegisterOrUploadIso.vue

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -227,29 +227,39 @@
227227
</a-col>
228228
</a-row>
229229

230-
<a-form-item ref="isextractable" name="isextractable">
231-
<template #label>
232-
<tooltip-label :title="$t('label.isextractable')" :tooltip="apiParams.isextractable.description"/>
233-
</template>
234-
<a-switch v-model:checked="form.isextractable" />
235-
</a-form-item>
236-
237-
<a-form-item
238-
ref="ispublic"
239-
name="ispublic"
240-
v-if="$store.getters.userInfo.roletype === 'Admin' || $store.getters.features.userpublictemplateenabled" >
241-
<template #label>
242-
<tooltip-label :title="$t('label.ispublic')" :tooltip="apiParams.ispublic.description"/>
243-
</template>
244-
<a-switch v-model:checked="form.ispublic" />
245-
</a-form-item>
246-
247-
<a-form-item ref="isfeatured" name="isfeatured" v-if="$store.getters.userInfo.roletype === 'Admin'">
248-
<template #label>
249-
<tooltip-label :title="$t('label.isfeatured')" :tooltip="apiParams.isfeatured.description"/>
250-
</template>
251-
<a-switch v-model:checked="form.isfeatured" />
252-
</a-form-item>
230+
<a-row :gutter="12">
231+
<a-col :md="24" :lg="12">
232+
<a-form-item ref="isdynamicallyscalable" name="isdynamicallyscalable">
233+
<template #label>
234+
<tooltip-label :title="$t('label.isdynamicallyscalable')" :tooltip="apiParams.isdynamicallyscalable.description"/>
235+
</template>
236+
<a-switch v-model:checked="form.isdynamicallyscalable" />
237+
</a-form-item>
238+
<a-form-item
239+
ref="ispublic"
240+
name="ispublic"
241+
v-if="$store.getters.userInfo.roletype === 'Admin' || $store.getters.features.userpublictemplateenabled" >
242+
<template #label>
243+
<tooltip-label :title="$t('label.ispublic')" :tooltip="apiParams.ispublic.description"/>
244+
</template>
245+
<a-switch v-model:checked="form.ispublic" />
246+
</a-form-item>
247+
</a-col>
248+
<a-col :md="24" :lg="12">
249+
<a-form-item ref="isextractable" name="isextractable">
250+
<template #label>
251+
<tooltip-label :title="$t('label.isextractable')" :tooltip="apiParams.isextractable.description"/>
252+
</template>
253+
<a-switch v-model:checked="form.isextractable" />
254+
</a-form-item>
255+
<a-form-item ref="isfeatured" name="isfeatured" v-if="$store.getters.userInfo.roletype === 'Admin'">
256+
<template #label>
257+
<tooltip-label :title="$t('label.isfeatured')" :tooltip="apiParams.isfeatured.description"/>
258+
</template>
259+
<a-switch v-model:checked="form.isfeatured" />
260+
</a-form-item>
261+
</a-col>
262+
</a-row>
253263

254264
<div :span="24" class="action-button">
255265
<a-button @click="closeAction">{{ $t('label.cancel') }}</a-button>
@@ -332,7 +342,8 @@ export default {
332342
this.form = reactive({
333343
bootable: true,
334344
isextractable: false,
335-
ispublic: false
345+
ispublic: false,
346+
isdynamicallyscalable: false
336347
})
337348
this.rules = reactive({
338349
url: [{ required: true, message: this.$t('label.upload.iso.from.local') }],

ui/src/views/image/UpdateISO.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@
6161
</a-select-option>
6262
</a-select>
6363
</a-form-item>
64+
<a-form-item name="isdynamicallyscalable" ref="isdynamicallyscalable">
65+
<template #label>
66+
<tooltip-label :title="$t('label.isdynamicallyscalable')" :tooltip="apiParams.isdynamicallyscalable.description"/>
67+
</template>
68+
<a-switch v-model:checked="form.isdynamicallyscalable" />
69+
</a-form-item>
6470

6571
<a-row :gutter="12">
6672
<a-col :md="24" :lg="12">
@@ -162,7 +168,7 @@ export default {
162168
displaytext: [{ required: true, message: this.$t('message.error.required.input') }],
163169
ostypeid: [{ required: true, message: this.$t('message.error.select') }]
164170
})
165-
const resourceFields = ['name', 'displaytext', 'ostypeid', 'userdataid', 'userdatapolicy']
171+
const resourceFields = ['name', 'displaytext', 'ostypeid', 'isdynamicallyscalable', 'userdataid', 'userdatapolicy']
166172
167173
for (var field of resourceFields) {
168174
var fieldValue = this.resource[field]

0 commit comments

Comments
 (0)